diff options
author | Matthew Barnes <mbarnes@src.gnome.org> | 2009-03-21 03:06:59 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@src.gnome.org> | 2009-03-21 03:06:59 +0800 |
commit | 4cec9fc7169dc3b810321555a70cda916720867d (patch) | |
tree | 8fe739ab0d249fb35bedc572bd34b3717512283b /shell | |
parent | 7a92d9cc82b7775a0f5cb1fde233119d435a79b6 (diff) | |
download | gsoc2013-evolution-4cec9fc7169dc3b810321555a70cda916720867d.tar gsoc2013-evolution-4cec9fc7169dc3b810321555a70cda916720867d.tar.gz gsoc2013-evolution-4cec9fc7169dc3b810321555a70cda916720867d.tar.bz2 gsoc2013-evolution-4cec9fc7169dc3b810321555a70cda916720867d.tar.lz gsoc2013-evolution-4cec9fc7169dc3b810321555a70cda916720867d.tar.xz gsoc2013-evolution-4cec9fc7169dc3b810321555a70cda916720867d.tar.zst gsoc2013-evolution-4cec9fc7169dc3b810321555a70cda916720867d.zip |
Saving progress on a massive attachment handling rewrite.
svn path=/branches/kill-bonobo/; revision=37465
Diffstat (limited to 'shell')
-rw-r--r-- | shell/e-shell.c | 14 | ||||
-rw-r--r-- | shell/main.c | 16 |
2 files changed, 23 insertions, 7 deletions
diff --git a/shell/e-shell.c b/shell/e-shell.c index 6e52d8bbef..5de46bcc65 100644 --- a/shell/e-shell.c +++ b/shell/e-shell.c @@ -170,12 +170,19 @@ shell_ready_for_offline (EShell *shell, if (!is_last_ref) return; + /* Increment the reference count so we can safely emit + * a signal without triggering the toggle reference. */ + g_object_ref (activity); + e_activity_complete (activity); g_object_remove_toggle_ref ( G_OBJECT (activity), (GToggleNotify) shell_ready_for_offline, shell); + /* Finalize the activity. */ + g_object_unref (activity); + shell->priv->online = FALSE; g_object_notify (G_OBJECT (shell), "online"); @@ -217,12 +224,19 @@ shell_ready_for_online (EShell *shell, if (!is_last_ref) return; + /* Increment the reference count so we can safely emit + * a signal without triggering the toggle reference. */ + g_object_ref (activity); + e_activity_complete (activity); g_object_remove_toggle_ref ( G_OBJECT (activity), (GToggleNotify) shell_ready_for_online, shell); + /* Finalize the activity. */ + g_object_unref (activity); + shell->priv->online = TRUE; g_object_notify (G_OBJECT (shell), "online"); diff --git a/shell/main.c b/shell/main.c index 6b15768e07..bf0a8c47c6 100644 --- a/shell/main.c +++ b/shell/main.c @@ -618,13 +618,15 @@ create_default_shell (void) shell, "window-destroyed", G_CALLBACK (shell_window_destroyed_cb), NULL); - g_signal_connect ( - master_client, "save_yourself", - G_CALLBACK (master_client_save_yourself_cb), shell); - - g_signal_connect ( - master_client, "die", - G_CALLBACK (master_client_die_cb), shell); + if (master_client != NULL) { + g_signal_connect ( + master_client, "save_yourself", + G_CALLBACK (master_client_save_yourself_cb), shell); + + g_signal_connect ( + master_client, "die", + G_CALLBACK (master_client_die_cb), shell); + } g_object_unref (conf_client); |