Some fixes for memory leaks, issue #657
Added Gtk:manage() on widgets and some destructors.
This commit is contained in:
@@ -53,7 +53,7 @@ RTWindow::RTWindow () {
|
||||
mainNB->set_scrollable (true);
|
||||
mainNB->signal_switch_page().connect_notify( sigc::mem_fun(*this, &RTWindow::on_mainNB_switch_page) );
|
||||
|
||||
fpanel = new FilePanel ();
|
||||
fpanel = Gtk::manage ( new FilePanel () );
|
||||
fpanel->setParent (this);
|
||||
|
||||
// decorate tab
|
||||
@@ -62,7 +62,7 @@ RTWindow::RTWindow () {
|
||||
|
||||
Gtk::VBox* vbf = Gtk::manage (new Gtk::VBox ());
|
||||
vbf->pack_start (*Gtk::manage (new Gtk::Image (Gtk::Stock::DIRECTORY, Gtk::ICON_SIZE_MENU)));
|
||||
Gtk::Label* l=new Gtk::Label (Glib::ustring(" ") + M("MAIN_FRAME_FILEBROWSER"));
|
||||
Gtk::Label* l= Gtk::manage(new Gtk::Label (Glib::ustring(" ") + M("MAIN_FRAME_FILEBROWSER")));
|
||||
l->set_angle (90);
|
||||
vbf->pack_start (*l);
|
||||
vbf->set_spacing (2);
|
||||
@@ -77,22 +77,22 @@ RTWindow::RTWindow () {
|
||||
mainNB->append_page (*fpanel, *hbf);
|
||||
}
|
||||
|
||||
bpanel = new BatchQueuePanel ();
|
||||
bpanel = Gtk::manage ( new BatchQueuePanel () );
|
||||
bpanel->setParent (this);
|
||||
|
||||
// decorate tab, the label is unimportant since its updated in batchqueuepanel anyway
|
||||
Gtk::Label* lbq = new Gtk::Label (M("MAIN_FRAME_BATCHQUEUE"));
|
||||
Gtk::Label* lbq = Gtk::manage ( new Gtk::Label (M("MAIN_FRAME_BATCHQUEUE")) );
|
||||
mainNB->append_page (*bpanel, *lbq);
|
||||
|
||||
// epanel is only for single tab mode
|
||||
epanel = new EditorPanel (fpanel);
|
||||
epanel = Gtk::manage ( new EditorPanel (fpanel) );
|
||||
epanel->setParent (this);
|
||||
|
||||
// decorate tab
|
||||
if (options.mainNBVertical) {
|
||||
Gtk::VBox* vbe = Gtk::manage (new Gtk::VBox ());
|
||||
vbe->pack_start (*Gtk::manage (new Gtk::Image (argv0+"/images/logoicon16.png")));
|
||||
Gtk::Label* l=new Gtk::Label( Glib::ustring(" ") + M("MAIN_FRAME_EDITOR") );
|
||||
Gtk::Label* l=Gtk::manage (new Gtk::Label( Glib::ustring(" ") + M("MAIN_FRAME_EDITOR") ));
|
||||
//l->set_markup(Glib::ustring("<b>Editor</b>")); Bold difficult to read
|
||||
l->set_angle (90);
|
||||
vbe->pack_start (*l);
|
||||
|
Reference in New Issue
Block a user