From 2c5367bc593ea567e038aeed4e5bf0dca559ab07 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Tue, 4 Sep 2012 09:45:32 +0200 Subject: [PATCH] CComponentsItemBox: use also locales in overloaded methode addText() --- src/gui/components/cc.h | 1 + src/gui/components/components.cpp | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/src/gui/components/cc.h b/src/gui/components/cc.h index c2da27b2e..e1d6cdfee 100644 --- a/src/gui/components/cc.h +++ b/src/gui/components/cc.h @@ -363,6 +363,7 @@ class CComponentsItemBox : public CComponentsContainer virtual bool addLogoOrText(int align, const std::string& logo, const std::string& text, size_t *index=NULL); virtual void clearTitlebar(); virtual void addText(const std::string& s_text, const int align=CC_ALIGN_LEFT, size_t *index=NULL); + virtual void addText(neutrino_locale_t locale_text, const int align=CC_ALIGN_LEFT, size_t *index=NULL); virtual void addIcon(const std::string& s_icon_name, const int align=CC_ALIGN_LEFT, size_t *index=NULL); virtual void addPicture(const std::string& s_picture_path, const int align=CC_ALIGN_LEFT, size_t *index=NULL); virtual void addClock(const int align=CC_ALIGN_RIGHT, size_t *index=NULL); diff --git a/src/gui/components/components.cpp b/src/gui/components/components.cpp index d81cd8db6..5856300e2 100644 --- a/src/gui/components/components.cpp +++ b/src/gui/components/components.cpp @@ -918,6 +918,11 @@ void CComponentsItemBox::addText(const std::string& s_text, const int align, siz addElement(align, CC_ITEMBOX_TEXT, s_text, index); } +void CComponentsItemBox::addText(neutrino_locale_t locale_text, const int align, size_t *index) +{ + addElement(align, CC_ITEMBOX_TEXT, g_Locale->getText(locale_text), index); +} + void CComponentsItemBox::addIcon(const std::string& s_icon_name, const int align, size_t *index) { addElement(align, CC_ITEMBOX_ICON, s_icon_name, index);