comparison gui/dialog/fileselect.c @ 35938:8515446e81c6

Cosmetic: Rename variables holding data in UTF-8 encoding.
author ib
date Thu, 21 Mar 2013 09:56:58 +0000
parents f5b0d03fbc3b
children 736092b4a1be
comparison
equal deleted inserted replaced
35937:f5b0d03fbc3b 35938:8515446e81c6
341 341
342 if ( fsTopList_items ) g_list_free( fsTopList_items ); fsTopList_items=NULL; 342 if ( fsTopList_items ) g_list_free( fsTopList_items ); fsTopList_items=NULL;
343 if ( fsPathTable ) g_hash_table_destroy( fsPathTable ); fsPathTable=g_hash_table_new_full(g_str_hash, g_str_equal, free, free); 343 if ( fsPathTable ) g_hash_table_destroy( fsPathTable ); fsPathTable=g_hash_table_new_full(g_str_hash, g_str_equal, free, free);
344 { 344 {
345 unsigned int i, c = 1; 345 unsigned int i, c = 1;
346 gchar *uname; 346 gchar *utf8name;
347 347
348 if ( fsMedium ) 348 if ( fsMedium )
349 { 349 {
350 for ( i=0;i < FF_ARRAY_ELEMS(fsHistory);i++ ) 350 for ( i=0;i < FF_ARRAY_ELEMS(fsHistory);i++ )
351 if ( fsHistory[i] ) 351 if ( fsHistory[i] )
352 { 352 {
353 const gchar *fname; 353 const gchar *fname;
354 fname = cfg_old_filename_from_utf8(fsHistory[i]); 354 fname = cfg_old_filename_from_utf8(fsHistory[i]);
355 uname = g_filename_display_name(fname); 355 utf8name = g_filename_display_name(fname);
356 fsTopList_items=g_list_append( fsTopList_items,uname ); 356 fsTopList_items=g_list_append( fsTopList_items,utf8name );
357 g_hash_table_insert(fsPathTable, strdup(uname), strdup(fname)); 357 g_hash_table_insert(fsPathTable, strdup(utf8name), strdup(fname));
358 if ( c ) c=gstrcmp( dir,fname ); 358 if ( c ) c=gstrcmp( dir,fname );
359 } 359 }
360 } 360 }
361 if ( c && dir ) 361 if ( c && dir )
362 { 362 {
363 uname = g_filename_display_name( dir ); 363 utf8name = g_filename_display_name( dir );
364 fsTopList_items=g_list_prepend( fsTopList_items,uname ); 364 fsTopList_items=g_list_prepend( fsTopList_items,utf8name );
365 g_hash_table_insert(fsPathTable, strdup(uname), strdup(dir)); 365 g_hash_table_insert(fsPathTable, strdup(utf8name), strdup(dir));
366 } 366 }
367 } 367 }
368 free( dir ); 368 free( dir );
369 if ( getenv( "HOME" ) ) fsTopList_items=g_list_append( fsTopList_items,getenv( "HOME" ) ); 369 if ( getenv( "HOME" ) ) fsTopList_items=g_list_append( fsTopList_items,getenv( "HOME" ) );
370 else fsTopList_items=g_list_append( fsTopList_items,"/home" ); 370 else fsTopList_items=g_list_append( fsTopList_items,"/home" );