- osd-setup: move menu-related stuff to a submenu 'menus'

* re-sort remaining items
This commit is contained in:
svenhoefer
2013-05-10 21:36:34 +02:00
parent 3a62b97fcb
commit 655ae5d51f
7 changed files with 67 additions and 33 deletions

View File

@@ -256,16 +256,16 @@ colorchooser.green grün
colorchooser.red rot
colormenu.background Hintergrundfarbe
colormenu.contrast_fonts Schriftkontrast
colormenu.fade Menüs faden
colormenu.fade Ein-/Ausblenden
colormenu.font Neutrino-HD Schriftart
colormenu.font_ttx Teletext Schriftart
colormenu.hd_preset LCD
colormenu.menucolors Menüfarben
colormenu.menucolors Farben
colormenu.osd_preset Monitor Auswahl
colormenu.sd_preset CRT
colormenu.textcolor Textfarbe
colormenu.themeselect Theme auswählen
colormenu.timing OSD Timeouts
colormenu.timing Timeouts
colormenusetup.menucontent Fensterinhalt
colormenusetup.menucontent_inactive Fensterinhalt deaktiviert
colormenusetup.menucontent_selected Fensterinhalt selektiert
@@ -779,7 +779,7 @@ menu.hint_eventlist_fonts Ändern Sie die Schriftgröße in der Event-Liste
menu.hint_eventlist_setup Wählen Sie die Anzeigeoptionen für die Event-Liste
menu.hint_extended Energiespar-, EPG-Speicher- und Lade-Optionen, HDMI-CEC, Startkanal und mehr
menu.hint_factory Zurücksetzen der Box auf Werkseinstellungen.\nDie Box wird danach neu gestartet
menu.hint_fade Bei aktivierter Funktion werden die Menüfenster 'weich' ein- bzw. ausgeblendet
menu.hint_fade Bei aktivierter Funktion werden die GUI-Fenster 'weich' ein- bzw. ausgeblendet
menu.hint_fan_speed Steuerung der Lüftergeschwindigkeit für die CPU
menu.hint_filebrowser_denydirectoryleave Verhindert das Verlassen des Startverzeichnisses
menu.hint_filebrowser_showrights Anzeige der Dateirechte der Dateien im Filebrowser
@@ -891,6 +891,7 @@ menu.hint_media Abspielen von Musik, Internetradio und Filmen; Betrachten Sie Bi
menu.hint_menu_fonts Ändern Sie die Schriftgrößen im Menü
menu.hint_menu_hints Zeigt Ihnen Hinweise zu den Menüpunkten an. Sie erreichen das auch jederzeit mit der Taste 'Hilfe'
menu.hint_menu_pos Legen Sie die Anzeigeposition der Menüs fest
menu.hint_menus Wählen Sie die Anzeigeoptionen für die Menüs
menu.hint_misc_cec HDMI-CEC Optionen
menu.hint_misc_channellist Erweiterte Einstellungen für die Kanallisten und Zapping-Einstellungen
menu.hint_misc_energy Energieverbrauchs- und Standby-Optionen, verzögertes Ausschalten, setzen bzw. ändern des Inaktivitätstimers
@@ -1699,8 +1700,9 @@ servicemenu.update Software-Aktualisierung
settings.backup Image-Einstellungen: Sichern
settings.backup_failed Sicherung fehlgeschlagen!
settings.help Hilfe
settings.menu_hints Menühinweise anzeigen
settings.menu_pos Menüposition
settings.menu_hints Hinweise anzeigen
settings.menu_pos Position
settings.menus Menüs
settings.missingoptionsconffile Die Neutrino-HD Einstellungen wurden erweitert.\nDie neuen Werte werden auf Standard gesetzt.
settings.noconffile Die Neutrino-HD Einstellungen wurden nicht\ngefunden. Es werden Standardwerte benutzt.
settings.pos_bottom_left unten links

View File

