Hello. It is patch to mplayer's gui (playlist). It allows to view file names in playlist correctly on non-utf8 localized systems.
Created attachment 102772 [details, diff] patch
Send this upstream please...
Sorry, I don't understand what it means.
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 ); }
Created attachment 103152 [details, diff] patch v2
Created attachment 103153 [details, diff] patch v2
(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