From f7f09e5d0b183a416c4069f2c28f865c680045c7 Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Sat, 9 Apr 2016 22:47:18 +0200 Subject: [PATCH] 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. --- gtk/xoptions.c | 2 ++ xboard2.h | 1 + 2 files changed, 3 insertions(+), 0 deletions(-) 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[]; -- 1.7.0.4