[epiphany/wip/exalm/gtk4-cleanups-2: 21/27] window-commands: Stop using gtk_dialog_run() for about dialog
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/wip/exalm/gtk4-cleanups-2: 21/27] window-commands: Stop using gtk_dialog_run() for about dialog
- Date: Tue, 30 Nov 2021 15:11:09 +0000 (UTC)
commit 7b5a31470afda5532fadb04949be83d3c658a3bb
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Tue Nov 30 17:56:27 2021 +0500
window-commands: Stop using gtk_dialog_run() for about dialog
It also needed a manual modal=true, turns out gtk_dialog_run() does that
implicitly.
src/window-commands.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/src/window-commands.c b/src/window-commands.c
index 917d0db50..0f5ac1654 100644
--- a/src/window-commands.c
+++ b/src/window-commands.c
@@ -981,8 +981,10 @@ window_cmd_show_about (GSimpleAction *action,
dialog = GTK_ABOUT_DIALOG (gtk_about_dialog_new ());
- if (window)
+ if (window) {
gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (window));
+ gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
+ }
if (g_str_equal (PROFILE, "Canary"))
gtk_about_dialog_set_program_name (dialog, _("Epiphany Canary"));
@@ -1036,8 +1038,9 @@ window_cmd_show_about (GSimpleAction *action,
gtk_about_dialog_set_documenters (dialog, (const char **)documenters);
gtk_about_dialog_set_translator_credits (dialog, _("translator-credits"));
- gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (GTK_WIDGET (dialog));
+ g_signal_connect (dialog, "response",
+ G_CALLBACK (gtk_widget_destroy), NULL);
+ gtk_window_present (GTK_WINDOW (dialog));
g_free (comments);
g_strfreev (artists);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]