[gtk+] filechooserwidget: Use GIcons
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] filechooserwidget: Use GIcons
- Date: Thu, 9 Nov 2017 02:57:04 +0000 (UTC)
commit 8460034f58274378b4ea118771487bde569e89b0
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Nov 8 21:52:50 2017 -0500
filechooserwidget: Use GIcons
This lets us avoid much of the symbolic icon rendering api.
gtk/gtkfilechooserwidget.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/gtk/gtkfilechooserwidget.c b/gtk/gtkfilechooserwidget.c
index f23e665..d2f9d5f 100644
--- a/gtk/gtkfilechooserwidget.c
+++ b/gtk/gtkfilechooserwidget.c
@@ -408,7 +408,7 @@ enum {
MODEL_COL_NAME_COLLATED,
MODEL_COL_IS_FOLDER,
MODEL_COL_IS_SENSITIVE,
- MODEL_COL_SURFACE,
+ MODEL_COL_ICON,
MODEL_COL_SIZE_TEXT,
MODEL_COL_DATE_TEXT,
MODEL_COL_TIME_TEXT,
@@ -427,7 +427,7 @@ enum {
G_TYPE_STRING, /* MODEL_COL_NAME_COLLATED */ \
G_TYPE_BOOLEAN, /* MODEL_COL_IS_FOLDER */ \
G_TYPE_BOOLEAN, /* MODEL_COL_IS_SENSITIVE */ \
- CAIRO_GOBJECT_TYPE_SURFACE, /* MODEL_COL_SURFACE */ \
+ G_TYPE_ICON, /* MODEL_COL_ICON */ \
G_TYPE_STRING, /* MODEL_COL_SIZE_TEXT */ \
G_TYPE_STRING, /* MODEL_COL_DATE_TEXT */ \
G_TYPE_STRING, /* MODEL_COL_TIME_TEXT */ \
@@ -3738,7 +3738,7 @@ change_icon_theme (GtkFileChooserWidget *impl)
/* the first cell in the first column is the icon column, and we have a fixed size there */
set_icon_cell_renderer_fixed_size (impl);
- clear_model_cache (impl, MODEL_COL_SURFACE);
+ clear_model_cache (impl, MODEL_COL_ICON);
gtk_widget_queue_resize (priv->browse_files_tree_view);
profile_end ("end", NULL);
@@ -4951,12 +4951,12 @@ file_system_model_set (GtkFileSystemModel *model,
else
g_value_set_boolean (value, TRUE);
break;
- case MODEL_COL_SURFACE:
+ case MODEL_COL_ICON:
if (info)
{
if (g_file_info_has_attribute (info, G_FILE_ATTRIBUTE_STANDARD_ICON))
{
- g_value_take_boxed (value, _gtk_file_info_render_icon (info, GTK_WIDGET (impl),
priv->icon_size));
+ g_value_take_object (value, _gtk_file_info_get_icon (info, priv->icon_size,
gtk_widget_get_scale_factor (GTK_WIDGET (impl))));
}
else
{
@@ -7853,7 +7853,7 @@ update_cell_renderer_attributes (GtkFileChooserWidget *impl)
gtk_tree_view_column_set_attributes (priv->list_name_column,
priv->list_pixbuf_renderer,
- "surface", MODEL_COL_SURFACE,
+ "gicon", MODEL_COL_ICON,
"sensitive", MODEL_COL_IS_SENSITIVE,
NULL);
gtk_tree_view_column_set_attributes (priv->list_name_column,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]