Cleanups for runDialog

Using an internal boolean rather than the visibility property seems
more reliable to me.  Add a list of internal functions rather than
an if/else chain, so for example an extension could hook something on.

Delete the javascript evaluator in favor of the upcoming lookingGlass.js.
This commit is contained in:
Colin Walters
2009-08-03 17:52:45 -04:00
parent 45dc34bfa2
commit 224538c885
2 changed files with 41 additions and 62 deletions

View File

@ -51,17 +51,10 @@ function start() {
global.connect('panel-run-dialog', function(panel) {
// Make sure not more than one run dialog is shown.
if (!runDialog) {
if (runDialog == null) {
runDialog = new RunDialog.RunDialog();
let endHandler = function() {
runDialog.destroy();
runDialog = null;
};
runDialog.connect('run', endHandler);
runDialog.connect('cancel', endHandler);
if (!runDialog.show())
endHandler();
}
runDialog.open();
});
overlay = new Overlay.Overlay();