Report error to user when fails to open calendar/task/memo list

This commit is contained in:
Milan Crha
2010-07-16 14:27:56 +02:00
parent 8b5dc5fcb1
commit efc1898b70
4 changed files with 54 additions and 0 deletions

View File

@ -271,6 +271,24 @@
<button stock ="gtk-ok" response="GTK_RESPONSE_YES"/>
</error>
<error id="failed-open-calendar" type="error" default="GTK_RESPONSE_YES">
<_primary>Error loading calendar</_primary>
<secondary>{0}</secondary>
<button stock ="gtk-ok" response="GTK_RESPONSE_YES"/>
</error>
<error id="failed-open-tasks" type="error" default="GTK_RESPONSE_YES">
<_primary>Error loading task list</_primary>
<secondary>{0}</secondary>
<button stock ="gtk-ok" response="GTK_RESPONSE_YES"/>
</error>
<error id="failed-open-memos" type="error" default="GTK_RESPONSE_YES">
<_primary>Error loading memo list</_primary>
<secondary>{0}</secondary>
<button stock ="gtk-ok" response="GTK_RESPONSE_YES"/>
</error>
<error id="server-version" type="warning">
<_primary>Some features may not work properly with your current server.</_primary>
<_secondary>You are connecting to an unsupported GroupWise server and may encounter problems using Evolution. For best results, the server should be upgraded to a supported version.</_secondary>

View File

@ -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));

View File

@ -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));

View File

@ -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));