Actually run the program
authorEnrico Zini <enrico@enricozini.org>
Mon, 3 Aug 2009 22:18:08 +0000 (23:18 +0100)
committerEnrico Zini <enrico@enricozini.org>
Mon, 3 Aug 2009 22:18:08 +0000 (23:18 +0100)
src/app_wm.vala

index e2b8b283c7d4b25278cd210a5a420cba5adea2ce..2b5dc5aac0cca9d71ace6a311f1f1df7d890adde 100644 (file)
@@ -147,7 +147,16 @@ public class LauncherButton : Gtk.Button
 
        public void on_clicked()
        {
-               stderr.printf("COMMAND: %s\n", exec);
+               zavai.log.info("Run program: " + exec);
+               string[] args = new string[] { exec, null };
+               Pid pid;
+               Process.spawn_async(
+                       Environment.get_home_dir(),
+                       args,
+                       null,
+                       SpawnFlags.SEARCH_PATH,
+                       null,
+                       out pid);
        }
 }
 
@@ -234,7 +243,7 @@ public void init()
                zavai.log.error("Not running launcher: " + e.message);
                launcher = null;
        }
-       
+
        if (launcher != null)
        {
                zavai.registry.register_applet("wm.launcher", launcher);