Commit 4758ccba authored by Gildas Bazin's avatar Gildas Bazin

* modules/gui/wxwindows/*: work-around a wxwindows bug with accelerators registration on win32.

parent e9a6f99b
...@@ -279,6 +279,12 @@ Interface::~Interface() ...@@ -279,6 +279,12 @@ Interface::~Interface()
delete timer; delete timer;
} }
void Interface::Init()
{
/* Misc init */
SetupHotkeys();
}
void Interface::Update() void Interface::Update()
{ {
/* Misc updates */ /* Misc updates */
......
...@@ -49,6 +49,7 @@ Timer::Timer( intf_thread_t *_p_intf, Interface *_p_main_interface ) ...@@ -49,6 +49,7 @@ Timer::Timer( intf_thread_t *_p_intf, Interface *_p_main_interface )
{ {
p_intf = _p_intf; p_intf = _p_intf;
p_main_interface = _p_main_interface; p_main_interface = _p_main_interface;
b_init = 0;
i_old_playing_status = PAUSE_S; i_old_playing_status = PAUSE_S;
i_old_rate = INPUT_RATE_DEFAULT; i_old_rate = INPUT_RATE_DEFAULT;
...@@ -90,6 +91,14 @@ Timer::~Timer() ...@@ -90,6 +91,14 @@ Timer::~Timer()
*****************************************************************************/ *****************************************************************************/
void Timer::Notify() void Timer::Notify()
{ {
#if defined( __WXMSW__ ) /* Work-around a bug with accelerators */
if( !b_init )
{
p_main_interface->Init();
b_init = VLC_TRUE;
}
#endif
vlc_mutex_lock( &p_intf->change_lock ); vlc_mutex_lock( &p_intf->change_lock );
/* Update the input */ /* Update the input */
......
...@@ -181,6 +181,7 @@ public: ...@@ -181,6 +181,7 @@ public:
private: private:
intf_thread_t *p_intf; intf_thread_t *p_intf;
Interface *p_main_interface; Interface *p_main_interface;
vlc_bool_t b_init;
int i_old_playing_status; int i_old_playing_status;
int i_old_rate; int i_old_rate;
vlc_bool_t b_old_seekable; vlc_bool_t b_old_seekable;
...@@ -291,6 +292,7 @@ public: ...@@ -291,6 +292,7 @@ public:
/* Constructor */ /* Constructor */
Interface( intf_thread_t *p_intf ); Interface( intf_thread_t *p_intf );
virtual ~Interface(); virtual ~Interface();
void Init();
void TogglePlayButton( int i_playing_status ); void TogglePlayButton( int i_playing_status );
void Update(); void Update();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment