aboutsummaryrefslogtreecommitdiff
path: root/gui/chooser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gui/chooser.cpp')
-rw-r--r--gui/chooser.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/gui/chooser.cpp b/gui/chooser.cpp
index c6068e2b45..6ebfc18885 100644
--- a/gui/chooser.cpp
+++ b/gui/chooser.cpp
@@ -27,27 +27,25 @@ enum {
};
ChooserDialog::ChooserDialog(NewGui *gui, const String title, const StringList& list)
- : Dialog(gui, 8, 24, 320-2*8, 141)
-{
+ : Dialog(gui, 8, 24, 320 -2 * 8, 141) {
// Headline
- new StaticTextWidget(this, 10, 8, _w-2*10, kLineHeight, title, kTextAlignCenter);
-
+ new StaticTextWidget(this, 10, 8, _w - 2 * 10, kLineHeight, title, kTextAlignCenter);
+
// Add choice list
- _list = new ListWidget(this, 10, 22, _w-2*10, _h-22-24-10);
+ _list = new ListWidget(this, 10, 22, _w - 2 * 10, _h - 22 - 24 - 10);
_list->setNumberingMode(kListNumberingOff);
_list->setList(list);
// Buttons
- addButton(_w-2*(kButtonWidth+10), _h-24, "Cancel", kCloseCmd, 0);
- _chooseButton = addButton(_w-(kButtonWidth+10), _h-24, "Choose", kChooseCmd, 0);
+ addButton(_w - 2 * (kButtonWidth + 10), _h - 24, "Cancel", kCloseCmd, 0);
+ _chooseButton = addButton(_w-(kButtonWidth + 10), _h - 24, "Choose", kChooseCmd, 0);
_chooseButton->setEnabled(false);
-
+
// Result = -1 -> no choice was made
setResult(-1);
}
-void ChooserDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data)
-{
+void ChooserDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {
int item = _list->getSelected();
switch (cmd) {
case kChooseCmd: