From d22877daff84a004fb555274afcff9e1675fa220 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ball=C3=B3=20Gy=C3=B6rgy?= Date: Tue, 20 Oct 2026 16:07:37 +0200 Subject: battstat: Fix reopening preferences after closing the window Handle the delete-event to hide the preferences dialog instead of destroying it when the window is closed using the title bar's close button. This allows the existing dialog to be presented again when the preferences are opened. --- battstat/battstat-preferences.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'battstat') diff --git a/battstat/battstat-preferences.c b/battstat/battstat-preferences.c index 88f939191..f7b2f9782 100644 --- a/battstat/battstat-preferences.c +++ b/battstat/battstat-preferences.c @@ -263,6 +263,9 @@ battstat_preferences_init (BattstatPreferences *dialog) { gtk_widget_init_template (GTK_WIDGET (dialog)); + g_signal_connect (dialog, "delete-event", + G_CALLBACK (gtk_widget_hide_on_delete), NULL); + g_object_bind_property (dialog->check_text, "active", dialog->check_text_ptr, "sensitive", G_BINDING_DEFAULT); -- cgit v1.2.1