[evolution-patches] Plugin for Adding Disable account popup menu
- From: "S Shreyas" <sshreyas novell com>
- To: <evolution-patches lists ximian com>, "Michael Zucchi" <notzed novell com>
- Cc:
- Subject: [evolution-patches] Plugin for Adding Disable account popup menu
- Date: Mon, 23 May 2005 07:11:11 -0600
hey,
Attaching a patch( plugin ) which adds Disable Account pop up menu to a
store at right click.
Cheers,
Shreyas
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/ChangeLog,v
retrieving revision 1.1468
diff -u -p -w -r1.1468 ChangeLog
--- ChangeLog 19 May 2005 17:44:34 -0000 1.1468
+++ ChangeLog 23 May 2005 12:17:25 -0000
@@ -1,3 +1,8 @@
+2005-05-23 Shreyas Srinivasan <sshreyas novell com>
+
+ * configure.in: Add mail-account-disable plugin which adds
+ Account Disable to pop-up menus .
+
2005-05-19 Chenthill Palanisamy <pchenthill novell com>
* configure.in: Added a plugin to mark all messages
--- /dev/null 2005-03-20 01:06:14.000000000 +0530
+++ plugins/mail-account-disable/org-gnome-mail-account-disable.eplug.xml 2005-05-23 16:44:02.000000000 +0530
@@ -0,0 +1,16 @@
+<?xml version="1.0"?>
+<e-plugin-list>
+ <e-plugin id="org.gnome.mail.account.disable"
+ type="shlib" domain="evolution" _name="Disable Account"
+ location="@PLUGINDIR@/libmail-account-disable.so">
+ <_description>Allows disabling of accounts.</_description>
+ <author name="Shreyas Srinivasan" email="sshreyas novell com"/>
+ <hook class="org.gnome.evolution.mail.popup:1.0">
+ <menu id="org.gnome.evolution.mail.foldertree.popup" target="folder">
+ <item type="item" path="20.emc.03" _label="_Disable"
+ activate="org_gnome_mail_account_disable"
+ enable="store" visible="store"/>
+ </menu>
+ </hook>
+ </e-plugin>
+</e-plugin-list>
--- /dev/null 2005-03-20 01:06:14.000000000 +0530
+++ plugins/mail-account-disable/mail-account-disable.c 2005-05-23 17:53:23.000000000 +0530
@@ -0,0 +1,48 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ * Authors: Shreyas Srinivasan <sshreyas novell com>
+ *
+ * Copyright 2004 Novell, Inc. (www.novell.com)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
+ *
+ */
+
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <glib.h>
+#include <string.h>
+#include <mail/mail-component.h>
+#include <mail/em-folder-tree.h>
+#include <mail/mail-config.h>
+#include <mail/em-folder-selector.h>
+#include "mail/em-popup.h"
+#include <mail/em-account-editor.h>
+
+void
+org_gnome_mail_account_disable (EPlugin *plug, EMPopupTargetFolder *target)
+{
+ EAccount *account;
+ MailComponent *component = mail_component_peek ();
+ account = mail_config_get_account_by_source_url (target->uri);
+ account->enabled = FALSE;
+ e_account_list_change(mail_config_get_accounts(), account);
+ mail_component_remove_store_by_uri (component, target->uri);
+ mail_config_write ();
+}
+
--- /dev/null 2005-03-20 01:06:14.000000000 +0530
+++ plugins/mail-account-disable/Makefile.am 2005-05-23 16:46:49.000000000 +0530
@@ -0,0 +1,13 @@
+INCLUDES = \
+ -I$(top_srcdir) \
+ $(EVOLUTION_MAIL_CFLAGS)
+
+ EVO_PLUGIN_RULE@
+
+plugin_DATA = org-gnome-mail-account-disable.eplug
+plugin_LTLIBRARIES = libmail-account-disable.la
+
+libmail_account_disable_la_SOURCES = mail-account-disable.c
+libmail_account_disable_la_LDFLAGS = -module -avoid-version
+
+EXTRA_DIST = org-gnome-mail-account-disable.eplug.xml
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]