[gnome-shell] modalDialog: Consistently return correct boolean for open() in ModalDialogs
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] modalDialog: Consistently return correct boolean for open() in ModalDialogs
- Date: Wed, 17 Nov 2021 10:31:03 +0000 (UTC)
commit f8f37e0161f7b72f46e05643dd121cee661b3745
Author: Evan Welsh <contact evanwelsh com>
Date: Sat Oct 30 15:08:12 2021 -0700
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: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2038>
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 057cd5b1bb..7c8d69b806 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 cf835972ea..4d1bac142a 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 9d99f0035f..fd38fd2629 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() {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]