From 0c82bbe8d629873e4e01e6a560ada1c848f97f95 Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Tue, 29 Dec 2015 09:44:43 +0100 Subject: [PATCH] - user_menue_setup: don't override users title anymore --- src/gui/user_menue_setup.cpp | 24 ++++++++---------------- src/gui/user_menue_setup.h | 1 - 2 files changed, 8 insertions(+), 17 deletions(-) diff --git a/src/gui/user_menue_setup.cpp b/src/gui/user_menue_setup.cpp index fd2d3e3af..7fd2d38aa 100644 --- a/src/gui/user_menue_setup.cpp +++ b/src/gui/user_menue_setup.cpp @@ -262,37 +262,31 @@ int CUserMenuSetup::showSetup() } -//check items of current button menu and set prefered menue name -void CUserMenuSetup::checkButtonItems() +//check button name for details like empty string and show an user message on issue +void CUserMenuSetup::checkButtonName() { //count of configured items int used_items = getUsedItemsCount(); - + //warn if no items defined and reset menu name, if empty - if (used_items == 0){ + if (used_items == 0) + { if (!g_settings.usermenu[button]->title.empty()){ // DisplayInfoMessage(g_Locale->getText(LOCALE_USERMENU_MSG_WARNING_NO_ITEMS)); g_settings.usermenu[button]->title = ""; } + //exit function return; } +#if 0 //if found only 1 configured item, ensure that the caption of usermenu is the same like this if (used_items == 1) { bool dummy; g_settings.usermenu[button]->title = CUserMenu::getUserMenuButtonName(button, dummy); } -} +#endif -//check button name for details like empty string and show an user message on issue -void CUserMenuSetup::checkButtonName() -{ - checkButtonItems(); - - //exit function, if no items found - if (getUsedItemsCount() == 0) - return; - if (button < USERMENU_ITEMS_COUNT && g_settings.usermenu[button]->title.empty()) { std::string msg(g_Locale->getText(LOCALE_USERMENU_MSG_INFO_IS_EMPTY)); @@ -303,10 +297,8 @@ void CUserMenuSetup::checkButtonName() } } - //get count of used items int CUserMenuSetup::getUsedItemsCount() { return ::split(g_settings.usermenu[button]->items, ',').size(); } - diff --git a/src/gui/user_menue_setup.h b/src/gui/user_menue_setup.h index 8f0041b1c..088e135e6 100644 --- a/src/gui/user_menue_setup.h +++ b/src/gui/user_menue_setup.h @@ -76,7 +76,6 @@ class CUserMenuSetup : public CMenuTarget std::map vals; int showSetup(); - void checkButtonItems(); void checkButtonName(); public: