cc_frm_header: fix neutrino locales in CComponentsHeader

Origin commit data
------------------
Branch: ni/coolstream
Commit: 4cc9e7691a
Author: vanhofen <vanhofen@gmx.de>
Date: 2013-05-26 (Sun, 26 May 2013)

Origin message was:
------------------
- cc_frm_header: fix neutrino locales in CComponentsHeader

------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2013-05-26 22:49:46 +02:00
parent 2e816c19d0
commit 9790718094

View File

@@ -105,7 +105,7 @@ void CComponentsHeader::initVarHeader()
cch_text_obj = NULL;
cch_icon_name = NULL;
cch_btn_obj = NULL;
cch_text = "header";
cch_text = "";
cch_locale_text = NONEXISTANT_LOCALE;
cch_col_text = COL_MENUHEAD;
cch_items_y = 0;
@@ -136,7 +136,7 @@ void CComponentsHeader::setHeaderText(const std::string& caption)
void CComponentsHeader::setHeaderText(neutrino_locale_t caption_locale)
{
cch_text = g_Locale->getText(caption_locale);
cch_locale_text = caption_locale;
}
void CComponentsHeader::setHeaderIcon(const char* icon_name)
@@ -285,6 +285,9 @@ void CComponentsHeader::initCCHeaderText()
//set header text properties
if (cch_text_obj){
if (cch_locale_text != NONEXISTANT_LOCALE)
cch_text_obj->setText(cch_locale_text, CTextBox::AUTO_WIDTH, cch_font);
else
cch_text_obj->setText(cch_text, CTextBox::AUTO_WIDTH, cch_font);
cch_text_obj->forceTextPaint(); //here required
cch_text_obj->setDimensionsAll(cch_text_x, cch_items_y, width-cch_icon_w-fr_thickness, height-2*fr_thickness);