gnome-applets r11169 - in trunk/trashapplet: . src



Author: ryanl
Date: Mon Dec 22 05:09:07 2008
New Revision: 11169
URL: http://svn.gnome.org/viewvc/gnome-applets?rev=11169&view=rev

Log:
2008-12-21  Ryan Lortie  <desrt desrt ca>

        * src/trashapplet.c (trash_applet_monitor_changed): set the image from 
        the icon directly, now that we have the API to do so.



Modified:
   trunk/trashapplet/ChangeLog
   trunk/trashapplet/src/trashapplet.c

Modified: trunk/trashapplet/src/trashapplet.c
==============================================================================
--- trunk/trashapplet/src/trashapplet.c	(original)
+++ trunk/trashapplet/src/trashapplet.c	Mon Dec 22 05:09:07 2008
@@ -104,20 +104,15 @@
 
   if (!g_icon_equal (icon, applet->icon))
     {
-      char const * const *icon_names;
-
-      /* TODO: support other types (but by then, probably GtkImage
-       *       will have built-in support for GIcon loading...)
+      /* note: the size is meaningless here,
+       * since we do set_pixel_size() later
        */
-      g_assert (G_IS_THEMED_ICON (icon));
-
-      icon_names = g_themed_icon_get_names (G_THEMED_ICON (icon));
-      gtk_image_set_from_icon_name (GTK_IMAGE (applet->image),
-                                    icon_names[0],
-                                    GTK_ICON_SIZE_MENU);
+      gtk_image_set_from_gicon (GTK_IMAGE (applet->image),
+                                icon, GTK_ICON_SIZE_MENU);
 
       if (applet->icon)
         g_object_unref (applet->icon);
+
       applet->icon = g_object_ref (icon);
     }
 



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