[gnome-shell/wip/fmuellner/minor-cleanup: 28/28] modalDialog: Remove some unused code
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/fmuellner/minor-cleanup: 28/28] modalDialog: Remove some unused code
- Date: Wed, 21 Mar 2018 16:49:39 +0000 (UTC)
commit 526834e39be83ba27df6303b2da894f8607b9406
Author: Florian Müllner <fmuellner gnome org>
Date: Sat Mar 3 00:31:00 2018 +0100
modalDialog: Remove some unused code
No need to figure out an x_alignment variable that hasn't been used
since commit 0722c06275a3d ...
js/ui/modalDialog.js | 15 +--------------
1 file changed, 1 insertion(+), 14 deletions(-)
---
diff --git a/js/ui/modalDialog.js b/js/ui/modalDialog.js
index f97a2338c..19c5eda3a 100644
--- a/js/ui/modalDialog.js
+++ b/js/ui/modalDialog.js
@@ -100,21 +100,8 @@ var ModalDialog = new Lang.Class({
setButtons(buttons) {
this.clearButtons();
- for (let i = 0; i < buttons.length; i++) {
- let buttonInfo = buttons[i];
-
- let x_alignment;
- if (buttons.length == 1)
- x_alignment = St.Align.END;
- else if (i == 0)
- x_alignment = St.Align.START;
- else if (i == buttons.length - 1)
- x_alignment = St.Align.END;
- else
- x_alignment = St.Align.MIDDLE;
-
+ for (let buttonInfo of buttons)
this.addButton(buttonInfo);
- }
},
addButton(buttonInfo) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]