From e4afd3f9fb962ea1295a0657ec9f83a427829171 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Tue, 26 May 2009 23:21:02 -0400 Subject: Remove trailing whitespace, again. --- plugins/folder-unsubscribe/folder-unsubscribe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/folder-unsubscribe/folder-unsubscribe.c') diff --git a/plugins/folder-unsubscribe/folder-unsubscribe.c b/plugins/folder-unsubscribe/folder-unsubscribe.c index d2d83b6ec6..308aea35f0 100644 --- a/plugins/folder-unsubscribe/folder-unsubscribe.c +++ b/plugins/folder-unsubscribe/folder-unsubscribe.c @@ -11,7 +11,7 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with the program; if not, see + * License along with the program; if not, see * * * Authors: -- cgit v1.2.3 From 948235c3d1076dbe6ed2e57a24c16a083bbd9f01 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Wed, 27 May 2009 10:29:19 -0400 Subject: Prefer GLib basic types over C types. --- plugins/folder-unsubscribe/folder-unsubscribe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins/folder-unsubscribe/folder-unsubscribe.c') diff --git a/plugins/folder-unsubscribe/folder-unsubscribe.c b/plugins/folder-unsubscribe/folder-unsubscribe.c index 308aea35f0..1d5e4fb8dc 100644 --- a/plugins/folder-unsubscribe/folder-unsubscribe.c +++ b/plugins/folder-unsubscribe/folder-unsubscribe.c @@ -46,7 +46,7 @@ void org_gnome_mail_folder_unsubscribe (EPlugin *plug, EMPopupTargetFolder *targ struct _folder_unsub_t { MailMsg base; - char *uri; + gchar *uri; }; static gchar * @@ -60,7 +60,7 @@ static void folder_unsubscribe_exec (struct _folder_unsub_t *msg) { extern CamelSession *session; - const char *path = NULL; + const gchar *path = NULL; CamelStore *store; CamelURL *url; -- cgit v1.2.3 From b0e26e9c5f13c710c7677959cc457158206befe1 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Fri, 5 Jun 2009 14:48:29 +0200 Subject: Fix even more compiler warnings and disable one for format strings --- plugins/folder-unsubscribe/folder-unsubscribe.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'plugins/folder-unsubscribe/folder-unsubscribe.c') diff --git a/plugins/folder-unsubscribe/folder-unsubscribe.c b/plugins/folder-unsubscribe/folder-unsubscribe.c index 1d5e4fb8dc..7005ac7feb 100644 --- a/plugins/folder-unsubscribe/folder-unsubscribe.c +++ b/plugins/folder-unsubscribe/folder-unsubscribe.c @@ -56,10 +56,11 @@ folder_unsubscribe_desc (struct _folder_unsub_t *msg) _("Unsubscribing from folder \"%s\""), msg->uri); } +extern CamelSession *session; + static void folder_unsubscribe_exec (struct _folder_unsub_t *msg) { - extern CamelSession *session; const gchar *path = NULL; CamelStore *store; CamelURL *url; -- cgit v1.2.3 From f0cf88bc99a458193f2c16a3ed346c20f6a5fd1a Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Thu, 25 Jun 2009 13:27:20 -0400 Subject: Kill the "folder-unsubscribe" plugin. Feature is now integrated in core mailer, and has a main menu item. --- plugins/folder-unsubscribe/folder-unsubscribe.c | 110 ------------------------ 1 file changed, 110 deletions(-) delete mode 100644 plugins/folder-unsubscribe/folder-unsubscribe.c (limited to 'plugins/folder-unsubscribe/folder-unsubscribe.c') diff --git a/plugins/folder-unsubscribe/folder-unsubscribe.c b/plugins/folder-unsubscribe/folder-unsubscribe.c deleted file mode 100644 index 7005ac7feb..0000000000 --- a/plugins/folder-unsubscribe/folder-unsubscribe.c +++ /dev/null @@ -1,110 +0,0 @@ -/* - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) version 3. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with the program; if not, see - * - * - * Authors: - * Jeffrey Stedfast - * - * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) - * - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include -#include - -#include - -#include -#include -#include - -#include "mail/em-popup.h" -#include "mail/mail-mt.h" -#include "mail/mail-ops.h" - - -void org_gnome_mail_folder_unsubscribe (EPlugin *plug, EMPopupTargetFolder *target); - - - -struct _folder_unsub_t { - MailMsg base; - - gchar *uri; -}; - -static gchar * -folder_unsubscribe_desc (struct _folder_unsub_t *msg) -{ - return g_strdup_printf ( - _("Unsubscribing from folder \"%s\""), msg->uri); -} - -extern CamelSession *session; - -static void -folder_unsubscribe_exec (struct _folder_unsub_t *msg) -{ - const gchar *path = NULL; - CamelStore *store; - CamelURL *url; - - if (!(store = camel_session_get_store (session, msg->uri, &msg->base.ex))) - return; - - url = camel_url_new (msg->uri, NULL); - if (((CamelService *) store)->provider->url_flags & CAMEL_URL_FRAGMENT_IS_PATH) - path = url->fragment; - else if (url->path && url->path[0]) - path = url->path + 1; - - if (path != NULL) - camel_store_unsubscribe_folder (store, path, &msg->base.ex); - - camel_url_free (url); -} - -static void -folder_unsubscribe_free (struct _folder_unsub_t *msg) -{ - g_free (msg->uri); -} - -static MailMsgInfo unsubscribe_info = { - sizeof (struct _folder_unsub_t), - (MailMsgDescFunc) folder_unsubscribe_desc, - (MailMsgExecFunc) folder_unsubscribe_exec, - (MailMsgDoneFunc) NULL, - (MailMsgFreeFunc) folder_unsubscribe_free -}; - - -void -org_gnome_mail_folder_unsubscribe (EPlugin *plug, EMPopupTargetFolder *target) -{ - struct _folder_unsub_t *unsub; - - if (target->uri == NULL) - return; - - unsub = mail_msg_new (&unsubscribe_info); - unsub->uri = g_strdup (target->uri); - - mail_msg_unordered_push (unsub); -} -- cgit v1.2.3