diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2013-01-25 01:02:11 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2013-01-25 01:10:31 +0800 |
commit | 60c5c7170f5642a78a4fd2092e4e78caae8475d6 (patch) | |
tree | 70620e5c6207172473e96d405cfeb90f3eb6a205 /modules | |
parent | f3dfdae8458d08331551ce441be045f4dfaa8b77 (diff) | |
download | gsoc2013-evolution-60c5c7170f5642a78a4fd2092e4e78caae8475d6.tar gsoc2013-evolution-60c5c7170f5642a78a4fd2092e4e78caae8475d6.tar.gz gsoc2013-evolution-60c5c7170f5642a78a4fd2092e4e78caae8475d6.tar.bz2 gsoc2013-evolution-60c5c7170f5642a78a4fd2092e4e78caae8475d6.tar.lz gsoc2013-evolution-60c5c7170f5642a78a4fd2092e4e78caae8475d6.tar.xz gsoc2013-evolution-60c5c7170f5642a78a4fd2092e4e78caae8475d6.tar.zst gsoc2013-evolution-60c5c7170f5642a78a4fd2092e4e78caae8475d6.zip |
E_CLIENT_ERROR_BUSY is no longer used.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/calendar/e-cal-shell-sidebar.c | 71 | ||||
-rw-r--r-- | modules/calendar/e-memo-shell-sidebar.c | 71 | ||||
-rw-r--r-- | modules/calendar/e-task-shell-sidebar.c | 71 |
3 files changed, 0 insertions, 213 deletions
diff --git a/modules/calendar/e-cal-shell-sidebar.c b/modules/calendar/e-cal-shell-sidebar.c index 3a870257e7..5f736b088c 100644 --- a/modules/calendar/e-cal-shell-sidebar.c +++ b/modules/calendar/e-cal-shell-sidebar.c @@ -209,28 +209,6 @@ cal_shell_sidebar_retrieve_capabilies_cb (GObject *source_object, cal_shell_sidebar_emit_status_message (cal_shell_sidebar, NULL); } -static gboolean cal_shell_sidebar_retry_open_timeout_cb (gpointer user_data); - -struct RetryOpenData -{ - EClient *client; - ECalShellSidebar *cal_shell_sidebar; - GCancellable *cancellable; -}; - -static void -free_retry_open_data (gpointer data) -{ - struct RetryOpenData *rod = data; - - if (!rod) - return; - - g_object_unref (rod->client); - g_object_unref (rod->cancellable); - g_free (rod); -} - static void cal_shell_sidebar_client_opened_cb (GObject *source_object, GAsyncResult *result, @@ -255,24 +233,6 @@ cal_shell_sidebar_client_opened_cb (GObject *source_object, return; } - if (g_error_matches (error, E_CLIENT_ERROR, E_CLIENT_ERROR_BUSY)) { - struct RetryOpenData *rod; - - rod = g_new0 (struct RetryOpenData, 1); - rod->client = g_object_ref (client); - rod->cal_shell_sidebar = cal_shell_sidebar; - rod->cancellable = g_object_ref (cal_shell_sidebar->priv->loading_clients); - - /* postpone for 1/2 of a second, backend is busy now */ - g_timeout_add_full ( - G_PRIORITY_DEFAULT, 500, - cal_shell_sidebar_retry_open_timeout_cb, - rod, free_retry_open_data); - - g_clear_error (&error); - return; - } - shell_sidebar = E_SHELL_SIDEBAR (cal_shell_sidebar); shell_view = e_shell_sidebar_get_shell_view (shell_sidebar); shell_content = e_shell_view_get_shell_content (shell_view); @@ -284,15 +244,6 @@ cal_shell_sidebar_client_opened_cb (GObject *source_object, case -1: break; - case E_CLIENT_ERROR_BUSY: - g_warning ( - "%s: Cannot open '%s', it's busy (%s)", - G_STRFUNC, e_source_get_display_name (source), - error->message); - g_clear_error (&error); - g_object_unref (parent); - return; - case E_CLIENT_ERROR_REPOSITORY_OFFLINE: e_alert_submit ( E_ALERT_SINK (shell_content), @@ -329,28 +280,6 @@ cal_shell_sidebar_client_opened_cb (GObject *source_object, cal_shell_sidebar); } -static gboolean -cal_shell_sidebar_retry_open_timeout_cb (gpointer user_data) -{ - struct RetryOpenData *rod = user_data; - - g_return_val_if_fail (rod != NULL, FALSE); - g_return_val_if_fail (rod->client != NULL, FALSE); - g_return_val_if_fail (rod->cal_shell_sidebar != NULL, FALSE); - g_return_val_if_fail (rod->cancellable != NULL, FALSE); - - if (g_cancellable_is_cancelled (rod->cancellable)) - return FALSE; - - e_client_open ( - rod->client, FALSE, - rod->cal_shell_sidebar->priv->loading_clients, - cal_shell_sidebar_client_opened_cb, - rod->cal_shell_sidebar); - - return FALSE; -} - static void cal_shell_sidebar_default_loaded_cb (GObject *source_object, GAsyncResult *result, diff --git a/modules/calendar/e-memo-shell-sidebar.c b/modules/calendar/e-memo-shell-sidebar.c index 64e74663c1..5251763944 100644 --- a/modules/calendar/e-memo-shell-sidebar.c +++ b/modules/calendar/e-memo-shell-sidebar.c @@ -206,28 +206,6 @@ memo_shell_sidebar_retrieve_capabilies_cb (GObject *source_object, memo_shell_sidebar_emit_status_message (memo_shell_sidebar, NULL); } -static gboolean memo_shell_sidebar_retry_open_timeout_cb (gpointer user_data); - -struct RetryOpenData -{ - EClient *client; - EMemoShellSidebar *memo_shell_sidebar; - GCancellable *cancellable; -}; - -static void -free_retry_open_data (gpointer data) -{ - struct RetryOpenData *rod = data; - - if (!rod) - return; - - g_object_unref (rod->client); - g_object_unref (rod->cancellable); - g_free (rod); -} - static void memo_shell_sidebar_client_opened_cb (GObject *source_object, GAsyncResult *result, @@ -252,24 +230,6 @@ memo_shell_sidebar_client_opened_cb (GObject *source_object, return; } - if (g_error_matches (error, E_CLIENT_ERROR, E_CLIENT_ERROR_BUSY)) { - struct RetryOpenData *rod; - - rod = g_new0 (struct RetryOpenData, 1); - rod->client = g_object_ref (client); - rod->memo_shell_sidebar = memo_shell_sidebar; - rod->cancellable = g_object_ref (memo_shell_sidebar->priv->loading_clients); - - /* postpone for 1/2 of a second, backend is busy now */ - g_timeout_add_full ( - G_PRIORITY_DEFAULT, 500, - memo_shell_sidebar_retry_open_timeout_cb, - rod, free_retry_open_data); - - g_clear_error (&error); - return; - } - shell_sidebar = E_SHELL_SIDEBAR (memo_shell_sidebar); shell_view = e_shell_sidebar_get_shell_view (shell_sidebar); shell_content = e_shell_view_get_shell_content (shell_view); @@ -281,15 +241,6 @@ memo_shell_sidebar_client_opened_cb (GObject *source_object, case -1: break; - case E_CLIENT_ERROR_BUSY: - g_warning ( - "%s: Cannot open '%s', it's busy (%s)", - G_STRFUNC, e_source_get_display_name (source), - error->message); - g_clear_error (&error); - g_object_unref (parent); - return; - case E_CLIENT_ERROR_REPOSITORY_OFFLINE: e_alert_submit ( E_ALERT_SINK (shell_content), @@ -326,28 +277,6 @@ memo_shell_sidebar_client_opened_cb (GObject *source_object, memo_shell_sidebar); } -static gboolean -memo_shell_sidebar_retry_open_timeout_cb (gpointer user_data) -{ - struct RetryOpenData *rod = user_data; - - g_return_val_if_fail (rod != NULL, FALSE); - g_return_val_if_fail (rod->client != NULL, FALSE); - g_return_val_if_fail (rod->memo_shell_sidebar != NULL, FALSE); - g_return_val_if_fail (rod->cancellable != NULL, FALSE); - - if (g_cancellable_is_cancelled (rod->cancellable)) - return FALSE; - - e_client_open ( - rod->client, FALSE, - rod->memo_shell_sidebar->priv->loading_clients, - memo_shell_sidebar_client_opened_cb, - rod->memo_shell_sidebar); - - return FALSE; -} - static void memo_shell_sidebar_default_loaded_cb (GObject *source_object, GAsyncResult *result, diff --git a/modules/calendar/e-task-shell-sidebar.c b/modules/calendar/e-task-shell-sidebar.c index 1f46e2932e..7c7742e295 100644 --- a/modules/calendar/e-task-shell-sidebar.c +++ b/modules/calendar/e-task-shell-sidebar.c @@ -206,28 +206,6 @@ task_shell_sidebar_retrieve_capabilies_cb (GObject *source_object, task_shell_sidebar_emit_status_message (task_shell_sidebar, NULL); } -static gboolean task_shell_sidebar_retry_open_timeout_cb (gpointer user_data); - -struct RetryOpenData -{ - EClient *client; - ETaskShellSidebar *task_shell_sidebar; - GCancellable *cancellable; -}; - -static void -free_retry_open_data (gpointer data) -{ - struct RetryOpenData *rod = data; - - if (!rod) - return; - - g_object_unref (rod->client); - g_object_unref (rod->cancellable); - g_free (rod); -} - static void task_shell_sidebar_client_opened_cb (GObject *source_object, GAsyncResult *result, @@ -252,24 +230,6 @@ task_shell_sidebar_client_opened_cb (GObject *source_object, return; } - if (g_error_matches (error, E_CLIENT_ERROR, E_CLIENT_ERROR_BUSY)) { - struct RetryOpenData *rod; - - rod = g_new0 (struct RetryOpenData, 1); - rod->client = g_object_ref (client); - rod->task_shell_sidebar = task_shell_sidebar; - rod->cancellable = g_object_ref (task_shell_sidebar->priv->loading_clients); - - /* postpone for 1/2 of a second, backend is busy now */ - g_timeout_add_full ( - G_PRIORITY_DEFAULT, 500, - task_shell_sidebar_retry_open_timeout_cb, - rod, free_retry_open_data); - - g_clear_error (&error); - return; - } - shell_sidebar = E_SHELL_SIDEBAR (task_shell_sidebar); shell_view = e_shell_sidebar_get_shell_view (shell_sidebar); shell_content = e_shell_view_get_shell_content (shell_view); @@ -281,15 +241,6 @@ task_shell_sidebar_client_opened_cb (GObject *source_object, case -1: break; - case E_CLIENT_ERROR_BUSY: - g_warning ( - "%s: Cannot open '%s', it's busy (%s)", - G_STRFUNC, e_source_get_display_name (source), - error->message); - g_clear_error (&error); - g_object_unref (parent); - return; - case E_CLIENT_ERROR_REPOSITORY_OFFLINE: e_alert_submit ( E_ALERT_SINK (shell_content), @@ -326,28 +277,6 @@ task_shell_sidebar_client_opened_cb (GObject *source_object, task_shell_sidebar); } -static gboolean -task_shell_sidebar_retry_open_timeout_cb (gpointer user_data) -{ - struct RetryOpenData *rod = user_data; - - g_return_val_if_fail (rod != NULL, FALSE); - g_return_val_if_fail (rod->client != NULL, FALSE); - g_return_val_if_fail (rod->task_shell_sidebar != NULL, FALSE); - g_return_val_if_fail (rod->cancellable != NULL, FALSE); - - if (g_cancellable_is_cancelled (rod->cancellable)) - return FALSE; - - e_client_open ( - rod->client, FALSE, - rod->task_shell_sidebar->priv->loading_clients, - task_shell_sidebar_client_opened_cb, - rod->task_shell_sidebar); - - return FALSE; -} - static void task_shell_sidebar_default_loaded_cb (GObject *source_object, GAsyncResult *result, |