summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Kareh <[email protected]>2019-07-07 07:52:06 -0400
committerraveit65 <[email protected]>2022-07-20 18:49:31 +0200
commitbc32856c94f0572cef02fd7e72a570c2662037c0 (patch)
tree3ba965f263276a7a5eb320d87627cdcc682b671a
parent6af614f43cc6b3612dca4ba677a21ec40d84333d (diff)
downloadcaja-bc32856c94f0572cef02fd7e72a570c2662037c0.tar.bz2
caja-bc32856c94f0572cef02fd7e72a570c2662037c0.tar.xz
preferences: Render extension icons as cairo_surfaces
-rw-r--r--src/caja-file-management-properties.c24
-rw-r--r--src/caja-file-management-properties.ui4
2 files changed, 14 insertions, 14 deletions
diff --git a/src/caja-file-management-properties.c b/src/caja-file-management-properties.c
index 9ead25ed..74172efb 100644
--- a/src/caja-file-management-properties.c
+++ b/src/caja-file-management-properties.c
@@ -189,9 +189,9 @@ static const char * const icon_captions_components[] =
enum
{
EXT_STATE_COLUMN,
- EXT_ICON_COLUMN,
+ EXT_ICON_COLUMN,
EXT_INFO_COLUMN,
- EXT_STRUCT_COLUMN
+ EXT_STRUCT_COLUMN
};
static void caja_file_management_properties_dialog_update_media_sensitivity (GtkBuilder *builder);
@@ -873,7 +873,7 @@ caja_file_management_properties_dialog_setup_extension_page (GtkBuilder *builder
GtkTreeSelection *selection;
GtkTreeIter iter;
GtkIconTheme *icon_theme;
- GdkPixbuf *ext_pixbuf_icon;
+ cairo_surface_t *ext_surface_icon;
GtkButton *about_button, *configure_button;
gchar *ext_text_info;
@@ -902,15 +902,15 @@ caja_file_management_properties_dialog_setup_extension_page (GtkBuilder *builder
if (ext->icon != NULL)
{
- ext_pixbuf_icon = gtk_icon_theme_load_icon (icon_theme, ext->icon,
- 24,
- GTK_ICON_LOOKUP_USE_BUILTIN, NULL);
+ ext_surface_icon = gtk_icon_theme_load_surface (icon_theme, ext->icon,
+ 24, gtk_widget_get_scale_factor (GTK_WIDGET (view)),
+ NULL, GTK_ICON_LOOKUP_USE_BUILTIN, NULL);
}
else
{
- ext_pixbuf_icon = gtk_icon_theme_load_icon (icon_theme, "system-run",
- 24,
- GTK_ICON_LOOKUP_USE_BUILTIN, NULL);
+ ext_surface_icon = gtk_icon_theme_load_surface (icon_theme, "system-run",
+ 24, gtk_widget_get_scale_factor (GTK_WIDGET (view)),
+ NULL, GTK_ICON_LOOKUP_USE_BUILTIN, NULL);
}
if (ext->description != NULL)
@@ -928,13 +928,13 @@ caja_file_management_properties_dialog_setup_extension_page (GtkBuilder *builder
gtk_list_store_append (store, &iter);
gtk_list_store_set (store, &iter,
EXT_STATE_COLUMN, ext->state,
- EXT_ICON_COLUMN, ext_pixbuf_icon,
+ EXT_ICON_COLUMN, ext_surface_icon,
EXT_INFO_COLUMN, ext_text_info,
EXT_STRUCT_COLUMN, ext, -1);
g_free (ext_text_info);
- if (ext_pixbuf_icon)
- g_object_unref (ext_pixbuf_icon);
+ if (ext_surface_icon)
+ cairo_surface_destroy (ext_surface_icon);
}
about_button = GTK_BUTTON (gtk_builder_get_object (builder, "about_extension_button"));
diff --git a/src/caja-file-management-properties.ui b/src/caja-file-management-properties.ui
index 77fdd7ee..aa337c2f 100644
--- a/src/caja-file-management-properties.ui
+++ b/src/caja-file-management-properties.ui
@@ -7,7 +7,7 @@
<!-- column-name ext-state -->
<column type="gboolean"/>
<!-- column-name ext-icon -->
- <column type="GdkPixbuf"/>
+ <column type="CairoSurface"/>
<!-- column-name ext-info -->
<column type="gchararray"/>
<!-- column-name ext-struct -->
@@ -2537,7 +2537,7 @@
<child>
<object class="GtkCellRendererPixbuf" id="cellrendererpixbuf1"/>
<attributes>
- <attribute name="pixbuf">1</attribute>
+ <attribute name="surface">1</attribute>
</attributes>
</child>
</object>