gui: Allow File|Open to select an encoding for system files.
[pspp] / src / ui / gui / text-data-import-dialog.c
index 198a1687a847dc5ab9b4f60115cd4f177c6ea05c..b0f524ec6a182adc6beb376747ef6f9afbc63f25 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPPIRE - a graphical user interface for PSPP.
-   Copyright (C) 2008, 2009, 2010, 2011, 2012, 2013  Free Software Foundation
+   Copyright (C) 2008, 2009, 2010, 2011, 2012, 2013, 2014  Free Software Foundation
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -41,7 +41,6 @@
 #include "libpspp/i18n.h"
 #include "libpspp/line-reader.h"
 #include "libpspp/message.h"
-#include "ui/gui/checkbox-treeview.h"
 #include "ui/gui/dialog-common.h"
 #include "ui/gui/executor.h"
 #include "ui/gui/helper.h"
@@ -56,7 +55,6 @@
 #include "ui/gui/psppire-scanf.h"
 #include "ui/syntax-gen.h"
 
-#include "gl/error.h"
 #include "gl/intprops.h"
 #include "gl/xalloc.h"
 
@@ -124,7 +122,7 @@ text_data_import_assistant (PsppireDataWindow *dw)
     case GTK_RESPONSE_APPLY:
       {
        gchar *fn = g_path_get_basename (ia->file.file_name);
-       open_data_window (PSPPIRE_WINDOW (dw), fn, generate_syntax (ia));
+       open_data_window (PSPPIRE_WINDOW (dw), fn, NULL, generate_syntax (ia));
        g_free (fn);
       }
       break;
@@ -214,7 +212,7 @@ apply_dict (const struct dictionary *dict, struct string *s)
       if (measure != var_default_measure (type))
         syntax_gen_pspp (s, "VARIABLE LEVEL %ss (%ss).\n",
                          name, measure_to_syntax (measure));
-      if (role != ROLE_NONE)
+      if (role != ROLE_INPUT)
         syntax_gen_pspp (s, "VARIABLE ROLE /%ss %ss.\n",
                          var_role_to_syntax (role), name);
       if (alignment != var_default_alignment (type))