Commit 9fa9ed14 authored by Andreas J. Guelzow's avatar Andreas J. Guelzow Committed by Andreas J. Guelzow

do not post a cancelled "error" if the workbook has no sheet but we didn't

2003-06-27  Andreas J. Guelzow  <aguelzow@taliesin.ca>

	* src/stf.c (stf_read_workbook): do not post a cancelled "error"
	* src/workbook-view.c (wb_view_new_from_input): if the workbook
	  has no sheet but we didn't have an error, the user must have
	  cancelled
parent fbadc8d9
2003-06-27 Andreas J. Guelzow <aguelzow@taliesin.ca>
* src/stf.c (stf_read_workbook): do not post a cancelled "error"
* src/workbook-view.c (wb_view_new_from_input): if the workbook
has no sheet but we didn't have an error, the user must have
cancelled
2003-07-08 Jody Goldberg <jody@gnome.org>
* src/application.c (gnumeric_application_setup_icons) : add
......
2003-06-27 Andreas J. Guelzow <aguelzow@taliesin.ca>
* src/stf.c (stf_read_workbook): do not post a cancelled "error"
* src/workbook-view.c (wb_view_new_from_input): if the workbook
has no sheet but we didn't have an error, the user must have
cancelled
2003-07-08 Jody Goldberg <jody@gnome.org>
* src/application.c (gnumeric_application_setup_icons) : add
......
2003-06-27 Andreas J. Guelzow <aguelzow@taliesin.ca>
* src/stf.c (stf_read_workbook): do not post a cancelled "error"
* src/workbook-view.c (wb_view_new_from_input): if the workbook
has no sheet but we didn't have an error, the user must have
cancelled
2003-07-08 Jody Goldberg <jody@gnome.org>
* src/application.c (gnumeric_application_setup_icons) : add
......
......@@ -207,13 +207,8 @@ stf_read_workbook (GnmFileOpener const *fo, gchar const *enc,
workbook_recalc (book);
sheet_queue_respan (sheet, 0, SHEET_MAX_ROWS-1);
} else {
/*
* FIXME: we have to set an error somehow so the caller notices
* that we did nothing. This makes it pop up an error message
* which isn't quite right.
*/
gnumeric_error_read (COMMAND_CONTEXT (context),
_("Cancelled"));
/* the user has cancelled */
/* the caller should notice that we have no sheets */
workbook_sheet_detach (book, sheet);
}
......
......@@ -865,6 +865,11 @@ wb_view_new_from_input (GsfInput *input,
if (gnumeric_io_error_occurred (io_context)) {
g_object_unref (G_OBJECT (new_wb));
new_wbv = NULL;
} else if (workbook_sheet_count (new_wb) == 0) {
/* we didn't get a sheet nor an error, */
/* the user must have cancelled */
g_object_unref (G_OBJECT (new_wb));
new_wbv = NULL;
} else {
workbook_recalc (new_wb);
workbook_set_dirty (new_wb, FALSE);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment