Made the text import dialogs sort of work again
authorJohn Darrington <john@darrington.wattle.id.au>
Sat, 16 Feb 2013 10:48:00 +0000 (11:48 +0100)
committerJohn Darrington <john@darrington.wattle.id.au>
Sat, 16 Feb 2013 14:04:27 +0000 (15:04 +0100)
src/ui/gui/page-assistant.c
src/ui/gui/page-first-line.c
src/ui/gui/page-intro.c
src/ui/gui/page-separators.c
src/ui/gui/text-data-import-dialog.c

index 43f6a362872b478d8b69478a4b3de277e791332f..b0b616e2654ac47f448a7b6ade3fc7d9ee5d8c75 100644 (file)
@@ -165,6 +165,14 @@ on_prepare (GtkAssistant *assistant, GtkWidget *page,
          prepare_formats_page (ia);
        }
     }
+  else
+    {
+      if (pn == 0)
+       prepare_separators_page (ia);
+      else if (pn == 3)
+       prepare_formats_page (ia);
+    }
+
 
   if (gtk_assistant_get_page_type (assistant, page)
       == GTK_ASSISTANT_PAGE_CONFIRM)
@@ -174,14 +182,8 @@ on_prepare (GtkAssistant *assistant, GtkWidget *page,
 
 
 
-#if 0  
-  /* Prepare .... */
-  if (page == ia->separators->page)
-    prepare_separators_page (ia);
-  else if (page == ia->formats->page)
-    prepare_formats_page (ia);
-
 
+#if 0
   gtk_widget_show (ia->asst.reset_button);
   if (page == ia->formats->page)
     gtk_widget_show (ia->asst.paste_button);
index d1cec2cb4ee83d77eb009890cfe7e4cf40fcf381..4109f043eec0a699463b194ab9ea5197d6801ddd 100644 (file)
@@ -89,10 +89,9 @@ first_line_page_create (struct import_assistant *ia)
 
   GtkBuilder *builder = ia->asst.builder;
 
-#if 0
   p->page = add_page_to_assistant (ia, get_widget_assert (builder, "FirstLine"),
                                    GTK_ASSISTANT_PAGE_CONTENT);
-#endif
+
   gtk_widget_destroy (get_widget_assert (builder, "first-line"));
   p->tree_view = create_lines_tree_view (
     GTK_CONTAINER (get_widget_assert (builder, "first-line-scroller")), ia);
index 6ef991c314d5bede4eddf3f5e1b8bb72f9de1f5f..e0d51f537c5066c902ee2d9c89dd5ef6993dc1b8 100644 (file)
@@ -109,13 +109,9 @@ intro_page_create (struct import_assistant *ia)
                             1, 2,
                             2, 3);
 
-#if 0
   p->page = add_page_to_assistant (ia, get_widget_assert (builder, "Intro"),
                                    GTK_ASSISTANT_PAGE_INTRO);
 
-  g_print ("%s:%d Added page %p\n", __FILE__, __LINE__, p->page);
-#endif  
-
   p->all_cases_button = get_widget_assert (builder, "import-all-cases");
 
   p->n_cases_button = get_widget_assert (builder, "import-n-cases");
index 780742bf5ba216cdb71969bf01f73e6637c11c80..fee511e0c308c99d43dd019d3323daf9289ab851 100644 (file)
@@ -159,10 +159,9 @@ separators_page_create (struct import_assistant *ia)
 
   struct separators_page *p = xzalloc (sizeof *p);
 
-#if 0
   p->page = add_page_to_assistant (ia, get_widget_assert (builder, "Separators"),
                                    GTK_ASSISTANT_PAGE_CONTENT);
-#endif
+
   p->custom_cb = get_widget_assert (builder, "custom-cb");
   p->custom_entry = get_widget_assert (builder, "custom-entry");
   p->quote_combo = get_widget_assert (builder, "quote-combo");
index 412af5b8f4a1c0e1ac12f5de8c2ff2d55e90e1d8..ab7d743b1dad384d81d7d733547af426277cc070 100644 (file)
@@ -97,6 +97,8 @@ text_data_import_assistant (PsppireDataWindow *dw)
       ia->intro = intro_page_create (ia);
       ia->separators = separators_page_create (ia);
       ia->first_line = first_line_page_create (ia);
+
+      printf ("%s:%d %p\n", __FILE__, __LINE__, ia->intro);
     }
   ia->formats = formats_page_create (ia);