]> git.sesse.net Git - vlc/blobdiff - modules/gui/wxwindows/interface.cpp
* modules/gui/wxwindows/*, include/vlc_interface.h: new generic "open file" dialog.
[vlc] / modules / gui / wxwindows / interface.cpp
index f03002c491f29c5af1f6cfe01fa9be894eba0636..196ed19de7a5d4c7cf40e30a94703bfbc5d5ccba 100644 (file)
@@ -2,7 +2,7 @@
  * interface.cpp : wxWindows plugin for vlc
  *****************************************************************************
  * Copyright (C) 2000-2001 VideoLAN
- * $Id: interface.cpp,v 1.47 2003/07/17 18:58:23 gbazin Exp $
+ * $Id: interface.cpp,v 1.50 2003/07/20 10:38:49 gbazin Exp $
  *
  * Authors: Gildas Bazin <gbazin@netcourrier.com>
  *
@@ -239,6 +239,10 @@ Interface::Interface( intf_thread_t *_p_intf ):
 
 Interface::~Interface()
 {
+    if( p_intf->p_sys->p_wxwindow )
+    {
+        delete p_intf->p_sys->p_wxwindow;
+    }
     /* Clean up */
 }
 
@@ -539,16 +543,21 @@ void Interface::OnMenuOpen(wxMenuEvent& event)
 #if defined( __WXMSW__ ) || defined( __WXMAC__ )
 void Interface::OnContextMenu2(wxContextMenuEvent& event)
 {
+    /* Only show the context menu for the main interface */
+    if( GetId() != event.GetId() )
+    {
+        event.Skip();
+        return;
+    }
+
     if( p_intf->p_sys->pf_show_dialog )
-        p_intf->p_sys->pf_show_dialog( p_intf, INTF_DIALOG_POPUPMENU, 0 );
-  //::PopupMenu( p_intf, this, ScreenToClient(event.GetPosition()) );
+        p_intf->p_sys->pf_show_dialog( p_intf, INTF_DIALOG_POPUPMENU, 0, 0 );
 }
 #endif
 void Interface::OnContextMenu(wxMouseEvent& event)
 {
     if( p_intf->p_sys->pf_show_dialog )
-        p_intf->p_sys->pf_show_dialog( p_intf, INTF_DIALOG_POPUPMENU, 0 );
-  //::PopupMenu( p_intf, this, event.GetPosition() );
+        p_intf->p_sys->pf_show_dialog( p_intf, INTF_DIALOG_POPUPMENU, 0, 0 );
 }
 
 void Interface::OnExit( wxCommandEvent& WXUNUSED(event) )
@@ -614,7 +623,7 @@ void Interface::OnShowDialog( wxCommandEvent& event )
 
         }
 
-        p_intf->p_sys->pf_show_dialog( p_intf, i_id, 1 );
+        p_intf->p_sys->pf_show_dialog( p_intf, i_id, 1, 0 );
     }
 }