diff options
Diffstat (limited to 'plugins/calendar-weather/calendar-weather.c')
-rw-r--r-- | plugins/calendar-weather/calendar-weather.c | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/plugins/calendar-weather/calendar-weather.c b/plugins/calendar-weather/calendar-weather.c index cacc7e00fa..22fb4946f3 100644 --- a/plugins/calendar-weather/calendar-weather.c +++ b/plugins/calendar-weather/calendar-weather.c @@ -51,8 +51,8 @@ gint e_plugin_lib_enable (EPluginLib *epl, gint enable) { GList *l; - gboolean found = FALSE; const gchar *tmp; + gint ii; static struct { const gchar *description; @@ -74,24 +74,21 @@ e_plugin_lib_enable (EPluginLib *epl, gint 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 gchar *)l->data, tmp)) { - found = TRUE; - break; - } + if (!strcmp ((const gchar *)l->data, tmp)) + goto exit; } - if (!found) { - gint i; - - for (i = 0; categories[i].description; i++) { - gchar *filename; + for (ii = 0; categories[ii].description; ii++) { + gchar *filename; - filename = e_icon_factory_get_icon_filename (categories[i].icon_name, GTK_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, GTK_ICON_SIZE_MENU); + e_categories_add ( + _(categories[ii].description), NULL, filename, FALSE); + g_free (filename); } +exit: return 0; } |