From f8f37e0161f7b72f46e05643dd121cee661b3745 Mon Sep 17 00:00:00 2001 From: Evan Welsh Date: Sat, 30 Oct 2021 15:08:12 -0700 Subject: [PATCH] modalDialog: Consistently return correct boolean for open() in ModalDialogs Previously these calls either ignored the return from super.open() or implicitely returned false. Part-of: --- js/ui/accessDialog.js | 4 +++- js/ui/runDialog.js | 4 ++-- js/ui/welcomeDialog.js | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/js/ui/accessDialog.js b/js/ui/accessDialog.js index 057cd5b1b..7c8d69b80 100644 --- a/js/ui/accessDialog.js +++ b/js/ui/accessDialog.js @@ -76,10 +76,12 @@ class AccessDialog extends ModalDialog.ModalDialog { } open() { - super.open(); + if (!super.open()) + return false; let connection = this._invocation.get_connection(); this._requestExported = this._request.export(connection, this._handle); + return true; } CloseAsync(invocation, _params) { diff --git a/js/ui/runDialog.js b/js/ui/runDialog.js index cf835972e..4d1bac142 100644 --- a/js/ui/runDialog.js +++ b/js/ui/runDialog.js @@ -249,8 +249,8 @@ class RunDialog extends ModalDialog.ModalDialog { this._commandError = false; if (this._lockdownSettings.get_boolean(DISABLE_COMMAND_LINE_KEY)) - return; + return false; - super.open(); + return super.open(); } }); diff --git a/js/ui/welcomeDialog.js b/js/ui/welcomeDialog.js index 9d99f0035..fd38fd262 100644 --- a/js/ui/welcomeDialog.js +++ b/js/ui/welcomeDialog.js @@ -26,9 +26,9 @@ class WelcomeDialog extends ModalDialog.ModalDialog { open() { if (!this._tourAppInfo) - return; + return false; - super.open(); + return super.open(); } _buildLayout() {