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:
@ -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();
|
||||
|
Reference in New Issue
Block a user