diff -Nru a/panel-plugin/weather-icon.c b/panel-plugin/weather-icon.c --- a/panel-plugin/weather-icon.c 2009-06-13 09:46:46.000000000 +0200 +++ b/panel-plugin/weather-icon.c 2010-05-21 19:41:15.663866585 +0200 @@ -36,22 +36,19 @@ get_icon (const gchar *number, gint size) { + gchar IconName[17]; GdkPixbuf *image = NULL; - gchar *filename; - filename = g_strdup_printf ("%s" G_DIR_SEPARATOR_S "%s" G_DIR_SEPARATOR_S "%s.png", - THEMESDIR, DEFAULT_W_THEME, number); + strcpy(IconName,"xfce4-weather-"); + strcat(IconName,number); - image = gdk_pixbuf_new_from_file_at_scale (filename, size, size, TRUE, NULL); + image = xfce_themed_icon_load (IconName, size); if (G_UNLIKELY (!image)) { - g_warning ("Unable to open image: %s", filename); - if (number && strcmp(number, "99")) { - g_free(filename); + g_warning ("Unable to open image: %s", IconName); + if (number && strcmp(number, "99")) return get_icon("99", size); - } } - g_free (filename); return image; }