[epiphany/wip/exalm/gtk4-cleanups-2: 18/24] window-commands: Stop using gtk_dialog_run() for about dialog
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/wip/exalm/gtk4-cleanups-2: 18/24] window-commands: Stop using gtk_dialog_run() for about dialog
- Date: Tue, 30 Nov 2021 20:23:48 +0000 (UTC)
commit 40de6f3299ffb5bfa9596af9595e061b80c5d4b8
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.
Part-of: <https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/1035>
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 44256c24d..ef340197a 100644
--- a/src/window-commands.c
+++ b/src/window-commands.c
@@ -979,8 +979,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"));
@@ -1034,8 +1036,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]