From 0ae285cc826904cca97b3fbf9adc4395791605e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Sat, 17 Feb 2024 00:20:46 +0100 Subject: [PATCH] modalDialog: Remove `onPrimary` parameter It was added in commit 48fb16b570 for the lock screen, but that hasn't been based on ModalDialog for a long time. It doesn't appear that anything else ever used the parameter, so just remove it. Part-of: --- js/ui/modalDialog.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/js/ui/modalDialog.js b/js/ui/modalDialog.js index 3593d2565..cab7f85c0 100644 --- a/js/ui/modalDialog.js +++ b/js/ui/modalDialog.js @@ -141,11 +141,8 @@ export const ModalDialog = GObject.registerClass({ return this.dialogLayout.addButton(buttonInfo); } - _fadeOpen(onPrimary) { - if (onPrimary) - this._monitorConstraint.primary = true; - else - this._monitorConstraint.index = global.display.get_current_monitor(); + _fadeOpen() { + this._monitorConstraint.index = global.display.get_current_monitor(); this._setState(State.OPENING); @@ -174,14 +171,14 @@ export const ModalDialog = GObject.registerClass({ () => (this._initialKeyFocus = null), this); } - open(timestamp, onPrimary) { + open(_timestamp) { if (this.state === State.OPENED || this.state === State.OPENING) return true; if (!this.pushModal()) return false; - this._fadeOpen(onPrimary); + this._fadeOpen(); return true; }