[gnome-shell] Use g_shell_parse_argv() in run dialog



commit 6e298759a44b6ca3c77b8e934333f57ef23fc463
Author: Dan Winship <danw gnome org>
Date:   Mon Aug 10 15:49:25 2009 -0400

    Use g_shell_parse_argv() in run dialog
    
    http://bugzilla.gnome.org/show_bug.cgi?id=581137

 configure.ac       |    3 ++-
 js/ui/runDialog.js |    6 ++++--
 2 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 7aafb2a..9b66023 100644
--- a/configure.ac
+++ b/configure.ac
@@ -50,7 +50,8 @@ AM_CONDITIONAL(BUILD_RECORDER, $build_recorder)
 PKG_CHECK_MODULES(MUTTER_PLUGIN, gio-unix-2.0 gtk+-2.0 dbus-glib-1 mutter-plugins
                                  gjs-gi-1.0 libgnome-menu $recorder_modules gconf-2.0
                                  gdk-x11-2.0 clutter-x11-1.0 clutter-glx-1.0
-                                 gnome-desktop-2.0 >= 2.26 libstartup-notification-1.0)
+                                 gnome-desktop-2.0 >= 2.26 libstartup-notification-1.0
+                                 gobject-introspection-1.0 >= 0.6.4)
 PKG_CHECK_MODULES(TIDY, clutter-1.0)
 PKG_CHECK_MODULES(BIG, clutter-1.0 gtk+-2.0 librsvg-2.0)
 PKG_CHECK_MODULES(GDMUSER, dbus-glib-1 gtk+-2.0)
diff --git a/js/ui/runDialog.js b/js/ui/runDialog.js
index 5ba561b..5d68bb8 100644
--- a/js/ui/runDialog.js
+++ b/js/ui/runDialog.js
@@ -2,6 +2,7 @@
 
 const Big = imports.gi.Big;
 const Clutter = imports.gi.Clutter;
+const GLib = imports.gi.GLib;
 const Lang = imports.lang;
 const Mainloop = imports.mainloop;
 const Shell = imports.gi.Shell;
@@ -108,12 +109,13 @@ RunDialog.prototype = {
         if (f) {
             f();
         } else if (command) {
-            var p = new Shell.Process({'args' : [command]});
             try {
+                let [ok, len, args] = GLib.shell_parse_argv(command);
+                let p = new Shell.Process({'args' : args});
                 p.run();
             } catch (e) {
                 // TODO: Give the user direct feedback.
-                log('Could not run command ' + command + '.');
+                log('Could not run command ' + command + ': ' + e);
             }
         }
     },



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