summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorlukefromdc <[email protected]>2024-01-10 17:34:32 -0500
committerLuke from DC <[email protected]>2024-01-17 00:33:59 +0000
commitf885c9e0ab9384170417e3979b67f7fad5a186fc (patch)
treedd47ab2c9ad80d38493b0db0a880359654e19ca9 /src
parent4bb9a2b8be6d71798acf68fa2b1932e130ad23ec (diff)
downloadcaja-f885c9e0ab9384170417e3979b67f7fad5a186fc.tar.bz2
caja-f885c9e0ab9384170417e3979b67f7fad5a186fc.tar.xz
wayland-background-dialog: ensure style provider is added only once
Diffstat (limited to 'src')
-rw-r--r--src/file-manager/fm-desktop-wayland-bg-dialog.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/file-manager/fm-desktop-wayland-bg-dialog.c b/src/file-manager/fm-desktop-wayland-bg-dialog.c
index 588e9ab0..84d0de35 100644
--- a/src/file-manager/fm-desktop-wayland-bg-dialog.c
+++ b/src/file-manager/fm-desktop-wayland-bg-dialog.c
@@ -78,6 +78,9 @@ update_preview (gboolean starting, GtkWidget *box, const gchar *filename,
preview_image = gtk_image_new ();
provider = gtk_css_provider_new ();
+ gtk_style_context_add_provider (gtk_widget_get_style_context (preview),
+ GTK_STYLE_PROVIDER (provider),
+ GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
gtk_box_pack_start (GTK_BOX (preview), preview_image, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (box), preview, FALSE, FALSE, 0);
}
@@ -115,9 +118,6 @@ update_preview (gboolean starting, GtkWidget *box, const gchar *filename,
g_string_append (string, "}");
css = g_string_free (string, FALSE);
- gtk_style_context_add_provider (gtk_widget_get_style_context (preview),
- GTK_STYLE_PROVIDER (provider),
- GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
gtk_css_provider_load_from_data (provider, css, -1, NULL);