Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 156349 | Differences between
and this patch

Collapse All | Expand All

(-)MPlayer-1.0rc1.orig/Gui/mplayer/gtk/pl.c (-4 / +7 lines)
Lines 160-168 void ShowPlayList( void ) Link Here
160
   while ( next || next->next )
160
   while ( next || next->next )
161
    {
161
    {
162
     char * text[1][3]; text[0][2]="";
162
     char * text[1][3]; text[0][2]="";
163
     text[0][0]=next->name;
163
     text[0][0]=g_locale_to_utf8( next->name,-1,NULL,NULL,NULL );
164
     text[0][1]=next->path;
164
     text[0][1]=next->path;
165
     gtk_clist_append( GTK_CLIST( CLSelected ),text[0] );
165
     gtk_clist_append( GTK_CLIST( CLSelected ),text[0] );
166
     g_free(text[0][0]);
166
     NrOfSelected++;
167
     NrOfSelected++;
167
     if ( next->next ) next=next->next; else break;
168
     if ( next->next ) next=next->next; else break;
168
    }
169
    }
Lines 217-223 static void plButtonReleased( GtkButton Link Here
217
	  item=calloc( 1,sizeof( plItem ) );
218
	  item=calloc( 1,sizeof( plItem ) );
218
	  gtk_clist_get_text( GTK_CLIST( CLSelected ),i,0,&text[0] );
219
	  gtk_clist_get_text( GTK_CLIST( CLSelected ),i,0,&text[0] );
219
	  gtk_clist_get_text( GTK_CLIST( CLSelected ),i,1,&text[1] );
220
	  gtk_clist_get_text( GTK_CLIST( CLSelected ),i,1,&text[1] );
220
	  item->name=strdup( text[0] );
221
	  item->name=g_locale_from_utf8( text[0],-1,NULL,NULL,NULL );
221
	  item->path=strdup( text[1] );
222
	  item->path=strdup( text[1] );
222
	  gtkSet( gtkAddPlItem,0,(void*)item );
223
	  gtkSet( gtkAddPlItem,0,(void*)item );
223
	 }
224
	 }
Lines 332-338 static void plCTree( GtkCTree * ctree,Gt Link Here
332
       path=calloc( 1,strlen( DirNode->path ) + strlen( dirent->d_name ) + 2 );
333
       path=calloc( 1,strlen( DirNode->path ) + strlen( dirent->d_name ) + 2 );
333
       if ( !strcmp( current_path,"/" ) ) sprintf( path,"/%s",dirent->d_name );
334
       if ( !strcmp( current_path,"/" ) ) sprintf( path,"/%s",dirent->d_name );
334
	else sprintf( path,"%s/%s",current_path,dirent->d_name );
335
	else sprintf( path,"%s/%s",current_path,dirent->d_name );
335
       text=dirent->d_name;
336
       text=g_locale_to_utf8( dirent->d_name,-1,NULL,NULL,NULL );
336
337
337
       if ( stat( path,&statbuf ) != -1 && S_ISDIR( statbuf.st_mode ) && dirent->d_name[0] != '.' )
338
       if ( stat( path,&statbuf ) != -1 && S_ISDIR( statbuf.st_mode ) && dirent->d_name[0] != '.' )
338
	{
339
	{
Lines 342-347 static void plCTree( GtkCTree * ctree,Gt Link Here
342
	 gtk_ctree_node_set_row_data_full( ctree,node,DirNode,NULL );
343
	 gtk_ctree_node_set_row_data_full( ctree,node,DirNode,NULL );
343
	 if ( subdir ) node=gtk_ctree_insert_node( ctree,node,NULL,&dummy,4,NULL,NULL,NULL,NULL,FALSE,FALSE );
344
	 if ( subdir ) node=gtk_ctree_insert_node( ctree,node,NULL,&dummy,4,NULL,NULL,NULL,NULL,FALSE,FALSE );
344
	}
345
	}
346
       g_free( text );	
345
       free( path ); path=NULL;
347
       free( path ); path=NULL;
346
      }
348
      }
347
     closedir( dir );
349
     closedir( dir );
Lines 369-377 static void scan_dir( char * path ) Link Here
369
	 curr=calloc( 1,strlen( path ) + strlen( dirent->d_name ) + 3 ); sprintf( curr,"%s/%s",path,dirent->d_name );
371
	 curr=calloc( 1,strlen( path ) + strlen( dirent->d_name ) + 3 ); sprintf( curr,"%s/%s",path,dirent->d_name );
370
	 if ( stat( curr,&statbuf ) != -1 && ( S_ISREG( statbuf.st_mode ) || S_ISLNK( statbuf.st_mode ) ) )
372
	 if ( stat( curr,&statbuf ) != -1 && ( S_ISREG( statbuf.st_mode ) || S_ISLNK( statbuf.st_mode ) ) )
371
	  {
373
	  {
372
	   text[0][0]=dirent->d_name;
374
	   text[0][0]=g_locale_to_utf8( dirent->d_name,-1,NULL,NULL,NULL );
373
	   gtk_clist_append( GTK_CLIST( CLFiles ),text[0] );
375
	   gtk_clist_append( GTK_CLIST( CLFiles ),text[0] );
374
	   NrOfEntrys++;
376
	   NrOfEntrys++;
377
	   g_free(text[0][0]);
375
	  }
378
	  }
376
	 free( curr );
379
	 free( curr );
377
	}
380
	}

Return to bug 156349