diff options
author | Milan Crha <mcrha@redhat.com> | 2010-12-15 00:44:16 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@gnome-db.org> | 2011-06-30 00:41:11 +0800 |
commit | 4231716442dc6bca34a563a17c068d126b37ea7c (patch) | |
tree | 53d1367972f62f1f867fcf0f06909af0b31c2484 /modules/calendar | |
parent | f18f55f251bcf12d7320b2f442daa0dcb1c40908 (diff) | |
download | gsoc2013-evolution-4231716442dc6bca34a563a17c068d126b37ea7c.tar.gz gsoc2013-evolution-4231716442dc6bca34a563a17c068d126b37ea7c.tar.zst gsoc2013-evolution-4231716442dc6bca34a563a17c068d126b37ea7c.zip |
Show common addressbook and calendar errors in an alert sink
Diffstat (limited to 'modules/calendar')
-rw-r--r-- | modules/calendar/e-cal-shell-sidebar.c | 13 | ||||
-rw-r--r-- | modules/calendar/e-memo-shell-sidebar.c | 13 | ||||
-rw-r--r-- | modules/calendar/e-task-shell-sidebar.c | 13 |
3 files changed, 9 insertions, 30 deletions
diff --git a/modules/calendar/e-cal-shell-sidebar.c b/modules/calendar/e-cal-shell-sidebar.c index 81ab858186..45bb5a37fb 100644 --- a/modules/calendar/e-cal-shell-sidebar.c +++ b/modules/calendar/e-cal-shell-sidebar.c @@ -161,13 +161,11 @@ cal_shell_sidebar_client_opened_cb (ECalShellSidebar *cal_shell_sidebar, ECal *client) { EShellView *shell_view; - EShellWindow *shell_window; EShellSidebar *shell_sidebar; const gchar *message; shell_sidebar = E_SHELL_SIDEBAR (cal_shell_sidebar); shell_view = e_shell_sidebar_get_shell_view (shell_sidebar); - shell_window = e_shell_view_get_shell_window (shell_view); if (g_error_matches (error, E_CALENDAR_ERROR, E_CALENDAR_STATUS_AUTHENTICATION_FAILED) || @@ -188,16 +186,14 @@ cal_shell_sidebar_client_opened_cb (ECalShellSidebar *cal_shell_sidebar, return; case E_CALENDAR_STATUS_REPOSITORY_OFFLINE: - e_alert_run_dialog_for_args ( - GTK_WINDOW (shell_window), + e_alert_submit (E_ALERT_SINK (e_shell_view_get_shell_content (shell_view)), "calendar:prompt-no-contents-offline-calendar", NULL); /* fall through */ default: if (error->code != E_CALENDAR_STATUS_REPOSITORY_OFFLINE) { - e_alert_run_dialog_for_args ( - GTK_WINDOW (shell_window), + e_alert_submit (E_ALERT_SINK (e_shell_view_get_shell_content (shell_view)), "calendar:failed-open-calendar", error->message, NULL); } @@ -226,7 +222,6 @@ cal_shell_sidebar_default_loaded_cb (ESource *source, EShellSidebar *shell_sidebar) { ECalShellSidebarPrivate *priv; - EShellWindow *shell_window; EShellView *shell_view; ECal *client; GError *error = NULL; @@ -234,7 +229,6 @@ cal_shell_sidebar_default_loaded_cb (ESource *source, priv = E_CAL_SHELL_SIDEBAR_GET_PRIVATE (shell_sidebar); shell_view = e_shell_sidebar_get_shell_view (shell_sidebar); - shell_window = e_shell_view_get_shell_window (shell_view); client = e_load_cal_source_finish (source, result, &error); @@ -243,8 +237,7 @@ cal_shell_sidebar_default_loaded_cb (ESource *source, goto exit; } else if (error != NULL) { - e_alert_run_dialog_for_args ( - GTK_WINDOW (shell_window), + e_alert_submit (E_ALERT_SINK (e_shell_view_get_shell_content (shell_view)), "calendar:failed-open-calendar", error->message, NULL); g_error_free (error); diff --git a/modules/calendar/e-memo-shell-sidebar.c b/modules/calendar/e-memo-shell-sidebar.c index 14d4b36e11..c22cff35dc 100644 --- a/modules/calendar/e-memo-shell-sidebar.c +++ b/modules/calendar/e-memo-shell-sidebar.c @@ -169,13 +169,11 @@ memo_shell_sidebar_client_opened_cb (EMemoShellSidebar *memo_shell_sidebar, ECal *client) { EShellView *shell_view; - EShellWindow *shell_window; EShellSidebar *shell_sidebar; const gchar *message; shell_sidebar = E_SHELL_SIDEBAR (memo_shell_sidebar); shell_view = e_shell_sidebar_get_shell_view (shell_sidebar); - shell_window = e_shell_view_get_shell_window (shell_view); if (g_error_matches (error, E_CALENDAR_ERROR, E_CALENDAR_STATUS_AUTHENTICATION_FAILED) || @@ -196,16 +194,14 @@ memo_shell_sidebar_client_opened_cb (EMemoShellSidebar *memo_shell_sidebar, return; case E_CALENDAR_STATUS_REPOSITORY_OFFLINE: - e_alert_run_dialog_for_args ( - GTK_WINDOW (shell_window), + e_alert_submit (get_alert_sink (shell_view), "calendar:prompt-no-contents-offline-memos", NULL); /* fall through */ default: if (error->code != E_CALENDAR_STATUS_REPOSITORY_OFFLINE) { - e_alert_run_dialog_for_args ( - GTK_WINDOW (shell_window), + e_alert_submit (get_alert_sink (shell_view), "calendar:failed-open-memos", error->message, NULL); } @@ -234,7 +230,6 @@ memo_shell_sidebar_default_loaded_cb (ESource *source, EShellSidebar *shell_sidebar) { EMemoShellSidebarPrivate *priv; - EShellWindow *shell_window; EShellView *shell_view; ECal *client; GError *error = NULL; @@ -242,7 +237,6 @@ memo_shell_sidebar_default_loaded_cb (ESource *source, priv = E_MEMO_SHELL_SIDEBAR_GET_PRIVATE (shell_sidebar); shell_view = e_shell_sidebar_get_shell_view (shell_sidebar); - shell_window = e_shell_view_get_shell_window (shell_view); client = e_load_cal_source_finish (source, result, &error); @@ -251,8 +245,7 @@ memo_shell_sidebar_default_loaded_cb (ESource *source, goto exit; } else if (error != NULL) { - e_alert_run_dialog_for_args ( - GTK_WINDOW (shell_window), + e_alert_submit (get_alert_sink (shell_view), "calendar:failed-open-memos", error->message, NULL); g_error_free (error); diff --git a/modules/calendar/e-task-shell-sidebar.c b/modules/calendar/e-task-shell-sidebar.c index 99bc67f8ad..a688da41cd 100644 --- a/modules/calendar/e-task-shell-sidebar.c +++ b/modules/calendar/e-task-shell-sidebar.c @@ -169,13 +169,11 @@ task_shell_sidebar_client_opened_cb (ETaskShellSidebar *task_shell_sidebar, ECal *client) { EShellView *shell_view; - EShellWindow *shell_window; EShellSidebar *shell_sidebar; const gchar *message; shell_sidebar = E_SHELL_SIDEBAR (task_shell_sidebar); shell_view = e_shell_sidebar_get_shell_view (shell_sidebar); - shell_window = e_shell_view_get_shell_window (shell_view); if (g_error_matches (error, E_CALENDAR_ERROR, E_CALENDAR_STATUS_AUTHENTICATION_FAILED) || @@ -196,16 +194,14 @@ task_shell_sidebar_client_opened_cb (ETaskShellSidebar *task_shell_sidebar, return; case E_CALENDAR_STATUS_REPOSITORY_OFFLINE: - e_alert_run_dialog_for_args ( - GTK_WINDOW (shell_window), + e_alert_submit (get_alert_sink (shell_view), "calendar:prompt-no-contents-offline-tasks", NULL); /* fall through */ default: if (error->code != E_CALENDAR_STATUS_REPOSITORY_OFFLINE) { - e_alert_run_dialog_for_args ( - GTK_WINDOW (shell_window), + e_alert_submit (get_alert_sink (shell_view), "calendar:failed-open-tasks", error->message, NULL); } @@ -234,7 +230,6 @@ task_shell_sidebar_default_loaded_cb (ESource *source, EShellSidebar *shell_sidebar) { ETaskShellSidebarPrivate *priv; - EShellWindow *shell_window; EShellView *shell_view; ECal *client; GError *error = NULL; @@ -242,7 +237,6 @@ task_shell_sidebar_default_loaded_cb (ESource *source, priv = E_TASK_SHELL_SIDEBAR_GET_PRIVATE (shell_sidebar); shell_view = e_shell_sidebar_get_shell_view (shell_sidebar); - shell_window = e_shell_view_get_shell_window (shell_view); client = e_load_cal_source_finish (source, result, &error); @@ -251,8 +245,7 @@ task_shell_sidebar_default_loaded_cb (ESource *source, goto exit; } else if (error != NULL) { - e_alert_run_dialog_for_args ( - GTK_WINDOW (shell_window), + e_alert_submit (get_alert_sink (shell_view), "calendar:failed-open-tasks", error->message, NULL); g_error_free (error); |