[gnome-games/wip/exalm/present] application: Stop using Gtk.Window.present()



commit 6250692d287c83c78c3c2fb738bb62a946ce0190
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date:   Tue Mar 5 08:08:26 2019 +0500

    application: Stop using Gtk.Window.present()
    
    Use Gtk.Window.present_with_time() instead.
    
    Fixes compile-time warnings.

 src/ui/application.vala | 20 +++++++++-----------
 1 file changed, 9 insertions(+), 11 deletions(-)
---
diff --git a/src/ui/application.vala b/src/ui/application.vala
index f7a2aaa1..b302b3fc 100644
--- a/src/ui/application.vala
+++ b/src/ui/application.vala
@@ -230,7 +230,7 @@ public class Games.Application : Gtk.Application {
                });
 
                if (window != null) {
-                       window.present ();
+                       window.present_with_time (Gtk.get_current_event_time ());
                        return;
                }
 
@@ -354,16 +354,14 @@ public class Games.Application : Gtk.Application {
        }
 
        private void preferences () {
-               if (preferences_window != null) {
-                       preferences_window.present ();
-
-                       return;
+               if (preferences_window == null) {
+                       preferences_window = new PreferencesWindow ();
+                       preferences_window.destroy.connect (() => {
+                               preferences_window = null;
+                       });
                }
-               preferences_window = new PreferencesWindow ();
-               preferences_window.destroy.connect (() => {
-                       preferences_window = null;
-               });
-               preferences_window.present ();
+
+               preferences_window.present_with_time (Gtk.get_current_event_time ());
        }
 
        private void help () {
@@ -401,7 +399,7 @@ public class Games.Application : Gtk.Application {
                                dialog.hide_on_delete ();
                });
 
-               dialog.present ();
+               dialog.present_with_time (Gtk.get_current_event_time ());
        }
 
        private void quit_application () {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]