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



commit 84d4060be0ee520caa2598589333b78ca4d9a3c3
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 5182a7eb..50441d99 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]