changeset 7540:2a1766fec13e

fix filter handling bug
author pontscho
date Sat, 28 Sep 2002 20:33:56 +0000
parents 56ea9db91251
children f51e76c3882e
files Gui/mplayer/gtk/fs.c
diffstat 1 files changed, 7 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/Gui/mplayer/gtk/fs.c	Sat Sep 28 20:09:14 2002 +0000
+++ b/Gui/mplayer/gtk/fs.c	Sat Sep 28 20:33:56 2002 +0000
@@ -33,7 +33,7 @@
 gchar         * fsSelectedFile = NULL;
 gchar         * fsSelectedDirectory = NULL;
 unsigned char * fsThatDir = ".";
-gchar           fsFilter[256] = "*";
+gchar         * fsFilter = "*";
 
 int             fsPressed = 0;
 int             fsType    = 0;
@@ -173,7 +173,6 @@
   }
  globfree( &gg );
 
-//printf( "fsFiler: '%s'\n",fsFilter );
  if ( strchr( fsFilter,',' ) )
   {
    char tmp[8];
@@ -335,7 +334,7 @@
 
 void fs_fsFilterCombo_activate( GtkEditable * editable,gpointer user_data )
 {
- strcpy( fsFilter,gtk_entry_get_text( GTK_ENTRY( user_data ) ) );
+ fsFilter=gtk_entry_get_text( GTK_ENTRY( user_data ) );
  CheckDir( fsFNameList,get_current_dir_name() );
 }
 
@@ -351,27 +350,27 @@
    case fsVideoSelector:
           for( i=0;fsVideoFilterNames[i][0];i++ )
            if( !strcmp( str,fsVideoFilterNames[i][0] ) )
-            { strcpy( fsFilter,fsVideoFilterNames[i][1] ); break; }
+            { fsFilter=fsVideoFilterNames[i][1]; break; }
           break;
    case fsSubtitleSelector:
           for( i=0;fsSubtitleFilterNames[i][0];i++ )
            if( !strcmp( str,fsSubtitleFilterNames[i][0] ) )
-            { strcpy( fsFilter,fsSubtitleFilterNames[i][1] ); break; }
+            { fsFilter=fsSubtitleFilterNames[i][1]; break; }
           break;
    case fsOtherSelector:
           for( i=0;fsOtherFilterNames[i][0];i++ )
            if( !strcmp( str,fsOtherFilterNames[i][0] ) )
-            { strcpy( fsFilter,fsOtherFilterNames[i][1] ); break; }
+            { fsFilter=fsOtherFilterNames[i][1]; break; }
           break;
    case fsAudioSelector:
           for( i=0;fsAudioFileNames[i][0];i++ )
            if( !strcmp( str,fsAudioFileNames[i][0] ) )
-            { strcpy( fsFilter,fsAudioFileNames[i][1] ); break; }
+            { fsFilter=fsAudioFileNames[i][1]; break; }
 	  break;
    case fsFontSelector:
           for( i=0;fsFontFileNames[i][0];i++ )
 	    if( !strcmp( str,fsFontFileNames[i][0] ) )
-	     { strcpy( fsFilter,fsFontFileNames[i][1] ); break; }
+	     { fsFilter,fsFontFileNames[i][1]; break; }
 	  break;
    default: return;
   }