From 2dda93ed2b5cdb9a7fd9ca9a9d05944ba4a4ecdc Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Thu, 9 Feb 2017 15:52:39 +0100 Subject: [PATCH] CMenuWidget: use only nameString as container for widget name neutrino_locale_t name could be transformed always to real string to unify this container --- src/gui/widget/menue.cpp | 7 +------ src/gui/widget/menue.h | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/gui/widget/menue.cpp b/src/gui/widget/menue.cpp index cb83c00f5..d3c5d2266 100644 --- a/src/gui/widget/menue.cpp +++ b/src/gui/widget/menue.cpp @@ -534,8 +534,7 @@ CMenuGlobal* CMenuGlobal::getInstance() CMenuWidget::CMenuWidget() { - nameString = g_Locale->getText(NONEXISTANT_LOCALE); - name = NONEXISTANT_LOCALE; + nameString = ""; iconfile = ""; selected = -1; iconOffset = 0; @@ -555,7 +554,6 @@ CMenuWidget::CMenuWidget() CMenuWidget::CMenuWidget(const neutrino_locale_t Name, const std::string & Icon, const int mwidth, const mn_widget_id_t &w_index) { - name = Name; nameString = g_Locale->getText(Name); preselected = -1; Init(Icon, mwidth, w_index); @@ -563,7 +561,6 @@ CMenuWidget::CMenuWidget(const neutrino_locale_t Name, const std::string & Icon, CMenuWidget::CMenuWidget(const std::string &Name, const std::string & Icon, const int mwidth, const mn_widget_id_t &w_index) { - name = NONEXISTANT_LOCALE; nameString = Name; preselected = -1; Init(Icon, mwidth, w_index); @@ -729,8 +726,6 @@ CMenuItem* CMenuWidget::getItem(const uint& item_id) const char *CMenuWidget::getName() { - if (name != NONEXISTANT_LOCALE) - return g_Locale->getText(name); return nameString.c_str(); } diff --git a/src/gui/widget/menue.h b/src/gui/widget/menue.h index 5cfa58da2..6c60eef90 100644 --- a/src/gui/widget/menue.h +++ b/src/gui/widget/menue.h @@ -504,7 +504,7 @@ class CMenuWidget : public CMenuTarget, public CComponentsSignals unsigned int saveScreen_x; protected: std::string nameString; - neutrino_locale_t name; + CFrameBuffer *frameBuffer; std::vector items; std::vector page_start;