[gnome-panel] [clock] Use icon fallbacks if the theme does not include phases of moon



commit 51fd73ddd980a81c65b3f0c68cf6f700c1e76e16
Author: Frank Solensky <frank src gnome org>
Date:   Sun Nov 29 09:54:48 2009 -0500

    [clock] Use icon fallbacks if the theme does not include phases of moon
    
    The changes for bgo#564958 (gweather doesn't show phase of moon) will
    allow weather_info_get_icon_name() to return values that aren't expected
    to be provided in all themes.
    
    We now use the GTK_ICON_LOOKUP_GENERIC_FALLBACK flag so that the
    application will fallback to a full moon if a shaded moon isn't
    available.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=603306

 applets/clock/clock-location-tile.c |    6 ++++--
 applets/clock/clock.c               |    3 ++-
 2 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/applets/clock/clock-location-tile.c b/applets/clock/clock-location-tile.c
index 71e6b75..67b72f3 100644
--- a/applets/clock/clock-location-tile.c
+++ b/applets/clock/clock-location-tile.c
@@ -599,7 +599,8 @@ weather_info_setup_tooltip (WeatherInfo *info, ClockLocation *location, GtkToolt
 
        	icon_name = weather_info_get_icon_name (info);
         theme = gtk_icon_theme_get_default ();
-        pixbuf = gtk_icon_theme_load_icon (theme, icon_name, 48, 0, NULL);
+        pixbuf = gtk_icon_theme_load_icon (theme, icon_name, 48,
+                                           GTK_ICON_LOOKUP_GENERIC_FALLBACK, NULL);
         if (pixbuf)
                 gtk_tooltip_set_icon (tooltip, pixbuf);
 
@@ -701,7 +702,8 @@ update_weather_icon (ClockLocation *loc, WeatherInfo *info, gpointer data)
 
         icon_name = weather_info_get_icon_name (info);
         theme = gtk_icon_theme_get_default ();
-        pixbuf = gtk_icon_theme_load_icon (theme, icon_name, 16, 0, NULL);
+        pixbuf = gtk_icon_theme_load_icon (theme, icon_name, 16,
+                                           GTK_ICON_LOOKUP_GENERIC_FALLBACK, NULL);
 
         if (pixbuf) {
                 gtk_image_set_from_pixbuf (GTK_IMAGE (priv->weather_icon), pixbuf);
diff --git a/applets/clock/clock.c b/applets/clock/clock.c
index 2a71259..b1dead3 100644
--- a/applets/clock/clock.c
+++ b/applets/clock/clock.c
@@ -2023,7 +2023,8 @@ location_weather_updated_cb (ClockLocation *location,
 	icon_name = weather_info_get_icon_name (info);
 	/* FIXME: mmh, screen please? Also, don't hardcode to 16 */
 	theme = gtk_icon_theme_get_default ();
-	pixbuf = gtk_icon_theme_load_icon (theme, icon_name, 16, 0, NULL);
+	pixbuf = gtk_icon_theme_load_icon (theme, icon_name, 16,
+					   GTK_ICON_LOOKUP_GENERIC_FALLBACK, NULL);
 
 	temp = weather_info_get_temp_summary (info);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]