diff options
author | Victor Kareh <[email protected]> | 2019-07-05 12:55:05 -0400 |
---|---|---|
committer | raveit65 <[email protected]> | 2019-07-10 16:31:02 +0200 |
commit | c54687e7d0f841c0bbcca7ce4fc808fd1739366d (patch) | |
tree | 3138fe5b315516977e4458be8f03572dd5ab152b /libcaja-private/caja-file-conflict-dialog.c | |
parent | cd688d3ea7935a03a7b8694d24f3e04e0606d610 (diff) | |
download | caja-c54687e7d0f841c0bbcca7ce4fc808fd1739366d.tar.bz2 caja-c54687e7d0f841c0bbcca7ce4fc808fd1739366d.tar.xz |
Render file-conflict icons as cairo_surface vectors
Diffstat (limited to 'libcaja-private/caja-file-conflict-dialog.c')
-rw-r--r-- | libcaja-private/caja-file-conflict-dialog.c | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/libcaja-private/caja-file-conflict-dialog.c b/libcaja-private/caja-file-conflict-dialog.c index 86cab0ca..4a671014 100644 --- a/libcaja-private/caja-file-conflict-dialog.c +++ b/libcaja-private/caja-file-conflict-dialog.c @@ -71,25 +71,25 @@ static void file_icons_changed (CajaFile *file, CajaFileConflictDialog *fcd) { - GdkPixbuf *pixbuf; + cairo_surface_t *surface; - pixbuf = caja_file_get_icon_pixbuf (fcd->details->destination, - CAJA_ICON_SIZE_LARGE, - TRUE, - 1, /*Don't double-scale icons*/ - CAJA_FILE_ICON_FLAGS_USE_THUMBNAILS); + surface = caja_file_get_icon_surface (fcd->details->destination, + CAJA_ICON_SIZE_LARGE, + FALSE, + gtk_widget_get_scale_factor (fcd->details->dest_image), + CAJA_FILE_ICON_FLAGS_USE_THUMBNAILS); - gtk_image_set_from_pixbuf (GTK_IMAGE (fcd->details->dest_image), pixbuf); - g_object_unref (pixbuf); + gtk_image_set_from_surface (GTK_IMAGE (fcd->details->dest_image), surface); + cairo_surface_destroy (surface); - pixbuf = caja_file_get_icon_pixbuf (fcd->details->source, - CAJA_ICON_SIZE_LARGE, - TRUE, - 1, /*Don't double-scale icons*/ - CAJA_FILE_ICON_FLAGS_USE_THUMBNAILS); + surface = caja_file_get_icon_surface (fcd->details->source, + CAJA_ICON_SIZE_LARGE, + FALSE, + gtk_widget_get_scale_factor (fcd->details->src_image), + CAJA_FILE_ICON_FLAGS_USE_THUMBNAILS); - gtk_image_set_from_pixbuf (GTK_IMAGE (fcd->details->src_image), pixbuf); - g_object_unref (pixbuf); + gtk_image_set_from_surface (GTK_IMAGE (fcd->details->src_image), surface); + cairo_surface_destroy (surface); } static void @@ -106,7 +106,7 @@ file_list_ready_cb (GList *files, char *dest_name, *dest_dir_name, *edit_name; char *label_text; char *size, *date, *type = NULL; - GdkPixbuf *pixbuf; + cairo_surface_t *surface; GtkWidget *label; GString *str; PangoAttrList *attr_list; @@ -234,27 +234,27 @@ file_list_ready_cb (GList *files, g_free (secondary_text); /* Set up file icons */ - pixbuf = caja_file_get_icon_pixbuf (dest, - CAJA_ICON_SIZE_LARGE, - TRUE, - 1, /*Don't double-scale icons*/ - CAJA_FILE_ICON_FLAGS_USE_THUMBNAILS); - details->dest_image = gtk_image_new_from_pixbuf (pixbuf); + surface = caja_file_get_icon_surface (dest, + CAJA_ICON_SIZE_LARGE, + TRUE, + gtk_widget_get_scale_factor (fcd->details->titles_vbox), + CAJA_FILE_ICON_FLAGS_USE_THUMBNAILS); + details->dest_image = gtk_image_new_from_surface (surface); gtk_box_pack_start (GTK_BOX (details->first_hbox), details->dest_image, FALSE, FALSE, 0); gtk_widget_show (details->dest_image); - g_object_unref (pixbuf); - - pixbuf = caja_file_get_icon_pixbuf (src, - CAJA_ICON_SIZE_LARGE, - TRUE, - 1, /*Don't double-scale icons*/ - CAJA_FILE_ICON_FLAGS_USE_THUMBNAILS); - details->src_image = gtk_image_new_from_pixbuf (pixbuf); + cairo_surface_destroy (surface); + + surface = caja_file_get_icon_surface (src, + CAJA_ICON_SIZE_LARGE, + TRUE, + gtk_widget_get_scale_factor (fcd->details->titles_vbox), + CAJA_FILE_ICON_FLAGS_USE_THUMBNAILS); + details->src_image = gtk_image_new_from_surface (surface); gtk_box_pack_start (GTK_BOX (details->second_hbox), details->src_image, FALSE, FALSE, 0); gtk_widget_show (details->src_image); - g_object_unref (pixbuf); + cairo_surface_destroy (surface); /* Set up labels */ label = gtk_label_new (NULL); |