gnumeric r16581 - in trunk: . src



Author: mortenw
Date: Tue May 20 00:24:29 2008
New Revision: 16581
URL: http://svn.gnome.org/viewvc/gnumeric?rev=16581&view=rev

Log:
2008-05-19  Morten Welinder  <terra gnome org>

	* src/stf.c (stf_read_workbook_auto_csvtab): Don't assume that the
	command context is a gui.  Fixes #533511.



Modified:
   trunk/ChangeLog
   trunk/NEWS
   trunk/src/stf.c

Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS	(original)
+++ trunk/NEWS	Tue May 20 00:24:29 2008
@@ -15,6 +15,7 @@
 	* Fix AREAS crash.  [#533370]
 	* Fix translation of function description.  [#533193]
 	* Fix R.QPOIS (and related functions) hang.  [#533515]
+	* Fix critical spew.  [#533511]
 
 --------------------------------------------------------------------------
 Gnumeric 1.9.0

Modified: trunk/src/stf.c
==============================================================================
--- trunk/src/stf.c	(original)
+++ trunk/src/stf.c	Tue May 20 00:24:29 2008
@@ -376,15 +376,27 @@
 		workbook_recalc_all (book);
 		sheet_queue_respan (sheet, 0, gnm_sheet_get_max_rows (sheet)-1);
 		if (po->cols_exceeded) {
-/* Using go_cmd_context_error_import will destroy the successfully imported portion */
-/*			go_cmd_context_error_import (GO_CMD_CONTEXT (context), */
-/*						      _("Some columns of data were" */
-/*							" dropped since they exceeded" */
-/*							" the available sheet size.")); */
-			go_gtk_notice_dialog (wbcg_toplevel (WBC_GTK (context->impl)),
-					 GTK_MESSAGE_WARNING,_("Some columns of data were"
-							       " dropped since they exceeded"
-							       " the available sheet size."));
+			const char *msg =
+				_("Some columns of data were"
+				  " dropped since they exceeded"
+				  " the available sheet size.");
+			/*
+			 * Using go_cmd_context_error_import will destroy the
+			 * successfully imported portion.  We ought to have a
+			 * way to issue a warning.
+			 */
+			if (IS_WBC_GTK (context->impl))
+				go_gtk_notice_dialog
+					(wbcg_toplevel (WBC_GTK (context->impl)),
+					 GTK_MESSAGE_WARNING,
+					 msg);
+			else
+				g_warning (msg);
+#if 0
+				go_cmd_context_error_import
+					(GO_CMD_CONTEXT (context),
+					 msg);
+#endif
 		}
 	} else {
 		workbook_sheet_delete (sheet);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]