]> git.sesse.net Git - vlc/commitdiff
* modules/gui/wxwindows/open.cpp: fixed an event problem on win32.
authorGildas Bazin <gbazin@videolan.org>
Sat, 29 Mar 2003 17:10:31 +0000 (17:10 +0000)
committerGildas Bazin <gbazin@videolan.org>
Sat, 29 Mar 2003 17:10:31 +0000 (17:10 +0000)
* modules/gui/wxwindows/wxwindows.cpp: fixed a compilation problem on
   win32 when the wxwindows interface is compiled as a builtin.

modules/gui/wxwindows/open.cpp
modules/gui/wxwindows/wxwindows.cpp

index 2e7712ffdba4fcc59ef59ca420aea5c3564c7834..290360ad9cc05d6734daa1c735d7de4636397a19 100644 (file)
@@ -2,7 +2,7 @@
  * open.cpp : wxWindows plugin for vlc
  *****************************************************************************
  * Copyright (C) 2000-2001 VideoLAN
- * $Id: open.cpp,v 1.8 2003/03/29 11:15:14 gbazin Exp $
+ * $Id: open.cpp,v 1.9 2003/03/29 17:10:31 gbazin Exp $
  *
  * Authors: Gildas Bazin <gbazin@netcourrier.com>
  *
@@ -170,19 +170,6 @@ OpenDialog::OpenDialog( intf_thread_t *_p_intf, Interface *_p_main_interface,
         _("Alternatively, you can build an MRL using one of the "
           "following predefined targets:") );
 
-    /* Create notebook */
-    wxNotebook *notebook = new wxNotebook( panel, Notebook_Event );
-    wxNotebookSizer *notebook_sizer = new wxNotebookSizer( notebook );
-
-    notebook->AddPage( FilePanel( notebook ), _("File"),
-                       i_access_method == FILE_ACCESS );
-    notebook->AddPage( DiscPanel( notebook ), _("Disc"),
-                       i_access_method == DISC_ACCESS );
-    notebook->AddPage( NetPanel( notebook ), _("Network"),
-                       i_access_method == NET_ACCESS );
-    notebook->AddPage( SatPanel( notebook ), _("Satellite"),
-                       i_access_method == SAT_ACCESS );
-
     /* Create Stream Output checkox */
     wxFlexGridSizer *sout_sizer = new wxFlexGridSizer( 2, 1, 20 );
     sout_checkbox = new wxCheckBox( panel, SoutEnable_Event,
@@ -238,6 +225,18 @@ OpenDialog::OpenDialog( intf_thread_t *_p_intf, Interface *_p_main_interface,
     ok_button->SetDefault();
     wxButton *cancel_button = new wxButton( panel, wxID_CANCEL, _("Cancel") );
 
+    /* Create notebook */
+    wxNotebook *notebook = new wxNotebook( panel, Notebook_Event );
+    wxNotebookSizer *notebook_sizer = new wxNotebookSizer( notebook );
+
+    notebook->AddPage( FilePanel( notebook ), _("File"),
+                       i_access_method == FILE_ACCESS );
+    notebook->AddPage( DiscPanel( notebook ), _("Disc"),
+                       i_access_method == DISC_ACCESS );
+    notebook->AddPage( NetPanel( notebook ), _("Network"),
+                       i_access_method == NET_ACCESS );
+    notebook->AddPage( SatPanel( notebook ), _("Satellite"),
+                       i_access_method == SAT_ACCESS );
 
     /* Update Disc panel */
     wxCommandEvent dummy_event;
index 0ec003ff3cd9c0c9fa2296b5eb53b421f81bcf5b..ae9796d5ac9692d97296af29aac0ff5af2e91389 100644 (file)
@@ -2,7 +2,7 @@
  * wxwindows.cpp : wxWindows plugin for vlc
  *****************************************************************************
  * Copyright (C) 2000-2001 VideoLAN
- * $Id: wxwindows.cpp,v 1.12 2003/02/20 01:52:46 sigmunau Exp $
+ * $Id: wxwindows.cpp,v 1.13 2003/03/29 17:10:31 gbazin Exp $
  *
  * Authors: Gildas Bazin <gbazin@netcourrier.com>
  *
@@ -145,7 +145,7 @@ static void Close( vlc_object_t *p_this )
 /*****************************************************************************
  * Run: wxWindows thread
  *****************************************************************************/
-#if defined( WIN32 )
+#if !defined(__BUILTIN__) && defined( WIN32 )
 HINSTANCE hInstance = 0;
 extern "C" BOOL WINAPI
 DllMain (HANDLE hModule, DWORD fdwReason, LPVOID lpReserved)
@@ -165,7 +165,11 @@ static void Run( intf_thread_t *p_intf )
     wxTheApp = new Instance( p_intf );
 
 #if defined( WIN32 )
+#if !defined(__BUILTIN__)
     wxEntry( hInstance/*GetModuleHandle(NULL)*/, NULL, NULL, SW_SHOW, TRUE );
+#else
+    wxEntry( GetModuleHandle(NULL), NULL, NULL, SW_SHOW, TRUE );
+#endif
 #else
     wxEntry( 1, p_args );
 #endif