|
Bug or feature? I don't really know.
Anyway I had to make some changes in Gtk::Application, because
applications that used Gtk::ApplicationWindow instead of
Gtk::Window crashed. See
https://bugzilla.gnome.org/show_bug.cgi?id=681323#c1.
The new version 3.5.13 is more like the example programs shipped with gtk+, so I suppose it's more like the developers of glib and gtk+ think it shall be done. The problem for you is that if you add Gio::APPLICATION_HANDLES_COMMAND_LINE, the default implementation of virtual function local_command_line() does not emit the activate signal, which is now necessary, or else the window will not be added to the application and shown. If you use Gio::APPLICATION_HANDLES_COMMAND_LINE you must either override Gio::Application:local_command_line_vfunc() in a subclass, or (easier) connect to Gio::Application::signal_command_line(). In your signal handler, handle the command line arguments and then call Gio::Application::activate(). There is a long description of Gio::Application:run() at http://developer.gnome.org/glibmm/unstable/classGio_1_1Application.html. Read carefully and slowly, it's not easy to understand all the details. Kjell 2012-10-12 21:40, Фамилия Имя skrev:
|