[gnome-boxes/welcome-tutorial-improvements: 1/2] app-window: Make the Welcome Tutorial dialog modal



commit 509f8d2d9144a13ce7f4072cc1d918f4c99e7a1d
Author: Felipe Borges <felipeborges gnome org>
Date:   Mon Dec 16 18:17:02 2019 +0100

    app-window: Make the Welcome Tutorial dialog modal
    
    This way it gets presented above the main window at the first run.
    
    Fixes #282

 src/app-window.vala | 13 ++++++++-----
 src/app.vala        |  2 ++
 2 files changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/src/app-window.vala b/src/app-window.vala
index faa9b273..c645fa4d 100644
--- a/src/app-window.vala
+++ b/src/app-window.vala
@@ -189,11 +189,6 @@ else if (ui_state == UIState.DISPLAY)
         if (app.application_id == "org.gnome.BoxesDevel") {
             get_style_context ().add_class ("devel");
         }
-
-        if (first_run) {
-            new Boxes.WelcomeTutorial (this).run ();
-            first_run = !first_run;
-        }
     }
 
     public void setup_ui () {
@@ -312,6 +307,14 @@ public void show_vm_assistant (string? path = null) {
         new Boxes.VMAssistant (this, path).run ();
     }
 
+    public void show_welcome_tutorial () {
+        if (first_run) {
+            new Boxes.WelcomeTutorial (this).run ();
+
+            first_run = !first_run;
+        }
+    }
+
     public void show_properties () {
         if (current_item != null) {
             if (ui_state == UIState.COLLECTION && selection_mode)
diff --git a/src/app.vala b/src/app.vala
index dd6509d8..5fe63c9d 100644
--- a/src/app.vala
+++ b/src/app.vala
@@ -164,6 +164,8 @@ public override void activate () {
         window.set_state (UIState.COLLECTION);
 
         activate_async.begin ();
+
+        window.show_welcome_tutorial ();
     }
 
     static bool opt_fullscreen;


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