[gnome-games] application-window: Quit current game before starting a new one



commit 07961a1d12074967500ab5ded52b083ed9f6274a
Author: Yetizone <andreii lisita gmail com>
Date:   Fri Jan 25 12:03:51 2019 +0200

    application-window: Quit current game before starting a new one

 src/ui/application-window.vala | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/src/ui/application-window.vala b/src/ui/application-window.vala
index 33e6a27a..8819a249 100644
--- a/src/ui/application-window.vala
+++ b/src/ui/application-window.vala
@@ -163,6 +163,10 @@ private class Games.ApplicationWindow : Gtk.ApplicationWindow {
        }
 
        public void run_game (Game game) {
+               // If there is a game already running we have to quit it first
+               if (display_box.runner != null && !quit_game())
+                       return;
+
                if (run_game_cancellable != null)
                        run_game_cancellable.cancel ();
 


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