[gnumeric] avoid major problems due to gconf bug #641807



commit acb8d024fccacb44a4610cfc07870f7bae91e997
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date:   Mon Feb 7 23:20:42 2011 -0700

    avoid major problems due to gconf bug #641807
    
    2011-02-07  Andreas J. Guelzow <aguelzow pyrshep ca>
    
    	* schemas/gnumeric-dialogs.schemas.in
    	(/apps/gnumeric/stf/export/terminator): use escape
    	* src/stf-export.c (gnm_stf_get_stfe): do not leave the terminator
    	as "" (this could happen due to gconf bug #641807)

 ChangeLog                           |    7 +++++++
 schemas/gnumeric-dialogs.schemas.in |    3 +--
 src/stf-export.c                    |    5 +++++
 3 files changed, 13 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 7520d09..bb5b724 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-02-07  Andreas J. Guelzow <aguelzow pyrshep ca>
+
+	* schemas/gnumeric-dialogs.schemas.in 
+	(/apps/gnumeric/stf/export/terminator): use escape
+	* src/stf-export.c (gnm_stf_get_stfe): do not leave the terminator
+	as "" (this could happen due to gconf bug #641807)
+	
 2011-02-07  Jean Brefort  <jean brefort normalesup org>
 
 	* src/item-edit.c (item_edit_button_pressed), (item_edit_motion): fix
diff --git a/schemas/gnumeric-dialogs.schemas.in b/schemas/gnumeric-dialogs.schemas.in
index 839e4fc..04ad35a 100644
--- a/schemas/gnumeric-dialogs.schemas.in
+++ b/schemas/gnumeric-dialogs.schemas.in
@@ -581,8 +581,7 @@
         <applyto>/apps/gnumeric/stf/export/terminator</applyto>
         <owner>Gnumeric</owner>
         <type>string</type>
-	<default>
-</default>
+	<default>&#10;</default>
         <locale name="C">
         <short>Text Export Record Terminator</short>
         <long>Please use the Text Export dialog to edit this value.</long>
diff --git a/src/stf-export.c b/src/stf-export.c
index f5f26c1..1c5605b 100644
--- a/src/stf-export.c
+++ b/src/stf-export.c
@@ -603,6 +603,11 @@ gnm_stf_get_stfe (GObject *obj)
 		const char * string_indicator = gnm_conf_get_stf_export_stringindicator ();
 		const char * terminator = gnm_conf_get_stf_export_terminator ();
 		GString *triggers = g_string_new (NULL);
+
+		/* Workaround GConf bug #641807. */
+		if (terminator == NULL || strlen (terminator) == 0)
+			terminator = "\n";
+
 		g_string_append (triggers, " \t");
 		g_string_append (triggers, terminator);
 		g_string_append (triggers, string_indicator);



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