aboutsummaryrefslogtreecommitdiffstats
path: root/modules/calendar/e-memo-shell-sidebar.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2010-07-09 20:29:51 +0800
committerMilan Crha <mcrha@redhat.com>2010-07-09 20:29:51 +0800
commit03d626856b294bc98919ac244e04e9b8821a681d (patch)
tree62433e158f1791aa6b9222ecbe05d164c4703f6c /modules/calendar/e-memo-shell-sidebar.c
parent6d4ce8571ff62a3e489999d2feeac1691e06c59a (diff)
downloadgsoc2013-evolution-03d626856b294bc98919ac244e04e9b8821a681d.tar.gz
gsoc2013-evolution-03d626856b294bc98919ac244e04e9b8821a681d.tar.zst
gsoc2013-evolution-03d626856b294bc98919ac244e04e9b8821a681d.zip
Bug #623204 - Be able to report detailed errors from backends
Diffstat (limited to 'modules/calendar/e-memo-shell-sidebar.c')
-rw-r--r--modules/calendar/e-memo-shell-sidebar.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/modules/calendar/e-memo-shell-sidebar.c b/modules/calendar/e-memo-shell-sidebar.c
index 416759213e..75245c2d87 100644
--- a/modules/calendar/e-memo-shell-sidebar.c
+++ b/modules/calendar/e-memo-shell-sidebar.c
@@ -171,7 +171,7 @@ memo_shell_sidebar_backend_error_cb (EMemoShellSidebar *memo_shell_sidebar,
static void
memo_shell_sidebar_client_opened_cb (EMemoShellSidebar *memo_shell_sidebar,
- ECalendarStatus status,
+ const GError *error,
ECal *client)
{
EShellView *shell_view;
@@ -183,12 +183,12 @@ memo_shell_sidebar_client_opened_cb (EMemoShellSidebar *memo_shell_sidebar,
shell_view = e_shell_sidebar_get_shell_view (shell_sidebar);
shell_window = e_shell_view_get_shell_window (shell_view);
- if (status == E_CALENDAR_STATUS_AUTHENTICATION_FAILED ||
- status == E_CALENDAR_STATUS_AUTHENTICATION_REQUIRED)
+ if (g_error_matches (error, E_CALENDAR_ERROR, E_CALENDAR_STATUS_AUTHENTICATION_FAILED) ||
+ g_error_matches (error, E_CALENDAR_ERROR, E_CALENDAR_STATUS_AUTHENTICATION_REQUIRED))
e_auth_cal_forget_password (client);
/* Handle errors. */
- switch (status) {
+ switch (error ? error->code : E_CALENDAR_STATUS_OK) {
case E_CALENDAR_STATUS_OK:
break;
@@ -213,7 +213,7 @@ memo_shell_sidebar_client_opened_cb (EMemoShellSidebar *memo_shell_sidebar,
return;
}
- g_assert (status == E_CALENDAR_STATUS_OK);
+ g_assert (error == NULL);
g_signal_handlers_disconnect_matched (
client, G_SIGNAL_MATCH_FUNC, 0, 0, NULL,
@@ -227,7 +227,7 @@ memo_shell_sidebar_client_opened_cb (EMemoShellSidebar *memo_shell_sidebar,
static void
memo_shell_sidebar_default_opened_cb (EMemoShellSidebar *memo_shell_sidebar,
- ECalendarStatus status,
+ const GError *error,
ECal *client)
{
EShellView *shell_view;
@@ -236,12 +236,12 @@ memo_shell_sidebar_default_opened_cb (EMemoShellSidebar *memo_shell_sidebar,
shell_sidebar = E_SHELL_SIDEBAR (memo_shell_sidebar);
shell_view = e_shell_sidebar_get_shell_view (shell_sidebar);
- if (status == E_CALENDAR_STATUS_AUTHENTICATION_FAILED ||
- status == E_CALENDAR_STATUS_AUTHENTICATION_REQUIRED)
+ if (g_error_matches (error, E_CALENDAR_ERROR, E_CALENDAR_STATUS_AUTHENTICATION_FAILED) ||
+ g_error_matches (error, E_CALENDAR_ERROR, E_CALENDAR_STATUS_AUTHENTICATION_REQUIRED))
e_auth_cal_forget_password (client);
/* Handle errors. */
- switch (status) {
+ switch (error ? error->code : E_CALENDAR_STATUS_OK) {
case E_CALENDAR_STATUS_OK:
break;
@@ -259,7 +259,7 @@ memo_shell_sidebar_default_opened_cb (EMemoShellSidebar *memo_shell_sidebar,
return;
}
- g_assert (status == E_CALENDAR_STATUS_OK);
+ g_assert (error == NULL);
g_signal_handlers_disconnect_matched (
client, G_SIGNAL_MATCH_FUNC, 0, 0, NULL,
@@ -301,7 +301,7 @@ memo_shell_sidebar_set_default (EMemoShellSidebar *memo_shell_sidebar,
g_return_if_fail (client != NULL);
g_signal_connect_swapped (
- client, "cal-opened",
+ client, "cal-opened-ex",
G_CALLBACK (memo_shell_sidebar_default_opened_cb),
memo_shell_sidebar);
@@ -894,7 +894,7 @@ e_memo_shell_sidebar_add_source (EMemoShellSidebar *memo_shell_sidebar,
g_free (message);
g_signal_connect_swapped (
- client, "cal-opened",
+ client, "cal-opened-ex",
G_CALLBACK (memo_shell_sidebar_client_opened_cb),
memo_shell_sidebar);