diff options
author | Milan Crha <mcrha@redhat.com> | 2010-07-09 20:29:51 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2010-07-09 20:29:51 +0800 |
commit | 03d626856b294bc98919ac244e04e9b8821a681d (patch) | |
tree | 62433e158f1791aa6b9222ecbe05d164c4703f6c /modules/calendar/e-cal-shell-sidebar.c | |
parent | 6d4ce8571ff62a3e489999d2feeac1691e06c59a (diff) | |
download | gsoc2013-evolution-03d626856b294bc98919ac244e04e9b8821a681d.tar gsoc2013-evolution-03d626856b294bc98919ac244e04e9b8821a681d.tar.gz gsoc2013-evolution-03d626856b294bc98919ac244e04e9b8821a681d.tar.bz2 gsoc2013-evolution-03d626856b294bc98919ac244e04e9b8821a681d.tar.lz gsoc2013-evolution-03d626856b294bc98919ac244e04e9b8821a681d.tar.xz 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-cal-shell-sidebar.c')
-rw-r--r-- | modules/calendar/e-cal-shell-sidebar.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/modules/calendar/e-cal-shell-sidebar.c b/modules/calendar/e-cal-shell-sidebar.c index 4dfa2ecb2d..4299c07746 100644 --- a/modules/calendar/e-cal-shell-sidebar.c +++ b/modules/calendar/e-cal-shell-sidebar.c @@ -177,7 +177,7 @@ cal_shell_sidebar_backend_error_cb (ECalShellSidebar *cal_shell_sidebar, static void cal_shell_sidebar_client_opened_cb (ECalShellSidebar *cal_shell_sidebar, - ECalendarStatus status, + const GError *error, ECal *client) { EShellView *shell_view; @@ -189,12 +189,12 @@ cal_shell_sidebar_client_opened_cb (ECalShellSidebar *cal_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; @@ -219,7 +219,7 @@ cal_shell_sidebar_client_opened_cb (ECalShellSidebar *cal_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, @@ -233,7 +233,7 @@ cal_shell_sidebar_client_opened_cb (ECalShellSidebar *cal_shell_sidebar, static void cal_shell_sidebar_default_opened_cb (ECalShellSidebar *cal_shell_sidebar, - ECalendarStatus status, + const GError *error, ECal *client) { EShellView *shell_view; @@ -242,12 +242,12 @@ cal_shell_sidebar_default_opened_cb (ECalShellSidebar *cal_shell_sidebar, shell_sidebar = E_SHELL_SIDEBAR (cal_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; @@ -265,7 +265,7 @@ cal_shell_sidebar_default_opened_cb (ECalShellSidebar *cal_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, @@ -307,7 +307,7 @@ cal_shell_sidebar_set_default (ECalShellSidebar *cal_shell_sidebar, g_return_if_fail (client != NULL); g_signal_connect_swapped ( - client, "cal-opened", + client, "cal-opened-ex", G_CALLBACK (cal_shell_sidebar_default_opened_cb), cal_shell_sidebar); @@ -1008,7 +1008,7 @@ e_cal_shell_sidebar_add_source (ECalShellSidebar *cal_shell_sidebar, g_free (message); g_signal_connect_swapped ( - client, "cal-opened", + client, "cal-opened-ex", G_CALLBACK (cal_shell_sidebar_client_opened_cb), cal_shell_sidebar); |