X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=gtk%2Fxoptions.c;h=fd9bc0762e6e1c2211c0ef1dd00b37b14e815b54;hb=70a154066b96d5390c133ae8800ff1943d21ac0c;hp=79e5617a4896a61d9acf4462f7c1db44e9cb025f;hpb=6c09cbad6fd5630f883937303fc5e10a5ef8e3dc;p=xboard.git diff --git a/gtk/xoptions.c b/gtk/xoptions.c index 79e5617..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); @@ -1392,7 +1394,7 @@ if(appData.debugMode) printf("n=%d, h=%d, w=%d\n",n,height,width); GtkAttachOptions x = GTK_FILL; // make sure hbox is always available when we have more options on same row hbox = gtk_hbox_new (option[i].type == Button && option[i].textValue || option[i].type == Graph, 0); - if(!currentCps && option[i].value > 80) x |= GTK_EXPAND; // only vertically extended widgets should size vertically + if(!currentCps && option[i].value > 80 && option[i].type == TextBox) x |= GTK_EXPAND; // only vertically extended widgets should size vertically if (strcmp(option[i].name, "") == 0 || option[i].type == Label || option[i].type == Button) // for Label and Button name is contained inside option gtk_table_attach(GTK_TABLE(table), hbox, left, left+r, top, top+1, GTK_FILL | GTK_EXPAND, x, 2, 1); @@ -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")) {