diff -ruw vlc-snapshot-20050408\include\vlc_common.h vlc\include\vlc_common.h
--- vlc-snapshot-20050408\include\vlc_common.h	Fri Apr 08 13:51:52 2005
+++ vlc\include\vlc_common.h	Sat Apr 09 03:46:59 2005
@@ -957,15 +957,17 @@
 #       endif
 #   endif
 
-#   if defined( _MSC_VER )
+/*
+#   if (defined( _MSC_VER ) && (!defined(__WXMSW__)))
 #       if !defined( _OFF_T_DEFINED )
 typedef __int64 off_t;
 #           define _OFF_T_DEFINED
 #       else
 #           define off_t __int64
-            /* for wx compatibility typedef long off_t; */
+            // for wx compatibility typedef long off_t;
 #       endif
 #   endif
+*/
 
 #   if defined( __BORLANDC__ )
 #       undef off_t
diff -ruw vlc-snapshot-20050408\modules\gui\wxwindows\bookmarks.cpp vlc\modules\gui\wxwindows\bookmarks.cpp
--- vlc-snapshot-20050408\modules\gui\wxwindows\bookmarks.cpp	Fri Apr 08 13:51:14 2005
+++ vlc\modules\gui\wxwindows\bookmarks.cpp	Sat Apr 09 03:50:58 2005
@@ -68,7 +68,7 @@
     void Update();
 
     /* Event handlers (these functions should _not_ be virtual) */
-    void OnClose( wxCommandEvent& event );
+    void OnClose( wxCloseEvent& event );
     void OnAdd( wxCommandEvent& event );
     void OnDel( wxCommandEvent& event );
     void OnClear( wxCommandEvent& event );
@@ -336,7 +336,7 @@
     return wxFrame::Show( show );
 }
 
-void BookmarksDialog::OnClose( wxCommandEvent& event )
+void BookmarksDialog::OnClose( wxCloseEvent& event )
 {
     Hide();
 }
diff -ruw vlc-snapshot-20050408\modules\gui\wxwindows\extrapanel.cpp vlc\modules\gui\wxwindows\extrapanel.cpp
--- vlc-snapshot-20050408\modules\gui\wxwindows\extrapanel.cpp	Fri Apr 08 13:51:14 2005
+++ vlc\modules\gui\wxwindows\extrapanel.cpp	Sun Apr 10 01:54:02 2005
@@ -171,13 +171,19 @@
 
     notebook = new wxNotebook( this, Notebook_Event );
 
+#if (!wxCHECK_VERSION(2,5,0))
     wxNotebookSizer *notebook_sizer = new wxNotebookSizer( notebook );
+#endif
 
     notebook->AddPage( VideoPanel( notebook ), wxU(_("Video")) );
     notebook->AddPage( EqzPanel( notebook ), wxU(_("Equalizer")) );
     notebook->AddPage( AudioPanel( notebook ), wxU(_("Audio")) );
 
+#if (!wxCHECK_VERSION(2,5,0))
     extra_sizer->Add( notebook_sizer, 1, wxEXPAND, 0 );
+#else
+    extra_sizer->Add( notebook, 1, wxEXPAND, 0 );
+#endif
 
     SetSizerAndFit( extra_sizer );
     extra_sizer->Layout();
diff -ruw vlc-snapshot-20050408\modules\gui\wxwindows\fileinfo.cpp vlc\modules\gui\wxwindows\fileinfo.cpp
--- vlc-snapshot-20050408\modules\gui\wxwindows\fileinfo.cpp	Fri Apr 08 13:51:14 2005
+++ vlc\modules\gui\wxwindows\fileinfo.cpp	Sat Apr 09 04:10:06 2005
@@ -45,7 +45,7 @@
 
 BEGIN_EVENT_TABLE(FileInfo, wxFrame)
     /* Button events */
-    EVT_BUTTON(wxID_OK, FileInfo::OnClose)
+    EVT_BUTTON(wxID_OK, FileInfo::OnButtonClose)
 
     /* Hide the window when the user closes the window */
     EVT_CLOSE(FileInfo::OnClose)
@@ -160,7 +160,13 @@
 {
 }
 
-void FileInfo::OnClose( wxCloseEvent& event )
+void FileInfo::OnButtonClose( wxCommandEvent& event )
+{
+    wxCloseEvent cevent;
+    OnClose(cevent);
+}
+
+void FileInfo::OnClose( wxCloseEvent& WXUNUSED(event) )
 {
     Hide();
 }
diff -ruw vlc-snapshot-20050408\modules\gui\wxwindows\interface.cpp vlc\modules\gui\wxwindows\interface.cpp
--- vlc-snapshot-20050408\modules\gui\wxwindows\interface.cpp	Fri Apr 08 13:51:14 2005
+++ vlc\modules\gui\wxwindows\interface.cpp	Sun Apr 10 01:59:45 2005
@@ -210,7 +210,6 @@
     /* Custom events */
     EVT_COMMAND(0, wxEVT_INTF, Interface::OnControlEvent)
     EVT_COMMAND(1, wxEVT_INTF, Interface::OnControlEvent)
-
 END_EVENT_TABLE()
 
 /*****************************************************************************
@@ -226,6 +225,7 @@
     b_extra = VLC_FALSE;
 //    b_undock = VLC_FALSE;
 
+
     extra_window = NULL;
 
     /* Give our interface a nice little icon */
