X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=gtk%2Fxoptions.c;h=fd9bc0762e6e1c2211c0ef1dd00b37b14e815b54;hb=70a154066b96d5390c133ae8800ff1943d21ac0c;hp=7ae3f3f83cadf0ce9701985f40fe24be480853d3;hpb=3bd0288f93aab3a5ff3aec2eecc98ca2fa007898;p=xboard.git diff --git a/gtk/xoptions.c b/gtk/xoptions.c index 7ae3f3f..fd9bc07 100644 --- a/gtk/xoptions.c +++ b/gtk/xoptions.c @@ -1113,9 +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; + char fileext[MSG_SIZ], *filter = currentOption[opt_i].textValue, *old = NULL; - StartDir(filter, NULL); // change to start directory for this file type + 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 /* select file or folder depending on option_type */ if (currentOption[opt_i].type == PathName) @@ -1136,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); @@ -1549,7 +1551,8 @@ if(appData.debugMode) printf("n=%d, h=%d, w=%d\n",n,height,width); Pack(hbox, table, fbutton, left, left+r, top, 0); break; } - if(!strcmp(option[i].name, "R") || !strcmp(option[i].name, "G") || !strcmp(option[i].name, "B")) { + if(!strcmp(option[i].name, "R") || !strcmp(option[i].name, "G") || + !strcmp(option[i].name, "B") && !strcmp(option[i+1].name, "D")) { break; } else if(!strcmp(option[i].name, "D")) {