changeset 35935:5a953e0b001b

Remove pointless code. The file selector widget will be destroyed after a selection has been made, and fsTopList_items will be freed and rebuilt every time the file selector widget is created (newly). So it makes no sense to prepend any data to the GList that never will be used.
author ib
date Thu, 21 Mar 2013 09:36:48 +0000
parents 445773b8c373
children 68a031dce5c1
files gui/dialog/fileselect.c
diffstat 1 files changed, 1 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/gui/dialog/fileselect.c	Thu Mar 21 09:15:06 2013 +0000
+++ b/gui/dialog/fileselect.c	Thu Mar 21 09:36:48 2013 +0000
@@ -502,8 +502,7 @@
 static void fs_Ok_released( GtkButton * button, gpointer user_data )
 {
  char          * fsSelectedDirectory;
- GList         * item;
- int             i = 1, l;
+ int             l;
  struct stat     fs;
  gchar         * selected;
 
@@ -558,18 +557,6 @@
 
  HideFileSelect();
 
- item=fsTopList_items;
- while( item )
-  {
-   if ( !strcmp( item->data,fsSelectedDirectoryUtf8 ) ) i=0;
-   item=item->next;
-  }
- if ( i )
- {
-   fsTopList_items=g_list_prepend( fsTopList_items,fsSelectedDirectoryUtf8 );
-   g_hash_table_insert(fsPathTable, strdup(fsSelectedDirectoryUtf8), strdup(fsSelectedDirectory));
- }
-
  free(fsSelectedDirectory);
 
  if ( uiLoadPlay ) { uiLoadPlay=False; uiEvent( evPlay,0 ); }