mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
When the user chooses another default encoding, do not recheck the file for ambiguous words, but rather just resort what has been found before.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@14209 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
63dfe823fd
commit
a922906362
@ -1,3 +1,9 @@
|
||||
2006-05-27 Andreas Köhler <andi5.py@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@ihtfp.com>
|
||||
|
||||
* src/engine/gnc-engine.c: load the qsf backend from the right place.
|
||||
|
@ -141,6 +141,7 @@ static void gxi_data_destroy (GncXmlImportData *data);
|
||||
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 @@ ambiguous_cmp (const ambiguous_type *a, const ambiguous_type *b,
|
||||
}
|
||||
} 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,11 +637,18 @@ gxi_check_file (GncXmlImportData *data)
|
||||
/* 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)
|
||||
{
|
||||
@ -1137,7 +1145,7 @@ gxi_default_enc_combo_changed_cb (GtkComboBox *combo, GncXmlImportData *data)
|
||||
}
|
||||
|
||||
data->default_encoding = curr_enc;
|
||||
gxi_check_file (data);
|
||||
gxi_sort_ambiguous_list (data);
|
||||
gxi_update_string_box (data);
|
||||
gxi_update_conversion_forward (data);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user