From: H.G.Muller Date: Sat, 9 Apr 2016 20:47:18 +0000 (+0200) Subject: Add DATADIR as shortcut folder to file chooser X-Git-Url: http://winboard.nl/cgi-bin?p=xboard.git;a=commitdiff_plain;h=f7f09e5d0b183a416c4069f2c28f865c680045c7 Add DATADIR as shortcut folder to file chooser The file chooser invoked by a dialog Browse button now puts XBoard's DATADIR amongst the shortcuts in the 'Places' list, so you can navigate there with a single mouse click. --- diff --git a/gtk/xoptions.c b/gtk/xoptions.c index fd9bc07..4b72904 100644 --- a/gtk/xoptions.c +++ b/gtk/xoptions.c @@ -1132,6 +1132,8 @@ void BrowseGTK(GtkWidget *widget, gpointer gdata) GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, NULL); + gtk_file_chooser_add_shortcut_folder(GTK_FILE_CHOOSER(dialog), dataDir, NULL); + /* one filter to show everything */ gtk_file_filter_add_pattern(gtkfilter_all, "*"); gtk_file_filter_set_name (gtkfilter_all, "All Files"); diff --git a/xboard2.h b/xboard2.h index 3a5539e..a3c8f22 100644 --- a/xboard2.h +++ b/xboard2.h @@ -29,3 +29,4 @@ extern int squareSize, lineGap, defaultLineGap; extern int startedFromPositionFile; extern char *icsTextMenuString; extern int hi2X, hi2Y; +extern char dataDir[];