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



commit bff4e0e8ee81fd86085939e5fff1fdaedda06729
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 a452771..677c7cf 100644
--- a/src/wizard.vala
+++ b/src/wizard.vala
@@ -352,6 +352,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);
@@ -380,9 +386,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]