From 526834e39be83ba27df6303b2da894f8607b9406 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Sat, 3 Mar 2018 00:31:00 +0100 Subject: [PATCH] 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) {