@@ -256,7 +256,7 @@ colorchooser.green green
colorchooser.red red
colormenu.background Background
colormenu.contrast_fonts Contrast fonts
colormenu.fade Fade menus
colormenu.fade Fade GUI
colormenu.font Select GUI font
colormenu.font_ttx Select Teletext font
colormenu.hd_preset LCD
@@ -265,7 +265,7 @@ colormenu.osd_preset TV preset
colormenu.sd_preset CRT
colormenu.textcolor Text color
colormenu.themeselect Select theme
colormenu.timing OSD Timeouts
colormenu.timing Timeouts
colormenusetup.menucontent Content
colormenusetup.menucontent_inactive Content inactive
colormenusetup.menucontent_selected Content selected
@@ -891,6 +891,7 @@ menu.hint_media Play movies, audio files\nWatch pictures
menu.hint_menu_fonts Change menu font sizes
menu.hint_menu_hints Show this hints. Also you can switch\nit any time using 'help' button
menu.hint_menu_pos Select menu position
menu.hint_menus Configure menu options
menu.hint_misc_cec HDMI-CEC Options
menu.hint_misc_channellist HD/New/Removed channel lists\nZap cycle
menu.hint_misc_energy Enable soft-standby, delayed shutdown\ninactivity timers
@@ -1701,6 +1702,7 @@ settings.backup_failed Backup failed!
settings.help Help
settings.menu_hints Show menu hints
settings.menu_pos Menu position
settings.menus Menus
settings.missingoptionsconffile The Neutrino-HD settings have been updated.\nNew Options will be set to default.
settings.noconffile No Neutrino-HD settings found.\nUsing defaults.
settings.pos_bottom_left bottom left

View File

@@ -68,10 +68,12 @@ COsdSetup::COsdSetup(bool wizard_mode)
colorSetupNotifier = new CColorSetupNotifier();
fontsizenotifier = new CFontSizeNotifier;
osd_menu = NULL;
submenu_menus = NULL;
is_wizard = wizard_mode;
width = w_max (40, 10); //%
show_menu_hints = 0;
show_tuner_icon = 0;
}
@@ -432,6 +434,13 @@ int COsdSetup::showOsdSetup()
mf->setHint("", LOCALE_MENU_HINT_SCREEN_SETUP);
osd_menu->addItem(mf);
//menus
CMenuWidget osd_menu_menus(LOCALE_MAINMENU_SETTINGS, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_OSDSETUP_MENUS);
showOsdMenusSetup(&osd_menu_menus);
mf = new CMenuForwarder(LOCALE_SETTINGS_MENUS, true, NULL, &osd_menu_menus, NULL, CRCInput::convertDigitToKey(shortcut++));
mf->setHint("", LOCALE_MENU_HINT_MENUS);
osd_menu->addItem(mf);
//progressbar
mf = new CMenuForwarder(LOCALE_MISCSETTINGS_PROGRESSBAR, true, NULL, new CProgressbarSetup(), NULL, CRCInput::convertDigitToKey(shortcut++));
mf->setHint("", LOCALE_MENU_HINT_PROGRESSBAR);
@@ -472,39 +481,19 @@ int COsdSetup::showOsdSetup()
mf->setHint("", LOCALE_MENU_HINT_SCREENSHOT_SETUP);
osd_menu->addItem(mf);
osd_menu->addItem(GenericMenuSeparatorLine);
//monitor
CMenuOptionChooser * mc = new CMenuOptionChooser(LOCALE_COLORMENU_OSD_PRESET, &g_settings.screen_preset, OSD_PRESET_OPTIONS, OSD_PRESET_OPTIONS_COUNT, true, this);
mc->setHint("", LOCALE_MENU_HINT_OSD_PRESET);
osd_menu->addItem(mc);
osd_menu->addItem(GenericMenuSeparatorLine);
// corners
// round corners
int rounded_corners = g_settings.rounded_corners;
mc = new CMenuOptionChooser(LOCALE_EXTRA_ROUNDED_CORNERS, &rounded_corners, MENU_CORNERSETTINGS_TYPE_OPTIONS, MENU_CORNERSETTINGS_TYPE_OPTION_COUNT, true, this);
mc->setHint("", LOCALE_MENU_HINT_ROUNDED_CORNERS);
osd_menu->addItem(mc);
// scrambled
mc = new CMenuOptionChooser(LOCALE_EXTRA_SCRAMBLED_MESSAGE, &g_settings.scrambled_message, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true);
mc->setHint("", LOCALE_MENU_HINT_SCRAMBLED_MESSAGE);
osd_menu->addItem(mc);
// subchannel menu position
mc = new CMenuOptionChooser(LOCALE_INFOVIEWER_SUBCHAN_DISP_POS, &g_settings.infobar_subchan_disp_pos, INFOBAR_SUBCHAN_DISP_POS_OPTIONS, INFOBAR_SUBCHAN_DISP_POS_OPTIONS_COUNT, true);
mc->setHint("", LOCALE_MENU_HINT_SUBCHANNEL_POS);
osd_menu->addItem(mc);
// menu position
mc = new CMenuOptionChooser(LOCALE_SETTINGS_MENU_POS, &g_settings.menu_pos, MENU_DISP_POS_OPTIONS, MENU_DISP_POS_OPTIONS_COUNT, true, this);
mc->setHint("", LOCALE_MENU_HINT_MENU_POS);
osd_menu->addItem(mc);
// menu hints
int show_hints = g_settings.show_menu_hints;
mc = new CMenuOptionChooser(LOCALE_SETTINGS_MENU_HINTS, &show_hints, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, this);
mc->setHint("", LOCALE_MENU_HINT_MENU_HINTS);
osd_menu->addItem(mc);
// fade windows
mc = new CMenuOptionChooser(LOCALE_COLORMENU_FADE, &g_settings.widget_fade, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true );
mc->setHint("", LOCALE_MENU_HINT_FADE);
@@ -515,8 +504,21 @@ int COsdSetup::showOsdSetup()
mc->setHint("", LOCALE_MENU_HINT_BIGWINDOWS);
osd_menu->addItem(mc);
osd_menu->addItem(GenericMenuSeparatorLine);
// scrambled
mc = new CMenuOptionChooser(LOCALE_EXTRA_SCRAMBLED_MESSAGE, &g_settings.scrambled_message, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true);
mc->setHint("", LOCALE_MENU_HINT_SCRAMBLED_MESSAGE);
osd_menu->addItem(mc);
// subchannel menu position
mc = new CMenuOptionChooser(LOCALE_INFOVIEWER_SUBCHAN_DISP_POS, &g_settings.infobar_subchan_disp_pos, INFOBAR_SUBCHAN_DISP_POS_OPTIONS, INFOBAR_SUBCHAN_DISP_POS_OPTIONS_COUNT, true);
mc->setHint("", LOCALE_MENU_HINT_SUBCHANNEL_POS);
osd_menu->addItem(mc);
int res = osd_menu->exec(NULL, "");
delete submenu_menus;
delete osd_menu;
return res;
}
@@ -732,6 +734,26 @@ const CMenuOptionChooser::keyval LOCALE_MISCSETTINGS_INFOBAR_DISP_OPTIONS[LOCAL
{ 6 , LOCALE_MISCSETTINGS_INFOBAR_DISP_6 }
};
//menus
void COsdSetup::showOsdMenusSetup(CMenuWidget *menu_menus)
{
submenu_menus = menu_menus;
CMenuOptionChooser * mc;
submenu_menus->addIntroItems(LOCALE_SETTINGS_MENUS);
// menu position
mc = new CMenuOptionChooser(LOCALE_SETTINGS_MENU_POS, &g_settings.menu_pos, MENU_DISP_POS_OPTIONS, MENU_DISP_POS_OPTIONS_COUNT, true, this);
mc->setHint("", LOCALE_MENU_HINT_MENU_POS);
submenu_menus->addItem(mc);
// menu hints
show_menu_hints = g_settings.show_menu_hints;
mc = new CMenuOptionChooser(LOCALE_SETTINGS_MENU_HINTS, &show_menu_hints, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, this);
mc->setHint("", LOCALE_MENU_HINT_MENU_HINTS);
submenu_menus->addItem(mc);
}
//infobar
void COsdSetup::showOsdInfobarSetup(CMenuWidget *menu_infobar)
{
@@ -878,12 +900,12 @@ bool COsdSetup::changeNotify(const neutrino_locale_t OptionName, void * data)
if(ARE_LOCALES_EQUAL(OptionName, LOCALE_COLORMENU_CONTRAST_FONTS))
return true;
else if(ARE_LOCALES_EQUAL(OptionName, LOCALE_SETTINGS_MENU_POS)) {
osd_menu->hide();
submenu_menus->hide();
return true;
}
else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_SETTINGS_MENU_HINTS)) {
/* change option after hide, to let hide clear hint */
osd_menu->hide();
submenu_menus->hide();
g_settings.show_menu_hints = * (int*) data;
return true;
}

View File

@@ -46,15 +46,18 @@ class COsdSetup : public CMenuTarget, public CChangeObserver
CColorSetupNotifier *colorSetupNotifier;
CFontSizeNotifier *fontsizenotifier;
CMenuWidget *osd_menu;
CMenuWidget *submenu_menus;
int width;
bool is_wizard;
int show_menu_hints;
int show_tuner_icon;
int showOsdSetup();
void showOsdMenueColorSetup(CMenuWidget *menu_colors);
void showOsdFontSizeSetup(CMenuWidget *menu_fonts);
void showOsdTimeoutSetup(CMenuWidget *menu_timeout);
void showOsdMenusSetup(CMenuWidget *menu_menus);
void showOsdInfobarSetup(CMenuWidget *menu_infobar);
void showOsdChanlistSetup(CMenuWidget *menu_chanlist);
void showOsdEventlistSetup(CMenuWidget *menu_eventlist);

View File

@@ -54,6 +54,7 @@ enum MN_WIDGET_ID
//osd setup
MN_WIDGET_ID_OSDSETUP,
MN_WIDGET_ID_OSDSETUP_MENUS,
MN_WIDGET_ID_OSDSETUP_CHANNELLIST,
MN_WIDGET_ID_OSDSETUP_EVENTLIST,
MN_WIDGET_ID_OSDSETUP_FONT,

View File

@@ -918,6 +918,7 @@ typedef enum
LOCALE_MENU_HINT_MENU_FONTS,
LOCALE_MENU_HINT_MENU_HINTS,
LOCALE_MENU_HINT_MENU_POS,
LOCALE_MENU_HINT_MENUS,
LOCALE_MENU_HINT_MISC_CEC,
LOCALE_MENU_HINT_MISC_CHANNELLIST,
LOCALE_MENU_HINT_MISC_ENERGY,
@@ -1728,6 +1729,7 @@ typedef enum
LOCALE_SETTINGS_HELP,
LOCALE_SETTINGS_MENU_HINTS,
LOCALE_SETTINGS_MENU_POS,
LOCALE_SETTINGS_MENUS,
LOCALE_SETTINGS_MISSINGOPTIONSCONFFILE,
LOCALE_SETTINGS_NOCONFFILE,
LOCALE_SETTINGS_POS_BOTTOM_LEFT,

View File

@@ -918,6 +918,7 @@ const char * locale_real_names[] =
"menu.hint_menu_fonts",
"menu.hint_menu_hints",
"menu.hint_menu_pos",
"menu.hint_menus",
"menu.hint_misc_cec",
"menu.hint_misc_channellist",
"menu.hint_misc_energy",
@@ -1728,6 +1729,7 @@ const char * locale_real_names[] =
"settings.help",
"settings.menu_hints",
"settings.menu_pos",
"settings.menus",
"settings.missingoptionsconffile",
"settings.noconffile",
"settings.pos_bottom_left",