From c9682d98f311488ee39074f09d1ad012aab20349 Mon Sep 17 00:00:00 2001 From: deepend Date: Thu, 26 Feb 2026 02:33:52 -0700 Subject: [PATCH] Updated setup_theme_gtk3_import_cb so the GTK3 theme import file chooser dialog now calls fe_apply_theme_to_toplevel(dialog) immediately after gtk_file_chooser_dialog_new, ensuring it receives app-level theme classes like other dialogs. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added the same short explanatory comment style already used in setup_theme_show_message (“Window classes are required for GTK CSS selectors like .zoitechat-dark / .zoitechat-light.”), keeping behavior/style aligned with existing code conventions. Verified the open/cancel/import flow is unchanged: the same GTK_RESPONSE_ACCEPT gate, early return on cancel, file extraction path retrieval, and import success/error handling remain intact. --- src/fe-gtk/setup.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/fe-gtk/setup.c b/src/fe-gtk/setup.c index 87d43b86..e15db124 100644 --- a/src/fe-gtk/setup.c +++ b/src/fe-gtk/setup.c @@ -2012,6 +2012,9 @@ setup_theme_gtk3_import_cb (GtkWidget *button, gpointer user_data) _ ("_Cancel"), GTK_RESPONSE_CANCEL, _ ("_Open"), GTK_RESPONSE_ACCEPT, NULL); + /* Window classes are required for GTK CSS selectors like + * .zoitechat-dark / .zoitechat-light. */ + fe_apply_theme_to_toplevel (dialog); filter = gtk_file_filter_new (); gtk_file_filter_set_name (filter, _("Theme archives (.zip, .tar.xz, .tar.gz, .tar)"));