CMenuSeparator: clean up multiple code parts

Origin commit data
------------------
Branch: ni/coolstream
Commit: 326a9634e1
Author: Thilo Graf <dbt@novatux.de>
Date: 2017-06-18 (Sun, 18 Jun 2017)


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

------------------
This commit was generated by Migit
This commit is contained in:
2017-06-18 00:04:40 +02:00
parent b0d7a2a488
commit b295c863d0
2 changed files with 11 additions and 6 deletions

View File

@@ -2231,18 +2231,20 @@ int CMenuForwarder::paint(bool selected)
//------------------------------------------------------------------------------------------------------------------------------- //-------------------------------------------------------------------------------------------------------------------------------
CMenuSeparator::CMenuSeparator(const int Type, const neutrino_locale_t Text, bool IsStatic) : CMenuItem(false, CRCInput::RC_nokey, NULL, NULL, IsStatic) CMenuSeparator::CMenuSeparator(const int Type, const neutrino_locale_t Text, bool IsStatic) : CMenuItem(false, CRCInput::RC_nokey, NULL, NULL, IsStatic)
{ {
type = Type; init(Type, Text, "");
name = Text;
nameString = "";
} }
CMenuSeparator::CMenuSeparator(const int Type, const std::string &Text, bool IsStatic) : CMenuItem(false, CRCInput::RC_nokey, NULL, NULL, IsStatic) CMenuSeparator::CMenuSeparator(const int Type, const std::string &Text, bool IsStatic) : CMenuItem(false, CRCInput::RC_nokey, NULL, NULL, IsStatic)
{ {
type = Type; init(Type, NONEXISTANT_LOCALE, Text);
name = NONEXISTANT_LOCALE;
nameString = Text;
} }
void CMenuSeparator::init(const int& Type, const neutrino_locale_t& lText, const std::string &sText)
{
type = Type;
name = lText;
nameString = sText;
}
int CMenuSeparator::getHeight(void) int CMenuSeparator::getHeight(void)
{ {

View File

@@ -202,6 +202,9 @@ class CMenuItem : public CComponentsSignals
class CMenuSeparator : public CMenuItem class CMenuSeparator : public CMenuItem
{ {
int type; int type;
void init( const int& Type,
const neutrino_locale_t& lText,
const std::string& sText);
public: public: