summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Sehmisch <crush@themanaworld.org>2009-02-10 15:51:54 +0100
committerPhilipp Sehmisch <crush@themanaworld.org>2009-02-10 15:51:54 +0100
commit133829a37a3bef491eb8b7b8936f44106310f31e (patch)
tree1d2f0b53f13e60ce4d44774df8819820654297f1
parentdb038683f22ca408d6c8df32863183b3b8b85046 (diff)
downloadmana-client-133829a37a3bef491eb8b7b8936f44106310f31e.tar.gz
mana-client-133829a37a3bef491eb8b7b8936f44106310f31e.tar.bz2
mana-client-133829a37a3bef491eb8b7b8936f44106310f31e.tar.xz
mana-client-133829a37a3bef491eb8b7b8936f44106310f31e.zip
Fixed a compile error by using less awkward code
-rw-r--r--src/gui/setup_colours.cpp16
1 files changed, 5 insertions, 11 deletions
diff --git a/src/gui/setup_colours.cpp b/src/gui/setup_colours.cpp
index 49e08aeb..82499560 100644
--- a/src/gui/setup_colours.cpp
+++ b/src/gui/setup_colours.cpp
@@ -155,10 +155,10 @@ void Setup_Colours::action(const gcn::ActionEvent &event)
std::string msg;
if (ch == '<')
- msg = toString("@@|") +
+ msg = toString("@@|") +
_("This is what the color looks like") + "@@";
else
- msg = "##" + toString(ch) +
+ msg = "##" + toString(ch) +
_("This is what the color looks like");
mPreview->clearRows();
@@ -171,27 +171,21 @@ void Setup_Colours::action(const gcn::ActionEvent &event)
if (event.getId() == "slider_red")
{
- char buffer[30];
- std::sprintf(buffer, "%d", static_cast<int>(mRedSlider->getValue()));
- mRedText->setText(buffer);
+ mRedText->setText(toString(mRedSlider->getValue()));
updateColour();
return;
}
if (event.getId() == "slider_green")
{
- char buffer[30];
- std::sprintf(buffer, "%d", static_cast<int>(mGreenSlider->getValue()));
- mGreenText->setText(buffer);
+ mGreenText->setText(toString(mGreenSlider->getValue()));
updateColour();
return;
}
if (event.getId() == "slider_blue")
{
- char buffer[30];
- std::sprintf(buffer, "%d", static_cast<int>(mBlueSlider->getValue()));
- mBlueText->setText(buffer);
+ mBlueText->setText(toString(mBlueSlider->getValue()));
updateColour();
return;
}