aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-02-14 05:55:43 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-02-17 07:57:09 +0800
commit9714a4bbf1a938871240640002c9dd369133c766 (patch)
tree99ffa3e5a7cbdb5f672909c62080a8ae5eb8d163 /modules
parent9551d47dd1a42d1cce29926957a82238f9514272 (diff)
downloadgsoc2013-evolution-9714a4bbf1a938871240640002c9dd369133c766.tar
gsoc2013-evolution-9714a4bbf1a938871240640002c9dd369133c766.tar.gz
gsoc2013-evolution-9714a4bbf1a938871240640002c9dd369133c766.tar.bz2
gsoc2013-evolution-9714a4bbf1a938871240640002c9dd369133c766.tar.lz
gsoc2013-evolution-9714a4bbf1a938871240640002c9dd369133c766.tar.xz
gsoc2013-evolution-9714a4bbf1a938871240640002c9dd369133c766.tar.zst
gsoc2013-evolution-9714a4bbf1a938871240640002c9dd369133c766.zip
Defer "backend-died" alerts to EShell.
Diffstat (limited to 'modules')
-rw-r--r--modules/calendar/e-cal-shell-sidebar.c19
-rw-r--r--modules/calendar/e-memo-shell-sidebar.c19
-rw-r--r--modules/calendar/e-task-shell-sidebar.c19
3 files changed, 9 insertions, 48 deletions
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