summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVictor Kareh <[email protected]>2019-07-07 07:21:51 -0400
committermonsta <[email protected]>2019-07-23 17:38:11 +0300
commit164ebe9b6d808bd2abad1ea6e7ff6eec402453a9 (patch)
tree6f0a9c4ded6bd676edebf0eb7d3943254352be61 /src
parent8446b73407dd3c9ca0b061d4c87b94e52cf94a85 (diff)
downloadcaja-164ebe9b6d808bd2abad1ea6e7ff6eec402453a9.tar.bz2
caja-164ebe9b6d808bd2abad1ea6e7ff6eec402453a9.tar.xz
preferences: Render media icons as cairo_surface
Diffstat (limited to 'src')
-rw-r--r--src/caja-file-management-properties.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/caja-file-management-properties.c b/src/caja-file-management-properties.c
index 7f540707..f272f156 100644
--- a/src/caja-file-management-properties.c
+++ b/src/caja-file-management-properties.c
@@ -32,6 +32,7 @@
#include <gio/gio.h>
#include <glib/gi18n.h>
+#include <cairo-gobject.h>
#include <eel/eel-glib-extensions.h>
@@ -778,7 +779,7 @@ caja_file_management_properties_dialog_setup_media_page (GtkBuilder *builder)
other_type_combo_box = GTK_WIDGET (gtk_builder_get_object (builder, "media_other_type_combobox"));
other_type_list_store = gtk_list_store_new (3,
- GDK_TYPE_PIXBUF,
+ CAIRO_GOBJECT_TYPE_SURFACE,
G_TYPE_STRING,
G_TYPE_STRING);
@@ -794,7 +795,7 @@ caja_file_management_properties_dialog_setup_media_page (GtkBuilder *builder)
char *description;
GIcon *icon;
CajaIconInfo *icon_info;
- GdkPixbuf *pixbuf;
+ cairo_surface_t *surface;
int icon_size, icon_scale;
if (!g_str_has_prefix (content_type, "x-content/"))
@@ -817,21 +818,21 @@ caja_file_management_properties_dialog_setup_media_page (GtkBuilder *builder)
{
icon_info = caja_icon_info_lookup (icon, icon_size, icon_scale);
g_object_unref (icon);
- pixbuf = caja_icon_info_get_pixbuf_nodefault_at_size (icon_info, icon_size);
+ surface = caja_icon_info_get_surface_nodefault_at_size (icon_info, icon_size);
g_object_unref (icon_info);
}
else
{
- pixbuf = NULL;
+ surface = NULL;
}
gtk_list_store_set (other_type_list_store, &iter,
- 0, pixbuf,
+ 0, surface,
1, description,
2, content_type,
-1);
- if (pixbuf != NULL)
- g_object_unref (pixbuf);
+ if (surface != NULL)
+ cairo_surface_destroy (surface);
g_free (description);
skip:
;
@@ -844,7 +845,7 @@ skip:
renderer = gtk_cell_renderer_pixbuf_new ();
gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (other_type_combo_box), renderer, FALSE);
gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (other_type_combo_box), renderer,
- "pixbuf", 0,
+ "surface", 0,
NULL);
renderer = gtk_cell_renderer_text_new ();
gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (other_type_combo_box), renderer, TRUE);