diff options
author | phintuka <phintuka> | 2012-03-19 11:29:14 +0000 |
---|---|---|
committer | phintuka <phintuka> | 2012-03-19 11:29:14 +0000 |
commit | a888c2ebca7902a8172f7d4000ad80d3546559f9 (patch) | |
tree | 8e575c7c482cb61769681c21df26de004b8bd3ad | |
parent | eb5074c5b58ca3dd278f9ab43e7259df39506ac5 (diff) | |
download | xineliboutput-a888c2ebca7902a8172f7d4000ad80d3546559f9.tar.gz xineliboutput-a888c2ebca7902a8172f7d4000ad80d3546559f9.tar.bz2 |
Removed static members from main menu
-rw-r--r-- | config.c | 3 | ||||
-rw-r--r-- | config.h | 4 | ||||
-rw-r--r-- | menu.c | 11 | ||||
-rw-r--r-- | menu.h | 5 |
4 files changed, 11 insertions, 12 deletions
@@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: config.c,v 1.113 2012-03-17 19:40:48 phintuka Exp $ + * $Id: config.c,v 1.114 2012-03-19 11:29:14 phintuka Exp $ * */ @@ -714,6 +714,7 @@ config_t::config_t() { media_enable_delete = 0; main_menu_mode = ShowMenu; + last_hotkey = -1;//kNone; force_primary_device = 0; }; @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: config.h,v 1.88 2012-03-17 19:46:23 phintuka Exp $ + * $Id: config.h,v 1.89 2012-03-19 11:29:14 phintuka Exp $ * */ @@ -267,6 +267,8 @@ class config_t { // OSD state eMainMenuMode main_menu_mode; // used internally to open right sub-menu cOsdObject *pending_menu_action; // used to replace current OSD with another type of OSD object + time_t last_hotkey_time; + int/*eKeys*/ last_hotkey; // local frontend settings char local_frontend[64]; @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: menu.c,v 1.95 2012-03-19 11:07:52 phintuka Exp $ + * $Id: menu.c,v 1.96 2012-03-19 11:29:14 phintuka Exp $ * */ @@ -574,9 +574,6 @@ eOSState cMenuBrowseFiles::ProcessKey(eKeys Key) #include "tools/display_message.h" -time_t cMenuXinelib::g_LastHotkeyTime = 0; -eKeys cMenuXinelib::g_LastHotkey = kNone; - cMenuXinelib::cMenuXinelib(cXinelibDevice *Dev) { m_Dev = Dev; @@ -741,7 +738,7 @@ eOSState cMenuXinelib::ProcessHotkey(eKeys Key) eOSState NewState = osEnd; cString Message; time_t now = time(NULL); - bool OnlyInfo = ((g_LastHotkeyTime < now-3) || g_LastHotkey != Key); + bool OnlyInfo = ((xc.last_hotkey_time < now-3) || xc.last_hotkey != Key); switch (Key) { case HOTKEY_DVD: @@ -949,8 +946,8 @@ eOSState cMenuXinelib::ProcessHotkey(eKeys Key) xc.pending_menu_action = new cDisplayMessage(Message); } - g_LastHotkeyTime = now; - g_LastHotkey = Key; + xc.last_hotkey_time = now; + xc.last_hotkey = Key; return NewState; } @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: menu.h,v 1.10 2012-03-19 11:21:33 phintuka Exp $ + * $Id: menu.h,v 1.11 2012-03-19 11:29:14 phintuka Exp $ * */ @@ -27,8 +27,7 @@ class cMenuXinelib : public cMenuSetupPage // Hotkeys enum { hkInit, hkSeen, hkNone } hotkey_state; - static time_t g_LastHotkeyTime; - static eKeys g_LastHotkey; + virtual eOSState ProcessHotkey(eKeys Key); cOsdItem *audio_ctrl_compress; |