diff options
author | Cosimo Cecchi <cosimoc@gnome.org> | 2011-11-30 11:27:24 -0500 |
---|---|---|
committer | Cosimo Cecchi <cosimoc@gnome.org> | 2011-11-30 16:39:59 -0500 |
commit | 126651f8894d660bdc8924592b996e7dd1eef456 (patch) | |
tree | beac6071b3648878715359dd0840fc3a465b8972 /gtk/gtkcellrendererpixbuf.c | |
parent | 0304cc04d3c26d432adfab8cb9852e3b15c6eca0 (diff) | |
download | gtk+-126651f8894d660bdc8924592b996e7dd1eef456.tar.gz |
cellrendererpix: make sure to select the default helper as a fallback
If we don't have expander pixbufs, select the default helper to render
the icon, even if the cell is an expander. This mimics what the old code
did.
Diffstat (limited to 'gtk/gtkcellrendererpixbuf.c')
-rw-r--r-- | gtk/gtkcellrendererpixbuf.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/gtk/gtkcellrendererpixbuf.c b/gtk/gtkcellrendererpixbuf.c index 893e163332..25820b3ac8 100644 --- a/gtk/gtkcellrendererpixbuf.c +++ b/gtk/gtkcellrendererpixbuf.c @@ -531,18 +531,14 @@ gtk_cell_renderer_pixbuf_render (GtkCellRenderer *cell, _gtk_icon_helper_set_pixbuf (icon_helper, priv->pixbuf_expander_closed); } } - else - { - icon_helper = g_object_ref (priv->icon_helper); - } - if (icon_helper != NULL) - { - _gtk_icon_helper_draw (icon_helper, - context, cr, - pix_rect.x, pix_rect.y); - g_object_unref (icon_helper); - } + if (icon_helper == NULL) + icon_helper = g_object_ref (priv->icon_helper); + + _gtk_icon_helper_draw (icon_helper, + context, cr, + pix_rect.x, pix_rect.y); + g_object_unref (icon_helper); gtk_style_context_restore (context); } |