[Idee] UK Customizing Menu DIFF

PT-1
Moderator english
Beiträge: 2458
Registriert: Donnerstag 20. Dezember 2001, 00:00

[Idee] UK Customizing Menu DIFF

Beitrag von PT-1 »

Hallo,

wie schon hier gezeigt kommt jetzt das diff


Bild

Die DIFFS stammen von speedy2006
Comments:
This is the customization menu, as originally showcased in Oxygen BETA70. It is a more advanced
version of the 'user levels' patch currently available. This is a re-make of old code, so it
may not be up to todays standards.
Update from old code: Menu items are now dynamically ordered
This revision does not cover all the possible menu entries - it only covers a handful. More can
be added as and when required; but this is just a basic mock version to get things going.
License: GPL
Instructions are included within the ZIP. Hope to see these put to good use

For easy expansion I have made the bulk of the coding into a seperate file. To add more options to this menu, just edit the customize_menu.cpp file accordingly


Die Instructionen sind mit in dem Zip File. Fuer einfache Erweiterung habe ich den meisten Code in einem einzelnen File untergebracht. Um mehr Funktionen hinzuzufuegen muss man einfach die customize_menu.cpp editieren

http://www.pt-1.net/Diffs/customize_menu.zip
Zuletzt geändert von PT-1 am Mittwoch 17. Dezember 2008, 15:10, insgesamt 1-mal geändert.
PT-1
Moderator english
Beiträge: 2458
Registriert: Donnerstag 20. Dezember 2001, 00:00

Beitrag von PT-1 »

Neues Diff: http://www.njlworld.com/~pt1/Diffs/cust ... enu1.1.zip

Nun mit restart von Neutrino nachdem man Aenderungen gemacht hat

Zum Teil gibt es mit der folgenden Zeile probleme (apps/tuxbox/neutrino/src/gui/customize_menu.cpp):

Code: Alles auswählen

execvp(global_argv[0], global_argv); // Restart Neutrino
Einfach in:

Code: Alles auswählen

CNeutrinoApp::ExitRun(True);    // Restart Neutrino
aendern
mb405
Tuxboxer
Tuxboxer
Beiträge: 2331
Registriert: Donnerstag 24. März 2005, 21:52

Beitrag von mb405 »

@PT-1
kannste das nochmal uppen ?? ich wollt es grad mal laden, und probieren.
download geht nicht :(
PT-1
Moderator english
Beiträge: 2458
Registriert: Donnerstag 20. Dezember 2001, 00:00

Beitrag von PT-1 »

mb405
Tuxboxer
Tuxboxer
Beiträge: 2331
Registriert: Donnerstag 24. März 2005, 21:52

Beitrag von mb405 »

uiui ne eigene website :)
danke dir
PT-1
Moderator english
Beiträge: 2458
Registriert: Donnerstag 20. Dezember 2001, 00:00

Beitrag von PT-1 »

mb405 hat geschrieben:uiui ne eigene website :)
danke dir
Die habe ich spendiert bekommen :D
PT-1
Moderator english
Beiträge: 2458
Registriert: Donnerstag 20. Dezember 2001, 00:00

Beitrag von PT-1 »

Noch was neues, Diff's folgen
This new version splits everything up into sections, allowing the use of more options with a less cluttered interface. It also uses the original button assignments. You can now set a PIN code, and also enable/disable this PIN code check.

The main menu itself can now also be protected with a PIN code (option only allows for PIN code, since it would not be good to allow a "hide" option for the main menu!!).

The red (EPG menu) and blue (Features menu) button menu's can also be enabled, disabled or PIN protected.

If the AIW menu is included in the compile then it is also expanded to use this personalization menu. I have added the appropriate "#ifdef ENABLE_UK" sections where necessary so that this wont be included in german builds unless --enable-uk is set.
Bild
ed_2
Einsteiger
Einsteiger
Beiträge: 161
Registriert: Donnerstag 29. November 2001, 00:00

Beitrag von ed_2 »

Hi,

kann mann sowas nicht direkt einchecken?

Ist doch prima für ne Kinder-D-box geeignet.

Dann brauche ich nur noch eine einstellmöglichkeit das die Box nur eine
bestimmte Zeitlang am Tag an sein darf.

mfg

ed_2
mb405
Tuxboxer
Tuxboxer
Beiträge: 2331
Registriert: Donnerstag 24. März 2005, 21:52

Beitrag von mb405 »

die diffs kann doch jeder einbauen, der bisserl verstand hat.
zum anderen tragen sie sehr zum verständnis der ganzen materie bei.
PT-1
Moderator english
Beiträge: 2458
Registriert: Donnerstag 20. Dezember 2001, 00:00

Beitrag von PT-1 »

Hier erstmal das letzte Diff das nun von Nitr8 CVS tauglich gemacht wurde:

Bild

