[gnome-boxes/connect-to-new-remotes: 38/38] wizard: Connect to newly created remote machines



commit 9cc59eea73f75854178bfa345d351239d970bde7
Author: Felipe Borges <felipeborges gnome org>
Date:   Mon Jan 22 13:42:28 2018 +0100

    wizard: Connect to newly created remote machines
    
    Just like we do for libvirt machines.
    
    p.s.: this Wizard code needs refactoring.
    
    Fixes #48

 src/wizard.vala | 9 +++++++++
 1 file changed, 9 insertions(+)
---
diff --git a/src/wizard.vala b/src/wizard.vala
index f9d57ac4..dfc7b287 100644
--- a/src/wizard.vala
+++ b/src/wizard.vala
@@ -112,6 +112,11 @@
                        if (create.end (result)) {
                           window.set_state (UIState.COLLECTION);
                           wizard_source.page = SourcePage.MAIN;
+
+                          if (machine != null && machine is RemoteMachine) {
+                            window.connect_to (machine);
+                            machine = null;
+                          }
                        } else {
                           window.notificationbar.display_error (_("Box creation failed"));
                        }
@@ -271,6 +276,10 @@ private async bool create () {
         } else if (source != null) {
             source.save ();
             App.app.add_collection_source.begin (source);
+
+            if (machine is RemoteMachine) {
+                return true;
+            }
         } else if (wizard_source.libvirt_sys_import) {
             wizard_source.libvirt_sys_importer.import.begin ();
         } else {


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