neutrino: sync keybind and usermenu code with neutrino-mp, code (C) martii

This commit is contained in:
[CST] Focus
2014-09-05 17:49:11 +04:00
parent f07e81c4b9
commit 420af7a4dc
45 changed files with 1767 additions and 1144 deletions

View File

@@ -137,7 +137,7 @@ struct SNeutrinoSettings
int ci_ignore_messages;
int radiotext_enable;
int easymenu;
//vcr
int vcr_AutoSwitch;
@@ -176,20 +176,20 @@ struct SNeutrinoSettings
enum PERSONALIZE_SETTINGS //settings.h
{
P_MAIN_PINSTATUS,
//user menu
P_MAIN_BLUE_BUTTON,
P_MAIN_YELLOW_BUTTON,
P_MAIN_GREEN_BUTTON,
P_MAIN_RED_BUTTON,
//main menu
P_MAIN_TV_MODE,
P_MAIN_TV_RADIO_MODE, //togglemode
P_MAIN_RADIO_MODE,
P_MAIN_TIMER,
P_MAIN_MEDIA,
P_MAIN_GAMES,
P_MAIN_TOOLS,
P_MAIN_SCRIPTS,
@@ -202,7 +202,7 @@ struct SNeutrinoSettings
P_MAIN_SHUTDOWN,
P_MAIN_INFOMENU,
P_MAIN_CISETTINGS,
//settings menu
P_MSET_SETTINGS_MANAGER,
P_MSET_VIDEO,
@@ -217,7 +217,7 @@ struct SNeutrinoSettings
P_MSET_KEYBINDING,
P_MSET_MEDIAPLAYER,
P_MSET_MISC,
//service menu
P_MSER_TUNER,
P_MSER_SCANTS,
@@ -228,7 +228,7 @@ struct SNeutrinoSettings
P_MSER_RELOAD_PLUGINS,
P_MSER_SERVICE_INFOMENU,
P_MSER_SOFTUPDATE,
//media menu
P_MEDIA_MENU,
P_MEDIA_AUDIO,
@@ -236,18 +236,18 @@ struct SNeutrinoSettings
P_MEDIA_MPLAYER,
P_MEDIA_PVIEWER,
P_MEDIA_UPNP,
//movieplayer menu
P_MPLAYER_MBROWSER,
P_MPLAYER_FILEPLAY,
P_MPLAYER_YTPLAY,
//feature keys
P_FEAT_KEY_FAVORIT,
P_FEAT_KEY_TIMERLIST,
P_FEAT_KEY_VTXT,
P_FEAT_KEY_RC_LOCK,
//user menu
P_UMENU_SHOW_CANCEL,
@@ -257,10 +257,10 @@ struct SNeutrinoSettings
P_UMENU_PLUGIN_TYPE_SCRIPTS,
P_UMENU_PLUGIN_TYPE_LUA,
P_SETTINGS_MAX
P_SETTINGS_MAX
};
int personalize[P_SETTINGS_MAX];
int personalize[P_SETTINGS_MAX];
std::string personalize_pincode;
//timing
@@ -275,7 +275,7 @@ struct SNeutrinoSettings
TIMING_VOLUMEBAR = 6,
TIMING_FILEBROWSER = 7,
TIMING_NUMERICZAP = 8,
TIMING_SETTING_COUNT
};
@@ -392,16 +392,22 @@ struct SNeutrinoSettings
int filesystem_is_utf8;
// default plugin for ts-movieplayer (red button)
std::string movieplayer_plugin;
std::string onekey_plugin;
std::string plugin_hdd_dir;
std::string logo_hdd_dir;
std::string plugins_disabled;
std::string plugins_game;
std::string plugins_tool;
std::string plugins_script;
std::string plugins_lua;
//key configuration
int key_tvradio_mode;
int key_channelList_pageup;
int key_channelList_pagedown;
int key_pageup;
int key_pagedown;
int key_channelList_cancel;
int key_channelList_sort;
int key_channelList_addrecord;
@@ -419,7 +425,6 @@ struct SNeutrinoSettings
int key_list_end;
int key_power_off;
int menu_left_exit;
int audio_run_player;
int key_click;
int timeshift_pause;
int auto_timeshift;
@@ -427,6 +432,12 @@ struct SNeutrinoSettings
int auto_delete;
int record_hours;
int timeshift_hours;
int key_record;
int key_help;
int key_next43mode;
int key_switchformat;
int key_volumeup;
int key_volumedown;
int mpkey_rewind;
int mpkey_forward;
@@ -437,7 +448,9 @@ struct SNeutrinoSettings
int mpkey_time;
int mpkey_bookmark;
int mpkey_plugin;
int mpkey_goto;
int mpkey_subtitle;
int mpkey_next_repeat_mode;
int key_timeshift;
int key_plugin;
@@ -611,10 +624,10 @@ struct SNeutrinoSettings
int backlight_standby;
int backlight_deepstandby;
int lcd_scroll;
//#define FILESYSTEM_ENCODING_TO_UTF8(a) (g_settings.filesystem_is_utf8 ? (a) : ZapitTools::Latin1_to_UTF8(a).c_str())
//#define FILESYSTEM_ENCODING_TO_UTF8(a) (g_settings.filesystem_is_utf8 ? (a) : ZapitTools::Latin1_to_UTF8(a).c_str())
#define FILESYSTEM_ENCODING_TO_UTF8(a) (isUTF8(a) ? (a) : ZapitTools::Latin1_to_UTF8(a).c_str())
#define UTF8_TO_FILESYSTEM_ENCODING(a) (g_settings.filesystem_is_utf8 ? (a) : ZapitTools::UTF8_to_Latin1(a).c_str())
//#define FILESYSTEM_ENCODING_TO_UTF8_STRING(a) (g_settings.filesystem_is_utf8 ? (a) : ZapitTools::Latin1_to_UTF8(a))
//#define FILESYSTEM_ENCODING_TO_UTF8_STRING(a) (g_settings.filesystem_is_utf8 ? (a) : ZapitTools::Latin1_to_UTF8(a))
#define FILESYSTEM_ENCODING_TO_UTF8_STRING(a) (isUTF8(a) ? (a) : ZapitTools::Latin1_to_UTF8(a))
// pictureviewer
@@ -680,7 +693,7 @@ struct SNeutrinoSettings
ITEM_VTXT = 11,
ITEM_TECHINFO = 13,
ITEM_REMOTE = 14,
ITEM_PLUGIN_TYPES = 15,
ITEM_PLUGIN = 15,
ITEM_IMAGEINFO = 16,
ITEM_BOXINFO = 17,
ITEM_CAM = 18,
@@ -691,10 +704,20 @@ struct SNeutrinoSettings
ITEM_FILEPLAY = 23,
ITEM_TOOLS = 24,
ITEM_LUA = 25,
ITEM_HDDMENU = 26,
ITEM_AUDIOPLAY = 27,
ITEM_INETPLAY = 28,
ITEM_MAX // MUST be always the last in the list
} USER_ITEM;
std::string usermenu_text[BUTTON_MAX];
int usermenu[BUTTON_MAX][ITEM_MAX]; // (USER_ITEM) [button][position in Menue] = feature item
typedef struct {
unsigned int key;
std::string items;
std::string title;
std::string name;
} usermenu_t;
std::vector<usermenu_t *> usermenu;
//progressbar arrangement for infobar
typedef enum