X-Git-Url: http://winboard.nl/cgi-bin?p=xboard.git;a=blobdiff_plain;f=gtk%2Fxoptions.c;h=fbe1c232b4cc10be5e8cf25c0e15880da90f3541;hp=18024e8878345dc0e9ac28ff4297888e95e77723;hb=6487eb595b4ee51f8eab706698333e57c5dc4ff8;hpb=b782bd1af9ba9d45eb6a3f33f546d441b68479a0 diff --git a/gtk/xoptions.c b/gtk/xoptions.c index 18024e8..fbe1c23 100644 --- a/gtk/xoptions.c +++ b/gtk/xoptions.c @@ -1126,7 +1126,7 @@ void BrowseGTK(GtkWidget *widget, gpointer gdata) 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(); @@ -1150,6 +1150,8 @@ void BrowseGTK(GtkWidget *widget, gpointer gdata) 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);