diff --git a/src/gui/widget/menue.cpp b/src/gui/widget/menue.cpp index 6bac97b04..a06fe4d5d 100644 --- a/src/gui/widget/menue.cpp +++ b/src/gui/widget/menue.cpp @@ -2161,6 +2161,7 @@ void CMenuOptionStringChooser::init( const std::string &OptionName, optionValuePtr = pOptionValue ? pOptionValue : &optionValue; observ = Observ; pulldown = Pulldown; + hold_last_item = false; } @@ -2202,7 +2203,7 @@ int CMenuOptionStringChooser::exec(CMenuTarget* parent) std::string title_str = title.empty() ? getName() : title; - CMenuWidget* menu = new CMenuWidget(title_str, NEUTRINO_ICON_SETTINGS); + CMenuWidget* menu = new CMenuWidget(title_str, NEUTRINO_ICON_SETTINGS, 20, hold_last_item ? MN_WIDGET_ID_MENU_SELECT_STRING : -1); menu->addIntroItems(NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, CMenuWidget::BTN_TYPE_CANCEL); //if(parent) menu->move(20, 0); CMenuSelectorTarget * selector = new CMenuSelectorTarget(&select); diff --git a/src/gui/widget/menue.h b/src/gui/widget/menue.h index 38b5afc47..93c838357 100644 --- a/src/gui/widget/menue.h +++ b/src/gui/widget/menue.h @@ -503,7 +503,7 @@ class CMenuOptionStringChooser : public CMenuItem std::string* pOptionValue, CChangeObserver * const Observ, bool Pulldown ); - + bool hold_last_item; public: CMenuOptionStringChooser(const neutrino_locale_t Name, std::string* OptionValue, bool Active = false, CChangeObserver* Observ = NULL, const neutrino_msg_t DirectKey = RC_NOKEY, @@ -529,6 +529,7 @@ class CMenuOptionStringChooser : public CMenuItem } std::string getOptionValue() { return *optionValuePtr; } sigc::signal OnAfterChangeOption; + void rememberLastItem(bool remember = true) {hold_last_item = remember;} }; class CMenuGlobal diff --git a/src/neutrino_menue.h b/src/neutrino_menue.h index a4188727b..b094739f2 100644 --- a/src/neutrino_menue.h +++ b/src/neutrino_menue.h @@ -197,6 +197,9 @@ enum MN_WIDGET_ID //network services MN_WIDGET_ID_NETWORKSETUP_SERVICES, + //options select menue + MN_WIDGET_ID_MENU_SELECT_STRING, + MN_WIDGET_ID_MAX };