summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrbuj <[email protected]>2022-06-01 12:08:15 +0200
committerlukefromdc <[email protected]>2022-06-19 13:06:28 -0400
commit71423391061ac599f65e513204ff549e17705049 (patch)
treebc60ea18c84ca573504cc72447f4e64fe72a6f05
parent5f6191acc9cb85b0fbcd1d45b9cc7da3d7bd0f13 (diff)
downloadcaja-71423391061ac599f65e513204ff549e17705049.tar.bz2
caja-71423391061ac599f65e513204ff549e17705049.tar.xz
caja-file-conflict-dialog: update the icons once
-rw-r--r--libcaja-private/caja-file-conflict-dialog.c25
1 files changed, 9 insertions, 16 deletions
diff --git a/libcaja-private/caja-file-conflict-dialog.c b/libcaja-private/caja-file-conflict-dialog.c
index 9d86d15c..233f47ae 100644
--- a/libcaja-private/caja-file-conflict-dialog.c
+++ b/libcaja-private/caja-file-conflict-dialog.c
@@ -68,27 +68,18 @@ G_DEFINE_TYPE_WITH_PRIVATE (CajaFileConflictDialog,
GTK_TYPE_DIALOG);
static void
-file_icons_changed (CajaFile *file,
- CajaFileConflictDialog *fcd)
+file_icons_changed (CajaFile *file,
+ GtkWidget *widget)
{
cairo_surface_t *surface;
- surface = caja_file_get_icon_surface (fcd->details->destination,
+ surface = caja_file_get_icon_surface (file,
CAJA_ICON_SIZE_LARGE,
FALSE,
- gtk_widget_get_scale_factor (fcd->details->dest_image),
+ gtk_widget_get_scale_factor (widget),
CAJA_FILE_ICON_FLAGS_USE_THUMBNAILS);
- gtk_image_set_from_surface (GTK_IMAGE (fcd->details->dest_image), surface);
- cairo_surface_destroy (surface);
-
- 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_surface (GTK_IMAGE (fcd->details->src_image), surface);
+ gtk_image_set_from_surface (GTK_IMAGE (widget), surface);
cairo_surface_destroy (surface);
}
@@ -371,9 +362,11 @@ file_list_ready_cb (GList *files,
caja_file_monitor_add (dest, fcd, CAJA_FILE_ATTRIBUTES_FOR_ICON);
details->src_handler_id = g_signal_connect (src, "changed",
- G_CALLBACK (file_icons_changed), fcd);
+ G_CALLBACK (file_icons_changed),
+ fcd->details->src_image);
details->dest_handler_id = g_signal_connect (dest, "changed",
- G_CALLBACK (file_icons_changed), fcd);
+ G_CALLBACK (file_icons_changed),
+ fcd->details->dest_image);
}
static void