From 224f26b84d9c12b0dd1d337f51c14b6ebb901007 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sun, 4 Sep 2011 09:48:24 -0400 Subject: GtkApplication has some new EShell-like features. I pushed a few EShell features up to GtkApplication for GTK+ 3.2, so we can now trim off the redundancies in EShell. 1) GtkApplication has a new "window-added" signal which replaces EShell's own "window-created" signal. 2) GtkApplication has a new "window-removed" signal which replaces EShell's own "window-destroyed" signal. 3) gtk_application_get_windows() now returns a list of windows sorted by most recently focused, replacing e_shell_get_watched_windows(). 4) GtkApplication now provides enough hooks to subclasses that we can remove e_shell_watch_window() and call gtk_application_add_window() directly. --- modules/offline-alert/evolution-offline-alert.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'modules/offline-alert') diff --git a/modules/offline-alert/evolution-offline-alert.c b/modules/offline-alert/evolution-offline-alert.c index 9fb5d2a60c..c685815b17 100644 --- a/modules/offline-alert/evolution-offline-alert.c +++ b/modules/offline-alert/evolution-offline-alert.c @@ -97,10 +97,11 @@ offline_alert_network_available_cb (EShell *shell, } static void -offline_alert_window_created_cb (EShell *shell, - GtkWindow *window, - EOfflineAlert *extension) +offline_alert_window_added_cb (GtkApplication *application, + GtkWindow *window, + EOfflineAlert *extension) { + EShell *shell = E_SHELL (application); GtkAction *action; if (!E_IS_SHELL_WINDOW (window)) @@ -118,7 +119,7 @@ offline_alert_window_created_cb (EShell *shell, G_CALLBACK (offline_alert_network_available_cb), extension); g_signal_handlers_disconnect_by_func ( - shell, offline_alert_window_created_cb, extension); + shell, offline_alert_window_added_cb, extension); if (e_shell_get_online (shell)) return; @@ -175,8 +176,8 @@ offline_alert_constructed (GObject *object) /* Watch for the first EShellWindow. */ g_signal_connect ( - shell, "window-created", - G_CALLBACK (offline_alert_window_created_cb), extension); + shell, "window-added", + G_CALLBACK (offline_alert_window_added_cb), extension); /* Chain up to parent's constructed() method. */ G_OBJECT_CLASS (e_offline_alert_parent_class)->constructed (object); -- cgit v1.2.3