Blob Blame History Raw
From f8757108221427d828bdc362438737a566e5a42d Mon Sep 17 00:00:00 2001
From: "Zeeshan Ali (Khattak)" <zeeshanak@gnome.org>
Date: Thu, 22 Aug 2013 03:29:07 +0300
Subject: [PATCH] app: Minor simplification of code

https://bugzilla.gnome.org/show_bug.cgi?id=688798
---
 src/app.vala | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/src/app.vala b/src/app.vala
index f7b6c34..aae9222 100644
--- a/src/app.vala
+++ b/src/app.vala
@@ -289,17 +289,15 @@ public int command_line (GLib.ApplicationCommandLine cmdline) {
             });
         } 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) {
-- 
2.1.0