aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-folder-utils.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-11-01 05:16:57 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-11-01 10:54:30 +0800
commitc211a974e3d532077b3be3235ff2e891533b9c3c (patch)
tree84b380a0ba37b9ec0feec3b61cac5725773c8534 /mail/em-folder-utils.c
parentccc2b3a14bf19b3db1d837887a07e74f50db078c (diff)
downloadgsoc2013-evolution-c211a974e3d532077b3be3235ff2e891533b9c3c.tar
gsoc2013-evolution-c211a974e3d532077b3be3235ff2e891533b9c3c.tar.gz
gsoc2013-evolution-c211a974e3d532077b3be3235ff2e891533b9c3c.tar.bz2
gsoc2013-evolution-c211a974e3d532077b3be3235ff2e891533b9c3c.tar.lz
gsoc2013-evolution-c211a974e3d532077b3be3235ff2e891533b9c3c.tar.xz
gsoc2013-evolution-c211a974e3d532077b3be3235ff2e891533b9c3c.tar.zst
gsoc2013-evolution-c211a974e3d532077b3be3235ff2e891533b9c3c.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.c75
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)
{