if(currentCps) {
name = gtk_button_get_label (GTK_BUTTON(widget));
if(currentOption[data].type == SaveButton) GenericReadout(currentOption, -1);
- snprintf(buf, MSG_SIZ, "option %s\n", name);
- SendToProgram(buf, currentCps);
+ if(data == 0) { // XBoard save button
+ SaveEngineSettings(currentCps == &second); PopDown(dlg);
+ } else {
+ snprintf(buf, MSG_SIZ, "option %s\n", name);
+ SendToProgram(buf, currentCps);
+ }
} else ((ButtonCallback*) currentOption[data].target)(data);
shells[dlg] = oldSh; // in case of multiple instances, restore previous (as this one could be popped down now)
GtkFileFilter *gtkfilter_all;
int n, opt_i = (intptr_t) gdata;
GtkFileChooserAction fc_action;
- char buf[MSG_SIZ];
+ char buf[MSG_SIZ], *p;
gtkfilter = gtk_file_filter_new();
gtkfilter_all = gtk_file_filter_new();
GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
NULL);
+ if(*chessDir && (!(p = strstr(chessDir, "/home/")) || strchr(p+6, '/')))
+ gtk_file_chooser_add_shortcut_folder(GTK_FILE_CHOOSER(dialog), chessDir, NULL);
gtk_file_chooser_add_shortcut_folder(GTK_FILE_CHOOSER(dialog), dataDir, NULL);
snprintf(buf, MSG_SIZ, "%s/themes", dataDir);
gtk_file_chooser_add_shortcut_folder(GTK_FILE_CHOOSER(dialog), buf, NULL);