Add magic 'restart' command to run dialog which re-executes

This is immensely convenient for debugging.  The shell global reexec_self
only works on Linux, sue me.

http://bugzilla.gnome.org/show_bug.cgi?id=565037

svn path=/trunk/; revision=130
This commit is contained in:
Colin Walters
2008-12-18 20:57:37 +00:00
parent f059492a20
commit 6a1e408c44
3 changed files with 44 additions and 1 deletions

View File

@ -78,7 +78,10 @@ RunDialog.prototype = {
},
_run : function(command) {
if (command) {
if (command == 'restart') {
let global = Shell.Global.get();
global.reexec_self();
} else if (command) {
var p = new Shell.Process({'args' : [command]});
try {
p.run();