summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2005-03-03 13:57:00 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2005-03-03 13:57:00 +0000
commita3cee3d83ae63c541d5dfe7be479080265a1633b (patch)
tree04aa92adf0b01a4238377348c149d7d53c4505b3
parent1f6a65d3750dea9fdb0d8c49deb3af34fa735e44 (diff)
downloadgdk-pixbuf-a3cee3d83ae63c541d5dfe7be479080265a1633b.tar.gz
Don't warn if a stock icon cannot be found. (#168830, Sven Neumann)
2005-03-03 Matthias Clasen <mclasen@redhat.com> * gtk/gtkcellrendererpixbuf.c (gtk_cell_renderer_pixbuf_render): Don't warn if a stock icon cannot be found. (#168830, Sven Neumann)
-rw-r--r--ChangeLog6
-rw-r--r--ChangeLog.pre-2-106
-rw-r--r--ChangeLog.pre-2-86
-rw-r--r--gtk/gtkcellrendererpixbuf.c37
4 files changed, 34 insertions, 21 deletions
diff --git a/ChangeLog b/ChangeLog
index 4f08c210a..2408bc42d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2005-03-03 Matthias Clasen <mclasen@redhat.com>
+ * gtk/gtkcellrendererpixbuf.c (gtk_cell_renderer_pixbuf_render):
+ Don't warn if a stock icon cannot be found. (#168830,
+ Sven Neumann)
+
+2005-03-03 Matthias Clasen <mclasen@redhat.com>
+
* gtk/gtkwidget.c (gtk_widget_reparent_subwindows):
Avoid warnings if gtk_widget_reparent() is called at
unusual times. (#168966, Christian Persch)
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index 4f08c210a..2408bc42d 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,5 +1,11 @@
2005-03-03 Matthias Clasen <mclasen@redhat.com>
+ * gtk/gtkcellrendererpixbuf.c (gtk_cell_renderer_pixbuf_render):
+ Don't warn if a stock icon cannot be found. (#168830,
+ Sven Neumann)
+
+2005-03-03 Matthias Clasen <mclasen@redhat.com>
+
* gtk/gtkwidget.c (gtk_widget_reparent_subwindows):
Avoid warnings if gtk_widget_reparent() is called at
unusual times. (#168966, Christian Persch)
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index 4f08c210a..2408bc42d 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -1,5 +1,11 @@
2005-03-03 Matthias Clasen <mclasen@redhat.com>
+ * gtk/gtkcellrendererpixbuf.c (gtk_cell_renderer_pixbuf_render):
+ Don't warn if a stock icon cannot be found. (#168830,
+ Sven Neumann)
+
+2005-03-03 Matthias Clasen <mclasen@redhat.com>
+
* gtk/gtkwidget.c (gtk_widget_reparent_subwindows):
Avoid warnings if gtk_widget_reparent() is called at
unusual times. (#168966, Christian Persch)
diff --git a/gtk/gtkcellrendererpixbuf.c b/gtk/gtkcellrendererpixbuf.c
index b4600f266..3c3840c73 100644
--- a/gtk/gtkcellrendererpixbuf.c
+++ b/gtk/gtkcellrendererpixbuf.c
@@ -510,35 +510,15 @@ gtk_cell_renderer_pixbuf_render (GtkCellRenderer *cell,
GdkPixbuf *colorized = NULL;
GdkRectangle pix_rect;
GdkRectangle draw_rect;
- gboolean stock_pixbuf = FALSE;
priv = GTK_CELL_RENDERER_PIXBUF_GET_PRIVATE (cell);
- pixbuf = cellpixbuf->pixbuf;
- if (cell->is_expander)
- {
- if (cell->is_expanded &&
- cellpixbuf->pixbuf_expander_open != NULL)
- pixbuf = cellpixbuf->pixbuf_expander_open;
- else if (! cell->is_expanded &&
- cellpixbuf->pixbuf_expander_closed != NULL)
- pixbuf = cellpixbuf->pixbuf_expander_closed;
- }
-
- if (!pixbuf && !priv->stock_id)
- return;
- else if (!pixbuf && priv->stock_id)
- stock_pixbuf = TRUE;
-
gtk_cell_renderer_pixbuf_get_size (cell, widget, cell_area,
&pix_rect.x,
&pix_rect.y,
&pix_rect.width,
&pix_rect.height);
- if (stock_pixbuf)
- pixbuf = cellpixbuf->pixbuf;
-
pix_rect.x += cell_area->x;
pix_rect.y += cell_area->y;
pix_rect.width -= cell->xpad * 2;
@@ -548,6 +528,21 @@ gtk_cell_renderer_pixbuf_render (GtkCellRenderer *cell,
!gdk_rectangle_intersect (expose_area, &draw_rect, &draw_rect))
return;
+ pixbuf = cellpixbuf->pixbuf;
+
+ if (cell->is_expander)
+ {
+ if (cell->is_expanded &&
+ cellpixbuf->pixbuf_expander_open != NULL)
+ pixbuf = cellpixbuf->pixbuf_expander_open;
+ else if (!cell->is_expanded &&
+ cellpixbuf->pixbuf_expander_closed != NULL)
+ pixbuf = cellpixbuf->pixbuf_expander_closed;
+ }
+
+ if (!pixbuf)
+ return;
+
if (GTK_WIDGET_STATE (widget) == GTK_STATE_INSENSITIVE || !cell->sensitive)
{
GtkIconSource *source;
@@ -555,7 +550,7 @@ gtk_cell_renderer_pixbuf_render (GtkCellRenderer *cell,
source = gtk_icon_source_new ();
gtk_icon_source_set_pixbuf (source, pixbuf);
/* The size here is arbitrary; since size isn't
- * wildcarded in the souce, it isn't supposed to be
+ * wildcarded in the source, it isn't supposed to be
* scaled by the engine function
*/
gtk_icon_source_set_size (source, GTK_ICON_SIZE_SMALL_TOOLBAR);