]> Pileus Git - ~andy/gtk/commitdiff
Allow builtin icons when loading themed icons, and don't leak a
authorMatthias Clasen <mclasen@redhat.com>
Sat, 27 Dec 2008 03:07:19 +0000 (03:07 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Sat, 27 Dec 2008 03:07:19 +0000 (03:07 +0000)
2008-12-26  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkentry.c: Allow builtin icons when loading themed icons,
        and don't leak a GtkIconInfo.

svn path=/trunk/; revision=21940

ChangeLog
gtk/gtkentry.c

index 7d6ce458c5becb9748eb2722ca13c340e7c162b5..90303d025cf019fc4896c210688999afbb6c951e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-12-26  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtkentry.c: Allow builtin icons when loading themed icons,
+       and don't leak a GtkIconInfo.
+
 2008-12-26  Matthias Clasen  <mclasen@redhat.com>
 
        * gtk/gtkentry.c: Emit ::icon-pressed regardless which button was
index 1b5fa48f34f05f8f017d0c56bca5a14bbc7a17fb..2c30be703e34f15ffbc48f6eac12dcc415180ece 100644 (file)
@@ -6006,9 +6006,14 @@ gtk_entry_ensure_pixbuf (GtkEntry             *entry,
 
           info = gtk_icon_theme_lookup_by_gicon (icon_theme,
                                                  icon_info->gicon,
-                                                 MIN (width, height), 0);
+                                                 MIN (width, height), 
+                                                 GTK_ICON_LOOKUP_USE_BUILTIN);
+          if (info)
+            {
+              icon_info->pixbuf = gtk_icon_info_load_icon (info, NULL);
+              gtk_icon_info_free (info);
+            }
 
-          icon_info->pixbuf = gtk_icon_info_load_icon (info, NULL);
           if (icon_info->pixbuf == NULL)
             icon_info->pixbuf = gtk_widget_render_icon (GTK_WIDGET (entry),
                                                         GTK_STOCK_MISSING_IMAGE,