help-menu.c: fix default html browser start on windows - correct uri
[pspp] / src / ui / gui / psppire-import-assistant.c
index ad32d1f5d3c5c80b1ba305293b2315314b26d642..1b6cf570afd10b99ff95a2c1c34ccc4fec43694a 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPPIRE - a graphical user interface for PSPP.
-   Copyright (C) 2015  Free Software Foundation
+   Copyright (C) 2015, 2016  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
@@ -459,15 +459,6 @@ on_prepare (GtkAssistant *assistant, GtkWidget *page, PsppireImportAssistant *ia
       on_entering (ia, new_page);
   }
   
-#if GTK3_TRANSITION
-  if (gtk_assistant_get_page_type (assistant, page)
-      == GTK_ASSISTANT_PAGE_CONFIRM)
-    gtk_widget_grab_focus (assistant->apply);
-  else
-    gtk_widget_grab_focus (assistant->forward);
-#endif
-
-
   ia->current_page = pn;
 }
 
@@ -962,6 +953,8 @@ psppire_import_assistant_init (PsppireImportAssistant *ia)
   chooser_page_create (ia);
 
   gtk_assistant_set_forward_page_func (GTK_ASSISTANT (ia), next_page_func, NULL, NULL);
+
+  gtk_window_fullscreen (GTK_WINDOW (ia));
 }
 
 
@@ -2054,7 +2047,7 @@ prepare_formats_page (PsppireImportAssistant *ia)
        case SPREADSHEET_GNUMERIC:
          {
            reader = spreadsheet_make_reader (ia->spreadsheet, &sro);
-           ia->dict = ia->spreadsheet->dict;
+           ia->dict = dict_clone (ia->spreadsheet->dict);
          }
          break;
        default:
@@ -2233,13 +2226,11 @@ static void
 intro_append_syntax (const PsppireImportAssistant *ia, struct string *s)
 {
   if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (ia->n_cases_button)))
-    ds_put_format (s, "  /IMPORTCASE=FIRST %d\n",
+    ds_put_format (s, "N OF CASES %d.\n",
                   gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (ia->n_cases_spin)));
   else if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (ia->percent_button)))
-    ds_put_format (s, "  /IMPORTCASE=PERCENT %d\n",
-                  gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (ia->percent_spin)));
-  else
-    ds_put_cstr (s, "  /IMPORTCASE=ALL\n");
+    ds_put_format (s, "SAMPLE %.4g.\n",
+                  gtk_spin_button_get_value (GTK_SPIN_BUTTON (ia->percent_spin)) / 100.0);
 }
 
 
@@ -2386,9 +2377,6 @@ psppire_import_assistant_generate_syntax (PsppireImportAssistant *ia)
       if (ia->encoding && strcmp (ia->encoding, "Auto"))
        syntax_gen_pspp (&s, "  /ENCODING=%sq\n", ia->encoding);
 
-      intro_append_syntax (ia, &s);
-
-
       ds_put_cstr (&s,
                   "  /ARRANGEMENT=DELIMITED\n"
                   "  /DELCASE=LINE\n");
@@ -2398,6 +2386,7 @@ psppire_import_assistant_generate_syntax (PsppireImportAssistant *ia)
 
       formats_append_syntax (ia, &s);
       apply_dict (ia->dict, &s);
+      intro_append_syntax (ia, &s);
     }
   else
     {