From 9714a4bbf1a938871240640002c9dd369133c766 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Wed, 13 Feb 2013 16:55:43 -0500 Subject: Defer "backend-died" alerts to EShell. --- modules/calendar/e-cal-shell-sidebar.c | 19 +++---------------- modules/calendar/e-memo-shell-sidebar.c | 19 +++---------------- modules/calendar/e-task-shell-sidebar.c | 19 +++---------------- 3 files changed, 9 insertions(+), 48 deletions(-) (limited to 'modules/calendar') diff --git a/modules/calendar/e-cal-shell-sidebar.c b/modules/calendar/e-cal-shell-sidebar.c index aafae792e1..b7ab5516f7 100644 --- a/modules/calendar/e-cal-shell-sidebar.c +++ b/modules/calendar/e-cal-shell-sidebar.c @@ -162,32 +162,19 @@ static void cal_shell_sidebar_backend_died_cb (ECalShellSidebar *cal_shell_sidebar, ECalClient *client) { - EShellView *shell_view; - EShellContent *shell_content; - EShellSidebar *shell_sidebar; GHashTable *client_table; ESource *source; - const gchar *uid; + gchar *uid; client_table = cal_shell_sidebar->priv->client_table; - shell_sidebar = E_SHELL_SIDEBAR (cal_shell_sidebar); - shell_view = e_shell_sidebar_get_shell_view (shell_sidebar); - shell_content = e_shell_view_get_shell_content (shell_view); - source = e_client_get_source (E_CLIENT (client)); - uid = e_source_get_uid (source); - - g_object_ref (source); + uid = e_source_dup_uid (source); g_hash_table_remove (client_table, uid); cal_shell_sidebar_emit_status_message (cal_shell_sidebar, NULL); - e_alert_submit ( - E_ALERT_SINK (shell_content), - "calendar:calendar-crashed", NULL); - - g_object_unref (source); + g_free (uid); } static void diff --git a/modules/calendar/e-memo-shell-sidebar.c b/modules/calendar/e-memo-shell-sidebar.c index 24e6f841d1..138b78d306 100644 --- a/modules/calendar/e-memo-shell-sidebar.c +++ b/modules/calendar/e-memo-shell-sidebar.c @@ -159,32 +159,19 @@ static void memo_shell_sidebar_backend_died_cb (EMemoShellSidebar *memo_shell_sidebar, ECalClient *client) { - EShellView *shell_view; - EShellContent *shell_content; - EShellSidebar *shell_sidebar; GHashTable *client_table; ESource *source; - const gchar *uid; + gchar *uid; client_table = memo_shell_sidebar->priv->client_table; - shell_sidebar = E_SHELL_SIDEBAR (memo_shell_sidebar); - shell_view = e_shell_sidebar_get_shell_view (shell_sidebar); - shell_content = e_shell_view_get_shell_content (shell_view); - source = e_client_get_source (E_CLIENT (client)); - uid = e_source_get_uid (source); - - g_object_ref (source); + uid = e_source_dup_uid (source); g_hash_table_remove (client_table, uid); memo_shell_sidebar_emit_status_message (memo_shell_sidebar, NULL); - e_alert_submit ( - E_ALERT_SINK (shell_content), - "calendar:memos-crashed", NULL); - - g_object_unref (source); + g_free (uid); } static void diff --git a/modules/calendar/e-task-shell-sidebar.c b/modules/calendar/e-task-shell-sidebar.c index dc25f3921a..b353f8a6e1 100644 --- a/modules/calendar/e-task-shell-sidebar.c +++ b/modules/calendar/e-task-shell-sidebar.c @@ -159,32 +159,19 @@ static void task_shell_sidebar_backend_died_cb (ETaskShellSidebar *task_shell_sidebar, ECalClient *client) { - EShellView *shell_view; - EShellContent *shell_content; - EShellSidebar *shell_sidebar; GHashTable *client_table; ESource *source; - const gchar *uid; + gchar *uid; client_table = task_shell_sidebar->priv->client_table; - shell_sidebar = E_SHELL_SIDEBAR (task_shell_sidebar); - shell_view = e_shell_sidebar_get_shell_view (shell_sidebar); - shell_content = e_shell_view_get_shell_content (shell_view); - source = e_client_get_source (E_CLIENT (client)); - uid = e_source_get_uid (source); - - g_object_ref (source); + uid = e_source_dup_uid (source); g_hash_table_remove (client_table, uid); task_shell_sidebar_emit_status_message (task_shell_sidebar, NULL); - e_alert_submit ( - E_ALERT_SINK (shell_content), - "calendar:tasks-crashed", NULL); - - g_object_unref (source); + g_free (uid); } static void -- cgit v1.2.3