comparison gui/ui/gtk/fileselect.c @ 33739:9f6d46d325de

Remove gfree() from interface.c. Rename it nfree() and define it as macro.
author ib
date Thu, 07 Jul 2011 09:29:15 +0000
parents 71c29e8ec68f
children 2c02269701bd
comparison
equal deleted inserted replaced
33738:998f94e62a61 33739:9f6d46d325de
30 #include "gui/ui/pixmaps/dir.xpm" 30 #include "gui/ui/pixmaps/dir.xpm"
31 #include "gui/ui/pixmaps/file.xpm" 31 #include "gui/ui/pixmaps/file.xpm"
32 32
33 #include "gui/app.h" 33 #include "gui/app.h"
34 #include "gui/interface.h" 34 #include "gui/interface.h"
35 #include "gui/util/mem.h"
35 #include "gui/util/string.h" 36 #include "gui/util/string.h"
36 #include "help_mp.h" 37 #include "help_mp.h"
37 #include "mpcommon.h" 38 #include "mpcommon.h"
38 #include "stream/stream.h" 39 #include "stream/stream.h"
39 40
369 if ( fsHistory[i] && !strcmp( fsHistory[i],subject ) ) 370 if ( fsHistory[i] && !strcmp( fsHistory[i],subject ) )
370 { 371 {
371 char * tmp = fsHistory[i]; fsHistory[i]=fsHistory[0]; fsHistory[0]=tmp; 372 char * tmp = fsHistory[i]; fsHistory[i]=fsHistory[0]; fsHistory[0]=tmp;
372 return; 373 return;
373 } 374 }
374 gfree( (void **)&fsHistory[fsPersistant_MaxPos - 1] ); 375 nfree( fsHistory[fsPersistant_MaxPos - 1] );
375 for ( i=fsPersistant_MaxPos - 1;i;i-- ) fsHistory[i]=fsHistory[i - 1]; 376 for ( i=fsPersistant_MaxPos - 1;i;i-- ) fsHistory[i]=fsHistory[i - 1];
376 fsHistory[0]=gstrdup( subject ); 377 fsHistory[0]=gstrdup( subject );
377 } 378 }
378 //----------------------------------------------- 379 //-----------------------------------------------
379 380
478 { 479 {
479 case fsVideoSelector: 480 case fsVideoSelector:
480 guiSetDF( guiInfo.Filename,fsSelectedDirectory,fsSelectedFile ); 481 guiSetDF( guiInfo.Filename,fsSelectedDirectory,fsSelectedFile );
481 guiInfo.StreamType=STREAMTYPE_FILE; 482 guiInfo.StreamType=STREAMTYPE_FILE;
482 guiInfo.FilenameChanged=1; sub_fps=0; 483 guiInfo.FilenameChanged=1; sub_fps=0;
483 gfree( (void **)&guiInfo.AudioFile ); 484 nfree( guiInfo.AudioFile );
484 gfree( (void **)&guiInfo.Subtitlename ); 485 nfree( guiInfo.Subtitlename );
485 fs_PersistantHistory( get_current_dir_name_utf8() ); //totem, write into history 486 fs_PersistantHistory( get_current_dir_name_utf8() ); //totem, write into history
486 break; 487 break;
487 case fsSubtitleSelector: 488 case fsSubtitleSelector:
488 guiSetDF( guiInfo.Subtitlename,fsSelectedDirectory,fsSelectedFile ); 489 guiSetDF( guiInfo.Subtitlename,fsSelectedDirectory,fsSelectedFile );
489 guiLoadSubtitle( guiInfo.Subtitlename ); 490 guiLoadSubtitle( guiInfo.Subtitlename );