From 86123d436a4f958b084335f0523c7ddd03f10b62 Mon Sep 17 00:00:00 2001 From: John Darrington Date: Tue, 8 Jan 2013 22:13:05 +0100 Subject: [PATCH] Added a bit more to the gui --- src/ui/gui/page-sheet-spec.c | 3 ++- src/ui/gui/text-data-import-dialog.c | 4 +++- src/ui/gui/text-data-import.ui | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/ui/gui/page-sheet-spec.c b/src/ui/gui/page-sheet-spec.c index 249084150c..91ab6e23b2 100644 --- a/src/ui/gui/page-sheet-spec.c +++ b/src/ui/gui/page-sheet-spec.c @@ -101,6 +101,7 @@ post_sheet_spec_page (struct import_assistant *ia) struct dictionary *dict; GtkWidget *sheet_entry = get_widget_assert (builder, "sheet-entry"); + GtkWidget *readnames_checkbox = get_widget_assert (builder, "readnames-checkbox"); gint num = atoi (gtk_entry_get_text (sheet_entry)); @@ -111,7 +112,7 @@ post_sheet_spec_page (struct import_assistant *ia) ssp->opts.sheet_index = num; ssp->sri.file_name = file->file_name; - ssp->sri.read_names = true; + ssp->sri.read_names = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (readnames_checkbox)); ssp->sri.asw = -1; switch (ia->file.type) diff --git a/src/ui/gui/text-data-import-dialog.c b/src/ui/gui/text-data-import-dialog.c index 7aeee411a3..cda83ebb65 100644 --- a/src/ui/gui/text-data-import-dialog.c +++ b/src/ui/gui/text-data-import-dialog.c @@ -289,10 +289,12 @@ generate_syntax (const struct import_assistant *ia) "\n /TYPE=%ss" "\n /FILE=%sq" "\n /SHEET=index %d" + "\n /READNAMES=%ss" ".", (ia->file.type == FTYPE_GNUMERIC) ? "GNM" : "ODS", ia->file.file_name, - ssp->opts.sheet_index); + ssp->opts.sheet_index, + ssp->sri.read_names ? "ON" : "OFF"); } break; diff --git a/src/ui/gui/text-data-import.ui b/src/ui/gui/text-data-import.ui index 080ee5e2c3..d05296a7d7 100644 --- a/src/ui/gui/text-data-import.ui +++ b/src/ui/gui/text-data-import.ui @@ -763,7 +763,7 @@ The selected file contains N lines of text. Only the first M of these will be s - + Use first row as _variable names True True -- 2.30.2