@@ -246,7 +246,7 @@
     p_systray = NULL;
     if ( config_GetInt( p_intf, "wxwin-systray" ) )
     {
-        p_systray = new Systray(this);
+        p_systray = new Systray(this, p_intf);
         p_systray->SetIcon( wxIcon( vlc16x16_xpm ), wxT("VLC media player") );
         if ( (! p_systray->IsOk()) || (! p_systray->IsIconInstalled()) )
         {
@@ -374,8 +374,13 @@
  *****************************************************************************/
 void Interface::CreateOurMenuBar()
 {
+    int minimal = config_GetInt( p_intf, "wxwin-minimal" );
+
     /* Create the "File" menu */
     wxMenu *file_menu = new wxMenu;
+
+    if (!minimal)
+    {
     file_menu->Append( OpenFileSimple_Event,
                        wxU(_("Quick &Open File...\tCtrl-O")) );
 
@@ -391,11 +396,15 @@
     file_menu->AppendSeparator();
     file_menu->Append( Wizard_Event, wxU(_("&Wizard...\tCtrl-W")) );
     file_menu->AppendSeparator();
+    }
     file_menu->Append( Exit_Event, wxU(_("E&xit\tCtrl-X")) );
 
     /* Create the "View" menu */
     wxMenu *view_menu = new wxMenu;
+    if (!minimal)
+    {
     view_menu->Append( Playlist_Event, wxU(_("&Playlist...\tCtrl-P")) );
+    }
     view_menu->Append( Logs_Event, wxU(_("&Messages...\tCtrl-M")) );
     view_menu->Append( FileInfo_Event,
                        wxU(_("Stream and Media &info...\tCtrl-I")) );
@@ -463,6 +472,8 @@
 #define HELP_SLOW N_("Play slower")
 #define HELP_FAST N_("Play faster")
 
+    int minimal = config_GetInt( p_intf, "wxwin-minimal" );
+
     wxLogNull LogDummy; /* Hack to suppress annoying log message on the win32
                          * version because we don't include wx.rc */
 
@@ -471,17 +482,23 @@
 
     toolbar->SetToolBitmapSize( wxSize(TOOLBAR_BMP_WIDTH,TOOLBAR_BMP_HEIGHT) );
 
+    if (!minimal)
+    {
     toolbar->AddTool( OpenFile_Event, wxT(""),
                       wxBitmap( eject_xpm ), wxU(_(HELP_OPEN)) );
     toolbar->AddSeparator();
+    }
 
     wxToolBarToolBase *p_tool = toolbar->AddTool( PlayStream_Event, wxT(""),
                       wxBitmap( play_xpm ), wxU(_(HELP_PLAY)) );
     p_tool->SetClientData( p_tool );
 
+    if (!minimal)
+    {
     toolbar->AddTool( StopStream_Event, wxT(""), wxBitmap( stop_xpm ),
                       wxU(_(HELP_STOP)) );
     toolbar->AddSeparator();
+
     toolbar->AddTool( PrevStream_Event, wxT(""),
                       wxBitmap( prev_xpm ), wxU(_(HELP_PLP)) );
     toolbar->AddTool( SlowStream_Event, wxT(""),
@@ -493,6 +510,7 @@
     toolbar->AddSeparator();
     toolbar->AddTool( Playlist_Event, wxT(""), wxBitmap( playlist_xpm ),
                       wxU(_(HELP_PLO)) );
+    }
 
     wxControl *p_dummy_ctrl =
         new wxControl( toolbar, -1, wxDefaultPosition,
@@ -1334,7 +1352,7 @@
     EVT_TASKBAR_LEFT_DOWN(Systray::OnLeftClick)
 #endif
     /* Menu events */
-    EVT_MENU(Iconize_Event, Systray::OnLeftClick)
+    EVT_MENU(Iconize_Event, Systray::OnMenuIconize)
     EVT_MENU(Exit_Event, Systray::OnExit)
     EVT_MENU(PlayStream_Event, Systray::OnPlayStream)
     EVT_MENU(NextStream_Event, Systray::OnNextStream)
@@ -1342,18 +1360,25 @@
     EVT_MENU(StopStream_Event, Systray::OnStopStream)
 END_EVENT_TABLE()
 
-Systray::Systray( Interface *_p_main_interface )
+Systray::Systray( Interface *_p_main_interface, intf_thread_t *_p_intf )
 {
     p_main_interface = _p_main_interface;
+    p_intf = _p_intf;
 }
 
 /* Event handlers */
-void Systray::OnLeftClick( wxTaskBarIconEvent& event )
+void Systray::OnMenuIconize( wxCommandEvent& event )
 {
     p_main_interface->Show( ! p_main_interface->IsShown() );
     if ( p_main_interface->IsShown() ) p_main_interface->Raise();
 }
 
+void Systray::OnLeftClick( wxTaskBarIconEvent& event )
+{
+    wxCommandEvent cevent;
+    OnMenuIconize(cevent);
+}
+
 void Systray::OnExit( wxCommandEvent& event )
 {
     p_main_interface->Close(TRUE);
@@ -1382,13 +1407,19 @@
 /* Systray popup menu */
 wxMenu* Systray::CreatePopupMenu()
 {
+    int minimal = config_GetInt( p_intf, "wxwin-minimal" );
+
     wxMenu* systray_menu = new wxMenu;
     systray_menu->Append( Exit_Event, wxU(_("Quit VLC")) );
     systray_menu->AppendSeparator();
     systray_menu->Append( PlayStream_Event, wxU(_("Play/Pause")) );
+
+    if (!minimal)
+    {
     systray_menu->Append( PrevStream_Event, wxU(_("Previous")) );
     systray_menu->Append( NextStream_Event, wxU(_("Next")) );
     systray_menu->Append( StopStream_Event, wxU(_("Stop")) );
+    }
     systray_menu->AppendSeparator();
     systray_menu->Append( Iconize_Event, wxU(_("Show/Hide interface")) );
     return systray_menu;
diff -ruw vlc-snapshot-20050408\modules\gui\wxwindows\menus.cpp vlc\modules\gui\wxwindows\menus.cpp
--- vlc-snapshot-20050408\modules\gui\wxwindows\menus.cpp	Fri Apr 08 13:51:14 2005
+++ vlc\modules\gui\wxwindows\menus.cpp	Sun Apr 10 01:47:33 2005
@@ -148,6 +148,8 @@
 {
 #define MAX_POPUP_ITEMS 45
 
+    int minimal = config_GetInt( p_intf, "wxwin-minimal" );
+
     vlc_object_t *p_object, *p_input;
     char *ppsz_varnames[MAX_POPUP_ITEMS];
     int pi_objects[MAX_POPUP_ITEMS];
@@ -274,9 +276,12 @@
     {
         vlc_value_t val;
         popupmenu.InsertSeparator( 0 );
+        if (!minimal)
+        {
         popupmenu.Insert( 0, Stop_Event, wxU(_("Stop")) );
         popupmenu.Insert( 0, Previous_Event, wxU(_("Previous")) );
         popupmenu.Insert( 0, Next_Event, wxU(_("Next")) );
+        }
 
         var_Get( p_input, "state", &val );
         if( val.i_int == PAUSE_S )
@@ -301,8 +306,11 @@
 
     popupmenu.Append( MenuDummy_Event, wxU(_("Miscellaneous")),
                       MiscMenu( p_intf ), wxT("") );
+    if (!minimal)
+    {
     popupmenu.Append( MenuDummy_Event, wxU(_("Open")),
                       OpenStreamMenu( p_intf ), wxT("") );
+    }
 
     p_intf->p_sys->p_popup_menu = &popupmenu;
     p_parent->PopupMenu( &popupmenu, pos.x, pos.y );
@@ -1001,7 +1009,7 @@
 
         wxMutexGuiLeave(); // We don't want deadlocks
         var_Set( p_object, p_menuitemext->psz_var, p_menuitemext->val );
-        wxMutexGuiEnter();
+        //wxMutexGuiEnter();
 
         vlc_object_release( p_object );
     }
diff -ruw vlc-snapshot-20050408\modules\gui\wxwindows\messages.cpp vlc\modules\gui\wxwindows\messages.cpp
--- vlc-snapshot-20050408\modules\gui\wxwindows\messages.cpp	Fri Apr 08 13:51:14 2005
+++ vlc\modules\gui\wxwindows\messages.cpp	Sat Apr 09 04:22:19 2005
@@ -48,7 +48,7 @@
 
 BEGIN_EVENT_TABLE(Messages, wxFrame)
     /* Button events */
-    EVT_BUTTON(wxID_OK, Messages::OnClose)
+    EVT_BUTTON(wxID_OK, Messages::OnButtonClose)
     EVT_BUTTON(wxID_CLEAR, Messages::OnClear)
     EVT_BUTTON(wxID_SAVEAS, Messages::OnSaveLog)
 
@@ -193,7 +193,13 @@
 /*****************************************************************************
  * Private methods.
  *****************************************************************************/
-void Messages::OnClose( wxEvent& WXUNUSED(event) )
+void Messages::OnButtonClose( wxCommandEvent& WXUNUSED(event) )
+{
+    wxCloseEvent cevent;
+    OnClose(cevent);
+}
+
+void Messages::OnClose( wxCloseEvent& WXUNUSED(event) )
 {
     Hide();
 }
diff -ruw vlc-snapshot-20050408\modules\gui\wxwindows\open.cpp vlc\modules\gui\wxwindows\open.cpp
--- vlc-snapshot-20050408\modules\gui\wxwindows\open.cpp	Fri Apr 08 13:51:14 2005
+++ vlc\modules\gui\wxwindows\open.cpp	Sun Apr 10 01:54:01 2005
@@ -101,11 +101,11 @@
     EVT_TEXT(DiscDevice_Event, OpenDialog::OnDiscDeviceChange)
     EVT_TEXT(DiscDevice_Event, OpenDialog::OnDiscPanelChange)
     EVT_TEXT(DiscTitle_Event, OpenDialog::OnDiscPanelChange)
-    EVT_SPINCTRL(DiscTitle_Event, OpenDialog::OnDiscPanelChange)
+    EVT_SPINCTRL(DiscTitle_Event, OpenDialog::OnDiscPanelChangeSpin)
     EVT_TEXT(DiscChapter_Event, OpenDialog::OnDiscPanelChange)
-    EVT_SPINCTRL(DiscChapter_Event, OpenDialog::OnDiscPanelChange)
+    EVT_SPINCTRL(DiscChapter_Event, OpenDialog::OnDiscPanelChangeSpin)
     EVT_TEXT(DiscSub_Event, OpenDialog::OnDiscPanelChange)
-    EVT_SPINCTRL(DiscSub_Event, OpenDialog::OnDiscPanelChange)
+    EVT_SPINCTRL(DiscSub_Event, OpenDialog::OnDiscPanelChangeSpin)
 
     /* Events generated by the net panel */
     EVT_RADIOBUTTON(NetRadio1_Event, OpenDialog::OnNetTypeChange)
@@ -113,11 +113,11 @@
     EVT_RADIOBUTTON(NetRadio3_Event, OpenDialog::OnNetTypeChange)
     EVT_RADIOBUTTON(NetRadio4_Event, OpenDialog::OnNetTypeChange)
     EVT_TEXT(NetPort1_Event, OpenDialog::OnNetPanelChange)
-    EVT_SPINCTRL(NetPort1_Event, OpenDialog::OnNetPanelChange)
+    EVT_SPINCTRL(NetPort1_Event, OpenDialog::OnNetPanelChangeSpin)
     EVT_TEXT(NetPort2_Event, OpenDialog::OnNetPanelChange)
-    EVT_SPINCTRL(NetPort2_Event, OpenDialog::OnNetPanelChange)
+    EVT_SPINCTRL(NetPort2_Event, OpenDialog::OnNetPanelChangeSpin)
     EVT_TEXT(NetPort3_Event, OpenDialog::OnNetPanelChange)
-    EVT_SPINCTRL(NetPort3_Event, OpenDialog::OnNetPanelChange)
+    EVT_SPINCTRL(NetPort3_Event, OpenDialog::OnNetPanelChangeSpin)
     EVT_TEXT(NetAddr2_Event, OpenDialog::OnNetPanelChange)
     EVT_TEXT(NetAddr3_Event, OpenDialog::OnNetPanelChange)
     EVT_TEXT(NetAddr4_Event, OpenDialog::OnNetPanelChange)
@@ -135,10 +135,10 @@
     /* Events generated by the caching button */
     EVT_CHECKBOX(CachingEnable_Event, OpenDialog::OnCachingEnable)
     EVT_TEXT(CachingChange_Event, OpenDialog::OnCachingChange)
-    EVT_SPINCTRL(CachingChange_Event, OpenDialog::OnCachingChange)
+    EVT_SPINCTRL(CachingChange_Event, OpenDialog::OnCachingChangeSpin)
 
     /* Hide the window when the user closes the window */
-    EVT_CLOSE(OpenDialog::OnCancel)
+    EVT_CLOSE(OpenDialog::OnClose)
 
 END_EVENT_TABLE()
 
@@ -463,7 +463,10 @@
 
     /* Create notebook */
     notebook = new wxNotebook( panel, Notebook_Event );
+    
+#if (!wxCHECK_VERSION(2,5,0))
     wxNotebookSizer *notebook_sizer = new wxNotebookSizer( notebook );
+#endif
 
     notebook->AddPage( FilePanel( notebook ), wxU(_("File")),
                        i_access_method == FILE_ACCESS );
@@ -537,7 +540,9 @@
     wxBoxSizer *panel_sizer = new wxBoxSizer( wxVERTICAL );
     panel_sizer->Add( mrl_sizer_sizer, 0, wxEXPAND, 5 );
     panel_sizer->Add( label, 0, wxEXPAND | wxALL, 5 );
+#if (!wxCHECK_VERSION(2,5,0))
     panel_sizer->Add( notebook_sizer, 1, wxEXPAND | wxALL, 5 );
+#endif
     panel_sizer->Add( common_opt_sizer, 0, wxALIGN_LEFT | wxALL, 5 );
     panel_sizer->Add( static_line, 0, wxEXPAND | wxALL, 5 );
     panel_sizer->Add( button_sizer, 0, wxALIGN_LEFT | wxALL, 5 );
@@ -1084,6 +1089,12 @@
 
 void OpenDialog::OnCancel( wxCommandEvent& WXUNUSED(event) )
 {
+    wxCloseEvent cevent;
+    OnClose(cevent);
+}
+
+void OpenDialog::OnClose( wxCloseEvent& WXUNUSED(event) )
+{
     Hide();
 
     if( IsModal() ) EndModal( wxID_CANCEL );
@@ -1138,6 +1149,14 @@
 /*****************************************************************************
  * Disc panel event methods.
  *****************************************************************************/
+void OpenDialog::OnDiscPanelChangeSpin( wxSpinEvent& event )
+{
+    wxCommandEvent cevent;
+    cevent.SetId(event.GetId());
+    cevent.SetInt(event.GetPosition());
+    OnDiscPanelChange(cevent);
+}
+
 void OpenDialog::OnDiscPanelChange( wxCommandEvent& event )
 {
     if( event.GetId() == DiscTitle_Event ) i_disc_title = event.GetInt();
@@ -1249,6 +1268,14 @@
 /*****************************************************************************
  * Net panel event methods.
  *****************************************************************************/
+void OpenDialog::OnNetPanelChangeSpin( wxSpinEvent& event )
+{
+    wxCommandEvent cevent;
+    cevent.SetId(event.GetId());
+    cevent.SetInt(event.GetPosition());
+    OnNetPanelChange(cevent);
+}
+
 void OpenDialog::OnNetPanelChange( wxCommandEvent& event )
 {
     if( event.GetId() >= NetPort1_Event && event.GetId() <= NetPort3_Event )
@@ -1343,6 +1370,12 @@
     caching_value->Enable( event.GetInt() != 0 );
     i_caching = caching_value->GetValue();
     UpdateMRL();
+}
+
+void OpenDialog::OnCachingChangeSpin( wxSpinEvent& event )
+{
+    wxCommandEvent cevent;
+    OnCachingChange(cevent);
 }
 
 void OpenDialog::OnCachingChange( wxCommandEvent& event )
diff -ruw vlc-snapshot-20050408\modules\gui\wxwindows\playlist.cpp vlc\modules\gui\wxwindows\playlist.cpp
--- vlc-snapshot-20050408\modules\gui\wxwindows\playlist.cpp	Fri Apr 08 13:51:14 2005
+++ vlc\modules\gui\wxwindows\playlist.cpp	Sun Apr 10 00:35:52 2005
@@ -128,7 +128,7 @@
     EVT_MENU(AddFile_Event, Playlist::OnAddFile)
     EVT_MENU(AddDir_Event, Playlist::OnAddDir)
     EVT_MENU(AddMRL_Event, Playlist::OnAddMRL)
-    EVT_MENU(Close_Event, Playlist::OnClose)
+    EVT_MENU(Close_Event, Playlist::OnMenuClose)
     EVT_MENU(Open_Event, Playlist::OnOpen)
     EVT_MENU(Save_Event, Playlist::OnSave)
 
@@ -429,7 +429,7 @@
 void Playlist::UpdateNode( playlist_t *p_playlist, playlist_item_t *p_node,
                            wxTreeItemId node )
 {
-    long cookie;
+    wxTreeItemIdValue cookie;
     wxTreeItemId child;
     for( int i = 0; i< p_node->i_children ; i++ )
     {
@@ -656,7 +656,7 @@
 /* Find a wxItem from a playlist_item */
 wxTreeItemId Playlist::FindItem( wxTreeItemId root, playlist_item_t *p_item )
 {
-    long cookie;
+    wxTreeItemIdValue cookie;
     PlaylistItem *p_wxcurrent;
     wxTreeItemId search;
     wxTreeItemId item = treectrl->GetFirstChild( root, cookie );
@@ -708,7 +708,7 @@
 /* Find a wxItem from a playlist id */
 wxTreeItemId Playlist::FindItem( wxTreeItemId root, int i_id )
 {
-    long cookie;
+    wxTreeItemIdValue cookie;
     PlaylistItem *p_wxcurrent;
     wxTreeItemId search;
     wxTreeItemId item = treectrl->GetFirstChild( root, cookie );
@@ -757,7 +757,7 @@
 
 int Playlist::CountItems( wxTreeItemId root )
 {
-    long cookie;
+    wxTreeItemIdValue cookie;
     int count = 0;
     wxTreeItemId item = treectrl->GetFirstChild( root, cookie );
 
@@ -778,7 +778,7 @@
 /* Find a wxItem from a name (from current) */
 wxTreeItemId Playlist::FindItemByName( wxTreeItemId root, wxString search_string, wxTreeItemId current, vlc_bool_t *pb_current_found )
 {
-    long cookie;
+    wxTreeItemIdValue cookie;
     wxTreeItemId search;
     wxTreeItemId item = treectrl->GetFirstChild( root, cookie );
     wxTreeItemId child;
@@ -956,6 +956,11 @@
     vlc_object_release( p_playlist );
 }
 
+void Playlist::OnMenuClose( wxCommandEvent& event )
+{
+    wxCloseEvent cevent;
+    OnClose(cevent);
+}
 
 void Playlist::OnClose( wxCloseEvent& WXUNUSED(event) )
 {
@@ -1329,7 +1334,7 @@
             wxMutexGuiLeave();
             playlist_ServicesDiscoveryRemove( p_playlist,
                             pp_sds[event.GetId() - FirstSD_Event] );
-            wxMutexGuiEnter();
+            //wxMutexGuiEnter();
         }
     }
     vlc_object_release( p_playlist );
diff -ruw vlc-snapshot-20050408\modules\gui\wxwindows\preferences.cpp vlc\modules\gui\wxwindows\preferences.cpp
--- vlc-snapshot-20050408\modules\gui\wxwindows\preferences.cpp	Fri Apr 08 13:51:14 2005
+++ vlc\modules\gui\wxwindows\preferences.cpp	Sun Apr 10 00:00:56 2005
@@ -168,7 +168,7 @@
     EVT_CHECKBOX(Advanced_Event, PrefsDialog::OnAdvanced)
 
     /* Don't destroy the window when the user closes it */
-    EVT_CLOSE(PrefsDialog::OnCancel)
+    EVT_CLOSE(PrefsDialog::OnClose)
 END_EVENT_TABLE()
 
 // menu and control ids
@@ -269,7 +269,13 @@
     prefs_tree->CleanChanges();
 }
 
-void PrefsDialog::OnCancel( wxEvent& WXUNUSED(event) )
+void PrefsDialog::OnClose( wxCloseEvent& WXUNUSED(event) )
+{
+    wxCommandEvent cevent;
+    OnCancel(cevent);
+}
+
+void PrefsDialog::OnCancel( wxCommandEvent& WXUNUSED(event) )
 {
     this->Hide();
     prefs_tree->CleanChanges();
@@ -330,6 +336,7 @@
     b_advanced = VLC_FALSE;
 
     root_item = AddRoot( wxT("") );
+    wxASSERT_MSG(root_item.IsOk(), "Could not add root item");
 
     wxImageList *p_images = new wxImageList( 16,16,TRUE );
     p_images->Add( wxIcon( audio_xpm ) );
@@ -505,8 +512,9 @@
         if( !i_options ) continue;
 
         /* Find the right category item */
-        long cookie;
+        wxTreeItemIdValue cookie;
         vlc_bool_t b_found = VLC_FALSE;
+
         wxTreeItemId category_item = GetFirstChild( root_item , cookie);
         while( category_item.IsOk() )
         {
@@ -524,7 +532,7 @@
 
         /* Find subcategory item */
         b_found = VLC_FALSE;
-        cookie = -1;
+        //cookie = -1;
         wxTreeItemId subcategory_item = GetFirstChild( category_item, cookie );
         while( subcategory_item.IsOk() )
         {
@@ -558,14 +566,18 @@
     }
 
     /* Sort all this mess */
-    long cookie; size_t i_child_index;
+    wxTreeItemIdValue cookie; 
+    size_t i_child_index;
     wxTreeItemId capability_item = GetFirstChild( root_item, cookie);
     for( i_child_index = 0;
-         i_child_index < GetChildrenCount( plugins_item, FALSE );
+         (capability_item.IsOk() && 
+          //(i_child_index < GetChildrenCount( plugins_item, FALSE )));
+          (i_child_index < GetChildrenCount( root_item, FALSE )));
          i_child_index++ )
     {
         SortChildren( capability_item );
-        capability_item = GetNextChild( plugins_item, cookie );
+        //capability_item = GetNextChild( plugins_item, cookie );
+        capability_item = GetNextChild( root_item, cookie );
     }
 
     /* Clean-up everything */
@@ -579,16 +591,16 @@
     SelectItem( GetFirstChild( root_item, cookie ) );
 #endif
 
-    Expand( root_item );
+    //cannot expand hidden root item
+    //Expand( root_item );
 }
 
-PrefsTreeCtrl::~PrefsTreeCtrl()
-{
+PrefsTreeCtrl::~PrefsTreeCtrl(){
 }
 
 void PrefsTreeCtrl::ApplyChanges()
 {
-    long cookie, cookie2, cookie3;
+    wxTreeItemIdValue cookie, cookie2, cookie3;
     ConfigTreeData *config_data;
 
     wxTreeItemId category = GetFirstChild( root_item, cookie );
@@ -625,7 +637,7 @@
 
 void PrefsTreeCtrl::CleanChanges()
 {
-    long cookie, cookie2, cookie3;
+    wxTreeItemIdValue cookie, cookie2, cookie3;
     ConfigTreeData *config_data;
 
     config_data = !GetSelection() ? NULL :
@@ -633,7 +645,7 @@
     if( config_data  )
     {
         config_data->panel->Hide();
-        p_sizer->Remove( config_data->panel );
+        p_sizer->Detach( config_data->panel );
     }
 
     wxTreeItemId category = GetFirstChild( root_item, cookie );
@@ -687,7 +699,7 @@
         return config_data;
     }
 
-    long cookie, cookie2, cookie3;
+    wxTreeItemIdValue cookie, cookie2, cookie3;
     ConfigTreeData *config_new;
     wxTreeItemId category = GetFirstChild( root_item, cookie );
     while( category.IsOk() )
@@ -725,7 +737,7 @@
     if( config_data && config_data->panel )
     {
         config_data->panel->Hide();
-        p_sizer->Remove( config_data->panel );
+        p_sizer->Detach( config_data->panel );
     }
 
     /* Don't use event.GetItem() because we also send fake events */
@@ -761,7 +773,7 @@
     if( config_data  )
     {
         config_data->panel->Hide();
-        p_sizer->Remove( config_data->panel );
+        p_sizer->Detach( config_data->panel );
     }
 
     if( GetSelection() )
diff -ruw vlc-snapshot-20050408\modules\gui\wxwindows\preferences_widgets.cpp vlc\modules\gui\wxwindows\preferences_widgets.cpp
--- vlc-snapshot-20050408\modules\gui\wxwindows\preferences_widgets.cpp	Fri Apr 08 13:51:14 2005
+++ vlc\modules\gui\wxwindows\preferences_widgets.cpp	Sat Apr 09 04:19:18 2005
@@ -159,7 +159,7 @@
     p_update_data = p_data;
 }
 
-void ConfigControl::OnUpdate( wxEvent& WXUNUSED(event) )
+void ConfigControl::OnUpdate( wxCommandEvent& WXUNUSED(event) )
 {
     if( pf_update_callback )
     {
@@ -167,6 +167,13 @@
     }
 }
 
+void ConfigControl::OnUpdateScroll( wxScrollEvent& WXUNUSED(event) )
+{
+    wxCommandEvent cevent;
+    OnUpdate(cevent);
+}
+
+
 /*****************************************************************************
  * KeyConfigControl implementation
  *****************************************************************************/
@@ -708,7 +715,7 @@
  *****************************************************************************/
 BEGIN_EVENT_TABLE(IntegerConfigControl, wxPanel)
     EVT_TEXT(-1, IntegerConfigControl::OnUpdate)
-    EVT_COMMAND_SCROLL(-1, IntegerConfigControl::OnUpdate)
+    EVT_COMMAND_SCROLL(-1, IntegerConfigControl::OnUpdateScroll)
 END_EVENT_TABLE()
 
 IntegerConfigControl::IntegerConfigControl( vlc_object_t *p_this,
@@ -743,11 +750,17 @@
     return i_value; //spin->GetValue();
 }
 
-void IntegerConfigControl::OnUpdate( wxScrollEvent &event )
+void IntegerConfigControl::OnUpdate( wxCommandEvent &event )
 {
     i_value = event.GetInt();
     ConfigControl::OnUpdate( event );
 }
+void IntegerConfigControl::OnUpdateScroll( wxScrollEvent &event )
+{
+    wxCommandEvent cevent;
+    cevent.SetInt(event.GetPosition());
+    OnUpdate(cevent);
+}
 
 /*****************************************************************************
  * IntegerListConfigControl implementation
@@ -851,7 +864,7 @@
  * RangedIntConfigControl implementation
  *****************************************************************************/
 BEGIN_EVENT_TABLE(RangedIntConfigControl, wxPanel)
-    EVT_COMMAND_SCROLL(-1, RangedIntConfigControl::OnUpdate)
+    EVT_COMMAND_SCROLL(-1, RangedIntConfigControl::OnUpdateScroll)
 END_EVENT_TABLE()
 
 RangedIntConfigControl::RangedIntConfigControl( vlc_object_t *p_this,
@@ -879,6 +892,7 @@
 {
     return slider->GetValue();
 }
+
 
 /*****************************************************************************
  * FloatConfigControl implementation
diff -ruw vlc-snapshot-20050408\modules\gui\wxwindows\preferences_widgets.h vlc\modules\gui\wxwindows\preferences_widgets.h
--- vlc-snapshot-20050408\modules\gui\wxwindows\preferences_widgets.h	Fri Apr 08 13:51:14 2005
+++ vlc\modules\gui\wxwindows\preferences_widgets.h	Sat Apr 09 04:19:34 2005
@@ -48,7 +48,8 @@
     void (*pf_update_callback)( void * );
     void *p_update_data;
 
-    void OnUpdate( wxEvent& );
+    void OnUpdate( wxCommandEvent& event );
+    void OnUpdateScroll( wxScrollEvent& event );
 
 private:
     wxString name;
@@ -170,7 +171,8 @@
     wxSpinCtrl *spin;
     int i_value;
 
-    void OnUpdate( wxScrollEvent& );
+    void OnUpdate( wxCommandEvent& event );
+    void OnUpdateScroll( wxScrollEvent& event );
 
     DECLARE_EVENT_TABLE()
 };
diff -ruw vlc-snapshot-20050408\modules\gui\wxwindows\wizard.cpp vlc\modules\gui\wxwindows\wizard.cpp
--- vlc-snapshot-20050408\modules\gui\wxwindows\wizard.cpp	Fri Apr 08 13:51:14 2005
+++ vlc\modules\gui\wxwindows\wizard.cpp	Sat Apr 09 04:01:08 2005
@@ -183,7 +183,7 @@
 {
     public:
         wizHelloPage( wxWizard *parent);
-        void OnActionChange(wxEvent& event);
+        void OnActionChange( wxCommandEvent& event );
         void OnWizardPageChanging(wxWizardEvent& event);
         void OnMoreInfo( wxCommandEvent& event );
     protected:
@@ -209,7 +209,7 @@
         wizInputPage( wxWizard *, wxWizardPage *, intf_thread_t *);
         wizInputPage::~wizInputPage();
         void OnWizardPageChanging(wxWizardEvent& event);
-        void OnInputChange(wxEvent& event);
+        void OnInputChange( wxCommandEvent& event );
         void OnEnablePartial(wxCommandEvent& event);
         virtual wxWizardPage *GetPrev() const;
         virtual wxWizardPage *GetNext() const;
@@ -316,7 +316,7 @@
     wxStaticText *address_text;
     wxTextCtrl *address_txtctrl;
     WizardDialog * p_parent;
-    void OnMethodChange(wxEvent& event);
+    void OnMethodChange( wxCommandEvent& event );
     wxRadioButton *method_radios[4];
     wxWizardPage *p_prev;
     wxWizardPage *p_next;
@@ -349,7 +349,7 @@
     int i_encap;
     int i_mux;
     int i_action;
-    void OnEncapChange(wxEvent& event);
+    void OnEncapChange( wxCommandEvent& event );
     wxRadioButton *encap_radios[MUXERS_NUMBER];
     WizardDialog *p_parent;
     wxWizardPage *p_prev;
@@ -505,7 +505,7 @@
                   wxOK | wxICON_INFORMATION, this->p_parent );
 }
 
-void wizHelloPage::OnActionChange(wxEvent& event)
+void wizHelloPage::OnActionChange( wxCommandEvent& event )
 {
     i_action = event.GetId() - ActionRadio0_Event;
     ((wizInputPage *)GetNext())->SetAction( i_action );
@@ -644,7 +644,7 @@
 {
 }
 
-void wizInputPage::OnInputChange(wxEvent& event)
+void wizInputPage::OnInputChange( wxCommandEvent& event )
 {
     i_input = event.GetId() - InputRadio0_Event;
     if( i_input == 0 )
@@ -1098,7 +1098,7 @@
 void wizStreamingMethodPage::SetPrev( wxWizardPage *page) {p_prev = page; }
 
 
-void wizStreamingMethodPage::OnMethodChange(wxEvent& event)
+void wizStreamingMethodPage::OnMethodChange( wxCommandEvent& event )
 {
     i_method = event.GetId() - MethodRadio0_Event;
     address_text->SetLabel( wxU(
@@ -1174,7 +1174,7 @@
 }
 
 
-void wizEncapPage::OnEncapChange(wxEvent& event)
+void wizEncapPage::OnEncapChange( wxCommandEvent& event )
 {
     i_mux = event.GetId() - EncapRadio0_Event;
 }
diff -ruw vlc-snapshot-20050408\modules\gui\wxwindows\wxwindows.cpp vlc\modules\gui\wxwindows\wxwindows.cpp
--- vlc-snapshot-20050408\modules\gui\wxwindows\wxwindows.cpp	Fri Apr 08 13:51:14 2005
+++ vlc\modules\gui\wxwindows\wxwindows.cpp	Sun Apr 10 01:29:55 2005
@@ -91,6 +91,8 @@
     "starts.")
 #define TASKBAR_TEXT N_("Show taskbar entry")
 #define TASKBAR_LONGTEXT N_("Show taskbar entry")
+#define MINIMAL_TEXT N_("Minimal interface")
+#define MINIMAL_LONGTEXT N_("Use minimal interface, no toolbar, few menus")
 #define SYSTRAY_TEXT N_("Show systray icon")
 #define SYSTRAY_LONGTEXT N_("Show systray icon")
 
@@ -117,6 +119,8 @@
               BOOKMARKS_TEXT, BOOKMARKS_LONGTEXT, VLC_FALSE );
     add_bool( "wxwin-taskbar", 1, NULL,
               TASKBAR_TEXT, TASKBAR_LONGTEXT, VLC_FALSE );
+    add_bool( "wxwin-minimal", 0, NULL,
+              MINIMAL_TEXT, MINIMAL_LONGTEXT, VLC_TRUE );
 #ifdef wxHAS_TASK_BAR_ICON
     add_bool( "wxwin-systray", 0, NULL,
               SYSTRAY_TEXT, SYSTRAY_LONGTEXT, VLC_FALSE );
@@ -217,6 +221,8 @@
 /*****************************************************************************
  * Run: wxWindows thread
  *****************************************************************************/
+
+//when is this called?
 #if !defined(__BUILTIN__) && defined( WIN32 )
 HINSTANCE hInstance = 0;
 extern "C" BOOL WINAPI
@@ -264,6 +270,11 @@
 
 #if defined( WIN32 )
 #if !defined(__BUILTIN__)
+
+    //because no one knows when DllMain is called
+    if (hInstance == NULL)
+      hInstance = GetModuleHandle(NULL);
+
     wxEntry( hInstance/*GetModuleHandle(NULL)*/, NULL, NULL, SW_SHOW );
 #else
     wxEntry( GetModuleHandle(NULL), NULL, NULL, SW_SHOW );
@@ -319,6 +330,7 @@
         {
             style = wxDEFAULT_FRAME_STYLE|wxFRAME_NO_TASKBAR;
         }
+
         Interface *MainInterface = new Interface( p_intf, style );
         p_intf->p_sys->p_wxwindow = MainInterface;
 
diff -ruw vlc-snapshot-20050408\modules\gui\wxwindows\wxwindows.h vlc\modules\gui\wxwindows\wxwindows.h
--- vlc-snapshot-20050408\modules\gui\wxwindows\wxwindows.h	Fri Apr 08 13:51:14 2005
+++ vlc\modules\gui\wxwindows\wxwindows.h	Sun Apr 10 01:42:40 2005
@@ -45,12 +45,12 @@
 #include <wx/taskbar.h>
 #include "vlc_keys.h"
 
-/* Hmmm, work-around for newest wxWin */
-#ifdef wxStaticCastEvent
-#   undef wxStaticCastEvent
-#   define wxStaticCastEvent(type, val) ((type)(val))
+//PITA
+#if (!wxCHECK_VERSION(2,5,0))
+typedef long wxTreeItemIdValue;
 #endif
 
+
 DECLARE_LOCAL_EVENT_TYPE( wxEVT_DIALOG, 0 );
 DECLARE_LOCAL_EVENT_TYPE( wxEVT_INTF, 1 );
 
@@ -294,12 +294,13 @@
 class Systray: public wxTaskBarIcon
 {
 public:
-    Systray( Interface* p_main_interface );
+    Systray( Interface* p_main_interface, intf_thread_t *p_intf );
     virtual ~Systray() {};
     wxMenu* CreatePopupMenu();
     void UpdateTooltip( const wxChar* tooltip );
 
 private:
+    void OnMenuIconize( wxCommandEvent& event );
     void OnLeftClick( wxTaskBarIconEvent& event );
     void OnPlayStream ( wxCommandEvent& event );
     void OnStopStream ( wxCommandEvent& event );
@@ -307,6 +308,7 @@
     void OnNextStream ( wxCommandEvent& event );
     void OnExit(  wxCommandEvent& event );
     Interface* p_main_interface;
+    intf_thread_t *p_intf;
     DECLARE_EVENT_TABLE()
 };
 #endif
@@ -443,6 +445,7 @@
     /* Event handlers (these functions should _not_ be virtual) */
     void OnOk( wxCommandEvent& event );
     void OnCancel( wxCommandEvent& event );
+    void OnClose( wxCloseEvent& event );
 
     void OnPageChange( wxNotebookEvent& event );
     void OnMRLChange( wxCommandEvent& event );
@@ -452,11 +455,13 @@
     void OnFileBrowse( wxCommandEvent& event );
 
     /* Event handlers for the disc page */
+    void OnDiscPanelChangeSpin( wxSpinEvent& event );
     void OnDiscPanelChange( wxCommandEvent& event );
     void OnDiscTypeChange( wxCommandEvent& event );
     void OnDiscDeviceChange( wxCommandEvent& event );
 
     /* Event handlers for the net page */
+    void OnNetPanelChangeSpin( wxSpinEvent& event );
     void OnNetPanelChange( wxCommandEvent& event );
     void OnNetTypeChange( wxCommandEvent& event );
 
@@ -471,6 +476,7 @@
     /* Event handlers for the caching option */
     void OnCachingEnable( wxCommandEvent& event );
     void OnCachingChange( wxCommandEvent& event );
+    void OnCachingChangeSpin( wxSpinEvent& event );
 
     DECLARE_EVENT_TABLE();
 
@@ -774,10 +780,11 @@
 
     /* Event handlers (these functions should _not_ be virtual) */
     void OnOk( wxCommandEvent& event );
-    void OnCancel( wxEvent& event );
+    void OnCancel( wxCommandEvent& event );
     void OnSave( wxCommandEvent& event );
     void OnResetAll( wxCommandEvent& event );
     void OnAdvanced( wxCommandEvent& event );
+    void OnClose( wxCloseEvent& event );
 
     DECLARE_EVENT_TABLE();
 
@@ -798,7 +805,8 @@
 
 private:
     /* Event handlers (these functions should _not_ be virtual) */
-    void OnClose( wxEvent& event );
+    void OnButtonClose( wxCommandEvent& event );
+    void OnClose( wxCloseEvent& WXUNUSED(event) );
     void OnClear( wxCommandEvent& event );
     void OnSaveLog( wxCommandEvent& event );
 
@@ -842,7 +850,8 @@
     void OnAddFile( wxCommandEvent& event );
     void OnAddDir( wxCommandEvent& event );
     void OnAddMRL( wxCommandEvent& event );
-    void OnClose( wxCloseEvent& event );
+    void OnMenuClose( wxCommandEvent& event );
+    void OnClose( wxCloseEvent& WXUNUSED(event) );
 
     void OnEnableSelection( wxCommandEvent& event );
     void OnDisableSelection( wxCommandEvent& event );
@@ -998,7 +1007,8 @@
     vlc_bool_t b_need_update;
 
 private:
-    void OnClose( wxCloseEvent& event );
+    void OnButtonClose( wxCommandEvent& event );
+    void OnClose( wxCloseEvent& WXUNUSED(event) );
 
     DECLARE_EVENT_TABLE();
 
Only in vlc\modules\gui: wxwindows.zip
Only in vlc\msvc: Debug
Only in vlc\msvc: libvlc.vcproj
Only in vlc\msvc: plugin_access_file.vcproj
Only in vlc\msvc: plugin_access_http.vcproj
Only in vlc\msvc: plugin_access_output_dummy.vcproj
Only in vlc\msvc: plugin_access_output_file.vcproj
Only in vlc\msvc: plugin_access_output_http.vcproj
Only in vlc\msvc: plugin_access_output_udp.vcproj
Only in vlc\msvc: plugin_access_udp.vcproj
Only in vlc\msvc: plugin_aout_directx.vcproj
Only in vlc\msvc: plugin_araw.vcproj
Only in vlc\msvc: plugin_avi.vcproj
Only in vlc\msvc: plugin_dummy.vcproj
Only in vlc\msvc: plugin_fixed32tofloat32.vcproj
Only in vlc\msvc: plugin_fixed32tos16.vcproj
Only in vlc\msvc: plugin_float32_mixer.vcproj
Only in vlc\msvc: plugin_hotkeys.vcproj
Only in vlc\msvc: plugin_i420_rgb.vcproj
Only in vlc\msvc: plugin_i420_yuy2.vcproj
Only in vlc\msvc: plugin_i422_yuy2.vcproj
Only in vlc\msvc: plugin_ipv4.vcproj
Only in vlc\msvc: plugin_logger.vcproj
Only in vlc\msvc: plugin_memcpy.vcproj
Only in vlc\msvc: plugin_mp4.vcproj
Only in vlc\msvc: plugin_mpeg_audio.vcproj
Only in vlc\msvc: plugin_mux_avi.vcproj
Only in vlc\msvc: plugin_mux_dummy.vcproj
Only in vlc\msvc: plugin_mux_ps.vcproj
Only in vlc\msvc: plugin_mux_ts.vcproj
Only in vlc\msvc: plugin_packetizer_copy.vcproj
Only in vlc\msvc: plugin_packetizer_mpeg4audio.vcproj
Only in vlc\msvc: plugin_packetizer_mpeg4video.vcproj
Only in vlc\msvc: plugin_packetizer_mpegvideo.vcproj
Only in vlc\msvc: plugin_ps.vcproj
Only in vlc\msvc: plugin_rawvideo.vcproj
Only in vlc\msvc: plugin_rc.vcproj
Only in vlc\msvc: plugin_s16tofloat32.vcproj
Only in vlc\msvc: plugin_s16tofloat32swab.vcproj
Only in vlc\msvc: plugin_s8tofloat32.vcproj
Only in vlc\msvc: plugin_skins2.vcproj
Only in vlc\msvc: plugin_trivial_channel_mixer.vcproj
Only in vlc\msvc: plugin_trivial_mixer.vcproj
Only in vlc\msvc: plugin_ts.vcproj
Only in vlc\msvc: plugin_u8tofixed32.vcproj
Only in vlc\msvc: plugin_u8tofloat32.vcproj
Only in vlc\msvc: plugin_ugly_resampler.vcproj
Only in vlc\msvc: plugin_vout_directx.vcproj
Only in vlc\msvc: plugin_wav.vcproj
Only in vlc\msvc: plugin_waveout.vcproj
Only in vlc\msvc: plugin_wingdi.vcproj
Only in vlc\msvc: plugin_wxwindows.ncb
Only in vlc\msvc: plugin_wxwindows.vcproj
Only in vlc\msvc: plugins
Only in vlc\msvc: vlc.exe
Only in vlc\msvc: vlc.ncb
Only in vlc\msvc: vlc.pdb
Only in vlc\msvc: vlc.sln
Only in vlc\msvc: vlc.suo
Only in vlc\msvc: vlc.vcproj
Only in vlc\msvc: VTune
