[MPlayer-cvslog] r32820 - trunk/gui/mplayer/gui_common.c

ib subversion at mplayerhq.hu
Thu Jan 27 18:58:58 CET 2011


Author: ib
Date: Thu Jan 27 18:58:58 2011
New Revision: 32820

Log:
Revert "Translate messages shown in the GUI window(s) from UTF-8"
(r32800 and r32802).

(A far better solution is about to come.)

Modified:
   trunk/gui/mplayer/gui_common.c

Modified: trunk/gui/mplayer/gui_common.c
==============================================================================
--- trunk/gui/mplayer/gui_common.c	Wed Jan 26 22:51:43 2011	(r32819)
+++ trunk/gui/mplayer/gui_common.c	Thu Jan 27 18:58:58 2011	(r32820)
@@ -55,7 +55,6 @@ static inline void TranslateFilename( in
  int i;
  char * p;
  size_t len;
- gchar *msg = NULL;
 
  switch ( guiIntfStruct.StreamType )
   {
@@ -73,38 +72,21 @@ static inline void TranslateFilename( in
             if ( ( len > 3 )&&( tmp[len - 3] == '.' ) ) tmp[len - 3]=0;
             else if ( ( len > 4 )&&( tmp[len - 4] == '.' ) ) tmp[len - 4]=0;
             else if ( ( len > 5 )&&( tmp[len - 5] == '.' ) ) tmp[len - 5]=0;
-           }
-          else
-           {
-            msg = g_filename_from_utf8( MSGTR_NoFileLoaded, -1, NULL, NULL, NULL );
-            av_strlcpy( tmp, ( msg ? msg : MSGTR_NoFileLoaded ), tmplen );
-           }
+           } else av_strlcpy( tmp,MSGTR_NoFileLoaded,tmplen );
           break;
 #ifdef CONFIG_DVDREAD
    case STREAMTYPE_DVD:
-          if ( guiIntfStruct.DVD.current_chapter )
-           {
-            msg = g_filename_from_utf8( MSGTR_Chapter, -1, NULL, NULL, NULL );
-            snprintf( tmp, tmplen, ( msg ? msg : MSGTR_Chapter ), guiIntfStruct.DVD.current_chapter );
-           }
-          else
-           {
-            msg = g_filename_from_utf8( MSGTR_NoChapter, -1, NULL, NULL, NULL );
-            av_strlcat( tmp, ( msg ? msg : MSGTR_NoChapter ), tmplen );
-           }
+          if ( guiIntfStruct.DVD.current_chapter ) snprintf(tmp,tmplen,MSGTR_Chapter,guiIntfStruct.DVD.current_chapter );
+            else av_strlcat( tmp,MSGTR_NoChapter,tmplen );
           break;
 #endif
 #ifdef CONFIG_VCD
    case STREAMTYPE_VCD:
-        msg = g_filename_from_utf8( MSGTR_VCDTrack, -1, NULL, NULL, NULL );
-        snprintf( tmp, tmplen, ( msg ? msg : MSGTR_VCDTrack ), guiIntfStruct.Track );
+        snprintf( tmp,tmplen,MSGTR_VCDTrack,guiIntfStruct.Track );
 	break;
 #endif
-   default:
-     msg = g_filename_from_utf8( MSGTR_NoMediaOpened, -1, NULL, NULL, NULL );
-     av_strlcpy( tmp, ( msg ? msg : MSGTR_NoMediaOpened ), tmplen );
+   default: av_strlcpy( tmp,MSGTR_NoMediaOpened,tmplen );
   }
- g_free(msg);
  if ( c )
   {
    for ( i=0;i < (int)strlen( tmp );i++ )


More information about the MPlayer-cvslog mailing list