src/ui/gui/psppire-output-window.h \
src/ui/gui/psppire-var-view.c \
src/ui/gui/psppire-var-view.h \
+ src/ui/gui/psppire-spreadsheet-model.c \
+ src/ui/gui/psppire-spreadsheet-model.h \
src/ui/gui/psppire-selector.h \
src/ui/gui/psppire-select-dest.c \
src/ui/gui/psppire-select-dest.h \
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);
{
prepare_sheet_spec_page (ia);
}
-
-
-
gtk_widget_show (ia->asst.reset_button);
if (page == ia->formats->page)
if (ia->spreadsheet == NULL)
ia->spreadsheet = gnumeric_probe (file->file_name);
+
+ printf ("%s:%d %p\n", __FILE__, __LINE__, ia->spreadsheet);
if (ia->spreadsheet == NULL)
ia->spreadsheet = ods_probe (file->file_name);
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);
GtkBuilder *builder = ia->asst.builder;
struct formats_page *p = xzalloc (sizeof *p);
+#if 0
p->page = add_page_to_assistant (ia, get_widget_assert (builder, "Formats"),
GTK_ASSISTANT_PAGE_CONFIRM);
+#endif
p->data_tree_view = GTK_TREE_VIEW (get_widget_assert (builder, "data"));
p->modified_vars = NULL;
p->modified_var_cnt = 0;
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");
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");
GtkBuilder *builder = ia->asst.builder;
struct sheet_spec_page *p = xzalloc (sizeof (*p));
- p->page = add_page_to_assistant (ia, get_widget_assert (builder, "Sheet"),
- GTK_ASSISTANT_PAGE_INTRO);
+ GtkWidget *combo_box = get_widget_assert (builder, "sheet-entry");
+ GtkCellRenderer *renderer = gtk_cell_renderer_text_new ();
+ gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo_box), renderer, TRUE);
+ gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combo_box), renderer,
+ "text", 0,
+ NULL);
return p;
}
void
prepare_sheet_spec_page (struct import_assistant *ia)
{
- struct sheet_spec_page *p = ia->sheet_spec;
-
GtkBuilder *builder = ia->asst.builder;
GtkWidget *sheet_entry = get_widget_assert (builder, "sheet-entry");
+ printf ("%s:%d %p\n", __FILE__, __LINE__, ia->spreadsheet);
+ gtk_combo_box_set_model (GTK_COMBO_BOX (sheet_entry),
+ psppire_spreadsheet_model_new (ia->spreadsheet));
- gtk_spin_button_set_digits (GTK_SPIN_BUTTON (sheet_entry), 0);
- gtk_spin_button_set_range (GTK_SPIN_BUTTON (sheet_entry), 1, ia->spreadsheet->sheets);
+ gtk_combo_box_set_active (sheet_entry, 0);
}
GtkWidget *range_entry = get_widget_assert (builder, "cell-range-entry");
GtkWidget *readnames_checkbox = get_widget_assert (builder, "readnames-checkbox");
- gint num = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (sheet_entry));
-
const gchar *range = gtk_entry_get_text (GTK_ENTRY (range_entry));
+ gint num = 0;
if ( num < 1 )
num = 1;
gtk_container_set_border_width (GTK_CONTAINER (window), 10);
// tm = GTK_TREE_MODEL (make_store ());
- combo_box = gtk_combo_box_new_with_model (tm);
+ combo_box = gtk_combo_box_new();
{
GtkCellRenderer *renderer = gtk_cell_renderer_text_new ();
NULL);
}
+ gtk_combo_box_set_model (GTK_COMBO_BOX (combo_box),
+ tm);
gtk_combo_box_set_active (combo_box, 0);
{
GtkWindow *parent_window = GTK_WINDOW (dw);
struct import_assistant *ia = init_assistant (parent_window);
+ GtkBuilder *builder = ia->asst.builder;
struct sheet_spec_page *ssp ;
if (!init_file (ia, parent_window))
ssp = ia->sheet_spec;
+ add_page_to_assistant (ia, get_widget_assert (builder, "Sheet"),
+ GTK_ASSISTANT_PAGE_INTRO);
+
+ add_page_to_assistant (ia, get_widget_assert (builder, "Formats"),
+ GTK_ASSISTANT_PAGE_CONFIRM);
+
+
gtk_widget_show_all (GTK_WIDGET (ia->asst.assistant));
ia->asst.main_loop = g_main_loop_new (NULL, false);
</object>
</child>
</object>
- <object class="GtkAdjustment" id="adjustment1">
- <property name="value">100</property>
- <property name="lower">1</property>
- <property name="upper">100</property>
- <property name="step_increment">1</property>
- <property name="page_increment">10</property>
- </object>
- <object class="GtkAdjustment" id="adjustment2">
- <property name="value">1000</property>
- <property name="upper">100000000</property>
- <property name="step_increment">1</property>
- <property name="page_increment">10</property>
- </object>
- <object class="GtkAdjustment" id="adjustment3">
- <property name="value">1</property>
- <property name="upper">100</property>
- <property name="step_increment">1</property>
- <property name="page_increment">10</property>
- </object>
<object class="GtkWindow" id="Sheet">
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="border_width">12</property>
</packing>
</child>
<child>
- <object class="GtkSpinButton" id="sheet-entry">
+ <object class="GtkComboBox" id="sheet-entry">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="invisible_char">●</property>
- <property name="adjustment">adjustment3</property>
+ <property name="active">0</property>
</object>
<packing>
<property name="left_attach">1</property>