[Gnucash-changes] r14209 - gnucash/trunk - When the user chooses another default encoding, do not recheck the file for ambiguous words, but rather just resort what has been found before.

Andreas Köhler andi5 at cvs.gnucash.org
Sat May 27 06:44:51 EDT 2006


Author: andi5
Date: 2006-05-27 06:44:50 -0400 (Sat, 27 May 2006)
New Revision: 14209
Trac: http://svn.gnucash.org/trac/changeset/14209

Modified:
   gnucash/trunk/ChangeLog
   gnucash/trunk/src/gnome-utils/druid-gnc-xml-import.c
Log:
When the user chooses another default encoding, do not recheck the file for ambiguous words, but rather just resort what has been found before.


Modified: gnucash/trunk/ChangeLog
===================================================================
--- gnucash/trunk/ChangeLog	2006-05-26 21:45:10 UTC (rev 14208)
+++ gnucash/trunk/ChangeLog	2006-05-27 10:44:50 UTC (rev 14209)
@@ -1,3 +1,9 @@
+2006-05-27  Andreas Köhler  <andi5.py at gmx.net>
+
+	* src/gnome-utils/druid-gnc-xml-import.c: When the user chooses
+	  another default encoding, do not recheck the file for ambiguous
+	  words, but rather just resort what has been found before.
+
 2006-05-26  Derek Atkins  <derek at ihtfp.com>
 
 	* src/engine/gnc-engine.c: load the qsf backend from the right place.

Modified: gnucash/trunk/src/gnome-utils/druid-gnc-xml-import.c
===================================================================
--- gnucash/trunk/src/gnome-utils/druid-gnc-xml-import.c	2006-05-26 21:45:10 UTC (rev 14208)
+++ gnucash/trunk/src/gnome-utils/druid-gnc-xml-import.c	2006-05-27 10:44:50 UTC (rev 14209)
@@ -141,6 +141,7 @@
 static void gxi_ambiguous_info_destroy (GncXmlImportData *data);
 static void gxi_session_destroy (GncXmlImportData *data);
 static void gxi_check_file (GncXmlImportData *data);
+static void gxi_sort_ambiguous_list (GncXmlImportData *data);
 static gboolean gxi_parse_file (GncXmlImportData *data);
 static gboolean gxi_save_file (GncXmlImportData *data);
 static void gxi_update_progress_bar (const gchar *message, double percentage);
@@ -499,7 +500,7 @@
     }
   } else {
     if (string_b) {
-      /* b looks good, a not. pub a to the top */
+      /* b looks good, a not. put a to the top */
       return -1;
     } else {
       /* both look suboptimal, see whether one has a decision attached to it */
@@ -636,12 +637,19 @@
     /* sort ambiguous words */
     g_hash_table_foreach (data->ambiguous_ht, (GHFunc)ambiguous_list_insert,
                           data);
-    data->ambiguous_list = g_list_sort_with_data (
-      data->ambiguous_list, (GCompareDataFunc) ambiguous_cmp, data);
+    gxi_sort_ambiguous_list (data);
   }
 }
 
 static void
+gxi_sort_ambiguous_list (GncXmlImportData *data)
+{
+  data->ambiguous_list = g_list_sort_with_data (
+    data->ambiguous_list, (GCompareDataFunc) ambiguous_cmp, data);
+
+}
+
+static void
 subst_insert_amb (gchar *byte_sequence, GList *conv_list, GncXmlImportData *data)
 {
   conv_type *choice;
@@ -1137,7 +1145,7 @@
   }
 
   data->default_encoding = curr_enc;
-  gxi_check_file (data);
+  gxi_sort_ambiguous_list (data);
   gxi_update_string_box (data);
   gxi_update_conversion_forward (data);
 }



More information about the gnucash-changes mailing list