- Don't keep a RefPtr to the glade file

git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@1115 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
tchernobog 2006-09-12 20:29:47 +00:00
parent cf4b4d050e
commit af19489348
2 changed files with 6 additions and 8 deletions

View File

@ -28,6 +28,7 @@
#include <sgpemv2/simulation.hh>
#include <sgpemv2/resource.hh>
#include <gtkmm/button.h>
#include <gtkmm/main.h>
#include <gtkmm/messagedialog.h>
@ -41,13 +42,14 @@ using Gnome::Glade::Xml;
JumpToDialog::JumpToDialog(BaseObjectType* cobject, const RefPtr<Xml>& glade) :
Dialog(cobject), _glade(glade), _target_instant(0)
Dialog(cobject), _target_instant(0)
{
_glade->get_widget("Button.Stop", _stop_button);
_glade->get_widget("ProgressBar", _progress);
Button* stop_button;
glade->get_widget("Button.Stop", stop_button);
glade->get_widget("ProgressBar", _progress);
// Attach signal handlers for the Stop button
_stop_button->signal_clicked().connect(sigc::mem_fun(*this, &JumpToDialog::_on_stop));
stop_button->signal_clicked().connect(sigc::mem_fun(*this, &JumpToDialog::_on_stop));
signal_show().connect(sigc::mem_fun(*this, &JumpToDialog::_on_jump));
signal_response().connect(sigc::hide(sigc::mem_fun(*this, &JumpToDialog::hide)));
}

View File

@ -25,7 +25,6 @@
#include <sgpemv2/simulation_observer.hh>
#include <gtkmm/button.h>
#include <gtkmm/dialog.h>
#include <gtkmm/progressbar.h>
#include <libglademm/xml.h>
@ -49,9 +48,6 @@ namespace sgpem
void update(const Simulation& changed_simulation);
Glib::RefPtr<Gnome::Glade::Xml> _glade;
Gtk::Button* _stop_button;
Gtk::ProgressBar* _progress;
unsigned int _target_instant;