[MPlayer-cvslog] r35967 - in trunk: gui/dialog/dialog.c help/help_mp-de.h help/help_mp-en.h

ib subversion at mplayerhq.hu
Fri Mar 15 07:19:05 CET 2013


Author: ib
Date: Fri Mar 15 07:19:05 2013
New Revision: 35967

Log:
Add a warning message about @locale in G_FILENAME_ENCODING.

Inform that setting G_BROKEN_FILENAMES or @locale in G_FILENAME_ENCODING
(which has the same meaning, but takes priority) isn't supported.
That is because of the gtk_disable_setlocale() call without which
MPlayer might break.

Modified:
   trunk/gui/dialog/dialog.c

Changes in other areas also in this revision:
Modified:
   trunk/help/help_mp-de.h
   trunk/help/help_mp-en.h

Modified: trunk/gui/dialog/dialog.c
==============================================================================
--- trunk/gui/dialog/dialog.c	Fri Mar 15 04:46:53 2013	(r35966)
+++ trunk/gui/dialog/dialog.c	Fri Mar 15 07:19:05 2013	(r35967)
@@ -43,6 +43,7 @@
 #include "gui/app/app.h"
 #include "gui/app/gui.h"
 #include "gui/interface.h"
+#include "gui/util/string.h"
 #include "gui/wm/ws.h"
 
 #include "gui/ui/actions.h"
@@ -132,6 +133,9 @@ void gtkInit(char *display_name)
 {
     int argc = 0;
     char *arg[3], **argv = arg;
+#ifdef CONFIG_GTK2
+    char *env;
+#endif
     GtkIconTheme *theme;
     GdkPixmap *gdkIcon;
     GdkBitmap *gdkIconMask;
@@ -147,6 +151,11 @@ void gtkInit(char *display_name)
 
 #ifdef CONFIG_GTK2
     gtk_disable_setlocale();
+
+    env = getenv("G_FILENAME_ENCODING");
+
+    if ((!env && getenv("G_BROKEN_FILENAMES")) || (gstrncmp(env, "@locale", 7) == 0))
+        mp_msg(MSGT_GPLAYER, MSGL_WARN, MSGTR_LOCALE_ENCODING);
 #endif
 
     gtk_init(&argc, &argv);


More information about the MPlayer-cvslog mailing list