]> git.sesse.net Git - vlc/commitdiff
* modules/gui/wxwindows/*: fixed context menu problem on win32.
authorGildas Bazin <gbazin@videolan.org>
Tue, 27 May 2003 11:35:34 +0000 (11:35 +0000)
committerGildas Bazin <gbazin@videolan.org>
Tue, 27 May 2003 11:35:34 +0000 (11:35 +0000)
modules/gui/wxwindows/interface.cpp
modules/gui/wxwindows/timer.cpp
modules/gui/wxwindows/wxwindows.h

index cad7e9365c5f853fe431eeb99053405c0364109c..483a9bca4865ec06a2a1dcfa84d2e254f3a5fdd8 100644 (file)
@@ -2,7 +2,7 @@
  * interface.cpp : wxWindows plugin for vlc
  *****************************************************************************
  * Copyright (C) 2000-2001 VideoLAN
- * $Id: interface.cpp,v 1.35 2003/05/26 19:06:47 gbazin Exp $
+ * $Id: interface.cpp,v 1.36 2003/05/27 11:35:34 gbazin Exp $
  *
  * Authors: Gildas Bazin <gbazin@netcourrier.com>
  *
@@ -139,10 +139,9 @@ BEGIN_EVENT_TABLE(Interface, wxFrame)
     EVT_MENU_OPEN(Interface::OnMenuOpen)
 
 #if defined( __WXMSW__ ) || defined( __WXMAC__ )
-    EVT_CONTEXT_MENU(Interface::OnContextMenu)
-#else
-    EVT_RIGHT_UP(Interface::OnContextMenu)
+    EVT_CONTEXT_MENU(Interface::OnContextMenu2)
 #endif
+    EVT_RIGHT_UP(Interface::OnContextMenu)
 
     /* Toolbar events */
     EVT_MENU(OpenFile_Event, Interface::OnOpenFile)
@@ -539,16 +538,15 @@ void Interface::OnMenuOpen(wxMenuEvent& event)
 }
 
 #if defined( __WXMSW__ ) || defined( __WXMAC__ )
-void Interface::OnContextMenu(wxContextMenuEvent& event)
+void Interface::OnContextMenu2(wxContextMenuEvent& event)
 {
     ::PopupMenu( p_intf, this, ScreenToClient(event.GetPosition()) );
 }
-#else
+#endif
 void Interface::OnContextMenu(wxMouseEvent& event)
 {
     ::PopupMenu( p_intf, this, event.GetPosition() );
 }
-#endif
 
 void Interface::OnExit( wxCommandEvent& WXUNUSED(event) )
 {
index 4b75af8d4153ee58ce819a9deca22ea60b3c60c8..600e431048ba77c8f2d3ff452e65ed891ffe3e9d 100644 (file)
@@ -2,7 +2,7 @@
  * timer.cpp : wxWindows plugin for vlc
  *****************************************************************************
  * Copyright (C) 2000-2001 VideoLAN
- * $Id: timer.cpp,v 1.19 2003/05/26 19:06:47 gbazin Exp $
+ * $Id: timer.cpp,v 1.20 2003/05/27 11:35:34 gbazin Exp $
  *
  * Authors: Gildas Bazin <gbazin@netcourrier.com>
  *
@@ -123,14 +123,10 @@ void Timer::Notify()
     {
         wxPoint mousepos = wxGetMousePosition();
 
-#if defined( __WXMSW__ ) || defined( __WXMAC__ )
-        wxContextMenuEvent event =
-            wxContextMenuEvent( wxEVT_NULL, 0, mousepos );
-#else
         wxMouseEvent event = wxMouseEvent( wxEVT_RIGHT_UP );
         event.m_x = p_main_interface->ScreenToClient(mousepos).x;
         event.m_y = p_main_interface->ScreenToClient(mousepos).y;
-#endif
+
         p_main_interface->AddPendingEvent(event);
 
         p_main_interface->b_popup_change = VLC_FALSE;
index 7881b592e7c90421dd41377673b9bc5d7db8da73..54e37809a5c3cb756bbc74c014fa9bcf99db4fcc 100644 (file)
@@ -2,7 +2,7 @@
  * wxwindows.h: private wxWindows interface description
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: wxwindows.h,v 1.32 2003/05/26 19:06:47 gbazin Exp $
+ * $Id: wxwindows.h,v 1.33 2003/05/27 11:35:34 gbazin Exp $
  *
  * Authors: Gildas Bazin <gbazin@netcourrier.com>
  *
@@ -173,10 +173,9 @@ private:
     void OnMenuOpen( wxMenuEvent& event );
 
 #if defined( __WXMSW__ ) || defined( __WXMAC__ )
-    void OnContextMenu(wxContextMenuEvent& event);
-#else
-    void OnContextMenu(wxMouseEvent& event);
+    void OnContextMenu2(wxContextMenuEvent& event);
 #endif
+    void OnContextMenu(wxMouseEvent& event);
 
     DECLARE_EVENT_TABLE();