X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fpage-assistant.c;h=59ece176f5cd5b3b702e5245bc83c4c367a4120c;hb=b241f1232945bfc913633c3ecec68e997500e065;hp=c27d6c3472d2dd4be30921aa6d63f5ad7cf82fd5;hpb=47324b542f10e961a72d711314f6abc7c83a59de;p=pspp diff --git a/src/ui/gui/page-assistant.c b/src/ui/gui/page-assistant.c index c27d6c3472..59ece176f5 100644 --- a/src/ui/gui/page-assistant.c +++ b/src/ui/gui/page-assistant.c @@ -80,11 +80,20 @@ init_assistant (GtkWindow *parent_window) ia->sheet_spec = sheet_spec_page_create (ia); ia->intro = intro_page_create (ia); + ia->separators = separators_page_create (ia); - ia->first_line = xzalloc (sizeof *ia->first_line); - ia->separators = xzalloc (sizeof *ia->separators); - ia->formats = xzalloc (sizeof *ia->formats); + a->prop_renderer = gtk_cell_renderer_text_new (); + g_object_ref_sink (a->prop_renderer); + a->fixed_renderer = gtk_cell_renderer_text_new (); + g_object_ref_sink (a->fixed_renderer); + g_object_set (G_OBJECT (a->fixed_renderer), + "family", "Monospace", + (void *) NULL); + + ia->first_line = first_line_page_create (ia); + + ia->formats = formats_page_create (ia); g_signal_connect (a->assistant, "prepare", G_CALLBACK (on_prepare), ia); g_signal_connect (a->assistant, "cancel", G_CALLBACK (on_cancel), ia); @@ -100,13 +109,6 @@ init_assistant (GtkWindow *parent_window) gtk_window_set_transient_for (GTK_WINDOW (a->assistant), parent_window); gtk_window_set_icon_name (GTK_WINDOW (a->assistant), "pspp"); - a->prop_renderer = gtk_cell_renderer_text_new (); - g_object_ref_sink (a->prop_renderer); - a->fixed_renderer = gtk_cell_renderer_text_new (); - g_object_ref_sink (a->fixed_renderer); - g_object_set (G_OBJECT (a->fixed_renderer), - "family", "Monospace", - (void *) NULL); return ia; } @@ -164,10 +166,10 @@ on_prepare (GtkAssistant *assistant, GtkWidget *page, int pn = gtk_assistant_get_current_page (assistant); g_print ("%s:%d Page %d %p\n", __FILE__, __LINE__, pn, page); -#if 0 - if (pn == 1 && ssp->spreadsheet) - post_sheet_spec_page (ia); + if (pn == 0) + prepare_sheet_spec_page (ia); +#if 0 if (gtk_assistant_get_page_type (assistant, page) == GTK_ASSISTANT_PAGE_CONFIRM) gtk_widget_grab_focus (assistant->apply); @@ -184,15 +186,14 @@ on_prepare (GtkAssistant *assistant, GtkWidget *page, { prepare_sheet_spec_page (ia); } - - -#endif gtk_widget_show (ia->asst.reset_button); if (page == ia->formats->page) gtk_widget_show (ia->asst.paste_button); else gtk_widget_hide (ia->asst.paste_button); + +#endif } /* Called when the Cancel button in the assistant is clicked. */