Code: Alles auswählen
--- tuxbox-cvs-orig/apps/tuxbox/neutrino/src/system/locals.h 2007-08-21 18:03:54.000000000 +0100
+++ tuxbox-cvs/apps/tuxbox/neutrino/src/system/locals.h 2007-08-21 18:04:11.000000000 +0100
@@ -266,6 +266,12 @@
LOCALE_COLORTHEMEMENU_DVB2K_THEME,
LOCALE_COLORTHEMEMENU_HEAD,
LOCALE_COLORTHEMEMENU_NEUTRINO_THEME,
+ LOCALE_CUSTOMIZE_HEAD,
+ LOCALE_CUSTOMIZE_NOTVISIBLE,
+ LOCALE_CUSTOMIZE_PIN,
+ LOCALE_CUSTOMIZE_PINHINT,
+ LOCALE_CUSTOMIZE_PINPROTECT,
+ LOCALE_CUSTOMIZE_VISIBLE,
LOCALE_DATE_APR,
LOCALE_DATE_AUG,
LOCALE_DATE_DEC,
--- tuxbox-cvs-orig/apps/tuxbox/neutrino/src/system/locals_intern.h 2007-08-21 18:03:54.000000000 +0100
+++ tuxbox-cvs/apps/tuxbox/neutrino/src/system/locals_intern.h 2007-08-21 18:04:11.000000000 +0100
@@ -266,6 +266,12 @@
"colorthememenu.dvb2k_theme",
"colorthememenu.head",
"colorthememenu.neutrino_theme",
+ "customize.head",
+ "customize.notvisible",
+ "customize.pin",
+ "customize.pinhint",
+ "customize.pinprotect",
+ "customize.visible",
"date.Apr",
"date.Aug",
"date.Dec",
--- tuxbox-cvs-orig/apps/tuxbox/neutrino/src/system/settings.h 2007-08-21 18:03:54.000000000 +0100
+++ tuxbox-cvs/apps/tuxbox/neutrino/src/system/settings.h 2007-08-21 22:40:45.000000000 +0100
@@ -51,6 +51,39 @@
//misc
int shutdown_real;
+
+ // Customize
+ int customize_tvmode;
+ int customize_radiomode;
+ int customize_scartmode;
+ int customize_upnp;
+ int customize_settings;
+ int customize_service;
+ int customize_sleeptimer;
+ int customize_reboot;
+ int customize_shutdown;
+ int customize_audioplayer;
+ int customize_movieplayer;
+ int customize_pictureviewer;
+ int customize_games;
+ int customize_video;
+ int customize_audio;
+ int customize_network;
+ int customize_recording;
+ int customize_streaming;
+ int customize_language;
+ int customize_lcd;
+ int customize_colours;
+ int customize_keysetup;
+ int customize_driversettings;
+ int customize_miscsettings;
+ int customize_audpicgeneral;
+ int customize_bouqueteditor;
+ int customize_scants;
+ int customize_imageinfo;
+ int customize_update;
+ char customize_pincode[5];
+
int shutdown_real_rcdelay;
char shutdown_count[4];
char record_safety_time_before[3];
--- tuxbox-cvs-orig/apps/tuxbox/neutrino/data/locale/english.locale 2007-08-21 18:03:54.000000000 +0100
+++ tuxbox-cvs/apps/tuxbox/neutrino/data/locale/english.locale 2007-08-21 18:04:11.000000000 +0100
@@ -239,6 +239,12 @@
colorthememenu.dvb2k_theme DVB2000 Theme
colorthememenu.head Theme Selector
colorthememenu.neutrino_theme Neutrino Theme
+customize.head Menu Personalization
+customize.notvisible Not Visible
+customize.pin Set up a PIN Code
+customize.pinhint Enter your new customization PIN
+customize.pinprotect PIN Protected
+customize.visible Visible
date.Apr Apr
date.Aug Aug
date.Dec Dec
@@ -815,7 +821,7 @@
parentallock.changepin change PIN code
parentallock.changepin_hint1 Enter your new youth protection pin code here!
parentallock.changetolocked on locked bouquets
-parentallock.head Enter Parental Lock PIN code
+parentallock.head Enter PIN code
parentallock.lockage lock program
parentallock.lockage12 from 12 years up
parentallock.lockage16 from 16 years up
--- tuxbox-cvs-orig/apps/tuxbox/neutrino/data/locale/deutsch.locale 2007-08-21 18:03:54.000000000 +0100
+++ tuxbox-cvs/apps/tuxbox/neutrino/data/locale/deutsch.locale 2007-08-21 22:33:12.000000000 +0100
@@ -239,6 +239,12 @@
colorthememenu.dvb2k_theme DVB2000 Theme
colorthememenu.head Theme auswählen
colorthememenu.neutrino_theme Neutrino Theme
+customize.head Menu Personalisierung
+customize.notvisible Unsichtbar
+customize.pin Pin Code eingeben
+customize.pinhint Neue Pin fuer Personalisierung
+customize.pinprotect PIN geschuetzt
+customize.visible sichtbar
date.Apr Apr
date.Aug Aug
date.Dec Dez
--- tuxbox-cvs-orig/apps/tuxbox/neutrino/src/gui/Makefile.am 2007-08-21 18:03:54.000000000 +0100
+++ tuxbox-cvs/apps/tuxbox/neutrino/src/gui/Makefile.am 2007-08-21 18:04:37.000000000 +0100
@@ -22,7 +22,7 @@
movieplayer.cpp rc_lock.cpp bookmarkmanager.cpp \
timeosd.cpp epgplus.cpp epg_menu.cpp \
streaminfo2.cpp plugins.cpp imageinfo.cpp \
- audio_select.cpp \
+ audio_select.cpp customize_menu.cpp \
moviebrowser.cpp movieinfo.cpp movieviewer.cpp
--- tuxbox-cvs-orig/apps/tuxbox/neutrino/src/neutrino.cpp 2007-08-21 18:03:54.000000000 +0100
+++ tuxbox-cvs/apps/tuxbox/neutrino/src/neutrino.cpp 2007-08-21 22:49:21.000000000 +0100
@@ -114,6 +114,7 @@
#include "gui/upnpbrowser.h"
#endif
#include "gui/imageinfo.h"
+#include "gui/customize_menu.h"
#include "gui/movieplayer.h"
@@ -587,6 +588,38 @@
checkParentallocked.close();
}
+ // Customization
+ g_settings.customize_tvmode = configfile.getInt32("customize_tvmode",0);
+ g_settings.customize_radiomode = configfile.getInt32("customize_radiomode",0);
+ g_settings.customize_scartmode = configfile.getInt32("customize_scartmode",0);
+#if ENABLE_UPNP
+ g_settings.customize_upnp = configfile.getInt32("customize_upnp", 0);
+#endif
+ g_settings.customize_settings = configfile.getInt32("customize_settings", 0);
+ g_settings.customize_service = configfile.getInt32("customize_service", 0);
+ g_settings.customize_sleeptimer = configfile.getInt32("customize_sleeptimer", 0);
+ g_settings.customize_reboot = configfile.getInt32("customize_reboot", 0);
+ g_settings.customize_shutdown = configfile.getInt32("customize_shutdown", 0);
+ g_settings.customize_audioplayer = configfile.getInt32("customize_audioplayer", 0);
+ g_settings.customize_movieplayer = configfile.getInt32("customize_movieplayer", 0);
+ g_settings.customize_pictureviewer = configfile.getInt32("customize_pictureviewer", 0);
+ g_settings.customize_games = configfile.getInt32("customize_games", 0);
+ g_settings.customize_video = configfile.getInt32("customize_video", 0);
+ g_settings.customize_audio = configfile.getInt32("customize_audio", 0);
+ g_settings.customize_network = configfile.getInt32("customize_network", 0);
+ g_settings.customize_recording = configfile.getInt32("customize_recording", 0);
+ g_settings.customize_streaming = configfile.getInt32("customize_streaming", 0);
+ g_settings.customize_language = configfile.getInt32("customize_language", 0);
+ g_settings.customize_colours = configfile.getInt32("customize_colours", 0);
+ g_settings.customize_lcd = configfile.getInt32("customize_lcd", 0);
+ g_settings.customize_keysetup = configfile.getInt32("customize_keysetup", 0);
+ g_settings.customize_audpicgeneral = configfile.getInt32("customize_audpicgeneral", 0);
+ g_settings.customize_driversettings = configfile.getInt32("customize_driversettings", 0);
+ g_settings.customize_miscsettings = configfile.getInt32("customize_miscsettings", 0);
+ g_settings.customize_bouqueteditor = configfile.getInt32("customize_bouqueteditor", 0);
+ g_settings.customize_scants = configfile.getInt32("customize_scants", 0);
+ g_settings.customize_update = configfile.getInt32("customize_update", 0);
+
//video
g_settings.video_Format = configfile.getInt32("video_Format", CControldClient::VIDEOFORMAT_4_3);
g_settings.video_csync = configfile.getInt32( "video_csync", 0 );
@@ -833,6 +866,7 @@
g_settings.parentallock_lockage = 18;
}
strcpy( g_settings.parentallock_pincode, configfile.getString( "parentallock_pincode", "0000" ).c_str() );
+ strcpy( g_settings.customize_pincode, configfile.getString( "customize_pincode", "0000" ).c_str() );
for (int i = 0; i < TIMING_SETTING_COUNT; i++)
g_settings.timing[i] = configfile.getInt32(locale_real_names[timing_setting_name[i]], default_timing[i]);
@@ -1009,6 +1043,38 @@
dprintf(DEBUG_NORMAL, "error while saving scan-settings!\n");
}
+ // Customization
+ configfile.setInt32("customize_tvmode", g_settings.customize_tvmode);
+ configfile.setInt32("customize_radiomode", g_settings.customize_radiomode);
+ configfile.setInt32("customize_scartmode", g_settings.customize_scartmode);
+ configfile.setInt32("customize_audioplayer", g_settings.customize_audioplayer);
+ configfile.setInt32("customize_movieplayer", g_settings.customize_movieplayer);
+ configfile.setInt32("customize_pictureviewer", g_settings.customize_pictureviewer);
+ configfile.setInt32("customize_games", g_settings.customize_games);
+#if ENABLE_UPNP
+ configfile.setInt32("customize_upnp", g_settings.customize_upnp);
+#endif
+ configfile.setInt32("customize_settings", g_settings.customize_settings);
+ configfile.setInt32("customize_service", g_settings.customize_service);
+ configfile.setInt32("customize_sleeptimer", g_settings.customize_sleeptimer);
+ configfile.setInt32("customize_reboot", g_settings.customize_reboot);
+ configfile.setInt32("customize_shutdown", g_settings.customize_shutdown);
+ configfile.setInt32("customize_video", g_settings.customize_video);
+ configfile.setInt32("customize_audio", g_settings.customize_audio);
+ configfile.setInt32("customize_network", g_settings.customize_network);
+ configfile.setInt32("customize_recording", g_settings.customize_recording);
+ configfile.setInt32("customize_streaming", g_settings.customize_streaming);
+ configfile.setInt32("customize_language", g_settings.customize_language);
+ configfile.setInt32("customize_colours", g_settings.customize_colours);
+ configfile.setInt32("customize_lcd", g_settings.customize_lcd);
+ configfile.setInt32("customize_keysetup", g_settings.customize_keysetup);
+ configfile.setInt32("customize_audpicgeneral", g_settings.customize_audpicgeneral);
+ configfile.setInt32("customize_driversettings", g_settings.customize_driversettings);
+ configfile.setInt32("customize_miscsettings", g_settings.customize_miscsettings);
+ configfile.setInt32("customize_bouqueteditor", g_settings.customize_bouqueteditor);
+ configfile.setInt32("customize_scants", g_settings.customize_scants);
+ configfile.setInt32("customize_update", g_settings.customize_update);
+
//video
configfile.setInt32( "video_Format", g_settings.video_Format );
configfile.setInt32( "video_csync", g_settings.video_csync );
@@ -1238,6 +1304,7 @@
configfile.setInt32( "parentallock_prompt", g_settings.parentallock_prompt );
configfile.setInt32( "parentallock_lockage", g_settings.parentallock_lockage );
configfile.setString( "parentallock_pincode", g_settings.parentallock_pincode );
+ configfile.setString( "customize_pincode", g_settings.customize_pincode );
//timing
for (int i = 0; i < TIMING_SETTING_COUNT; i++)
@@ -1722,21 +1789,69 @@
{
dprintf(DEBUG_DEBUG, "init mainmenue\n");
mainMenu.addItem(GenericMenuSeparator);
+ int main_shortcut = 0;
+ int settings_shortcut = 0;
- mainMenu.addItem(new CMenuForwarder(LOCALE_MAINMENU_TVMODE, true, NULL, this, "tv", CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED), firstchannel.mode != 'r');
- mainMenu.addItem(new CMenuForwarder(LOCALE_MAINMENU_RADIOMODE, true, NULL, this, "radio", CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN), firstchannel.mode == 'r');
- mainMenu.addItem(new CMenuForwarder(LOCALE_MAINMENU_SCARTMODE, true, NULL, this, "scart", CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW));
- mainMenu.addItem(new CMenuForwarder(LOCALE_MAINMENU_GAMES, true, NULL, new CPluginList(LOCALE_MAINMENU_GAMES,CPlugins::P_TYPE_GAME), "", CRCInput::RC_blue, NEUTRINO_ICON_BUTTON_BLUE));
- mainMenu.addItem(GenericMenuSeparatorLine);
- mainMenu.addItem(new CMenuForwarder(LOCALE_MAINMENU_AUDIOPLAYER, true, NULL, new CAudioPlayerGui(), NULL, CRCInput::RC_1));
-
- //mainMenu.addItem(new CMenuForwarder(LOCALE_MAINMENU_MOVIEPLAYER, true, NULL, new CMoviePlayerGui()));
- mainMenu.addItem(new CMenuForwarder(LOCALE_MAINMENU_MOVIEPLAYER, true, NULL, &moviePlayer, NULL, CRCInput::RC_2));
+ if (g_settings.customize_tvmode==0)
+ {
+ mainMenu.addItem(new CMenuForwarder(LOCALE_MAINMENU_TVMODE, true, NULL, this, "tv", CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED), firstchannel.mode != 'r');
+ }
+ else if (g_settings.customize_tvmode==2)
+ {
+ mainMenu.addItem(new CLockedMenuForwarder(LOCALE_MAINMENU_TVMODE, g_settings.customize_pincode, true, true, NULL, this, "tv", CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED), firstchannel.mode != 'r');
+ }
+ if (g_settings.customize_radiomode==0)
+ {
+ mainMenu.addItem(new CMenuForwarder(LOCALE_MAINMENU_RADIOMODE, true, NULL, this, "radio", CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN), firstchannel.mode == 'r');
+ }
+ else if (g_settings.customize_radiomode==2)
+ {
+ mainMenu.addItem(new CLockedMenuForwarder(LOCALE_MAINMENU_RADIOMODE, g_settings.customize_pincode, true, true, NULL, this, "radio", CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN), firstchannel.mode == 'r');
+ }
+ if (g_settings.customize_scartmode==0)
+ {
+ mainMenu.addItem(new CMenuForwarder(LOCALE_MAINMENU_SCARTMODE, true, NULL, this, "scart", CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW));
+ }
+ else if (g_settings.customize_scartmode==2)
+ {
+ mainMenu.addItem(new CLockedMenuForwarder(LOCALE_MAINMENU_SCARTMODE, g_settings.customize_pincode, true, true, NULL, this, "scart", CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW));
+ }
+ if (g_settings.customize_games==0)
+ {
+ mainMenu.addItem(new CMenuForwarder(LOCALE_MAINMENU_GAMES, true, NULL, new CPluginList(LOCALE_MAINMENU_GAMES,CPlugins::P_TYPE_GAME), "", CRCInput::RC_blue, NEUTRINO_ICON_BUTTON_BLUE));
+ }
+ else if (g_settings.customize_games==2)
+ {
+ mainMenu.addItem(new CLockedMenuForwarder(LOCALE_MAINMENU_GAMES, g_settings.customize_pincode, true, true, NULL, new CPluginList(LOCALE_MAINMENU_GAMES,CPlugins::P_TYPE_GAME), "", CRCInput::RC_blue, NEUTRINO_ICON_BUTTON_BLUE));
+ }
+ if (g_settings.customize_tvmode==1 && g_settings.customize_radiomode==1 && g_settings.customize_scartmode==1 && g_settings.customize_games==1)
+ {
+ // Do not display GenericMenuSeparatorLine
+ }
+ else
+ {
+ mainMenu.addItem(GenericMenuSeparatorLine);
+ }
+ if (g_settings.customize_audioplayer==0)
+ {
+ mainMenu.addItem(new CMenuForwarder(LOCALE_MAINMENU_AUDIOPLAYER, true, NULL, new CAudioPlayerGui(), NULL, CRCInput::convertDigitToKey(main_shortcut++)));
+ }
+ else if (g_settings.customize_audioplayer==2)
+ {
+ mainMenu.addItem(new CLockedMenuForwarder(LOCALE_MAINMENU_AUDIOPLAYER, g_settings.customize_pincode, true, true, NULL, new CAudioPlayerGui(), NULL, CRCInput::convertDigitToKey(main_shortcut++)));
+ }
+ if (g_settings.customize_movieplayer==0)
+ {
+ mainMenu.addItem(new CMenuForwarder(LOCALE_MAINMENU_MOVIEPLAYER, true, NULL, &moviePlayer, NULL, CRCInput::convertDigitToKey(main_shortcut++)));
+ }
+ else if (g_settings.customize_movieplayer==2)
+ {
+ mainMenu.addItem(new CLockedMenuForwarder(LOCALE_MAINMENU_MOVIEPLAYER, g_settings.customize_pincode, true, true, NULL, &moviePlayer, NULL, CRCInput::convertDigitToKey(main_shortcut++)));
+ }
moviePlayer.addItem(GenericMenuSeparator);
moviePlayer.addItem(GenericMenuBack);
moviePlayer.addItem(GenericMenuSeparatorLine);
-// CMoviePlayerGui* moviePlayerGui = new CMoviePlayerGui();
moviePlayer.addItem(new CMenuForwarder(LOCALE_MOVIEPLAYER_TSPLAYBACK, true, NULL, moviePlayerGui, "tsplayback", CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN));
moviePlayer.addItem(new CMenuForwarder(LOCALE_MOVIEPLAYER_TSPLAYBACK_PC, true, NULL, moviePlayerGui, "tsplayback_pc", CRCInput::RC_1));
#ifdef MOVIEBROWSER
@@ -1753,51 +1868,181 @@
moviePlayer.addItem(new CMenuForwarder(LOCALE_MAINMENU_SETTINGS, true, NULL, &streamingSettings, NULL, CRCInput::RC_help, NEUTRINO_ICON_BUTTON_HELP_SMALL));
moviePlayer.addItem(new CMenuForwarder(LOCALE_NFSMENU_HEAD, true, NULL, new CNFSSmallMenu(), NULL, CRCInput::RC_setup, NEUTRINO_ICON_BUTTON_DBOX_SMALL));
- mainMenu.addItem(new CMenuForwarder(LOCALE_MAINMENU_PICTUREVIEWER, true, NULL, new CPictureViewerGui(), NULL, CRCInput::RC_3));
- int shortcut = 4;
+ if (g_settings.customize_pictureviewer==0)
+ {
+ mainMenu.addItem(new CMenuForwarder(LOCALE_MAINMENU_PICTUREVIEWER, true, NULL, new CPictureViewerGui(), NULL, CRCInput::convertDigitToKey(main_shortcut++)));
+ }
+ else if (g_settings.customize_pictureviewer==2)
+ {
+ mainMenu.addItem(new CLockedMenuForwarder(LOCALE_MAINMENU_PICTUREVIEWER, g_settings.customize_pincode, true, true, NULL, new CPictureViewerGui(), NULL, CRCInput::convertDigitToKey(main_shortcut++)));
+ }
#if ENABLE_UPNP
- mainMenu.addItem(new CMenuForwarder(LOCALE_MAINMENU_UPNPBROWSER, true, NULL, new CUpnpBrowserGui(), NULL, CRCInput::RC_4));
- shortcut++;
+ if (g_settings.customize_upnp==0)
+ {
+ mainMenu.addItem(new CMenuForwarder(LOCALE_MAINMENU_UPNPBROWSER, true, NULL, new CUpnpBrowserGui(), NULL, CRCInput::convertDigitToKey(main_shortcut++)));
+ }
+ else if (g_settings.customize_upnp==2)
+ {
+ mainMenu.addItem(new CLockedMenuForwarder(LOCALE_MAINMENU_UPNPBROWSER, g_settings.customize_pincode, true, true, NULL, new CUpnpBrowserGui(), NULL, CRCInput::convertDigitToKey(main_shortcut++)));
+ }
#endif
if (g_PluginList->hasPlugin(CPlugins::P_TYPE_SCRIPT))
- mainMenu.addItem(new CMenuForwarder(LOCALE_MAINMENU_SCRIPTS, true, NULL, new CPluginList(LOCALE_MAINMENU_SCRIPTS,CPlugins::P_TYPE_SCRIPT), "",
- CRCInput::convertDigitToKey(shortcut++)));
- mainMenu.addItem(GenericMenuSeparatorLine);
-
- mainMenu.addItem(new CMenuForwarder(LOCALE_MAINMENU_SETTINGS, true, NULL, &mainSettings, NULL,
- CRCInput::convertDigitToKey(shortcut++)));
- mainMenu.addItem(new CLockedMenuForwarder(LOCALE_MAINMENU_SERVICE, g_settings.parentallock_pincode, false, true, NULL, &service, NULL,
- CRCInput::convertDigitToKey(shortcut++)));
+ mainMenu.addItem(new CMenuForwarder(LOCALE_MAINMENU_SCRIPTS, true, NULL, new CPluginList(LOCALE_MAINMENU_SCRIPTS,CPlugins::P_TYPE_SCRIPT), "", CRCInput::convertDigitToKey(main_shortcut++)));
+ if (g_settings.customize_audioplayer==1 && g_settings.customize_movieplayer==1 && g_settings.customize_pictureviewer==1 && g_settings.customize_upnp==1)
+ {
+ // Do not display GenericMenuSeparatorLine
+ }
+ else
+ {
+ mainMenu.addItem(GenericMenuSeparatorLine);
+ }
+ if (g_settings.customize_settings==0)
+ {
+ mainMenu.addItem(new CMenuForwarder(LOCALE_MAINMENU_SETTINGS, true, NULL, &mainSettings, NULL, CRCInput::convertDigitToKey(main_shortcut++)));
+ }
+ else if (g_settings.customize_settings==2)
+ {
+ mainMenu.addItem(new CLockedMenuForwarder(LOCALE_MAINMENU_SETTINGS, g_settings.customize_pincode, true, true, NULL, &mainSettings, NULL, CRCInput::convertDigitToKey(main_shortcut++)));
+ }
+ if (g_settings.customize_service==0)
+ {
+ mainMenu.addItem(new CLockedMenuForwarder(LOCALE_MAINMENU_SERVICE, g_settings.parentallock_pincode, false, true, NULL, &service, NULL, CRCInput::convertDigitToKey(main_shortcut++)));
+ }
+ else if (g_settings.customize_service==2)
+ {
+ mainMenu.addItem(new CLockedMenuForwarder(LOCALE_MAINMENU_SERVICE, g_settings.customize_pincode, true, true, NULL, &service, NULL, CRCInput::convertDigitToKey(main_shortcut++)));
+ }
mainMenu.addItem(GenericMenuSeparatorLine);
-
- mainMenu.addItem(new CMenuForwarder(LOCALE_MAINMENU_SLEEPTIMER, true, NULL, new CSleepTimerWidget, NULL,
- CRCInput::convertDigitToKey(shortcut++)));
- mainMenu.addItem(new CMenuForwarder(LOCALE_MAINMENU_REBOOT, true, NULL, this, "reboot",
- CRCInput::convertDigitToKey(shortcut++)));
- mainMenu.addItem(new CMenuForwarder(LOCALE_MAINMENU_SHUTDOWN, true, NULL, this, "shutdown", CRCInput::RC_standby, "power.raw"));
-
+ if (g_settings.customize_sleeptimer==0)
+ {
+ mainMenu.addItem(new CMenuForwarder(LOCALE_MAINMENU_SLEEPTIMER, true, NULL, new CSleepTimerWidget, NULL, CRCInput::convertDigitToKey(main_shortcut++)));
+ }
+ else if (g_settings.customize_sleeptimer==2)
+ {
+ mainMenu.addItem(new CLockedMenuForwarder(LOCALE_MAINMENU_SLEEPTIMER, g_settings.customize_pincode, true, true, NULL, new CSleepTimerWidget, NULL, CRCInput::convertDigitToKey(main_shortcut++)));
+ }
+ if (g_settings.customize_reboot==0)
+ {
+ mainMenu.addItem(new CMenuForwarder(LOCALE_MAINMENU_REBOOT, true, NULL, this, "reboot", CRCInput::convertDigitToKey(main_shortcut++)));
+ }
+ else if (g_settings.customize_reboot==2)
+ {
+ mainMenu.addItem(new CLockedMenuForwarder(LOCALE_MAINMENU_REBOOT, g_settings.customize_pincode, true, true, NULL, this, "reboot", CRCInput::convertDigitToKey(main_shortcut++)));
+ }
+ if (g_settings.customize_shutdown==0)
+ {
+ mainMenu.addItem(new CMenuForwarder(LOCALE_MAINMENU_SHUTDOWN, true, NULL, this, "shutdown", CRCInput::RC_standby, "power.raw"));
+ }
+ else if (g_settings.customize_shutdown==2)
+ {
+ mainMenu.addItem(new CLockedMenuForwarder(LOCALE_MAINMENU_SHUTDOWN, g_settings.customize_pincode, true, true, NULL, this, "shutdown", CRCInput::RC_standby, "power.raw"));
+ }
mainSettings.addItem(GenericMenuSeparator);
mainSettings.addItem(GenericMenuBack);
mainSettings.addItem(GenericMenuSeparatorLine);
mainSettings.addItem(new CMenuForwarder(LOCALE_MAINSETTINGS_SAVESETTINGSNOW, true, NULL, this, "savesettings", CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED));
mainSettings.addItem(GenericMenuSeparatorLine);
- mainSettings.addItem(new CMenuForwarder(LOCALE_MAINSETTINGS_VIDEO , true, NULL, &videoSettings , NULL, CRCInput::RC_1));
- mainSettings.addItem(new CMenuForwarder(LOCALE_MAINSETTINGS_AUDIO , true, NULL, &audioSettings , NULL, CRCInput::RC_2));
+ mainSettings.addItem(new CLockedMenuForwarder(LOCALE_CUSTOMIZE_HEAD, g_settings.customize_pincode, true, true, NULL, new UberNinja_Customize(), NULL, CRCInput::convertDigitToKey(settings_shortcut++)));
+ if (g_settings.customize_video==0)
+ {
+ mainSettings.addItem(new CMenuForwarder(LOCALE_MAINSETTINGS_VIDEO, true, NULL, &videoSettings, NULL, CRCInput::convertDigitToKey(settings_shortcut++)));
+ }
+ else if (g_settings.customize_video==2)
+ {
+ mainSettings.addItem(new CLockedMenuForwarder(LOCALE_MAINSETTINGS_VIDEO, g_settings.customize_pincode, true, true, NULL, &videoSettings, NULL, CRCInput::convertDigitToKey(settings_shortcut++)));
+ }
+ if (g_settings.customize_audio==0)
+ {
+ mainSettings.addItem(new CMenuForwarder(LOCALE_MAINSETTINGS_AUDIO, true, NULL, &audioSettings, NULL, CRCInput::convertDigitToKey(settings_shortcut++)));
+ }
+ else if (g_settings.customize_audio==2)
+ {
+ mainSettings.addItem(new CLockedMenuForwarder(LOCALE_MAINSETTINGS_AUDIO, g_settings.customize_pincode, true, true, NULL, &audioSettings, NULL, CRCInput::convertDigitToKey(settings_shortcut++)));
+ }
if(g_settings.parentallock_prompt)
- mainSettings.addItem(new CLockedMenuForwarder(LOCALE_PARENTALLOCK_PARENTALLOCK, g_settings.parentallock_pincode, true, true, NULL, &parentallockSettings, NULL, CRCInput::RC_3));
+ mainSettings.addItem(new CLockedMenuForwarder(LOCALE_PARENTALLOCK_PARENTALLOCK, g_settings.parentallock_pincode, true, true, NULL, &parentallockSettings, NULL, CRCInput::convertDigitToKey(settings_shortcut++)));
else
- mainSettings.addItem(new CMenuForwarder(LOCALE_PARENTALLOCK_PARENTALLOCK, true, NULL, &parentallockSettings, NULL, CRCInput::RC_3));
- mainSettings.addItem(new CMenuForwarder(LOCALE_MAINSETTINGS_NETWORK , true, NULL, &networkSettings , NULL, CRCInput::RC_4));
- mainSettings.addItem(new CMenuForwarder(LOCALE_MAINSETTINGS_RECORDING , true, NULL, &recordingSettings, NULL, CRCInput::RC_5));
- mainSettings.addItem(new CMenuForwarder(LOCALE_MAINSETTINGS_STREAMING , true, NULL, &streamingSettings, NULL, CRCInput::RC_6));
- mainSettings.addItem(new CMenuForwarder(LOCALE_MAINSETTINGS_LANGUAGE , true, NULL, &languageSettings , NULL, CRCInput::RC_7));
- mainSettings.addItem(new CMenuForwarder(LOCALE_MAINSETTINGS_COLORS , true, NULL, &colorSettings , NULL, CRCInput::RC_8));
- mainSettings.addItem(new CMenuForwarder(LOCALE_MAINSETTINGS_LCD , true, NULL, &lcdSettings , NULL, CRCInput::RC_9));
- mainSettings.addItem(new CMenuForwarder(LOCALE_MAINSETTINGS_KEYBINDING, true, NULL, &keySettings , NULL, CRCInput::RC_0));
-
- mainSettings.addItem(new CMenuForwarder(LOCALE_AUDIOPLAYERPICSETTINGS_GENERAL , true, NULL, &audiopl_picSettings , NULL, CRCInput::RC_blue, NEUTRINO_ICON_BUTTON_BLUE));
- mainSettings.addItem(new CMenuForwarder(LOCALE_MAINSETTINGS_DRIVER , true, NULL, &driverSettings , NULL, CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN));
- mainSettings.addItem(new CMenuForwarder(LOCALE_MAINSETTINGS_MISC , true, NULL, &miscSettings , NULL, CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW ));
+ mainSettings.addItem(new CMenuForwarder(LOCALE_PARENTALLOCK_PARENTALLOCK, true, NULL, &parentallockSettings, NULL, CRCInput::convertDigitToKey(settings_shortcut++)));
+ if (g_settings.customize_network==0)
+ {
+ mainSettings.addItem(new CMenuForwarder(LOCALE_MAINSETTINGS_NETWORK, true, NULL, &networkSettings, NULL, CRCInput::convertDigitToKey(settings_shortcut++)));
+ }
+ else if (g_settings.customize_network==2)
+ {
+ mainSettings.addItem(new CLockedMenuForwarder(LOCALE_MAINSETTINGS_NETWORK, g_settings.customize_pincode, true, true, NULL, &networkSettings, NULL, CRCInput::convertDigitToKey(settings_shortcut++)));
+ }
+ if (g_settings.customize_recording==0)
+ {
+ mainSettings.addItem(new CMenuForwarder(LOCALE_MAINSETTINGS_RECORDING, true, NULL, &recordingSettings, NULL, CRCInput::convertDigitToKey(settings_shortcut++)));
+ }
+ else if (g_settings.customize_recording==2)
+ {
+ mainSettings.addItem(new CLockedMenuForwarder(LOCALE_MAINSETTINGS_RECORDING, g_settings.customize_pincode, true, true, NULL, &recordingSettings, NULL, CRCInput::convertDigitToKey(settings_shortcut++)));
+ }
+ if (g_settings.customize_streaming==0)
+ {
+ mainSettings.addItem(new CMenuForwarder(LOCALE_MAINSETTINGS_STREAMING, true, NULL, &streamingSettings, NULL, CRCInput::convertDigitToKey(settings_shortcut++)));
+ }
+ else if (g_settings.customize_streaming==2)
+ {
+ mainSettings.addItem(new CLockedMenuForwarder(LOCALE_MAINSETTINGS_STREAMING, g_settings.customize_pincode, true, true, NULL, &streamingSettings, NULL, CRCInput::convertDigitToKey(settings_shortcut++)));
+ }
+ if (g_settings.customize_language==0)
+ {
+ mainSettings.addItem(new CMenuForwarder(LOCALE_MAINSETTINGS_LANGUAGE, true, NULL, &languageSettings, NULL, CRCInput::convertDigitToKey(settings_shortcut++)));
+ }
+ else if (g_settings.customize_language==2)
+ {
+ mainSettings.addItem(new CLockedMenuForwarder(LOCALE_MAINSETTINGS_LANGUAGE, g_settings.customize_pincode, true, true, NULL, &languageSettings, NULL, CRCInput::convertDigitToKey(settings_shortcut++)));
+ }
+ if (g_settings.customize_colours==0)
+ {
+ mainSettings.addItem(new CMenuForwarder(LOCALE_MAINSETTINGS_COLORS, true, NULL, &colorSettings, NULL, CRCInput::convertDigitToKey(settings_shortcut++)));
+ }
+ else if (g_settings.customize_colours==2)
+ {
+ mainSettings.addItem(new CLockedMenuForwarder(LOCALE_MAINSETTINGS_COLORS, g_settings.customize_pincode, true, true, NULL, &colorSettings, NULL, CRCInput::convertDigitToKey(settings_shortcut++)));
+ }
+ if (g_settings.customize_lcd==0)
+ {
+ mainSettings.addItem(new CMenuForwarder(LOCALE_MAINSETTINGS_LCD, true, NULL, &lcdSettings, NULL, CRCInput::convertDigitToKey(settings_shortcut++)));
+ }
+ else if (g_settings.customize_lcd==2)
+ {
+ mainSettings.addItem(new CLockedMenuForwarder(LOCALE_MAINSETTINGS_LCD, g_settings.customize_pincode, true, true, NULL, &lcdSettings, NULL, CRCInput::convertDigitToKey(settings_shortcut++)));
+ }
+ if (g_settings.customize_keysetup==0)
+ {
+ mainSettings.addItem(new CMenuForwarder(LOCALE_MAINSETTINGS_KEYBINDING, true, NULL, &keySettings, NULL, CRCInput::convertDigitToKey(settings_shortcut++)));
+ }
+ else if (g_settings.customize_keysetup==2)
+ {
+ mainSettings.addItem(new CLockedMenuForwarder(LOCALE_MAINSETTINGS_KEYBINDING, g_settings.customize_pincode, true, true, NULL, &keySettings, NULL, CRCInput::convertDigitToKey(settings_shortcut++)));
+ }
+ if (g_settings.customize_audpicgeneral==0)
+ {
+ mainSettings.addItem(new CMenuForwarder(LOCALE_AUDIOPLAYERPICSETTINGS_GENERAL, true, NULL, &audiopl_picSettings, NULL, CRCInput::RC_blue, NEUTRINO_ICON_BUTTON_BLUE));
+ }
+ else if (g_settings.customize_audpicgeneral==2)
+ {
+ mainSettings.addItem(new CLockedMenuForwarder(LOCALE_AUDIOPLAYERPICSETTINGS_GENERAL, g_settings.customize_pincode, true, true, NULL, &audiopl_picSettings, NULL, CRCInput::RC_blue, NEUTRINO_ICON_BUTTON_BLUE));
+ }
+ if (g_settings.customize_driversettings==0)
+ {
+ mainSettings.addItem(new CMenuForwarder(LOCALE_MAINSETTINGS_DRIVER, true, NULL, &driverSettings, NULL, CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN));
+ }
+ else if (g_settings.customize_driversettings==2)
+ {
+ mainSettings.addItem(new CLockedMenuForwarder(LOCALE_MAINSETTINGS_DRIVER, g_settings.customize_pincode, true, true, NULL, &driverSettings, NULL, CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN));
+ }
+ if (g_settings.customize_miscsettings==0)
+ {
+ mainSettings.addItem(new CMenuForwarder(LOCALE_MAINSETTINGS_MISC, true, NULL, &miscSettings, NULL, CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW ));
+ }
+ else if (g_settings.customize_miscsettings==0)
+ {
+ mainSettings.addItem(new CLockedMenuForwarder(LOCALE_MAINSETTINGS_MISC, g_settings.parentallock_pincode, true, true, NULL, &miscSettings, NULL, CRCInput::convertDigitToKey(settings_shortcut++)));
+ }
}
#define SCANTS_BOUQUET_OPTION_COUNT 5
@@ -2059,8 +2304,22 @@
service.addItem(GenericMenuSeparator);
service.addItem(GenericMenuBack);
service.addItem(GenericMenuSeparatorLine);
- service.addItem(new CMenuForwarder(LOCALE_BOUQUETEDITOR_NAME , true, NULL, new CBEBouquetWidget(), NULL , CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED));
- service.addItem(new CMenuForwarder(LOCALE_SERVICEMENU_SCANTS , true, NULL, &scanSettings , NULL , CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN));
+ if (g_settings.customize_bouqueteditor==0)
+ {
+ service.addItem(new CMenuForwarder(LOCALE_BOUQUETEDITOR_NAME , true, NULL, new CBEBouquetWidget(), NULL , CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED));
+ }
+ else if (g_settings.customize_bouqueteditor==2)
+ {
+ service.addItem(new CLockedMenuForwarder(LOCALE_BOUQUETEDITOR_NAME, g_settings.parentallock_pincode, true, true, NULL, new CBEBouquetWidget(), NULL, CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED));
+ }
+ if (g_settings.customize_scants==0)
+ {
+ service.addItem(new CMenuForwarder(LOCALE_SERVICEMENU_SCANTS , true, NULL, &scanSettings , NULL , CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN));
+ }
+ else if (g_settings.customize_scants==2)
+ {
+ service.addItem(new CLockedMenuForwarder(LOCALE_SERVICEMENU_SCANTS, g_settings.parentallock_pincode, true, true, NULL, &scanSettings, NULL, CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN));
+ }
service.addItem(GenericMenuSeparatorLine);
service.addItem(new CMenuForwarder(LOCALE_SERVICEMENU_RELOAD , true, NULL, this , "reloadchannels", CRCInput::RC_1));
service.addItem(new CMenuForwarder(LOCALE_SERVICEMENU_GETPLUGINS, true, NULL, this , "reloadplugins" , CRCInput::RC_2));
@@ -2139,7 +2398,14 @@
updateSettings->addItem(GenericMenuSeparatorLine);
updateSettings->addItem(new CMenuForwarder(LOCALE_FLASHUPDATE_CHECKUPDATE, true, NULL, new CFlashUpdate(), NULL, CRCInput::RC_blue, NEUTRINO_ICON_BUTTON_BLUE));
- service.addItem(new CMenuForwarder(LOCALE_SERVICEMENU_UPDATE, true, NULL, updateSettings, NULL, CRCInput::RC_blue, NEUTRINO_ICON_BUTTON_BLUE));
+ if (g_settings.customize_update==0)
+ {
+ service.addItem(new CMenuForwarder(LOCALE_SERVICEMENU_UPDATE, true, NULL, updateSettings, NULL, CRCInput::RC_blue, NEUTRINO_ICON_BUTTON_BLUE));
+ }
+ else if (g_settings.customize_bouqueteditor==2)
+ {
+ service.addItem(new CLockedMenuForwarder(LOCALE_SERVICEMENU_UPDATE, g_settings.customize_pincode, true, true, NULL, updateSettings, NULL, CRCInput::RC_blue, NEUTRINO_ICON_BUTTON_BLUE));
+ }
}
}
--- tuxbox-cvs-orig/apps/tuxbox/neutrino/src/gui/customize_menu.cpp 1970-01-01 01:00:00.000000000 +0100
+++ tuxbox-cvs/apps/tuxbox/neutrino/src/gui/customize_menu.cpp 2007-08-21 22:38:10.000000000 +0100
@@ -0,0 +1,174 @@
+/*
+$Id: customize_menu.cpp,v 1.000 2007/08/21 15:38:53 nitr8 Exp $
+
+Neutrino-GUI - DBoxII-Project
+
+Copyright (C) 2001 Steffen Hehn 'McClean'
+and some other guys
+Homepage: http://dbox.cyberphoria.org/
+
+Kommentar:
+
+This is the customization menu, as originally showcased in Oxygen BETA70. It is a more advanced
+version of the 'user levels' patch currently available.
+
+
+License: GPL
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA
+*/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <sys/wait.h>
+#include <global.h>
+#include <neutrino.h>
+#include <driver/fontrenderer.h>
+#include <driver/rcinput.h>
+#include <daemonc/remotecontrol.h>
+#include "widget/menue.h"
+#include "widget/messagebox.h"
+#include "widget/hintbox.h"
+#include "widget/lcdcontroler.h"
+#include "widget/keychooser.h"
+#include "widget/stringinput.h"
+#include "widget/stringinput_ext.h"
+#include "color.h"
+#include "customize_menu.h"
+
+#define CUSTOMIZE_OPTION_COUNT 3
+const CMenuOptionChooser::keyval CUSTOMIZE_OPTIONS[CUSTOMIZE_OPTION_COUNT] =
+{
+{ 0, LOCALE_CUSTOMIZE_VISIBLE }, // The option is visible on the menu
+{ 1, LOCALE_CUSTOMIZE_NOTVISIBLE }, // The option is NOT visible
+{ 2, LOCALE_CUSTOMIZE_PINPROTECT }, // PIN Protect the item on the menu
+};
+
+UberNinja_Customize::UberNinja_Customize()
+: configfile('\t')
+{
+ frameBuffer = CFrameBuffer::getInstance();
+ width = 600;
+ hheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight();
+ mheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight();
+ height = hheight+13*mheight+ 10;
+ x=(((g_settings.screen_EndX- g_settings.screen_StartX)-width) / 2) + g_settings.screen_StartX;
+ y=(((g_settings.screen_EndY- g_settings.screen_StartY)-height) / 2) + g_settings.screen_StartY;
+}
+
+int UberNinja_Customize::exec(CMenuTarget* parent, const std::string & actionKey)
+{
+ int res = menu_return::RETURN_REPAINT;
+
+ if (parent) { parent->hide(); }
+ ShowCustomizeMenu();
+ return res;
+}
+
+void UberNinja_Customize::hide()
+{
+ frameBuffer->paintBackgroundBoxRel(x,y, width,height);
+}
+
+void UberNinja_Customize::ShowCustomizeMenu()
+{
+ CMenuWidget* customizeMenu = new CMenuWidget(LOCALE_CUSTOMIZE_HEAD, "settings.raw");
+ CPINChangeWidget * pinChangeWidget = new CPINChangeWidget(LOCALE_CUSTOMIZE_PIN, g_settings.customize_pincode, 4, LOCALE_CUSTOMIZE_PINHINT);
+
+ customizeMenu->addItem(GenericMenuSeparator);
+ customizeMenu->addItem(GenericMenuBack);
+
+ customizeMenu->addItem(new CMenuForwarderNonLocalized("Changes only take effect on restart", false, NULL, this, ""));
+ customizeMenu->addItem(new CMenuForwarder(LOCALE_CUSTOMIZE_PIN, true, g_settings.customize_pincode, pinChangeWidget));
+
+ // Main Menu
+ customizeMenu->addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_MAINMENU_HEAD));
+ customizeMenu->addItem(new CMenuOptionChooser(LOCALE_MAINMENU_TVMODE, (int *)&g_settings.customize_tvmode, CUSTOMIZE_OPTIONS, CUSTOMIZE_OPTION_COUNT, true, NULL));
+ customizeMenu->addItem(new CMenuOptionChooser(LOCALE_MAINMENU_RADIOMODE, (int *)&g_settings.customize_radiomode, CUSTOMIZE_OPTIONS, CUSTOMIZE_OPTION_COUNT, true, NULL));
+ customizeMenu->addItem(new CMenuOptionChooser(LOCALE_MAINMENU_SCARTMODE, (int *)&g_settings.customize_scartmode, CUSTOMIZE_OPTIONS, CUSTOMIZE_OPTION_COUNT, true, NULL));
+ customizeMenu->addItem(new CMenuOptionChooser(LOCALE_MAINMENU_GAMES, (int *)&g_settings.customize_games, CUSTOMIZE_OPTIONS, CUSTOMIZE_OPTION_COUNT, true, NULL));
+ customizeMenu->addItem(GenericMenuSeparator);
+ customizeMenu->addItem(new CMenuOptionChooser(LOCALE_MAINMENU_AUDIOPLAYER, (int *)&g_settings.customize_audioplayer, CUSTOMIZE_OPTIONS, CUSTOMIZE_OPTION_COUNT, true, NULL));
+ customizeMenu->addItem(new CMenuOptionChooser(LOCALE_MAINMENU_MOVIEPLAYER, (int *)&g_settings.customize_movieplayer, CUSTOMIZE_OPTIONS, CUSTOMIZE_OPTION_COUNT, true, NULL));
+ customizeMenu->addItem(new CMenuOptionChooser(LOCALE_MAINMENU_PICTUREVIEWER, (int *)&g_settings.customize_pictureviewer, CUSTOMIZE_OPTIONS, CUSTOMIZE_OPTION_COUNT, true, NULL));
+#if ENABLE_UPNP
+ customizeMenu->addItem(new CMenuOptionChooser(LOCALE_MAINMENU_UPNPBROWSER, (int *)&g_settings.customize_upnp, CUSTOMIZE_OPTIONS, CUSTOMIZE_OPTION_COUNT, true, NULL));
+#endif
+ customizeMenu->addItem(GenericMenuSeparator);
+ customizeMenu->addItem(new CMenuOptionChooser(LOCALE_MAINMENU_SETTINGS, (int *)&g_settings.customize_settings, CUSTOMIZE_OPTIONS, CUSTOMIZE_OPTION_COUNT, true, NULL));
+ customizeMenu->addItem(new CMenuOptionChooser(LOCALE_MAINMENU_SERVICE, (int *)&g_settings.customize_service, CUSTOMIZE_OPTIONS, CUSTOMIZE_OPTION_COUNT, true, NULL));
+ customizeMenu->addItem(GenericMenuSeparator);
+ customizeMenu->addItem(new CMenuOptionChooser(LOCALE_MAINMENU_SLEEPTIMER, (int *)&g_settings.customize_sleeptimer, CUSTOMIZE_OPTIONS, CUSTOMIZE_OPTION_COUNT, true, NULL));
+ customizeMenu->addItem(new CMenuOptionChooser(LOCALE_MAINMENU_REBOOT, (int *)&g_settings.customize_reboot, CUSTOMIZE_OPTIONS, CUSTOMIZE_OPTION_COUNT, true, NULL));
+
+ // Settings Menu
+ customizeMenu->addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_MAINMENU_SETTINGS));
+ customizeMenu->addItem(new CMenuOptionChooser(LOCALE_MAINSETTINGS_VIDEO, (int *)&g_settings.customize_video, CUSTOMIZE_OPTIONS, CUSTOMIZE_OPTION_COUNT, true, NULL));
+ customizeMenu->addItem(new CMenuOptionChooser(LOCALE_MAINSETTINGS_AUDIO, (int *)&g_settings.customize_audio, CUSTOMIZE_OPTIONS, CUSTOMIZE_OPTION_COUNT, true, NULL));
+ customizeMenu->addItem(new CMenuOptionChooser(LOCALE_MAINSETTINGS_NETWORK, (int *)&g_settings.customize_network, CUSTOMIZE_OPTIONS, CUSTOMIZE_OPTION_COUNT, true, NULL));
+ customizeMenu->addItem(new CMenuOptionChooser(LOCALE_MAINSETTINGS_RECORDING, (int *)&g_settings.customize_recording, CUSTOMIZE_OPTIONS, CUSTOMIZE_OPTION_COUNT, true, NULL));
+ customizeMenu->addItem(new CMenuOptionChooser(LOCALE_MAINSETTINGS_STREAMING, (int *)&g_settings.customize_streaming, CUSTOMIZE_OPTIONS, CUSTOMIZE_OPTION_COUNT, true, NULL));
+ customizeMenu->addItem(new CMenuOptionChooser(LOCALE_MAINSETTINGS_LANGUAGE, (int *)&g_settings.customize_language, CUSTOMIZE_OPTIONS, CUSTOMIZE_OPTION_COUNT, true, NULL));
+ customizeMenu->addItem(new CMenuOptionChooser(LOCALE_MAINSETTINGS_COLORS, (int *)&g_settings.customize_colours, CUSTOMIZE_OPTIONS, CUSTOMIZE_OPTION_COUNT, true, NULL));
+ customizeMenu->addItem(new CMenuOptionChooser(LOCALE_MAINSETTINGS_LCD, (int *)&g_settings.customize_lcd, CUSTOMIZE_OPTIONS, CUSTOMIZE_OPTION_COUNT, true, NULL));
+ customizeMenu->addItem(new CMenuOptionChooser(LOCALE_MAINSETTINGS_KEYBINDING, (int *)&g_settings.customize_keysetup, CUSTOMIZE_OPTIONS, CUSTOMIZE_OPTION_COUNT, true, NULL));
+ customizeMenu->addItem(new CMenuOptionChooser(LOCALE_AUDIOPLAYERPICSETTINGS_GENERAL, (int *)&g_settings.customize_audpicgeneral, CUSTOMIZE_OPTIONS, CUSTOMIZE_OPTION_COUNT, true, NULL));
+ customizeMenu->addItem(new CMenuOptionChooser(LOCALE_MAINSETTINGS_DRIVER, (int *)&g_settings.customize_driversettings, CUSTOMIZE_OPTIONS, CUSTOMIZE_OPTION_COUNT, true, NULL));
+ customizeMenu->addItem(new CMenuOptionChooser(LOCALE_MAINSETTINGS_MISC, (int *)&g_settings.customize_miscsettings, CUSTOMIZE_OPTIONS, CUSTOMIZE_OPTION_COUNT, true, NULL));
+
+ // Service Menu
+ customizeMenu->addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_MAINMENU_SERVICE));
+ customizeMenu->addItem(new CMenuOptionChooser(LOCALE_BOUQUETLIST_HEAD, (int *)&g_settings.customize_bouqueteditor, CUSTOMIZE_OPTIONS, CUSTOMIZE_OPTION_COUNT, true, NULL));
+ customizeMenu->addItem(new CMenuOptionChooser(LOCALE_SERVICEMENU_SCANTS, (int *)&g_settings.customize_scants, CUSTOMIZE_OPTIONS, CUSTOMIZE_OPTION_COUNT, true, NULL));
+ customizeMenu->addItem(new CMenuOptionChooser(LOCALE_SERVICEMENU_UPDATE, (int *)&g_settings.customize_update, CUSTOMIZE_OPTIONS, CUSTOMIZE_OPTION_COUNT, true, NULL));
+
+ customizeMenu->exec (NULL, "");
+ customizeMenu->hide ();
+ delete customizeMenu;
+
+ // After menu exits, we must save all the menu specifics to our config file.
+ configfile.setInt32("customize_tvmode", g_settings.customize_tvmode);
+ configfile.setInt32("customize_radiomode", g_settings.customize_radiomode);
+ configfile.setInt32("customize_scartmode", g_settings.customize_scartmode);
+ configfile.setInt32("customize_games", g_settings.customize_games);
+ configfile.setInt32("customize_audioplayer", g_settings.customize_audioplayer);
+ configfile.setInt32("customize_movieplayer", g_settings.customize_movieplayer);
+ configfile.setInt32("customize_pictureviewer", g_settings.customize_pictureviewer);
+#if ENABLE_UPNP
+ configfile.setInt32("customize_upnp", g_settings.customize_upnp);
+#endif
+ configfile.setInt32("customize_settings", g_settings.customize_settings);
+ configfile.setInt32("customize_service", g_settings.customize_service);
+ configfile.setInt32("customize_sleeptimer", g_settings.customize_sleeptimer);
+ configfile.setInt32("customize_reboot", g_settings.customize_reboot);
+ configfile.setInt32("customize_shutdown", g_settings.customize_shutdown);
+ configfile.setInt32("customize_video", g_settings.customize_video);
+ configfile.setInt32("customize_audio", g_settings.customize_audio);
+ configfile.setInt32("customize_network", g_settings.customize_network);
+ configfile.setInt32("customize_recording", g_settings.customize_recording);
+ configfile.setInt32("customize_streaming", g_settings.customize_streaming);
+ configfile.setInt32("customize_language", g_settings.customize_language);
+ configfile.setInt32("customize_colours", g_settings.customize_colours);
+ configfile.setInt32("customize_lcd", g_settings.customize_lcd);
+ configfile.setInt32("customize_keysetup", g_settings.customize_keysetup);
+ configfile.setInt32("customize_audpicgeneral", g_settings.customize_audpicgeneral);
+ configfile.setInt32("customize_driversettings", g_settings.customize_driversettings);
+ configfile.setInt32("customize_miscsettings", g_settings.customize_miscsettings);
+ configfile.setInt32("customize_bouqueteditor", g_settings.customize_bouqueteditor);
+ configfile.setInt32("customize_scants", g_settings.customize_scants);
+ configfile.setInt32("customize_update", g_settings.customize_update);
+}
--- tuxbox-cvs-orig/apps/tuxbox/neutrino/src/gui/customize_menu.h 1970-01-01 01:00:00.000000000 +0100
+++ tuxbox-cvs/apps/tuxbox/neutrino/src/gui/customize_menu.h 2007-08-21 18:23:38.000000000 +0100
@@ -0,0 +1,57 @@
+/*
+$Id: customize_menu.cpp,v 1.000 2007/08/21 15:38:53 nitr8 Exp $
+
+Neutrino-GUI - DBoxII-Project
+
+Copyright (C) 2001 Steffen Hehn 'McClean'
+and some other guys
+Homepage: http://dbox.cyberphoria.org/
+
+Kommentar:
+
+This is the customization menu, as originally showcased in Oxygen BETA70. It is a more advanced
+version of the 'user levels' patch currently available.
+
+
+License: GPL
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA
+*/
+
+#ifndef __customizemenu__ /* liam note: change this value for each new menu */
+#define __customizemenu__ /* liam note: change this value for each new menu */
+#include <string>
+#include <vector>
+#include <configfile.h>
+#include <driver/framebuffer.h>
+#include <system/lastchannel.h>
+#include <system/setting_helpers.h>
+
+using namespace std;
+
+class UberNinja_Customize : public CMenuTarget
+{
+ private:
+ CFrameBuffer *frameBuffer;
+ int x, y, width, height, hheight, mheight;
+
+ public:
+ CConfigFile configfile;
+ UberNinja_Customize();
+ void hide();
+ int exec(CMenuTarget* parent, const std::string & actionKey);
+ void ShowCustomizeMenu();
+};
+#endif