Bild

http://www.pt-1.net/nitr8/customize_men ... 08h29.diff

EDIT: Mein webspace ist momentan down:
Here is the link for the file you uploaded:
http://download.yousendit.com/E8F24CBD73E6A1E5

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
Zuletzt geändert von PT-1 am Mittwoch 22. August 2007, 16:07, insgesamt 1-mal geändert.
dietmarw
Contributor
Beiträge: 1833
Registriert: Mittwoch 10. April 2002, 15:39

Beitrag von dietmarw »

sieht sehr gut aus, ich starte grade mal einen lauf..

1xI images und neutrino bin unter div_tests
http://tuxbox.trale.de
PT-1
Moderator english
Beiträge: 2458
Registriert: Donnerstag 20. Dezember 2001, 00:00

Beitrag von PT-1 »

Mein Webspace ist momentan unereichbar aber mal hier die letzte Variante.

THX to Speedy2206 und Nitr8

Bild

Bild

Bild

Bild

Bild

Here is the link for the file you uploaded:
http://download.yousendit.com/822C70B57A5DCCF7
nitr8
Einsteiger
Einsteiger
Beiträge: 102
Registriert: Freitag 29. Dezember 2006, 10:44

Beitrag von nitr8 »

right so once you guys have tested and approved let me know so i can check it into the CVS if you do not object.

--me
mash4077
Tuxboxer
Tuxboxer
Beiträge: 4654
Registriert: Samstag 27. April 2002, 13:19

Beitrag von mash4077 »

Hi,

ich will ja kein Spielverderber sein, aber ich hoffe, ihr macht das vor dem Einchecken irgendwie konfigurierbar, sodass diejenigen, die sowas nicht brauchen, auch weithin ihr normales Design haben.

Gruß
mash
dietmarw
Contributor
Beiträge: 1833
Registriert: Mittwoch 10. April 2002, 15:39

Beitrag von dietmarw »

mash4077 hat geschrieben:..sodass diejenigen, die sowas nicht brauchen, auch weithin ihr normales Design haben.
...
@mash
thought you not took a look inside?
only one entry added at settings (einstellungen) menu, all other is left untouched


@nitr8
only string "customize.visible" or "customize.notvisible" and "customize.pinprotect"
should be without "customize."
[edit: in pt-1 pictures is correct, here is "customize." in front of all entry's.
maybe by german language?]

Bild
Bild
Zuletzt geändert von dietmarw am Mittwoch 22. August 2007, 17:58, insgesamt 3-mal geändert.
Z80
Erleuchteter
Erleuchteter
Beiträge: 710
Registriert: Dienstag 3. September 2002, 12:54

Beitrag von Z80 »

mash4077 hat geschrieben:Hi,

ich will ja kein Spielverderber sein, aber ich hoffe, ihr macht das vor dem Einchecken irgendwie konfigurierbar, sodass diejenigen, die sowas nicht brauchen, auch weithin ihr normales Design haben.
Gruß
mash
ich versteh deinen einwand hier nicht, das design wird doch nicht verändert. imho ists doch nur ein separates Untermenü ("Personalisieren").
mash4077
Tuxboxer
Tuxboxer
Beiträge: 4654
Registriert: Samstag 27. April 2002, 13:19

Beitrag von mash4077 »

Hi,

wenn es so ist, dass beim nicht Verwenden dieser Funktion keinerlei Änderungen an den Menüs zu sehen sind, dann bin ich beruhigt. :wink:

Gruß
mash
PT-1
Moderator english
Beiträge: 2458
Registriert: Donnerstag 20. Dezember 2001, 00:00

Beitrag von PT-1 »

Noch ein Kommentar von Speedy

- The main bulk of code is in apps/tuxbox/gui/personalize.cpp.
- All locales sorted (just need to add languages other than english and german if putting into CVS)
- Seperators are only shown when necessary
- Added 100% of the options from the main menu, settings menu and service menu.
- All options "ENABLED" or "VISIBLE" by default (as should be expected)
- PIN code is set at 1234 by default but is also disabled by default
- Blue button menu (features) can be enabled/disabled on the fly without a reboot
- Red button menu (eventlist) can be enabled/disabled on the fly without a reboot
- When user makes a change in personalization menu, a reboot prompt is shown. This saves and reboots if necessary.
- Follows #ENABLE_UPNP where necessary (with exception of settings.h but i feel this is correct)
nitr8
Einsteiger
Einsteiger
Beiträge: 102
Registriert: Freitag 29. Dezember 2006, 10:44

Beitrag von nitr8 »

dietmarw hat geschrieben: @nitr8
only string "customize.visible" or "customize.notvisible" and "customize.pinprotect"
should be without "customize."
[edit: in pt-1 pictures is correct, here is "customize." in front of all entry's.
maybe by german language?]
That should be fixed in the latest diff, try the last diff pt1 posted on http://download.yousendit.com/822C70B57A5DCCF7

