widelands-dev team mailing list archive
-
widelands-dev team
-
Mailing list archive
-
Message #00532
[Merge] lp:~alocritani/widelands/bug900260 into lp:widelands
Angelo Locritani has proposed merging lp:~alocritani/widelands/bug900260 into lp:widelands.
Requested reviews:
Widelands Developers (widelands-dev)
Related bugs:
Bug #900260 in widelands: "Small improvemens to replay spinbutton"
https://bugs.launchpad.net/widelands/+bug/900260
For more details, see:
https://code.launchpad.net/~alocritani/widelands/bug900260/+merge/84901
Added a replacement for replay spinbutton (1day instead of default 1days) and inserted a whitespace between the number (1) and the units (day) so it's now "1 day", "2 days" etc
--
https://code.launchpad.net/~alocritani/widelands/bug900260/+merge/84901
Your team Widelands Developers is requested to review the proposed merge of lp:~alocritani/widelands/bug900260 into lp:widelands.
=== modified file 'src/ui_basic/spinbox.cc'
--- src/ui_basic/spinbox.cc 2011-11-30 21:38:37 +0000
+++ src/ui_basic/spinbox.cc 2011-12-08 08:06:51 +0000
@@ -103,7 +103,7 @@
}
char buf[64];
- snprintf(buf, sizeof(buf), "%i%s", sbi->value, sbi->unit.c_str());
+ snprintf(buf, sizeof(buf), "%i %s", sbi->value, sbi->unit.c_str());
sbi->text = new UI::Textarea
(this, butw * 16 / 5, 0, textw, h, buf, Align_Center);
@@ -161,7 +161,7 @@
++i)
if (i.empty()) {
char buf[64];
- snprintf(buf, sizeof(buf), "%i%s", sbi->value, sbi->unit.c_str());
+ snprintf(buf, sizeof(buf), "%i %s", sbi->value, sbi->unit.c_str());
sbi->text->set_text(buf);
break;
} else if (i.current->value == sbi->value) {
@@ -328,7 +328,7 @@
{
if (int32_t i = findReplacement(value) >= 0) {
char buf[64];
- snprintf(buf, sizeof(buf), "%i%s", value, sbi->unit.c_str());
+ snprintf(buf, sizeof(buf), "%i %s", value, sbi->unit.c_str());
sbi->valrep[i].text = buf;
}
}
=== modified file 'src/ui_fsmenu/options.cc'
--- src/ui_fsmenu/options.cc 2011-11-30 21:38:37 +0000
+++ src/ui_fsmenu/options.cc 2011-12-08 08:06:51 +0000
@@ -197,6 +197,7 @@
m_sb_autosave .add_replacement(0, _("Off"));
m_sb_remove_replays.add_replacement(0, _("Never"));
+ m_sb_remove_replays.add_replacement(1, _("1 day"));
m_sb_maxfps .set_font(ui_fn(), fs_small(), UI_FONT_CLR_FG);
m_sb_autosave .set_font(ui_fn(), fs_small(), UI_FONT_CLR_FG);
Follow ups