[gnome-nibbles/arnaudb/kill-preferences-dialog: 24/27] Make a MessageDialog modal on the correct window.
- From: Arnaud B. <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-nibbles/arnaudb/kill-preferences-dialog: 24/27] Make a MessageDialog modal on the correct window.
- Date: Tue, 23 Jun 2020 10:25:36 +0000 (UTC)
commit 518572fa1d985ce7753360d0ea5c3991d2020fa8
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Fri Jun 19 17:03:13 2020 +0200
Make a MessageDialog modal on the correct window.
src/preferences-dialog.vala | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/src/preferences-dialog.vala b/src/preferences-dialog.vala
index 859b1a4..d4eb850 100644
--- a/src/preferences-dialog.vala
+++ b/src/preferences-dialog.vala
@@ -21,8 +21,6 @@ using Gtk;
[GtkTemplate (ui = "/org/gnome/nibbles/ui/preferences-dialog.ui")]
private class PreferencesDialog : Window
{
- private ApplicationWindow window;
-
private GLib.Settings settings;
private Gee.ArrayList<GLib.Settings> worm_settings;
@@ -80,7 +78,6 @@ private class PreferencesDialog : Window
this.settings = settings;
this.worm_settings = worm_settings;
- this.window = window;
if (n_worms == 1)
headerbar_stack.set_visible_child_name ("preferences-label");
@@ -187,8 +184,8 @@ private class PreferencesDialog : Window
|| keyval == worm_settings [i].get_int ("key-left")
|| keyval == worm_settings [i].get_int ("key-right"))
{
- var dialog = new MessageDialog (window,
- DialogFlags.DESTROY_WITH_PARENT,
+ var dialog = new MessageDialog (this,
+ DialogFlags.DESTROY_WITH_PARENT | DialogFlags.MODAL,
MessageType.WARNING,
ButtonsType.CANCEL,
/* Translators: label of a MessageDialog that appears when
one tries to assign an already assigned key */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]