From 70436708f159fe3f5de90e171ea87802c3cc38b5 Mon Sep 17 00:00:00 2001 From: "[CST] Focus" Date: Fri, 18 Jul 2014 12:28:30 +0400 Subject: [PATCH] src/gui/osd_progressbar_setup.cpp: move infoviewer progressbar position config to osd_setup.cpp Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/4b3be3c313b9825cdb52957c7210b61613840216 Author: [CST] Focus Date: 2014-07-18 (Fri, 18 Jul 2014) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/osd_progressbar_setup.cpp | 47 ------------------------------- src/gui/osd_setup.cpp | 15 ++++++++++ 2 files changed, 15 insertions(+), 47 deletions(-) diff --git a/src/gui/osd_progressbar_setup.cpp b/src/gui/osd_progressbar_setup.cpp index 41cfb789d..c70946b17 100644 --- a/src/gui/osd_progressbar_setup.cpp +++ b/src/gui/osd_progressbar_setup.cpp @@ -39,15 +39,6 @@ #include -#define PROGRESSBAR_INFOBAR_POSITION_COUNT 4 -const CMenuOptionChooser::keyval PROGRESSBAR_INFOBAR_POSITION_OPTIONS[PROGRESSBAR_INFOBAR_POSITION_COUNT]= -{ - { 0 , LOCALE_MISCSETTINGS_PROGRESSBAR_INFOBAR_POSITION_0 }, - { 1 , LOCALE_MISCSETTINGS_PROGRESSBAR_INFOBAR_POSITION_1 }, - { 2 , LOCALE_MISCSETTINGS_PROGRESSBAR_INFOBAR_POSITION_2 }, - { 3 , LOCALE_MISCSETTINGS_PROGRESSBAR_INFOBAR_POSITION_3 } -}; - /* these are more descriptive... */ #define _LOCALE_PROGRESSBAR_COLOR_MATRIX LOCALE_MISCSETTINGS_PROGRESSBAR_DESIGN_0 #define _LOCALE_PROGRESSBAR_COLOR_VERTICAL LOCALE_MISCSETTINGS_PROGRESSBAR_DESIGN_1 @@ -108,44 +99,6 @@ int CProgressbarSetup::exec(CMenuTarget* parent, const std::string &actionKey) int CProgressbarSetup::showMenu() { -#if 0 - //menue init - CMenuWidget *progress = new CMenuWidget(LOCALE_MAINMENU_SETTINGS, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_PROGRESSBAR); - - //intros: back ande save - progress->addIntroItems(LOCALE_MISCSETTINGS_PROGRESSBAR); - - COnOffNotifier* miscProgressNotifier = new COnOffNotifier(0); - - //color on/off - CMenuOptionChooser *color; - color = new CMenuOptionChooser(LOCALE_MISCSETTINGS_PROGRESSBAR_COLOR, &g_settings.progressbar_color, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, miscProgressNotifier); - color->setHint("", LOCALE_MENU_HINT_PROGRESSBAR_COLOR); - - //design - CMenuOptionChooser *design; - design = new CMenuOptionChooser(LOCALE_MISCSETTINGS_PROGRESSBAR_DESIGN, &g_settings.progressbar_design, PROGRESSBAR_COLOR_OPTIONS, PROGRESSBAR_COLOR_OPTION_COUNT, g_settings.progressbar_color); - design->setHint("", LOCALE_MENU_HINT_PROGRESSBAR_DESIGN); - - //infobar position - CMenuOptionChooser *infobar_position; - infobar_position = new CMenuOptionChooser(LOCALE_MISCSETTINGS_PROGRESSBAR_INFOBAR_POSITION, &g_settings.infobar_progressbar, PROGRESSBAR_INFOBAR_POSITION_OPTIONS, PROGRESSBAR_INFOBAR_POSITION_COUNT, true); - infobar_position->setHint("", LOCALE_MENU_HINT_PROGRESSBAR_INFOBAR_POSITION); - - miscProgressNotifier->addItem(design); - - //paint items - progress->addItem(color); - progress->addItem(design); - progress->addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_MISCSETTINGS_INFOBAR)); - progress->addItem(infobar_position); - - int res = progress->exec (NULL, ""); - delete miscProgressNotifier; - delete progress; - - return res; -#endif CMenuWidget m(LOCALE_MAINMENU_SETTINGS, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_OSDSETUP_PROGRESSBAR); m.addIntroItems(LOCALE_MISCSETTINGS_PROGRESSBAR /*, LOCALE_MISCSETTINGS_GENERAL*/); diff --git a/src/gui/osd_setup.cpp b/src/gui/osd_setup.cpp index cdee469aa..4e4c47966 100644 --- a/src/gui/osd_setup.cpp +++ b/src/gui/osd_setup.cpp @@ -848,6 +848,15 @@ const CMenuOptionChooser::keyval LOCALE_MISCSETTINGS_INFOBAR_DISP_OPTIONS[LOCAL { 6 , LOCALE_MISCSETTINGS_INFOBAR_DISP_6 } }; +#define PROGRESSBAR_INFOBAR_POSITION_COUNT 4 +const CMenuOptionChooser::keyval PROGRESSBAR_INFOBAR_POSITION_OPTIONS[PROGRESSBAR_INFOBAR_POSITION_COUNT]= +{ + { 0 , LOCALE_MISCSETTINGS_PROGRESSBAR_INFOBAR_POSITION_0 }, + { 1 , LOCALE_MISCSETTINGS_PROGRESSBAR_INFOBAR_POSITION_1 }, + { 2 , LOCALE_MISCSETTINGS_PROGRESSBAR_INFOBAR_POSITION_2 }, + { 3 , LOCALE_MISCSETTINGS_PROGRESSBAR_INFOBAR_POSITION_3 } +}; + //menus void COsdSetup::showOsdMenusSetup(CMenuWidget *menu_menus) { @@ -895,6 +904,12 @@ void COsdSetup::showOsdInfobarSetup(CMenuWidget *menu_infobar) mc->setHint("", LOCALE_MENU_HINT_INFOBAR_SAT); menu_infobar->addItem(mc); + //infobar position + CMenuOptionChooser *infobar_position; + infobar_position = new CMenuOptionChooser(LOCALE_MISCSETTINGS_PROGRESSBAR_INFOBAR_POSITION, &g_settings.infobar_progressbar, PROGRESSBAR_INFOBAR_POSITION_OPTIONS, PROGRESSBAR_INFOBAR_POSITION_COUNT, true); + infobar_position->setHint("", LOCALE_MENU_HINT_PROGRESSBAR_INFOBAR_POSITION); + menu_infobar->addItem(infobar_position); + // flash/hdd progress mc = new CMenuOptionChooser(LOCALE_MISCSETTINGS_INFOBAR_SHOW_SYSFS_HDD, &g_settings.infobar_show_sysfs_hdd, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); mc->setHint("", LOCALE_MENU_HINT_INFOBAR_FILESYS);