[MPlayer-cvslog] r36032 - in trunk/gui/dialog: fileselect.c playlist.c

ib subversion at mplayerhq.hu
Thu Mar 21 10:56:58 CET 2013


Author: ib
Date: Thu Mar 21 10:56:58 2013
New Revision: 36032

Log:
Cosmetic: Rename variables holding data in UTF-8 encoding.

Modified:
   trunk/gui/dialog/fileselect.c
   trunk/gui/dialog/playlist.c

Modified: trunk/gui/dialog/fileselect.c
==============================================================================
--- trunk/gui/dialog/fileselect.c	Thu Mar 21 10:43:36 2013	(r36031)
+++ trunk/gui/dialog/fileselect.c	Thu Mar 21 10:56:58 2013	(r36032)
@@ -343,7 +343,7 @@ void ShowFileSelect( int type,int modal 
  if ( fsPathTable ) g_hash_table_destroy( fsPathTable ); fsPathTable=g_hash_table_new_full(g_str_hash, g_str_equal, free, free);
  {
   unsigned int  i, c = 1;
-  gchar *uname;
+  gchar *utf8name;
 
   if ( fsMedium )
    {
@@ -352,17 +352,17 @@ void ShowFileSelect( int type,int modal 
       {
        const gchar *fname;
        fname = cfg_old_filename_from_utf8(fsHistory[i]);
-       uname = g_filename_display_name(fname);
-       fsTopList_items=g_list_append( fsTopList_items,uname );
-       g_hash_table_insert(fsPathTable, strdup(uname), strdup(fname));
+       utf8name = g_filename_display_name(fname);
+       fsTopList_items=g_list_append( fsTopList_items,utf8name );
+       g_hash_table_insert(fsPathTable, strdup(utf8name), strdup(fname));
        if ( c ) c=gstrcmp( dir,fname );
       }
    }
   if ( c && dir )
    {
-     uname = g_filename_display_name( dir );
-     fsTopList_items=g_list_prepend( fsTopList_items,uname );
-     g_hash_table_insert(fsPathTable, strdup(uname), strdup(dir));
+     utf8name = g_filename_display_name( dir );
+     fsTopList_items=g_list_prepend( fsTopList_items,utf8name );
+     g_hash_table_insert(fsPathTable, strdup(utf8name), strdup(dir));
    }
  }
  free( dir );

Modified: trunk/gui/dialog/playlist.c
==============================================================================
--- trunk/gui/dialog/playlist.c	Thu Mar 21 10:43:36 2013	(r36031)
+++ trunk/gui/dialog/playlist.c	Thu Mar 21 10:56:58 2013	(r36032)
@@ -395,7 +395,7 @@ static void plCTree( GtkCTree * ctree,Gt
 {
  GtkCTreeNode  * node;
  DirNodeType   * DirNode;
- gchar 		   * text, * name = NULL;
+ gchar 		   * text, * utf8name = NULL;
  gchar 		   * dummy = "dummy";
  int     	 	 subdir = True;
  DIR   		   * dir = NULL;
@@ -419,14 +419,14 @@ static void plCTree( GtkCTree * ctree,Gt
        if ( !strcmp( current_path,"/" ) ) sprintf( path,"/%s",dirent->d_name );
 	else sprintf( path,"%s/%s",current_path,dirent->d_name );
        text=dirent->d_name;
-       g_free( name );
-       name=g_filename_display_name( text );
+       g_free( utf8name );
+       utf8name=g_filename_display_name( text );
 
        if ( stat( path,&statbuf ) != -1 && S_ISDIR( statbuf.st_mode ) && dirent->d_name[0] != '.' )
 	{
 	 DirNode=malloc( sizeof( DirNodeType ) ); DirNode->scaned=False; DirNode->path=strdup( path );
 	 subdir=check_for_subdir( path );
-	 node=gtk_ctree_insert_node( ctree,parent_node,NULL,&name,4,pxOpenedBook,msOpenedBook,pxClosedBook,msClosedBook,!subdir,FALSE );
+	 node=gtk_ctree_insert_node( ctree,parent_node,NULL,&utf8name,4,pxOpenedBook,msOpenedBook,pxClosedBook,msClosedBook,!subdir,FALSE );
 	 gtk_ctree_node_set_row_data_full( ctree,node,DirNode,NULL );
 	 if ( subdir ) gtk_ctree_insert_node( ctree,node,NULL,&dummy,4,NULL,NULL,NULL,NULL,FALSE,FALSE );
 	}
@@ -439,7 +439,7 @@ static void plCTree( GtkCTree * ctree,Gt
    gtk_clist_thaw( GTK_CLIST( ctree ) );
   }
 
-  g_free( name );
+  g_free( utf8name );
 }
 
 static void scan_dir( char * path )


More information about the MPlayer-cvslog mailing list