aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/calendar-weather/calendar-weather.c
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/calendar-weather/calendar-weather.c
parent4d07d219d1f18aeba2c16317ade4b4004d8934b9 (diff)
downloadgsoc2013-evolution-c22126d54f0cf0637e3d5ddd5d78b3ff5d111582.tar
gsoc2013-evolution-c22126d54f0cf0637e3d5ddd5d78b3ff5d111582.tar.gz
gsoc2013-evolution-c22126d54f0cf0637e3d5ddd5d78b3ff5d111582.tar.bz2
gsoc2013-evolution-c22126d54f0cf0637e3d5ddd5d78b3ff5d111582.tar.lz
gsoc2013-evolution-c22126d54f0cf0637e3d5ddd5d78b3ff5d111582.tar.xz
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/calendar-weather/calendar-weather.c')
-rw-r--r--plugins/calendar-weather/calendar-weather.c27
1 files changed, 12 insertions, 15 deletions
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;
}