GNOME Bugzilla – Bug 641087
Wish: GtkApplication::window-added signal
Last modified: 2011-05-31 23:14:00 UTC
Associating a new window with a GtkApplication is a useful event for applications and/or plugins to listen for. Would be nice if gtk_application_add_window() emitted a signal that includes the new GtkWindow. A method pointer for this signal in the GtkApplicationClass struct would be nice too if it's not too late to break ABI. Evolution's EShell emits such a signal, which we connect to in numerous places. http://library.gnome.org/devel/eshell/stable/EShell.html#e-shell-watch-window
Created attachment 179756 [details] [review] Proposed patch The class struct has some padding so this doesn't break ABI after all.
Gah, the padding value in the header should be reduced by 1, not 4.
I guess it goes without saying that if you add added, you should also add removed ?
For a window-removed signal to be useful it would also need to include the GtkWindow while it's still a GtkWindow, and I see that gtk_application_remove_window() is called during gtk_window_finalize() so I wasn't sure if there would be lifecycle issues with that. If not then yes I agree.
Ah, that is probably true