diff --git a/data/locale/english.locale b/data/locale/english.locale index e1467ac84..211254d73 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -485,6 +485,7 @@ mainsettings.savesettingsnow_hint Saving settings,\nplease wait... mainsettings.streaming Movieplayer mainsettings.video Video menu.back back +menu.next Next (press Menu to quit) messagebox.back Back messagebox.cancel Cancel messagebox.discard Discard changes? diff --git a/src/gui/widget/menue.cpp b/src/gui/widget/menue.cpp index c4dbe2533..484adf126 100644 --- a/src/gui/widget/menue.cpp +++ b/src/gui/widget/menue.cpp @@ -52,10 +52,13 @@ /* the following generic menu items are integrated into multiple menus at the same time */ CMenuSeparator CGenericMenuSeparator; CMenuSeparator CGenericMenuSeparatorLine(CMenuSeparator::LINE); -CMenuForwarder CGenericMenuBack(LOCALE_MENU_BACK); +//CMenuForwarder CGenericMenuBack(LOCALE_MENU_BACK); +CMenuForwarder CGenericMenuBack(LOCALE_MENU_BACK, true, NULL, NULL, NULL, CRCInput::RC_nokey, NEUTRINO_ICON_BUTTON_HOME); +CMenuForwarder CGenericMenuNext(LOCALE_MENU_NEXT, true, NULL, NULL, NULL, CRCInput::RC_nokey, NEUTRINO_ICON_BUTTON_HOME); CMenuSeparator * const GenericMenuSeparator = &CGenericMenuSeparator; CMenuSeparator * const GenericMenuSeparatorLine = &CGenericMenuSeparatorLine; CMenuForwarder * const GenericMenuBack = &CGenericMenuBack; +CMenuForwarder * const GenericMenuNext = &CGenericMenuNext; void CMenuItem::init(const int X, const int Y, const int DX, const int OFFX) { @@ -80,6 +83,7 @@ CMenuWidget::CMenuWidget() selected = -1; iconOffset = 0; offx = offy = 0; + from_wizard = false; } CMenuWidget::CMenuWidget(const neutrino_locale_t Name, const std::string & Icon, const int mwidth, const int mheight) @@ -178,6 +182,14 @@ int CMenuWidget::exec(CMenuTarget* parent, const std::string &) else fadeValue = g_settings.gtx_alpha1; + if(from_wizard) { + for (unsigned int count = 0; count < items.size(); count++) { + if(items[count] == GenericMenuBack) { + items[count] = GenericMenuNext; + break; + } + } + } paint(); int retval = menu_return::RETURN_REPAINT; uint64_t timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings::TIMING_MENU]); @@ -422,6 +434,8 @@ int CMenuWidget::exec(CMenuTarget* parent, const std::string &) CVFD::getInstance()->setMode(CVFD::MODE_TVRADIO); for (unsigned int count = 0; count < items.size(); count++) { + if(items[count] == GenericMenuNext) + items[count] = GenericMenuBack; CMenuItem* item = items[count]; item->init(-1, 0, 0, 0); } diff --git a/src/gui/widget/menue.h b/src/gui/widget/menue.h index 080de4433..47d1ac869 100644 --- a/src/gui/widget/menue.h +++ b/src/gui/widget/menue.h @@ -346,6 +346,7 @@ class CMenuWidget : public CMenuTarget unsigned int current_page; unsigned int total_pages; bool exit_pressed; + bool from_wizard; void Init(const std::string & Icon, const int mwidth, const int mheight); virtual void paintItems(); @@ -366,6 +367,7 @@ class CMenuWidget : public CMenuTarget int getSelected() { return selected; }; void move(int xoff, int yoff); int getSelectedLine(void){return exit_pressed ? -1 : selected;}; + void setWizardMode(bool _from_wizard) { from_wizard = _from_wizard;}; }; class CPINProtection diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 41146fa9b..b1c846f0d 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -721,6 +721,10 @@ const lcd_setting_struct_t lcd_setting[LCD_SETTING_COUNT] = /************************************************************************************** * CNeutrinoApp - loadSetup, load the application-settings * **************************************************************************************/ +#define DEFAULT_X_START 60 +#define DEFAULT_Y_START 20 +#define DEFAULT_X_END 1220 +#define DEFAULT_Y_END 560 int CNeutrinoApp::loadSetup(const char * fname) { char cfg_key[81]; @@ -1036,10 +1040,10 @@ printf("***************************** rec dir %s timeshift dir %s\n", g_settings g_settings.channellist_epgtext_align_right = configfile.getBool("channellist_epgtext_align_right" , false); g_settings.channellist_extended = configfile.getBool("channellist_extended" , true); //screen configuration - g_settings.screen_StartX = configfile.getInt32( "screen_StartX", 37 ); - g_settings.screen_StartY = configfile.getInt32( "screen_StartY", 23 ); - g_settings.screen_EndX = configfile.getInt32( "screen_EndX", 668 ); - g_settings.screen_EndY = configfile.getInt32( "screen_EndY", 555 ); + g_settings.screen_StartX = configfile.getInt32( "screen_StartX", DEFAULT_X_START); + g_settings.screen_StartY = configfile.getInt32( "screen_StartY", DEFAULT_Y_START ); + g_settings.screen_EndX = configfile.getInt32( "screen_EndX", DEFAULT_X_END); + g_settings.screen_EndY = configfile.getInt32( "screen_EndY", DEFAULT_Y_END); g_settings.screen_width = configfile.getInt32("screen_width", 0); g_settings.screen_height = configfile.getInt32("screen_height", 0); @@ -1188,14 +1192,12 @@ printf("***************************** rec dir %s timeshift dir %s\n", g_settings g_settings.uboot_console_bak = g_settings.uboot_console; } #endif -#define DEFAULT_X_OFF 85 -#define DEFAULT_Y_OFF 34 - if((g_settings.screen_width != (int) frameBuffer->getScreenWidth(true)) - || (g_settings.screen_height != (int) frameBuffer->getScreenHeight(true))) { - g_settings.screen_StartX = DEFAULT_X_OFF; - g_settings.screen_StartY = DEFAULT_Y_OFF; - g_settings.screen_EndX = frameBuffer->getScreenWidth(true) - DEFAULT_X_OFF; - g_settings.screen_EndY = frameBuffer->getScreenHeight(true) - DEFAULT_Y_OFF; + if((g_settings.screen_width && g_settings.screen_width != (int) frameBuffer->getScreenWidth(true)) + || (g_settings.screen_height && g_settings.screen_height != (int) frameBuffer->getScreenHeight(true))) { + g_settings.screen_StartX = DEFAULT_X_START; + g_settings.screen_StartY = DEFAULT_Y_START; + g_settings.screen_EndX = DEFAULT_X_END; + g_settings.screen_EndY = DEFAULT_Y_END; g_settings.screen_width = frameBuffer->getScreenWidth(true); g_settings.screen_height = frameBuffer->getScreenHeight(true); } @@ -2552,16 +2554,30 @@ int CNeutrinoApp::run(int argc, char **argv) if (display_language_selection) { hintBox->hide(); + languageSettings.setWizardMode(true); int ret = languageSettings.exec(NULL, ""); + languageSettings.setWizardMode(false); - if(ret != menu_return::RETURN_EXIT_ALL) + if(ret != menu_return::RETURN_EXIT_ALL) { + videoSettings->setWizardMode(true); videoSettings->exec(NULL, ""); - if(ret != menu_return::RETURN_EXIT_ALL) + videoSettings->setWizardMode(false); + } + if(ret != menu_return::RETURN_EXIT_ALL) { + colorSettings.setWizardMode(true); colorSettings.exec(NULL, ""); - if(ret != menu_return::RETURN_EXIT_ALL) + colorSettings.setWizardMode(false); + } + if(ret != menu_return::RETURN_EXIT_ALL) { + networkSettings.setWizardMode(true); networkSettings.exec(NULL, ""); - if(ret != menu_return::RETURN_EXIT_ALL) + networkSettings.setWizardMode(false); + } + if(ret != menu_return::RETURN_EXIT_ALL) { + _scanSettings.setWizardMode(true); _scanSettings.exec(NULL, ""); + _scanSettings.setWizardMode(false); + } videoDecoder->StopPicture(); } diff --git a/src/system/locals.h b/src/system/locals.h index bba03929c..99268fb9e 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -519,6 +519,7 @@ typedef enum { LOCALE_MAINSETTINGS_STREAMING, LOCALE_MAINSETTINGS_VIDEO, LOCALE_MENU_BACK, + LOCALE_MENU_NEXT, LOCALE_MESSAGEBOX_BACK, LOCALE_MESSAGEBOX_CANCEL, LOCALE_MESSAGEBOX_DISCARD, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index e5568d57e..fbe9af2c1 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -519,6 +519,7 @@ const char *locale_real_names[] = { "mainsettings.streaming", "mainsettings.video", "menu.back", + "menu.next", "messagebox.back", "messagebox.cancel", "messagebox.discard",