[gnome-boxes] app: Minor simplification of code



commit 60e4186161da4bdb3d19cf877dc608538d1c69ec
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Thu Aug 22 03:29:07 2013 +0300

    app: Minor simplification of code
    
    https://bugzilla.gnome.org/show_bug.cgi?id=688798

 src/app.vala |   14 ++++++--------
 1 files changed, 6 insertions(+), 8 deletions(-)
---
diff --git a/src/app.vala b/src/app.vala
index 0746d7c..0743e24 100644
--- a/src/app.vala
+++ b/src/app.vala
@@ -289,17 +289,15 @@ private class Boxes.App: Boxes.UI {
             });
         } else if (opt_uris != null) {
             var arg = opt_uris[0];
-            var file = File.new_for_commandline_arg (arg);
 
-            if (file.query_exists () || Uri.parse_scheme (arg) != null) {
-                call_when_ready (() => {
+            call_when_ready (() => {
+                var file = File.new_for_commandline_arg (arg);
+
+                if (file.query_exists () || Uri.parse_scheme (arg) != null)
                     wizard.open_with_uri (file.get_uri ());
-                });
-            } else {
-                call_when_ready (() => {
+                else
                     open (arg);
-                });
-            }
+            });
         }
 
         if (opt_search != null) {


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