diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2010-11-01 05:16:57 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@gnome-db.org> | 2010-11-10 06:33:20 +0800 |
commit | a2747569c8c4716c83880a6cc796ee1bd9b3f420 (patch) | |
tree | 334775949a9eb1443267fac7fd3a1c51d9c875d5 /mail/em-folder-utils.c | |
parent | 616f0b140bb937d7afeb46f834e32e8c51a67e1e (diff) | |
download | gsoc2013-evolution-a2747569c8c4716c83880a6cc796ee1bd9b3f420.tar gsoc2013-evolution-a2747569c8c4716c83880a6cc796ee1bd9b3f420.tar.gz gsoc2013-evolution-a2747569c8c4716c83880a6cc796ee1bd9b3f420.tar.bz2 gsoc2013-evolution-a2747569c8c4716c83880a6cc796ee1bd9b3f420.tar.lz gsoc2013-evolution-a2747569c8c4716c83880a6cc796ee1bd9b3f420.tar.xz gsoc2013-evolution-a2747569c8c4716c83880a6cc796ee1bd9b3f420.tar.zst gsoc2013-evolution-a2747569c8c4716c83880a6cc796ee1bd9b3f420.zip |
Kill em_folder_utils_unsubscribe_folder().
Use e_mail_session_unsubscribe_folder() instead.
Diffstat (limited to 'mail/em-folder-utils.c')
-rw-r--r-- | mail/em-folder-utils.c | 75 |
1 files changed, 0 insertions, 75 deletions
diff --git a/mail/em-folder-utils.c b/mail/em-folder-utils.c index c2720fc5ae..e84152e574 100644 --- a/mail/em-folder-utils.c +++ b/mail/em-folder-utils.c @@ -754,81 +754,6 @@ em_folder_utils_create_folder (CamelFolderInfo *folderinfo, gtk_dialog_run (GTK_DIALOG (dialog)); } -struct _folder_unsub_t { - MailMsg base; - EMailSession *session; - gchar *folder_uri; -}; - -static gchar * -emfu_unsubscribe_folder__desc (struct _folder_unsub_t *msg) -{ - return g_strdup_printf ( - _("Unsubscribing from folder \"%s\""), msg->folder_uri); -} - -static void -emfu_unsubscribe_folder__exec (struct _folder_unsub_t *msg, - GCancellable *cancellable, - GError **error) -{ - CamelStore *store; - CamelURL *url; - const gchar *path = NULL; - gint url_flags; - - store = camel_session_get_store ( - CAMEL_SESSION (msg->session), - msg->folder_uri, error); - if (store == NULL) - return; - - url = camel_url_new (msg->folder_uri, NULL); - url_flags = CAMEL_SERVICE (store)->provider->url_flags; - - if (url_flags & CAMEL_URL_FRAGMENT_IS_PATH) - path = url->fragment; - else if (url->path != NULL && *url->path != '\0') - path = url->path + 1; - - if (path != NULL) - camel_store_unsubscribe_folder_sync ( - store, path, cancellable, error); - - camel_url_free (url); -} - -static void -emfu_unsubscribe_folder__free (struct _folder_unsub_t *msg) -{ - g_object_unref (msg->session); - g_free (msg->folder_uri); -} - -static MailMsgInfo unsubscribe_info = { - sizeof (struct _folder_unsub_t), - (MailMsgDescFunc) emfu_unsubscribe_folder__desc, - (MailMsgExecFunc) emfu_unsubscribe_folder__exec, - (MailMsgDoneFunc) NULL, - (MailMsgFreeFunc) emfu_unsubscribe_folder__free -}; - -void -em_folder_utils_unsubscribe_folder (EMailSession *session, - const gchar *folder_uri) -{ - struct _folder_unsub_t *unsub; - - g_return_if_fail (E_IS_MAIL_SESSION (session)); - g_return_if_fail (folder_uri != NULL); - - unsub = mail_msg_new (&unsubscribe_info); - unsub->session = g_object_ref (session); - unsub->folder_uri = g_strdup (folder_uri); - - mail_msg_unordered_push (unsub); -} - const gchar * em_folder_utils_get_icon_name (guint32 flags) { |