GNOME Bugzilla – Bug 640042
GtkApplication's warning about not connecting to the activate signal is annoying
Last modified: 2011-03-04 14:19:27 UTC
GtkApplication warns at runtime if you don't connect a signal to the GtkApplication::activate signal. That's the ideal way to do things, but it's not strictly necessary. It's annoying for people to have to connect an empty signal handler just to get rid of that warning. This warning will also be seen often by people who override the default signal handler (set the vfunc) instead of connecting a signal handler, which is legitimate, and easily done in gtkmm by overriding a virtual method. That's because those people commonly call the base class implementation's default signal handler from their own handler - which I think you call "chaining up".
The warning lives in g_application_real_activate
The _real function can verify that it is the function in the vtable before issuing the warning (ie: ensure that it wasn't called just because of a chainup). We should probably do that. Would this be sufficient? Is there a use case where it is even a little bit reasonable to neither override nor connect to the activate signal? How do you know when a remote activation occurs?
I've made it so
Well maybe I misunderstand what "remote activation is" - I thought it was to do with single instance apps. The documentation assumes that you already know what it's talking about. I guess that I'm allowed to not care about "remote activation", and that that is valid.
Created attachment 182076 [details] [review] 0001-GApplication-Check-more-before-warning-about-a-missi.patch Permission to add the same check for g_application_real_command_line() with this patch?
Matthias OKed the patch on irc.