$(AM_V_at)echo "const char host_system[] = \"$(host_triplet)\";" >> $@
$(AM_V_at)echo "const char build_system[] = \"$(build_triplet)\";" >> $@
$(AM_V_at)echo "const char locale_dir[] = \"$(datadir)/locale\";" >> $@
+ $(AM_V_at)echo "const char examples_dir[] = \"$(examplesdir)\";" >> $@
$(AM_V_at)echo "const char *const authors[] = {" >> $@
$(AM_V_at)sed -e 's/^/ \"/' -e 's/$$/\",/' $(top_srcdir)/AUTHORS >> $@
$(AM_V_at)echo "0 };" >> $@
/* Locale directory. */
extern const char locale_dir[];
+/* The Examples directory */
+extern const char const examples_dir[];
+
/* From the AUTHORS file */
extern const char *const authors[];
+
#endif /* !version_h */
#include "data/any-reader.h"
#include "data/file-name.h"
#include "data/dataset.h"
+#include "libpspp/version.h"
#include "helper.h"
#include "psppire-data-window.h"
{
GtkWidget *dialog = psppire_window_file_chooser_dialog (de);
+ gtk_file_chooser_add_shortcut_folder (GTK_FILE_CHOOSER (dialog), examples_dir, NULL);
+
switch (gtk_dialog_run (GTK_DIALOG (dialog)))
{
case GTK_RESPONSE_ACCEPT:
gchar *encoding = psppire_encoding_selector_get_encoding (
gtk_file_chooser_get_extra_widget (GTK_FILE_CHOOSER (dialog)));
- int retval;
-
- retval = any_reader_detect (sysname, NULL);
+ int retval = any_reader_detect (sysname, NULL);
if (retval == 1)
open_data_window (de, name, encoding, NULL);
else if (retval == 0)