CMiscMenue: add entry for temporarily debug mode settings

Option "Level" overwrites assigned debug level output mode of Neutrino
start parameters, but only temporarily till change of options by user
or restart of Neutrino.
This commit is contained in:
2014-03-08 22:38:12 +01:00
parent 1e2290a758
commit 8a8748c5e7
8 changed files with 53 additions and 4 deletions

View File

@@ -35,7 +35,7 @@
#include <neutrino_menue.h>
#include <system/setting_helpers.h>
#include <system/helpers.h>
#include <system/debug.h>
#include <gui/miscsettings_menu.h>
#include <gui/cec_setup.h>
#include <gui/filebrowser.h>
@@ -312,6 +312,13 @@ int CMiscMenue::showMiscSettingsMenu()
return res;
}
const CMenuOptionChooser::keyval DEBUG_MODE_OPTIONS[DEBUG_MODES] =
{
{ DEBUG_NORMAL , LOCALE_DEBUG_LEVEL_1 },
{ DEBUG_INFO , LOCALE_DEBUG_LEVEL_2 },
{ DEBUG_DEBUG , LOCALE_DEBUG_LEVEL_3 }
};
//general settings
void CMiscMenue::showMiscSettingsMenuGeneral(CMenuWidget *ms_general)
{
@@ -347,6 +354,12 @@ void CMiscMenue::showMiscSettingsMenuGeneral(CMenuWidget *ms_general)
mf = new CMenuForwarder(LOCALE_MPKEY_PLUGIN, true, g_settings.movieplayer_plugin, this, "movieplayer_plugin");
mf->setHint("", LOCALE_MENU_HINT_MOVIEPLAYER_PLUGIN);
ms_general->addItem(mf);
//set debug level
ms_general->addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_DEBUG));
CMenuOptionChooser * md = new CMenuOptionChooser(LOCALE_DEBUG_LEVEL, &debug, DEBUG_MODE_OPTIONS, DEBUG_MODES, true);
// mc->setHint("", LOCALE_MENU_HINT_START_TOSTANDBY);
ms_general->addItem(md);
}
#define VIDEOMENU_HDMI_CEC_MODE_OPTION_COUNT 2

View File

@@ -27,9 +27,15 @@
extern int debug;
#define DEBUG_NORMAL 0
#define DEBUG_INFO 1
#define DEBUG_DEBUG 2
enum
{
DEBUG_NORMAL , // 0
DEBUG_INFO , // 1
DEBUG_DEBUG , // 2
DEBUG_MODES // 3 count of available modes
};
void setDebugLevel( int level );

View File

@@ -344,6 +344,11 @@ typedef enum
LOCALE_DATE_THU,
LOCALE_DATE_TUE,
LOCALE_DATE_WED,
LOCALE_DEBUG,
LOCALE_DEBUG_LEVEL,
LOCALE_DEBUG_LEVEL_1,
LOCALE_DEBUG_LEVEL_2,
LOCALE_DEBUG_LEVEL_3,
LOCALE_EPG_SAVING,
LOCALE_EPGEXTENDED_ACTORS,
LOCALE_EPGEXTENDED_DIRECTOR,

View File

@@ -344,6 +344,11 @@ const char * locale_real_names[] =
"date.Thu",
"date.Tue",
"date.Wed",
"debug",
"debug.level",
"debug.level_1",
"debug.level_2",
"debug.level_3",
"epg.saving",
"epgextended.actors",
"epgextended.director",