X-Git-Url: http://winboard.nl/cgi-bin?p=xboard.git;a=blobdiff_plain;f=gtk%2Fxoptions.c;h=fd9bc0762e6e1c2211c0ef1dd00b37b14e815b54;hp=7a3a83175f67ce60ee304416f23bd7a630c1a74f;hb=70a154066b96d5390c133ae8800ff1943d21ac0c;hpb=78380102f6e5d4bbe6bacb0df21aa6afec8ff903 diff --git a/gtk/xoptions.c b/gtk/xoptions.c index 7a3a831..fd9bc07 100644 --- a/gtk/xoptions.c +++ b/gtk/xoptions.c @@ -1113,11 +1113,11 @@ void BrowseGTK(GtkWidget *widget, gpointer gdata) gtkfilter = gtk_file_filter_new(); gtkfilter_all = gtk_file_filter_new(); - char fileext[MSG_SIZ], *filter = currentOption[opt_i].textValue, *old; + char fileext[MSG_SIZ], *filter = currentOption[opt_i].textValue, *old = NULL; + if(currentCps) filter = NULL; else if(currentOption[opt_i].type == PathName && filter) filter = "dir"; GetWidgetText(¤tOption[opt_i], &old); // start in same directory as current widget contents StartDir(filter, old); // change to start directory for this file type - g_free(old); /* select file or folder depending on option_type */ if (currentOption[opt_i].type == PathName) @@ -1138,7 +1138,7 @@ void BrowseGTK(GtkWidget *widget, gpointer gdata) gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dialog),gtkfilter_all); /* filter for specific filetypes e.g. pgn or fen */ - if (currentOption[opt_i].textValue != NULL) + if (currentOption[opt_i].textValue != NULL && !currentCps) // no filters for engine options! { char *q, *p = currentOption[opt_i].textValue; gtk_file_filter_set_name (gtkfilter, p);