aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@src.gnome.org>2009-01-18 04:06:17 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2009-01-18 04:06:17 +0800
commitc22126d54f0cf0637e3d5ddd5d78b3ff5d111582 (patch)
tree64f296a85dd817e3184159126e8dbde39c173363 /plugins
parent4d07d219d1f18aeba2c16317ade4b4004d8934b9 (diff)
downloadgsoc2013-evolution-c22126d54f0cf0637e3d5ddd5d78b3ff5d111582.tar.gz
gsoc2013-evolution-c22126d54f0cf0637e3d5ddd5d78b3ff5d111582.tar.zst
gsoc2013-evolution-c22126d54f0cf0637e3d5ddd5d78b3ff5d111582.zip
Hack GtkIconTheme so we can reference category icons as named icons.
Necessary for EActionComboBox, since GtkActions can only handle named or stock icons. Hopefully this is just a temporary hack. Eventually we should make the category icons themeable. Kill the "mail-account-disable" plugin and integrate it properly. More dead plugins to follow... Don't show disabled menu items in pop-up context menus. It does the user no good to see things he CAN'T do with the object he clicked on. svn path=/branches/kill-bonobo/; revision=37093
Diffstat (limited to 'plugins')
-rw-r--r--plugins/calendar-weather/Makefile.am10
-rw-r--r--plugins/calendar-weather/calendar-weather.c27
-rw-r--r--plugins/calendar-weather/category_weather_cloudy_16.pngbin597 -> 0 bytes
-rw-r--r--plugins/calendar-weather/category_weather_fog_16.pngbin217 -> 0 bytes
-rw-r--r--plugins/calendar-weather/category_weather_partly_cloudy_16.pngbin760 -> 0 bytes
-rw-r--r--plugins/calendar-weather/category_weather_rain_16.pngbin647 -> 0 bytes
-rw-r--r--plugins/calendar-weather/category_weather_snow_16.pngbin624 -> 0 bytes
-rw-r--r--plugins/calendar-weather/category_weather_sun_16.pngbin420 -> 0 bytes
-rw-r--r--plugins/calendar-weather/category_weather_tstorm_16.pngbin728 -> 0 bytes
-rw-r--r--plugins/mail-account-disable/ChangeLog62
-rw-r--r--plugins/mail-account-disable/Makefile.am21
-rw-r--r--plugins/mail-account-disable/mail-account-disable.c100
-rw-r--r--plugins/mail-account-disable/org-gnome-mail-account-disable.eplug.xml18
13 files changed, 12 insertions, 226 deletions
diff --git a/plugins/calendar-weather/Makefile.am b/plugins/calendar-weather/Makefile.am
index 2e2be150e3..cb0253e8fe 100644
--- a/plugins/calendar-weather/Makefile.am
+++ b/plugins/calendar-weather/Makefile.am
@@ -1,5 +1,4 @@
eds_datadir = `pkg-config --variable=privdatadir evolution-data-server-1.2`
-weatherdatadir = $(datadir)/evolution/$(BASE_VERSION)/weather
INCLUDES = \
-I$(top_srcdir) \
@@ -12,15 +11,6 @@ INCLUDES = \
@EVO_PLUGIN_RULE@
-weatherdata_DATA = \
- category_weather_cloudy_16.png \
- category_weather_fog_16.png \
- category_weather_partly_cloudy_16.png \
- category_weather_rain_16.png \
- category_weather_snow_16.png \
- category_weather_sun_16.png \
- category_weather_tstorm_16.png
-
plugin_DATA = org-gnome-calendar-weather.eplug
plugin_LTLIBRARIES = liborg-gnome-calendar-weather.la
diff --git a/plugins/calendar-weather/calendar-weather.c b/plugins/calendar-weather/calendar-weather.c
index a6dce31326..c16883ae23 100644
--- a/plugins/calendar-weather/calendar-weather.c
+++ b/plugins/calendar-weather/calendar-weather.c
@@ -51,8 +51,8 @@ int
e_plugin_lib_enable (EPluginLib *epl, int enable)
{
GList *l;
- gboolean found = FALSE;
- const char *tmp;
+ const gchar *tmp;
+ gint ii;
static struct {
const char *description;
@@ -74,24 +74,21 @@ e_plugin_lib_enable (EPluginLib *epl, int enable)
/* Add the categories icons if we don't have them. */
for (l = e_categories_get_list (); l; l = g_list_next (l)) {
- if (!strcmp ((const char *)l->data, tmp)) {
- found = TRUE;
- break;
- }
+ if (!strcmp ((const char *)l->data, tmp))
+ goto exit;
}
- if (!found) {
- int i;
-
- for (i = 0; categories[i].description; i++) {
- char *filename;
+ for (ii = 0; categories[ii].description; ii++) {
+ char *filename;
- filename = e_icon_factory_get_icon_filename (categories[i].icon_name, E_ICON_SIZE_MENU);
- e_categories_add (_(categories[i].description), NULL, filename, FALSE);
- g_free (filename);
- }
+ filename = e_icon_factory_get_icon_filename (
+ categories[ii].icon_name, E_ICON_SIZE_MENU);
+ e_categories_add (
+ _(categories[ii].description), NULL, filename, FALSE);
+ g_free (filename);
}
+exit:
return 0;
}
diff --git a/plugins/calendar-weather/category_weather_cloudy_16.png b/plugins/calendar-weather/category_weather_cloudy_16.png
deleted file mode 100644
index ddb3ba7c59..0000000000
--- a/plugins/calendar-weather/category_weather_cloudy_16.png
+++ /dev/null
Binary files differ
diff --git a/plugins/calendar-weather/category_weather_fog_16.png b/plugins/calendar-weather/category_weather_fog_16.png
deleted file mode 100644
index 23e4e2f1d4..0000000000
--- a/plugins/calendar-weather/category_weather_fog_16.png
+++ /dev/null
Binary files differ
diff --git a/plugins/calendar-weather/category_weather_partly_cloudy_16.png b/plugins/calendar-weather/category_weather_partly_cloudy_16.png
deleted file mode 100644
index 472feaa654..0000000000
--- a/plugins/calendar-weather/category_weather_partly_cloudy_16.png
+++ /dev/null
Binary files differ
diff --git a/plugins/calendar-weather/category_weather_rain_16.png b/plugins/calendar-weather/category_weather_rain_16.png
deleted file mode 100644
index e00d5e1c82..0000000000
--- a/plugins/calendar-weather/category_weather_rain_16.png
+++ /dev/null
Binary files differ
diff --git a/plugins/calendar-weather/category_weather_snow_16.png b/plugins/calendar-weather/category_weather_snow_16.png
deleted file mode 100644
index 5e95985f5f..0000000000
--- a/plugins/calendar-weather/category_weather_snow_16.png
+++ /dev/null
Binary files differ
diff --git a/plugins/calendar-weather/category_weather_sun_16.png b/plugins/calendar-weather/category_weather_sun_16.png
deleted file mode 100644
index 780c61c23c..0000000000
--- a/plugins/calendar-weather/category_weather_sun_16.png
+++ /dev/null
Binary files differ
diff --git a/plugins/calendar-weather/category_weather_tstorm_16.png b/plugins/calendar-weather/category_weather_tstorm_16.png
deleted file mode 100644
index b2af092b53..0000000000
--- a/plugins/calendar-weather/category_weather_tstorm_16.png
+++ /dev/null
Binary files differ
diff --git a/plugins/mail-account-disable/ChangeLog b/plugins/mail-account-disable/ChangeLog
deleted file mode 100644
index 86dc9a4897..0000000000
--- a/plugins/mail-account-disable/ChangeLog
+++ /dev/null
@@ -1,62 +0,0 @@
-2008-10-03 Sankar P <psankar@novell.com>
-
-License Changes
-
- * mail-account-disable.c:
-
-2007-11-18 Gilles Dartiguelongue <gdartigu@svn.gnome.org>
-
- ** Fix bug #495875
-
- * mail-account-disable.c:
- right click menu reordering
-
-2007-04-02 Sankar P <psankar@novell.com>
-
- * Committed on behalf of Gilles Dartiguelongue <dartigug@esiee.fr>
-
- * org-gnome-mail-account-disable.eplug.xml:
- Cleanup.
- Fixes part of #301149
-
-2006-08-21 Matthew Barnes <mbarnes@redhat.com>
-
- * mail-account-disable.c:
- "Disable" did not work for "On This Computer" - fixes bug 350901.
-
-2006-01-06 Simon Zheng <simon.zheng@sun.com>
-
- * mail-account-disable.c:
- use libedataserver/e-account-list.h instead of e-util/e-account-list.h.
- use libedataserver/e-account.h instead of e-util/e-account.h.
-
-2005-12-12 Harish Krishnaswamy <kharish@novell.com>
-
- * Makefile.am: Fix make-clean issues.
-
-2005-08-23 Not Zed <NotZed@Ximian.com>
-
- * Makefile.am: Remove the special case for win32, its a bug on all
- platforms, silly.
-
- * mail-account-disable.c (mail_account_disable): make signature
- match usage.
-
-2005-07-13 Tor Lillqvist <tml@novell.com>
-
- * Makefile.am (INCLUDES): Remove duplicated line.
- (LDFLAGS): Use NO_UNDEFINED.
- (LIBADD): Link with the required libraries, but let's do it only
- on Win32.
-
- * org-gnome-mail-account-disable.eplug.xml: Use SOEXT.
-
-2005-07-12 Vivek Jain <jvivek@novell.com>
-
- have a ChangeLog and transfer the changelog entry from the main
- ChangeLog
- (2005-07-10 Shreyas Srinivasan <sshreyas@novell.com>)
-
- * plugins/mail-account-disable/*: Plugin to add Disable/ Proxy
- Logout to a store menu on right click.
-
diff --git a/plugins/mail-account-disable/Makefile.am b/plugins/mail-account-disable/Makefile.am
deleted file mode 100644
index 7ec8a1124e..0000000000
--- a/plugins/mail-account-disable/Makefile.am
+++ /dev/null
@@ -1,21 +0,0 @@
-INCLUDES = \
- -I$(top_srcdir) \
- -I$(top_builddir)/mail \
- $(EVOLUTION_MAIL_CFLAGS) \
- -DEVOLUTION_GLADEDIR=\""$(gladedir)"\"
-
-@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 $(NO_UNDEFINED)
-libmail_account_disable_la_LIBADD = $(top_builddir)/e-util/libeutil.la \
- $(top_builddir)/mail/libevolution-mail.la \
- $(EVOLUTION_MAIL_LIBS)
-
-EXTRA_DIST = org-gnome-mail-account-disable.eplug.xml
-
-BUILT_SOURCES = $(plugin_DATA)
-CLEANFILES = $(BUILT_SOURCES)
diff --git a/plugins/mail-account-disable/mail-account-disable.c b/plugins/mail-account-disable/mail-account-disable.c
deleted file mode 100644
index 886b66a66f..0000000000
--- a/plugins/mail-account-disable/mail-account-disable.c
+++ /dev/null
@@ -1,100 +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 <http://www.gnu.org/licenses/>
- *
- *
- * Authors:
- * Shreyas Srinivasan <sshreyas@novell.com>
- *
- * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
- *
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <glib.h>
-#include <glib/gi18n.h>
-#include <string.h>
-#include <mail/mail-component.h>
-#include <mail/em-folder-selector.h>
-#include <mail/em-popup.h>
-#include <mail/em-account-editor.h>
-#include <mail/mail-config.h>
-#include <libedataserver/e-account.h>
-#include <libedataserver/e-account-list.h>
-
-#define ACCOUNT_DISABLE 0
-#define PROXY_LOGOUT 1
-
-void mail_account_disable (EPopup *ep, EPopupItem *p, void *data);
-void org_gnome_create_mail_account_disable (EPlugin *ep, EMPopupTargetFolder *t);
-
-static EPopupItem popup_items[] = {
- { E_POPUP_ITEM, "40.emc.04", N_("_Disable"), mail_account_disable, NULL, NULL, 0, EM_POPUP_FOLDER_STORE },
- { E_POPUP_ITEM, "40.emc.04", N_("Proxy _Logout"), mail_account_disable, NULL, NULL, 0, EM_POPUP_FOLDER_STORE }
-};
-
-static void
-popup_free (EPopup *ep, GSList *items, void *data)
-{
- g_slist_free (items);
-}
-
-void
-mail_account_disable (EPopup *ep, EPopupItem *p, void *data)
-{
- MailComponent *component;
- EAccount *account = data;
-
- g_assert (account != NULL);
-
- component = mail_component_peek ();
-
- if (mail_config_has_proxies (account))
- mail_config_remove_account_proxies (account);
-
- account->enabled = !account->enabled;
- e_account_list_change (mail_config_get_accounts (), account);
- mail_component_remove_store_by_uri (component, account->source->url);
-
- if (account->parent_uid)
- mail_config_remove_account (account);
-
- mail_config_save_accounts();
-}
-
-void
-org_gnome_create_mail_account_disable (EPlugin *ep, EMPopupTargetFolder *t)
-{
- EAccount *account;
- GSList *menus = NULL;
-
- account = mail_config_get_account_by_source_url (t->uri);
-
- if (account == NULL)
- return;
-
- if (g_strrstr (t->uri,"groupwise://") && account->parent_uid) {
- popup_items[PROXY_LOGOUT].label = _(popup_items [PROXY_LOGOUT].label);
- menus = g_slist_prepend (menus, &popup_items [PROXY_LOGOUT]);
- }
- else {
- popup_items[ACCOUNT_DISABLE].label = _(popup_items [ACCOUNT_DISABLE].label);
- menus = g_slist_prepend (menus, &popup_items [ACCOUNT_DISABLE]);
- }
-
- e_popup_add_items (t->target.popup, menus, NULL, popup_free, account);
-}
-
diff --git a/plugins/mail-account-disable/org-gnome-mail-account-disable.eplug.xml b/plugins/mail-account-disable/org-gnome-mail-account-disable.eplug.xml
deleted file mode 100644
index f1e0b34ef9..0000000000
--- a/plugins/mail-account-disable/org-gnome-mail-account-disable.eplug.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0"?>
-<e-plugin-list>
- <e-plugin
- id="org.gnome.mail.account.disable"
- type="shlib"
- domain="@GETTEXT_PACKAGE@"
- _name="Disable Account"
- location="@PLUGINDIR@/libmail-account-disable@SOEXT@">
- <_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"
- factory="org_gnome_create_mail_account_disable">
- </menu>
- </hook>
- </e-plugin>
-</e-plugin-list>