diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2010-07-05 05:40:28 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2010-07-09 02:37:52 +0800 |
commit | 137b0743ddfbd3bbc01c9813615ede91ddd9b954 (patch) | |
tree | 1d8e09ba0239eff419d432bdd8d5b521fbb727ba /plugins/groupwise-features | |
parent | 36f1f29b9a42c56a619e031b045db5a18f2b1dd7 (diff) | |
download | gsoc2013-evolution-137b0743ddfbd3bbc01c9813615ede91ddd9b954.tar gsoc2013-evolution-137b0743ddfbd3bbc01c9813615ede91ddd9b954.tar.gz gsoc2013-evolution-137b0743ddfbd3bbc01c9813615ede91ddd9b954.tar.bz2 gsoc2013-evolution-137b0743ddfbd3bbc01c9813615ede91ddd9b954.tar.lz gsoc2013-evolution-137b0743ddfbd3bbc01c9813615ede91ddd9b954.tar.xz gsoc2013-evolution-137b0743ddfbd3bbc01c9813615ede91ddd9b954.tar.zst gsoc2013-evolution-137b0743ddfbd3bbc01c9813615ede91ddd9b954.zip |
Migrate from CamelException to GError.
Diffstat (limited to 'plugins/groupwise-features')
-rw-r--r-- | plugins/groupwise-features/install-shared.c | 16 | ||||
-rw-r--r-- | plugins/groupwise-features/proxy.c | 11 | ||||
-rw-r--r-- | plugins/groupwise-features/share-folder-common.c | 28 |
3 files changed, 23 insertions, 32 deletions
diff --git a/plugins/groupwise-features/install-shared.c b/plugins/groupwise-features/install-shared.c index d2addbf095..55a3fb1664 100644 --- a/plugins/groupwise-features/install-shared.c +++ b/plugins/groupwise-features/install-shared.c @@ -58,7 +58,6 @@ install_folder_response (EMFolderSelector *emfs, gint response, gpointer *data) gchar *parent_name; gchar *container_id; const gchar *item_id; - CamelException ex; CamelStore *store; CamelFolder *folder; EAccount *account; @@ -91,9 +90,9 @@ install_folder_response (EMFolderSelector *emfs, gint response, gpointer *data) else parent_name = NULL; } - camel_exception_init (&ex); - if (!(store = (CamelStore *) camel_session_get_service (session, uri, CAMEL_PROVIDER_STORE, &ex))) { - camel_exception_clear (&ex); + store = (CamelStore *) camel_session_get_service ( + session, uri, CAMEL_PROVIDER_STORE, NULL); + if (store == NULL) { g_strfreev (names); return; } @@ -116,9 +115,8 @@ install_folder_response (EMFolderSelector *emfs, gint response, gpointer *data) account = mail_config_get_account_by_source_url (uri); uri = account->source->url; em_folder_tree_model_remove_store (model, store); - camel_exception_init (&ex); - if (!(provider = camel_provider_get(uri, &ex))) { - camel_exception_clear (&ex); + provider = camel_provider_get (uri, NULL); + if (provider == NULL) { g_strfreev (names); return; } @@ -208,8 +206,8 @@ org_gnome_popup_wizard (EPlugin *ep, EMEventTargetMessage *target) byte_array = g_byte_array_new (); stream = camel_stream_mem_new_with_byte_array (byte_array); - camel_data_wrapper_write_to_stream (dw, stream); - camel_stream_write (stream, "", 1); + camel_data_wrapper_write_to_stream (dw, stream, NULL); + camel_stream_write (stream, "", 1, NULL); from_addr = camel_mime_message_get_from ((CamelMimeMessage *)target->message); if (from_addr && camel_internet_address_get(from_addr, 0, &name, &email)) { diff --git a/plugins/groupwise-features/proxy.c b/plugins/groupwise-features/proxy.c index c539974564..fb0e786239 100644 --- a/plugins/groupwise-features/proxy.c +++ b/plugins/groupwise-features/proxy.c @@ -642,7 +642,6 @@ org_gnome_proxy (EPlugin *epl, EConfigHookItemFactoryData *data) proxyDialog *prd; proxyDialogPrivate *priv; CamelOfflineStore *store; - CamelException ex; gint pag_num; target_account = (EMConfigTargetAccount *)data->config->target; @@ -650,11 +649,11 @@ org_gnome_proxy (EPlugin *epl, EConfigHookItemFactoryData *data) /* We are using some g_object_set on this. We shuold also avoid double-free later. So reffing */ g_object_ref (account); - camel_exception_init (&ex); - if (!(store = (CamelOfflineStore *) camel_session_get_service (session, e_account_get_string(account, E_ACCOUNT_SOURCE_URL), CAMEL_PROVIDER_STORE, &ex))) { - camel_exception_clear (&ex); + store = (CamelOfflineStore *) camel_session_get_service ( + session, e_account_get_string (account, E_ACCOUNT_SOURCE_URL), + CAMEL_PROVIDER_STORE, NULL); + if (store == NULL) return NULL; - } if (g_strrstr (e_account_get_string(account, E_ACCOUNT_SOURCE_URL), "groupwise://")) { @@ -717,7 +716,7 @@ org_gnome_proxy (EPlugin *epl, EConfigHookItemFactoryData *data) } g_object_unref (store); - camel_exception_clear (&ex); + return NULL; } diff --git a/plugins/groupwise-features/share-folder-common.c b/plugins/groupwise-features/share-folder-common.c index 91758da535..532316599c 100644 --- a/plugins/groupwise-features/share-folder-common.c +++ b/plugins/groupwise-features/share-folder-common.c @@ -66,7 +66,6 @@ refresh_folder_tree (EMFolderTreeModel *model, CamelStore *store) { gchar *uri; EAccount *account; - CamelException ex; CamelProvider *provider; uri = camel_url_to_string (((CamelService *) store)->url, CAMEL_URL_HIDE_ALL); @@ -78,11 +77,10 @@ refresh_folder_tree (EMFolderTreeModel *model, CamelStore *store) uri = account->source->url; em_folder_tree_model_remove_store (model, store); - camel_exception_init (&ex); - if (!(provider = camel_provider_get(uri, &ex))) { - camel_exception_clear (&ex); + provider = camel_provider_get (uri, NULL); + if (provider == NULL) return; - } + if (!(provider->flags & CAMEL_PROVIDER_IS_STORAGE)) return; em_folder_tree_model_add_store (model, store, account->name); @@ -143,9 +141,9 @@ create_folder_exec (struct _EMCreateFolder *m) { d(printf ("creating folder parent='%s' name='%s' full_name='%s'\n", m->parent, m->name, m->full_name)); - if ((m->fi = camel_store_create_folder (m->store, m->parent, m->name, &m->base.ex))) { + if ((m->fi = camel_store_create_folder (m->store, m->parent, m->name, &m->base.error))) { if (camel_store_supports_subscriptions (m->store)) - camel_store_subscribe_folder (m->store, m->full_name, &m->base.ex); + camel_store_subscribe_folder (m->store, m->full_name, &m->base.error); } } @@ -239,7 +237,6 @@ users_dialog_response(GtkWidget *dialog, gint response, struct ShareInfo *ssi) struct _EMFolderTreeModelStoreInfo *si; EMFolderSelector *emfs = ssi->emfs; const gchar *uri, *path; - CamelException ex; CamelStore *store; if (response != GTK_RESPONSE_OK) { @@ -253,11 +250,10 @@ users_dialog_response(GtkWidget *dialog, gint response, struct ShareInfo *ssi) d(printf ("Creating new folder: %s (%s)\n", path, uri)); - camel_exception_init (&ex); - if (!(store = (CamelStore *) camel_session_get_service (session, uri, CAMEL_PROVIDER_STORE, &ex))) { - camel_exception_clear (&ex); + store = (CamelStore *) camel_session_get_service ( + session, uri, CAMEL_PROVIDER_STORE, NULL); + if (store == NULL) return; - } if (!(si = em_folder_tree_model_lookup_store_info (ssi->model, store))) { g_assert_not_reached (); @@ -293,7 +289,6 @@ new_folder_response (EMFolderSelector *emfs, gint response, EMFolderTreeModel *m struct ShareInfo *ssi; const gchar *uri; EGwConnection *cnc; - CamelException ex; CamelStore *store; ssi = g_new0(struct ShareInfo, 1); @@ -304,11 +299,10 @@ new_folder_response (EMFolderSelector *emfs, gint response, EMFolderTreeModel *m /* i want store at this point to get cnc not sure proper or not*/ uri = em_folder_selector_get_selected_uri (emfs); - camel_exception_init (&ex); - if (!(store = (CamelStore *) camel_session_get_service (session, uri, CAMEL_PROVIDER_STORE, &ex))) { - camel_exception_clear (&ex); + store = (CamelStore *) camel_session_get_service ( + session, uri, CAMEL_PROVIDER_STORE, NULL); + if (store == NULL) return; - } cnc = get_cnc (store); users_dialog = gtk_dialog_new_with_buttons ( |