]> git.sesse.net Git - vlc/commitdiff
* modules/gui/wxwindows/*: workaround uninitialization bug in wxWidgets -> re-enabled...
authorGildas Bazin <gbazin@videolan.org>
Mon, 18 Apr 2005 14:49:29 +0000 (14:49 +0000)
committerGildas Bazin <gbazin@videolan.org>
Mon, 18 Apr 2005 14:49:29 +0000 (14:49 +0000)
modules/gui/wxwindows/menus.cpp
modules/gui/wxwindows/video.cpp
modules/gui/wxwindows/wxwindows.cpp

index b8c143777aa824adaff4e0957c5531c222f6e1cf..38d070f0ccaaf23ea54c02d06ac33edb83dc4039 100644 (file)
@@ -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
index 45d47e3ad6cbe8bd0922f5c2a5515db95eb108a3..c498d2c3e376ea248f1af6efa25ec987e70d9fba 100644 (file)
@@ -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 );
index ba5f564d8d529b8203dec7169cc4eb1cb303b865..dc4071cf372c1710d59ec01c2dcc5e4870dba785 100644 (file)
@@ -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;
 }