]> git.sesse.net Git - vlc/commitdiff
* modules/gui/wxwindows/*: proper characters encoding conversions.
authorGildas Bazin <gbazin@videolan.org>
Sat, 19 Jul 2003 16:33:55 +0000 (16:33 +0000)
committerGildas Bazin <gbazin@videolan.org>
Sat, 19 Jul 2003 16:33:55 +0000 (16:33 +0000)
   Override the popup menu only for the main interface.

modules/gui/wxwindows/interface.cpp
modules/gui/wxwindows/wxwindows.cpp
modules/gui/wxwindows/wxwindows.h

index b062f324f7978385ba646c7be3c4bd394e6d533a..aaec87ff33017e478b53beedb37625dcf3660903 100644 (file)
@@ -2,7 +2,7 @@
  * interface.cpp : wxWindows plugin for vlc
  *****************************************************************************
  * Copyright (C) 2000-2001 VideoLAN
- * $Id: interface.cpp,v 1.48 2003/07/18 11:39:39 gbazin Exp $
+ * $Id: interface.cpp,v 1.49 2003/07/19 16:33:55 gbazin Exp $
  *
  * Authors: Gildas Bazin <gbazin@netcourrier.com>
  *
@@ -539,6 +539,13 @@ 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 );
 }
index 4deea8d10bf16aa7e5eb6ecfc8ec89284d453bcb..51d4ec1d0be7e1e8d5bdc3a64b2a27c249e42fd5 100644 (file)
@@ -2,7 +2,7 @@
  * wxwindows.cpp : wxWindows plugin for vlc
  *****************************************************************************
  * Copyright (C) 2000-2001 VideoLAN
- * $Id: wxwindows.cpp,v 1.21 2003/07/18 14:18:08 gbazin Exp $
+ * $Id: wxwindows.cpp,v 1.22 2003/07/19 16:33:55 gbazin Exp $
  *
  * Authors: Gildas Bazin <gbazin@netcourrier.com>
  *
 #ifdef WIN32                                                 /* mingw32 hack */
 #undef Yield
 #undef CreateDialog
+
+extern int wxEntry( HINSTANCE hInstance,
+                    HINSTANCE hPrevInstance = NULL,
+                    char *pCmdLine = NULL,
+                    int nCmdShow = SW_NORMAL );
 #endif
 
 /* Let vlc take care of the i18n stuff */
index 35173e670912837ccbc86ab46285af9f61185183..e8fc4d78962c70405e6125ce46a4022ef1a71ad8 100644 (file)
@@ -2,7 +2,7 @@
  * wxwindows.h: private wxWindows interface description
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: wxwindows.h,v 1.45 2003/07/18 11:39:39 gbazin Exp $
+ * $Id: wxwindows.h,v 1.46 2003/07/19 16:33:55 gbazin Exp $
  *
  * Authors: Gildas Bazin <gbazin@netcourrier.com>
  *
@@ -47,13 +47,24 @@ class FileInfo;
 
 #define SLIDER_MAX_POS 10000
 
-/* wxU is used to convert ansi strings to unicode strings (wchar_t) */
+/* wxU is used to convert ansi/utf8 strings to unicode strings (wchar_t) */
+#if defined( ENABLE_NLS ) && defined( HAVE_GETTEXT ) && \
+    defined( WIN32 ) && !defined( HAVE_INCLUDED_GETTEXT )
+#if wxUSE_UNICODE
+#   define wxU(utf8) wxString(utf8, wxConvUTF8)
+#else
+#   define wxU(ut8 ) wxString(wxConvUTF8.cMB2WC(ut8), *wxConvCurrent)
+#endif
+
+#else // ENABLE_NLS && HAVE_GETTEXT && WIN32 && !HAVE_INCLUDED_GETTEXT
 #if wxUSE_UNICODE
 #   define wxU(ansi) wxString(ansi, *wxConvCurrent)
 #else
 #   define wxU(ansi) ansi
 #endif
 
+#endif
+
 #if !defined(MODULE_NAME_IS_skins)
 /*****************************************************************************
  * intf_sys_t: description and status of wxwindows interface