From: H.G.Muller <hgm@hgm-xboard.(none)>
Date: Sat, 9 Apr 2016 21:40:54 +0000 (+0200)
Subject: Also put themes and textures in file chooser GTK
X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=b43ae6d0c5d6e3f89236153b0f61c908dd86f551;p=xboard.git

Also put themes and textures in file chooser GTK

The themes and textures folders are now also directly listed amongst
the 'Places' shortcuts in the GTK file chooser.
---

diff --git a/gtk/xoptions.c b/gtk/xoptions.c
index 4b72904..d84d425 100644
--- a/gtk/xoptions.c
+++ b/gtk/xoptions.c
@@ -1109,6 +1109,7 @@ void BrowseGTK(GtkWidget *widget, gpointer gdata)
     GtkFileFilter *gtkfilter_all;
     int opt_i = (intptr_t) gdata;
     GtkFileChooserAction fc_action;
+    char buf[MSG_SIZ];
 
     gtkfilter     = gtk_file_filter_new();
     gtkfilter_all = gtk_file_filter_new();
@@ -1133,6 +1134,10 @@ void BrowseGTK(GtkWidget *widget, gpointer gdata)
                       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);
+    snprintf(buf, MSG_SIZ, "%s/themes/textures", dataDir);
+    gtk_file_chooser_add_shortcut_folder(GTK_FILE_CHOOSER(dialog), buf, NULL);
 
     /* one filter to show everything */
     gtk_file_filter_add_pattern(gtkfilter_all, "*");