gtk+ r21715 - in trunk: . gtk



Author: chpe
Date: Sun Oct 26 20:37:17 2008
New Revision: 21715
URL: http://svn.gnome.org/viewvc/gtk+?rev=21715&view=rev

Log:
	Bug 557065 â gtkcellrendererpixbuf spams console over and over with
	'could not load image' warnings

	* gtk/gtkcellrendererpixbuf.c:
	(gtk_cell_renderer_pixbuf_create_themed_pixbuf): Remove noisy
	g_warning.

Modified:
   trunk/ChangeLog
   trunk/gtk/gtkcellrendererpixbuf.c

Modified: trunk/gtk/gtkcellrendererpixbuf.c
==============================================================================
--- trunk/gtk/gtkcellrendererpixbuf.c	(original)
+++ trunk/gtk/gtkcellrendererpixbuf.c	Sun Oct 26 20:37:17 2008
@@ -418,7 +418,6 @@
   GtkIconTheme *icon_theme;
   GtkSettings *settings;
   gint width, height;
-  GError *error = NULL;
 
   priv = GTK_CELL_RENDERER_PIXBUF_GET_PRIVATE (cellpixbuf);
 
@@ -445,7 +444,7 @@
 			                           priv->icon_name,
 			                           MIN (width, height), 
                                                    GTK_ICON_LOOKUP_USE_BUILTIN,
-                                                   &error);
+                                                   NULL);
   else if (priv->gicon)
     {
       GtkIconInfo *info;
@@ -454,24 +453,13 @@
                                              priv->gicon,
 			                     MIN (width, height), 
                                              GTK_ICON_LOOKUP_USE_BUILTIN);
-      if (!info)
+      if (info)
         {
-          g_set_error (&error, GTK_ICON_THEME_ERROR,  GTK_ICON_THEME_NOT_FOUND,
-                       _("Icon not present in theme"));
-        }
-      else
-        {
-          cellpixbuf->pixbuf = gtk_icon_info_load_icon (info, &error);
+          cellpixbuf->pixbuf = gtk_icon_info_load_icon (info, NULL);
           gtk_icon_info_free (info);
         }
     }
 
-  if (!cellpixbuf->pixbuf) 
-  {
-      g_warning ("could not load image: %s\n", error->message);
-      g_error_free (error);
-    }
-
   g_object_notify (G_OBJECT (cellpixbuf), "pixbuf");
 }
 



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