aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shell.c
diff options
context:
space:
mode:
Diffstat (limited to 'shell/e-shell.c')
-rw-r--r--shell/e-shell.c14
1 files changed, 14 insertions, 0 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");