[gnome-boxes/connect-to-new-remotes] wizard: Connect to newly created	remote machines
- From: Felipe Borges <felipeborges src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [gnome-boxes/connect-to-new-remotes] wizard: Connect to newly created	remote machines
- Date: Mon, 22 Jan 2018 12:44:33 +0000 (UTC)
commit 396d280400ca42dd78000063b59d32b05360385b
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]