mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-31 09:21:09 +02:00
Hack to use different locale for back item in initial startup settings
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@471 e54a6e83-5905-42d5-8d5c-058d10e6a962
Origin commit data
------------------
Commit: efa68de194
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2010-03-09 (Tue, 09 Mar 2010)
This commit is contained in:
@@ -485,6 +485,7 @@ mainsettings.savesettingsnow_hint Saving settings,\nplease wait...
|
|||||||
mainsettings.streaming Movieplayer
|
mainsettings.streaming Movieplayer
|
||||||
mainsettings.video Video
|
mainsettings.video Video
|
||||||
menu.back back
|
menu.back back
|
||||||
|
menu.next Next (press Menu to quit)
|
||||||
messagebox.back Back
|
messagebox.back Back
|
||||||
messagebox.cancel Cancel
|
messagebox.cancel Cancel
|
||||||
messagebox.discard Discard changes?
|
messagebox.discard Discard changes?
|
||||||
|
@@ -52,10 +52,13 @@
|
|||||||
/* the following generic menu items are integrated into multiple menus at the same time */
|
/* the following generic menu items are integrated into multiple menus at the same time */
|
||||||
CMenuSeparator CGenericMenuSeparator;
|
CMenuSeparator CGenericMenuSeparator;
|
||||||
CMenuSeparator CGenericMenuSeparatorLine(CMenuSeparator::LINE);
|
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 GenericMenuSeparator = &CGenericMenuSeparator;
|
||||||
CMenuSeparator * const GenericMenuSeparatorLine = &CGenericMenuSeparatorLine;
|
CMenuSeparator * const GenericMenuSeparatorLine = &CGenericMenuSeparatorLine;
|
||||||
CMenuForwarder * const GenericMenuBack = &CGenericMenuBack;
|
CMenuForwarder * const GenericMenuBack = &CGenericMenuBack;
|
||||||
|
CMenuForwarder * const GenericMenuNext = &CGenericMenuNext;
|
||||||
|
|
||||||
void CMenuItem::init(const int X, const int Y, const int DX, const int OFFX)
|
void CMenuItem::init(const int X, const int Y, const int DX, const int OFFX)
|
||||||
{
|
{
|
||||||
@@ -80,6 +83,7 @@ CMenuWidget::CMenuWidget()
|
|||||||
selected = -1;
|
selected = -1;
|
||||||
iconOffset = 0;
|
iconOffset = 0;
|
||||||
offx = offy = 0;
|
offx = offy = 0;
|
||||||
|
from_wizard = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
CMenuWidget::CMenuWidget(const neutrino_locale_t Name, const std::string & Icon, const int mwidth, const int mheight)
|
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
|
else
|
||||||
fadeValue = g_settings.gtx_alpha1;
|
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();
|
paint();
|
||||||
int retval = menu_return::RETURN_REPAINT;
|
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]);
|
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);
|
CVFD::getInstance()->setMode(CVFD::MODE_TVRADIO);
|
||||||
|
|
||||||
for (unsigned int count = 0; count < items.size(); count++) {
|
for (unsigned int count = 0; count < items.size(); count++) {
|
||||||
|
if(items[count] == GenericMenuNext)
|
||||||
|
items[count] = GenericMenuBack;
|
||||||
CMenuItem* item = items[count];
|
CMenuItem* item = items[count];
|
||||||
item->init(-1, 0, 0, 0);
|
item->init(-1, 0, 0, 0);
|
||||||
}
|
}
|
||||||
|
@@ -346,6 +346,7 @@ class CMenuWidget : public CMenuTarget
|
|||||||
unsigned int current_page;
|
unsigned int current_page;
|
||||||
unsigned int total_pages;
|
unsigned int total_pages;
|
||||||
bool exit_pressed;
|
bool exit_pressed;
|
||||||
|
bool from_wizard;
|
||||||
void Init(const std::string & Icon, const int mwidth, const int mheight);
|
void Init(const std::string & Icon, const int mwidth, const int mheight);
|
||||||
virtual void paintItems();
|
virtual void paintItems();
|
||||||
|
|
||||||
@@ -366,6 +367,7 @@ class CMenuWidget : public CMenuTarget
|
|||||||
int getSelected() { return selected; };
|
int getSelected() { return selected; };
|
||||||
void move(int xoff, int yoff);
|
void move(int xoff, int yoff);
|
||||||
int getSelectedLine(void){return exit_pressed ? -1 : selected;};
|
int getSelectedLine(void){return exit_pressed ? -1 : selected;};
|
||||||
|
void setWizardMode(bool _from_wizard) { from_wizard = _from_wizard;};
|
||||||
};
|
};
|
||||||
|
|
||||||
class CPINProtection
|
class CPINProtection
|
||||||
|
@@ -721,6 +721,10 @@ const lcd_setting_struct_t lcd_setting[LCD_SETTING_COUNT] =
|
|||||||
/**************************************************************************************
|
/**************************************************************************************
|
||||||
* CNeutrinoApp - loadSetup, load the application-settings *
|
* 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)
|
int CNeutrinoApp::loadSetup(const char * fname)
|
||||||
{
|
{
|
||||||
char cfg_key[81];
|
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_epgtext_align_right = configfile.getBool("channellist_epgtext_align_right" , false);
|
||||||
g_settings.channellist_extended = configfile.getBool("channellist_extended" , true);
|
g_settings.channellist_extended = configfile.getBool("channellist_extended" , true);
|
||||||
//screen configuration
|
//screen configuration
|
||||||
g_settings.screen_StartX = configfile.getInt32( "screen_StartX", 37 );
|
g_settings.screen_StartX = configfile.getInt32( "screen_StartX", DEFAULT_X_START);
|
||||||
g_settings.screen_StartY = configfile.getInt32( "screen_StartY", 23 );
|
g_settings.screen_StartY = configfile.getInt32( "screen_StartY", DEFAULT_Y_START );
|
||||||
g_settings.screen_EndX = configfile.getInt32( "screen_EndX", 668 );
|
g_settings.screen_EndX = configfile.getInt32( "screen_EndX", DEFAULT_X_END);
|
||||||
g_settings.screen_EndY = configfile.getInt32( "screen_EndY", 555 );
|
g_settings.screen_EndY = configfile.getInt32( "screen_EndY", DEFAULT_Y_END);
|
||||||
g_settings.screen_width = configfile.getInt32("screen_width", 0);
|
g_settings.screen_width = configfile.getInt32("screen_width", 0);
|
||||||
g_settings.screen_height = configfile.getInt32("screen_height", 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;
|
g_settings.uboot_console_bak = g_settings.uboot_console;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#define DEFAULT_X_OFF 85
|
if((g_settings.screen_width && g_settings.screen_width != (int) frameBuffer->getScreenWidth(true))
|
||||||
#define DEFAULT_Y_OFF 34
|
|| (g_settings.screen_height && g_settings.screen_height != (int) frameBuffer->getScreenHeight(true))) {
|
||||||
if((g_settings.screen_width != (int) frameBuffer->getScreenWidth(true))
|
g_settings.screen_StartX = DEFAULT_X_START;
|
||||||
|| (g_settings.screen_height != (int) frameBuffer->getScreenHeight(true))) {
|
g_settings.screen_StartY = DEFAULT_Y_START;
|
||||||
g_settings.screen_StartX = DEFAULT_X_OFF;
|
g_settings.screen_EndX = DEFAULT_X_END;
|
||||||
g_settings.screen_StartY = DEFAULT_Y_OFF;
|
g_settings.screen_EndY = DEFAULT_Y_END;
|
||||||
g_settings.screen_EndX = frameBuffer->getScreenWidth(true) - DEFAULT_X_OFF;
|
|
||||||
g_settings.screen_EndY = frameBuffer->getScreenHeight(true) - DEFAULT_Y_OFF;
|
|
||||||
g_settings.screen_width = frameBuffer->getScreenWidth(true);
|
g_settings.screen_width = frameBuffer->getScreenWidth(true);
|
||||||
g_settings.screen_height = frameBuffer->getScreenHeight(true);
|
g_settings.screen_height = frameBuffer->getScreenHeight(true);
|
||||||
}
|
}
|
||||||
@@ -2552,16 +2554,30 @@ int CNeutrinoApp::run(int argc, char **argv)
|
|||||||
|
|
||||||
if (display_language_selection) {
|
if (display_language_selection) {
|
||||||
hintBox->hide();
|
hintBox->hide();
|
||||||
|
languageSettings.setWizardMode(true);
|
||||||
int ret = languageSettings.exec(NULL, "");
|
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, "");
|
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, "");
|
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, "");
|
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.exec(NULL, "");
|
||||||
|
_scanSettings.setWizardMode(false);
|
||||||
|
}
|
||||||
|
|
||||||
videoDecoder->StopPicture();
|
videoDecoder->StopPicture();
|
||||||
}
|
}
|
||||||
|
@@ -519,6 +519,7 @@ typedef enum {
|
|||||||
LOCALE_MAINSETTINGS_STREAMING,
|
LOCALE_MAINSETTINGS_STREAMING,
|
||||||
LOCALE_MAINSETTINGS_VIDEO,
|
LOCALE_MAINSETTINGS_VIDEO,
|
||||||
LOCALE_MENU_BACK,
|
LOCALE_MENU_BACK,
|
||||||
|
LOCALE_MENU_NEXT,
|
||||||
LOCALE_MESSAGEBOX_BACK,
|
LOCALE_MESSAGEBOX_BACK,
|
||||||
LOCALE_MESSAGEBOX_CANCEL,
|
LOCALE_MESSAGEBOX_CANCEL,
|
||||||
LOCALE_MESSAGEBOX_DISCARD,
|
LOCALE_MESSAGEBOX_DISCARD,
|
||||||
|
@@ -519,6 +519,7 @@ const char *locale_real_names[] = {
|
|||||||
"mainsettings.streaming",
|
"mainsettings.streaming",
|
||||||
"mainsettings.video",
|
"mainsettings.video",
|
||||||
"menu.back",
|
"menu.back",
|
||||||
|
"menu.next",
|
||||||
"messagebox.back",
|
"messagebox.back",
|
||||||
"messagebox.cancel",
|
"messagebox.cancel",
|
||||||
"messagebox.discard",
|
"messagebox.discard",
|
||||||
|
Reference in New Issue
Block a user