[gimp/wip/Jehan/issue-8518-welcome-dialog-macos] Issue #8518: Could not close new Welcome dialog.
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/wip/Jehan/issue-8518-welcome-dialog-macos] Issue #8518: Could not close new Welcome dialog.
- Date: Sat, 10 Sep 2022 22:05:49 +0000 (UTC)
commit d505b3d25c6f22569eeb7852a08a4db162b0fab1
Author: Jehan <jehan girinstud io>
Date: Sat Sep 10 23:56:56 2022 +0200
Issue #8518: Could not close new Welcome dialog.
I can't reproduce this on Linux and according to docs and tests, the
"response" signal handles the delete-event.
But maybe there is a bug on macOS where it is not triggered when
clicking the window button?
THIS IS A TEST COMMIT, DO NOT PUSH AS-IS!
app/dialogs/welcome-dialog.c | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
---
diff --git a/app/dialogs/welcome-dialog.c b/app/dialogs/welcome-dialog.c
index 94b626adf7..853e4ea68b 100644
--- a/app/dialogs/welcome-dialog.c
+++ b/app/dialogs/welcome-dialog.c
@@ -55,6 +55,21 @@ static void welcome_size_allocate (GtkWidget *welcome_dia
GtkAllocation *allocation,
gpointer user_data);
+static gboolean
+on_delete (GtkWidget* self)
+{
+ printf("%s\n", G_STRFUNC);
+ gtk_widget_destroy (self);
+ return FALSE;
+}
+
+static gboolean
+on_response (GtkWidget* self)
+{
+ printf("%s\n", G_STRFUNC);
+ gtk_widget_destroy (self);
+ return FALSE;
+}
GtkWidget *
welcome_dialog_create (Gimp *gimp)
@@ -96,7 +111,11 @@ welcome_dialog_create (Gimp *gimp)
g_signal_connect (welcome_dialog,
"response",
- G_CALLBACK (gtk_widget_destroy),
+ G_CALLBACK (on_response),
+ NULL);
+ g_signal_connect (welcome_dialog,
+ "delete-event",
+ G_CALLBACK (on_delete),
NULL);
main_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]