[gnome-boxes] Allow passing paths instead of URIs



commit ca96e205d905938c2ec4941ce0b2174336dbbecd
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Tue Nov 15 23:14:39 2011 +0200

    Allow passing paths instead of URIs

 src/main.vala |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/main.vala b/src/main.vala
index c167ce7..eb070a2 100644
--- a/src/main.vala
+++ b/src/main.vala
@@ -66,10 +66,11 @@ public void main (string[] args) {
         warning (error.message);
     }
 
-    if (uris != null)
+    if (uris != null) {
         // FIXME: We only handle a single URI from commandline
-        new Boxes.App.with_uri (uris[0]);
-    else
+        var file = File.new_for_commandline_arg (uris[0]);
+        new Boxes.App.with_uri (file.get_uri ());
+    } else
         new Boxes.App ();
     Gtk.main ();
 }



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