summaryrefslogtreecommitdiff
path: root/gtk/gtkrecentchooserdefault.c
diff options
context:
space:
mode:
authorChristian Persch <chpe@gnome.org>2010-04-29 15:23:44 +0200
committerEmmanuele Bassi <ebassi@linux.intel.com>2010-10-22 12:20:55 +0100
commit95610f2a1485fb5e2ceb5d44c73c09fd4773dbad (patch)
tree8a025302271480f990aaf5bf20c4e26341f0e1eb /gtk/gtkrecentchooserdefault.c
parentb0fe3e49bbf788c9dd81d8c2f236666cc78d972d (diff)
downloadgtk+-95610f2a1485fb5e2ceb5d44c73c09fd4773dbad.tar.gz
recent-chooser: Use gtk_recent_info_get_gicon()
https://bugzilla.gnome.org/show_bug.cgi?id=617174
Diffstat (limited to 'gtk/gtkrecentchooserdefault.c')
-rw-r--r--gtk/gtkrecentchooserdefault.c25
1 files changed, 10 insertions, 15 deletions
diff --git a/gtk/gtkrecentchooserdefault.c b/gtk/gtkrecentchooserdefault.c
index 88a891a858..5445c65a08 100644
--- a/gtk/gtkrecentchooserdefault.c
+++ b/gtk/gtkrecentchooserdefault.c
@@ -435,6 +435,7 @@ gtk_recent_chooser_default_constructor (GType type,
gtk_tree_view_column_set_resizable (impl->icon_column, FALSE);
renderer = gtk_cell_renderer_pixbuf_new ();
+ g_object_set (renderer, "stock-size", GTK_ICON_SIZE_BUTTON, NULL);
gtk_tree_view_column_pack_start (impl->icon_column, renderer, FALSE);
gtk_tree_view_column_set_cell_data_func (impl->icon_column,
renderer,
@@ -984,23 +985,17 @@ recent_icon_data_func (GtkTreeViewColumn *tree_column,
GtkTreeIter *iter,
gpointer user_data)
{
- GtkRecentChooserDefault *impl = GTK_RECENT_CHOOSER_DEFAULT (user_data);
GtkRecentInfo *info = NULL;
- GdkPixbuf *pixbuf;
-
- gtk_tree_model_get (model, iter,
- RECENT_INFO_COLUMN, &info,
- -1);
+ GIcon *icon;
+
+ gtk_tree_model_get (model, iter, RECENT_INFO_COLUMN, &info, -1);
g_assert (info != NULL);
-
- pixbuf = gtk_recent_info_get_icon (info, impl->icon_size);
-
- g_object_set (cell,
- "pixbuf", pixbuf,
- NULL);
-
- if (pixbuf)
- g_object_unref (pixbuf);
+
+ icon = gtk_recent_info_get_gicon (info);
+ g_object_set (cell, "gicon", icon, NULL);
+
+ if (icon != NULL)
+ g_object_unref (icon);
gtk_recent_info_unref (info);
}