aboutsummaryrefslogtreecommitdiffstats
path: root/modules/calendar
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2010-07-16 20:27:56 +0800
committerMilan Crha <mcrha@redhat.com>2010-07-16 20:27:56 +0800
commitefc1898b70b78022bd8ec91cd54fb53c368ba714 (patch)
tree1d5568e2896165724105cd2e44dd5f0cc6334e63 /modules/calendar
parent8b5dc5fcb1ab4b9cf6fcb4dbeda41ece0c52c49e (diff)
downloadgsoc2013-evolution-efc1898b70b78022bd8ec91cd54fb53c368ba714.tar
gsoc2013-evolution-efc1898b70b78022bd8ec91cd54fb53c368ba714.tar.gz
gsoc2013-evolution-efc1898b70b78022bd8ec91cd54fb53c368ba714.tar.bz2
gsoc2013-evolution-efc1898b70b78022bd8ec91cd54fb53c368ba714.tar.lz
gsoc2013-evolution-efc1898b70b78022bd8ec91cd54fb53c368ba714.tar.xz
gsoc2013-evolution-efc1898b70b78022bd8ec91cd54fb53c368ba714.tar.zst
gsoc2013-evolution-efc1898b70b78022bd8ec91cd54fb53c368ba714.zip
Report error to user when fails to open calendar/task/memo list
Diffstat (limited to 'modules/calendar')
-rw-r--r--modules/calendar/e-cal-shell-sidebar.c12
-rw-r--r--modules/calendar/e-memo-shell-sidebar.c12
-rw-r--r--modules/calendar/e-task-shell-sidebar.c12
3 files changed, 36 insertions, 0 deletions
diff --git a/modules/calendar/e-cal-shell-sidebar.c b/modules/calendar/e-cal-shell-sidebar.c
index b8b7f4b03e..1cd4ba9619 100644
--- a/modules/calendar/e-cal-shell-sidebar.c
+++ b/modules/calendar/e-cal-shell-sidebar.c
@@ -215,6 +215,13 @@ cal_shell_sidebar_client_opened_cb (ECalShellSidebar *cal_shell_sidebar,
/* fall through */
default:
+ if (error->code != E_CALENDAR_STATUS_REPOSITORY_OFFLINE) {
+ e_alert_run_dialog_for_args (
+ GTK_WINDOW (shell_window),
+ "calendar:failed-open-calendar",
+ error->message, NULL);
+ }
+
e_cal_shell_sidebar_remove_source (
cal_shell_sidebar,
e_cal_get_source (client));
@@ -263,6 +270,11 @@ cal_shell_sidebar_default_opened_cb (ECalShellSidebar *cal_shell_sidebar,
return;
default:
+ e_alert_run_dialog_for_args (
+ GTK_WINDOW (e_shell_view_get_shell_window (shell_view)),
+ "calendar:failed-open-calendar",
+ error->message, NULL);
+
e_cal_shell_sidebar_remove_source (
cal_shell_sidebar,
e_cal_get_source (client));
diff --git a/modules/calendar/e-memo-shell-sidebar.c b/modules/calendar/e-memo-shell-sidebar.c
index c0001d19af..7b4b8f71b6 100644
--- a/modules/calendar/e-memo-shell-sidebar.c
+++ b/modules/calendar/e-memo-shell-sidebar.c
@@ -209,6 +209,13 @@ memo_shell_sidebar_client_opened_cb (EMemoShellSidebar *memo_shell_sidebar,
/* fall through */
default:
+ if (error->code != E_CALENDAR_STATUS_REPOSITORY_OFFLINE) {
+ e_alert_run_dialog_for_args (
+ GTK_WINDOW (shell_window),
+ "calendar:failed-open-memos",
+ error->message, NULL);
+ }
+
e_memo_shell_sidebar_remove_source (
memo_shell_sidebar,
e_cal_get_source (client));
@@ -257,6 +264,11 @@ memo_shell_sidebar_default_opened_cb (EMemoShellSidebar *memo_shell_sidebar,
return;
default:
+ e_alert_run_dialog_for_args (
+ GTK_WINDOW (e_shell_view_get_shell_window (shell_view)),
+ "calendar:failed-open-memos",
+ error->message, NULL);
+
e_memo_shell_sidebar_remove_source (
memo_shell_sidebar,
e_cal_get_source (client));
diff --git a/modules/calendar/e-task-shell-sidebar.c b/modules/calendar/e-task-shell-sidebar.c
index 4f870ec19a..8613b4eb0f 100644
--- a/modules/calendar/e-task-shell-sidebar.c
+++ b/modules/calendar/e-task-shell-sidebar.c
@@ -209,6 +209,13 @@ task_shell_sidebar_client_opened_cb (ETaskShellSidebar *task_shell_sidebar,
/* fall through */
default:
+ if (error->code != E_CALENDAR_STATUS_REPOSITORY_OFFLINE) {
+ e_alert_run_dialog_for_args (
+ GTK_WINDOW (shell_window),
+ "calendar:failed-open-tasks",
+ error->message, NULL);
+ }
+
e_task_shell_sidebar_remove_source (
task_shell_sidebar,
e_cal_get_source (client));
@@ -257,6 +264,11 @@ task_shell_sidebar_default_opened_cb (ETaskShellSidebar *task_shell_sidebar,
return;
default:
+ e_alert_run_dialog_for_args (
+ GTK_WINDOW (e_shell_view_get_shell_window (shell_view)),
+ "calendar:failed-open-tasks",
+ error->message, NULL);
+
e_task_shell_sidebar_remove_source (
task_shell_sidebar,
e_cal_get_source (client));