[gnome-boxes] wizard: Skip URI validation for system broker import



commit c0aa16e55d58dcd0d87a07db5897d6a6bf79f896
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Mon Feb 2 19:44:56 2015 +0000

    wizard: Skip URI validation for system broker import
    
    We don't have a URI when importing VM from system broker so attempting
    to validate that only leads to import failing with a weird 'Empty
    location' error message.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=743714

 src/wizard.vala |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/src/wizard.vala b/src/wizard.vala
index 3070d04..34c0c08 100644
--- a/src/wizard.vala
+++ b/src/wizard.vala
@@ -365,6 +365,12 @@ private class Boxes.Wizard: Gtk.Stack, Boxes.UI {
     }
 
     private bool prepare (ActivityProgress progress) {
+        if (wizard_source.libvirt_sys_import) {
+            prepare_cancellable.reset ();
+
+            return true;
+        }
+
         try {
             // Validate URI
             prepare_for_location (wizard_source.uri, true);
@@ -393,9 +399,6 @@ private class Boxes.Wizard: Gtk.Stack, Boxes.UI {
             return true;
         }
 
-        if (wizard_source.libvirt_sys_import)
-            return true;
-
         try {
             prepare_for_location (wizard_source.uri, false, progress);
         } catch (GLib.Error error) {


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