[glade--]New startup for gtkmm2 needed in glademm-1.1.1c



I noticed this tonight too:

Glademm-1.1.1c is still writing the main() function with the old gtkmm-1.2 style instead of the new style:

This:
int main(int argc, char **argv)
{  
   
   Gtk::Main m(&argc, &argv);
   manage(new class mainWindow());
   m.run();
   return 0;
}


Should now be:
int main(int argc, char **argv)
{  
   
   Gtk::Main m(&argc, &argv);
   mainWindow window;
   Gtk::Main::run(window);
   return 0;
}

It is noted in the change docs:
http://cvs.gnome.org/lxr/source/gtkmm-root/base/CHANGES
http://cvs.gnome.org/lxr/source/gtkmm-root/base/PORTING

And, demonstrated here:
http://gtkmm.sourceforge.net/gtkmm2/docs/tutorial/html/ch03.html

I hope I am reporting something that has not already been reported.

The difference is that with the new way, no event handling is needed for closing the window.  And, it avoids this message:
gtkmm-WARNING **: gtkmm: Attempt to call Gtk::manage() on a Gtk::Window, but a Gtk::Window has no parent container to manage its lifetime.

Mark





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]