Commit ac70d6fe authored by Gildas Bazin's avatar Gildas Bazin

* modules/gui/wxwindows/*: workaround uninitialization bug in wxWidgets ->...

* modules/gui/wxwindows/*: workaround uninitialization bug in wxWidgets -> re-enabled on-the-fly interface switching.
parent f5703c16
......@@ -255,7 +255,7 @@ void PopupMenu( intf_thread_t *p_intf, wxWindow *p_parent,
FIND_PARENT );
if( p_object != NULL )
{
#if defined(WIN32)
#if (wxCHECK_VERSION(2,5,0))
ppsz_varnames[i] = "intf-switch";
pi_objects[i++] = p_object->i_object_id;
#endif
......@@ -506,7 +506,7 @@ wxMenu *SettingsMenu( intf_thread_t *_p_intf, wxWindow *p_parent,
FIND_PARENT );
if( p_object != NULL )
{
#if defined(WIN32)
#if (wxCHECK_VERSION(2,5,0))
ppsz_varnames[i] = "intf-switch";
pi_objects[i++] = p_object->i_object_id;
#endif
......
......@@ -158,7 +158,7 @@ VideoWindow::VideoWindow( intf_thread_t *_p_intf, wxWindow *_p_parent ):
b_shown = VLC_TRUE;
p_intf->p_sys->p_video_sizer = new wxBoxSizer( wxHORIZONTAL );
#if (wxCHECK_VERSION(2,5,0))
#if (wxCHECK_VERSION(2,5,3))
p_intf->p_sys->p_video_sizer->Add( this, 1, wxEXPAND|wxFIXED_MINSIZE );
#else
p_intf->p_sys->p_video_sizer->Add( this, 1, wxEXPAND );
......
......@@ -63,6 +63,10 @@ static void Init ( intf_thread_t * );
static void ShowDialog ( intf_thread_t *, int, int, intf_dialog_args_t * );
#if (wxCHECK_VERSION(2,5,0))
void *wxClassInfo_sm_classTable_BUGGY = 0;
#endif
/*****************************************************************************
* Local classes declarations.
*****************************************************************************/
......@@ -219,6 +223,10 @@ static void Close( vlc_object_t *p_this )
/* */
delete p_intf->p_sys->p_window_settings;
#if (wxCHECK_VERSION(2,5,0))
wxClassInfo::sm_classTable = wxClassInfo_sm_classTable_BUGGY;
#endif
/* Destroy structure */
free( p_intf->p_sys );
}
......@@ -385,6 +393,12 @@ int Instance::OnExit()
/* We need to manually clean up the dialogs class */
if( p_intf->p_sys->p_wxwindow ) delete p_intf->p_sys->p_wxwindow;
}
#if (wxCHECK_VERSION(2,5,0))
wxClassInfo_sm_classTable_BUGGY = wxClassInfo::sm_classTable;
wxClassInfo::sm_classTable = 0;
#endif
return 0;
}
......
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