P.S.

also added

Code: Alles auswählen

        if (g_settings.personalize_audioplayer==0 && g_settings.personalize_movieplayer==0 && g_settings.personalize_pictureviewer==0 && g_settings.personalize_upnpbrowser==0) {
                // Stop seperator from appearing when menu entries have been hidden
        } else {
                mainMenu.addItem(GenericMenuSeparatorLine); }
to hide the Menu Separator Lines

--me
dbt
Administrator
Beiträge: 2675
Registriert: Donnerstag 28. September 2006, 19:18

Beitrag von dbt »

Wäre es bei der Gelegenheit nicht sinnvoll die Menüs aus der neutrino.cpp konsequent rauszutrennen. Ich meine ja nur, da das schon öfter mal angesprochen wurde.
PT-1
Moderator english
Beiträge: 2458
Registriert: Donnerstag 20. Dezember 2001, 00:00

Beitrag von PT-1 »

dbt hat geschrieben:Wäre es bei der Gelegenheit nicht sinnvoll die Menüs aus der neutrino.cpp konsequent rauszutrennen. Ich meine ja nur, da das schon öfter mal angesprochen wurde.
For the English readers

Would it not be good to take this Idea as a starting point and completely remove the menu's completely from the Neutrino.cpp as this has been proposed on previous occasions.
dietmarw
Contributor
Beiträge: 1833
Registriert: Mittwoch 10. April 2002, 15:39

Beitrag von dietmarw »

think until this step the posted menu is a good chance to customize now..
maybe other solutions in future.. but for now..

new build is in work..
in 70min until now ;)
PT-1
Moderator english
Beiträge: 2458
Registriert: Donnerstag 20. Dezember 2001, 00:00

Beitrag von PT-1 »

Thanks Dietmar ;-)
nitr8
Einsteiger
Einsteiger
Beiträge: 102
Registriert: Freitag 29. Dezember 2006, 10:44

Beitrag von nitr8 »

@dietmarw

how did the build go?

--me
dietmarw
Contributor
Beiträge: 1833
Registriert: Mittwoch 10. April 2002, 15:39

Beitrag von dietmarw »

error :cry:

Code: Alles auswählen

if powerpc-tuxbox-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I../../daemons -I../../src -I/home/dietmarw/tux_test/20070822/dbox2/cdkroot/include/tuxbox   -I/home/dietmarw/tux_test/20070822/dbox2/cdkroot/include/freetype2 -I/home/dietmarw/tux_test/20070822/dbox2/cdkroot/include/tuxbox -I/home/dietmarw/tux_test/20070822/dbox2/cdkroot/include/tuxbox   -I/home/dietmarw/tux_test/20070822/dbox2/cdkroot/include/tuxbox/mpegtools   -I/home/dietmarw/tux_test/20070822/dbox2/cdkroot/include -I/home/dietmarw/tux_test/20070822/tuxbox-cvs/driver/include -I../../lib   -I/home/dietmarw/tux_test/20070822/tuxbox-cvs/driver/dvb/include -I/home/dietmarw/tux_test/20070822/tuxbox-cvs/driver/include  -Wall -mcpu=823 -pipe -Os -MT personalize.o -MD -MP -MF ".deps/personalize.Tpo" -c -o personalize.o personalize.cpp; \
then mv -f ".deps/personalize.Tpo" ".deps/personalize.Po"; else rm -f ".deps/personalize.Tpo"; exit 1; fi
personalize.cpp: In member function `void CPersonalizeGui::SaveAndRestart()':
../../src/neutrino.h:167: error: `void CNeutrinoApp::saveSetup()' is private
personalize.cpp:349: error: within this context
make[5]: *** [personalize.o] Fehler 1
make[5]: Leaving directory `/home/dietmarw/tux_test/20070822/tuxbox-cvs/apps/tuxbox/neutrino/src/gui'
make[4]: *** [all-recursive] Fehler 1
make[4]: Leaving directory `/home/dietmarw/tux_test/20070822/tuxbox-cvs/apps/tuxbox/neutrino/src/gui'
make[3]: *** [all-recursive] Fehler 1
make[3]: Leaving directory `/home/dietmarw/tux_test/20070822/tuxbox-cvs/apps/tuxbox/neutrino/src'
make[2]: *** [all-recursive] Fehler 1
make[2]: Leaving directory `/home/dietmarw/tux_test/20070822/tuxbox-cvs/apps/tuxbox/neutrino'
make[1]: *** [all] Fehler 2
make[1]: Leaving directory `/home/dietmarw/tux_test/20070822/tuxbox-cvs/apps/tuxbox/neutrino'
make: *** [/home/dietmarw/tux_test/20070822/dbox2/cdkflash/root-neutrino] Fehler 2