projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' into import-gui
[pspp]
/
src
/
ui
/
gui
/
page-assistant.c
diff --git
a/src/ui/gui/page-assistant.c
b/src/ui/gui/page-assistant.c
index e10d83d0c6a817d57c24bca512d15363b35f8fc0..a83fbb2cd5add5204aa9e315c2336ee830f27fea 100644
(file)
--- a/
src/ui/gui/page-assistant.c
+++ b/
src/ui/gui/page-assistant.c
@@
-20,7
+20,6
@@
#include <errno.h>
#include <fcntl.h>
#include <errno.h>
#include <fcntl.h>
-#include <gtk-contrib/psppire-sheet.h>
#include <gtk/gtk.h>
#include <limits.h>
#include <stdlib.h>
#include <gtk/gtk.h>
#include <limits.h>
#include <stdlib.h>
@@
-46,7
+45,6
@@
#include "ui/gui/psppire-encoding-selector.h"
#include "ui/gui/psppire-empty-list-store.h"
#include "ui/gui/psppire-var-sheet.h"
#include "ui/gui/psppire-encoding-selector.h"
#include "ui/gui/psppire-empty-list-store.h"
#include "ui/gui/psppire-var-sheet.h"
-#include "ui/gui/psppire-var-store.h"
#include "gl/error.h"
#include "gl/intprops.h"
#include "gl/error.h"
#include "gl/intprops.h"
@@
-154,10
+152,15
@@
on_prepare (GtkAssistant *assistant, GtkWidget *page,
{
int pn = gtk_assistant_get_current_page (assistant);
{
int pn = gtk_assistant_get_current_page (assistant);
+ gtk_widget_show (ia->asst.reset_button);
+ gtk_widget_hide (ia->asst.paste_button);
+
if ( ia->spreadsheet)
{
if (pn == 0)
if ( ia->spreadsheet)
{
if (pn == 0)
- prepare_sheet_spec_page (ia);
+ {
+ prepare_sheet_spec_page (ia);
+ }
else if (pn == 1)
{
post_sheet_spec_page (ia);
else if (pn == 1)
{
post_sheet_spec_page (ia);
@@
-178,14
+181,6
@@
on_prepare (GtkAssistant *assistant, GtkWidget *page,
gtk_widget_grab_focus (assistant->apply);
else
gtk_widget_grab_focus (assistant->forward);
gtk_widget_grab_focus (assistant->apply);
else
gtk_widget_grab_focus (assistant->forward);
-
-#if 0
- 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. */
}
/* Called when the Cancel button in the assistant is clicked. */
@@
-211,25
+206,32
@@
on_paste (GtkButton *button, struct import_assistant *ia)
close_assistant (ia, PSPPIRE_RESPONSE_PASTE);
}
close_assistant (ia, PSPPIRE_RESPONSE_PASTE);
}
+static GtkWidget *
+assist_get_page (struct assist_page *ap)
+{
+ if (ap == NULL)
+ return NULL;
+
+ return ap->page;
+}
+
/* Called when the Reset button is clicked. */
static void
on_reset (GtkButton *button, struct import_assistant *ia)
{
/* Called when the Reset button is clicked. */
static void
on_reset (GtkButton *button, struct import_assistant *ia)
{
-#if 0
gint page_num = gtk_assistant_get_current_page (ia->asst.assistant);
GtkWidget *page = gtk_assistant_get_nth_page (ia->asst.assistant, page_num);
gint page_num = gtk_assistant_get_current_page (ia->asst.assistant);
GtkWidget *page = gtk_assistant_get_nth_page (ia->asst.assistant, page_num);
- if (page ==
ia->intro->page
)
+ if (page ==
assist_get_page ((struct assist_page *) ia->intro)
)
reset_intro_page (ia);
reset_intro_page (ia);
- else if (page ==
ia->first_line->page
)
+ else if (page ==
assist_get_page ((struct assist_page *) ia->first_line)
)
reset_first_line_page (ia);
reset_first_line_page (ia);
- else if (page ==
ia->separators->page
)
+ else if (page ==
assist_get_page ((struct assist_page *) ia->separators)
)
reset_separators_page (ia);
reset_separators_page (ia);
- else if (page ==
ia->formats->page
)
+ else if (page ==
assist_get_page ((struct assist_page *) ia->formats)
)
reset_formats_page (ia);
reset_formats_page (ia);
- else if (page ==
ia->sheet_spec->page
)
+ else if (page ==
assist_get_page ((struct assist_page *) ia->sheet_spec)
)
reset_sheet_spec_page (ia);
reset_sheet_spec_page (ia);
-#endif
}
/* Causes the assistant to close, returning RESPONSE for
}
/* Causes the assistant to close, returning RESPONSE for