Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 156349 - media-video/mplayer: patch to for filename localization
Summary: media-video/mplayer: patch to for filename localization
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-11-26 13:47 UTC by xeb
Modified: 2007-01-30 15:42 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
patch (patch,1.52 KB, patch)
2006-11-26 13:48 UTC, xeb
Details | Diff
patch v2 (patch,2.33 KB, patch)
2006-12-01 12:21 UTC, xeb
Details | Diff
patch v2 (patch,2.33 KB, patch)
2006-12-01 12:21 UTC, xeb
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description xeb 2006-11-26 13:47:45 UTC
Hello.
It is patch to mplayer's gui (playlist).
It allows to view file names in playlist correctly on non-utf8 localized systems.
Comment 1 xeb 2006-11-26 13:48:39 UTC
Created attachment 102772 [details, diff]
patch
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2006-11-26 13:49:46 UTC
Send this upstream please...
Comment 3 xeb 2006-11-26 13:55:33 UTC
Sorry, I don't understand what it means.
Comment 4 xeb 2006-11-26 14:01:06 UTC
diff -uprN MPlayer-1.0rc1.orig/Gui/mplayer/gtk/pl.c MPlayer-1.0rc1/Gui/mplayer/gtk/pl.c
--- MPlayer-1.0rc1.orig/Gui/mplayer/gtk/pl.c    2006-11-27 00:43:55.000000000 +0300
+++ MPlayer-1.0rc1/Gui/mplayer/gtk/pl.c 2006-11-27 00:47:54.000000000 +0300
@@ -332,7 +332,7 @@ static void plCTree( GtkCTree * ctree,Gt
        path=calloc( 1,strlen( DirNode->path ) + strlen( dirent->d_name ) + 2 );
        if ( !strcmp( current_path,"/" ) ) sprintf( path,"/%s",dirent->d_name );
        else sprintf( path,"%s/%s",current_path,dirent->d_name );
-       text=dirent->d_name;
+       text=g_locale_to_utf8( dirent->d_name,-1,NULL,NULL,NULL );

        if ( stat( path,&statbuf ) != -1 && S_ISDIR( statbuf.st_mode ) && dirent->d_name[0] != '.' )
        {
@@ -342,6 +342,7 @@ static void plCTree( GtkCTree * ctree,Gt
         gtk_ctree_node_set_row_data_full( ctree,node,DirNode,NULL );
         if ( subdir ) node=gtk_ctree_insert_node( ctree,node,NULL,&dummy,4,NULL,NULL,NULL,NULL,FALSE,FALSE );
        }
+       g_free( text );
        free( path ); path=NULL;
       }
      closedir( dir );
@@ -369,9 +370,10 @@ static void scan_dir( char * path )
         curr=calloc( 1,strlen( path ) + strlen( dirent->d_name ) + 3 ); sprintf( curr,"%s/%s",path,dirent->d_name );
         if ( stat( curr,&statbuf ) != -1 && ( S_ISREG( statbuf.st_mode ) || S_ISLNK( statbuf.st_mode ) ) )
          {
-          text[0][0]=dirent->d_name;
+          text[0][0]=g_locale_to_utf8( dirent->d_name,-1,NULL,NULL,NULL );
           gtk_clist_append( GTK_CLIST( CLFiles ),text[0] );
           NrOfEntrys++;
+          g_free(text[0][0]);
          }
         free( curr );
        }
Comment 5 xeb 2006-12-01 12:21:17 UTC
Created attachment 103152 [details, diff]
patch v2
Comment 6 xeb 2006-12-01 12:21:19 UTC
Created attachment 103153 [details, diff]
patch v2
Comment 7 Steve Dibb (RETIRED) gentoo-dev 2007-01-30 15:42:11 UTC
(In reply to comment #3)
> Sorry, I don't understand what it means.
> 

MPlayer is always happy to accept patches, and this is the place that should go.  Just hop on the mplayer-users mailing list, tell them what youre trying to do, and attach your patch as an attachment to the email.

http://www.mplayerhq.hu/design7/mailing_lists.html

thanks xeb