diff options
author | Philipp Sehmisch <crush@themanaworld.org> | 2009-02-10 15:51:54 +0100 |
---|---|---|
committer | Ira Rice <irarice@gmail.com> | 2009-02-10 12:35:51 -0700 |
commit | 243cd9b123069decdcbefa05d04517492efbc3ee (patch) | |
tree | c0d1600ddcce34dc9d5108e2206fb455562593e3 /src | |
parent | 02e60b55b359002ae1f26f36b40f8fa78ea1a708 (diff) | |
download | mana-243cd9b123069decdcbefa05d04517492efbc3ee.tar.gz mana-243cd9b123069decdcbefa05d04517492efbc3ee.tar.bz2 mana-243cd9b123069decdcbefa05d04517492efbc3ee.tar.xz mana-243cd9b123069decdcbefa05d04517492efbc3ee.zip |
Fixed a compile error by using less awkward code
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/setup_colours.cpp | 16 |
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; } |