From 86c90c049e0f4d793c38c6dd239e1bb0b1aeff5f Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Sun, 18 Dec 2005 10:21:24 +0000 Subject: Use g_ascii_strcasecmp() instead of g_strcasecmp(). This function handles 2005-12-18 Tor Lillqvist * e-table-config.c (find_model_column_by_name): Use g_ascii_strcasecmp() instead of g_strcasecmp(). This function handles the English column names. * e-table-specification.c (e_table_specification_load_from_file) * e-table-state.c (e_table_state_load_from_file): Use e_xml_parse_file(). svn path=/trunk/; revision=30867 --- widgets/table/ChangeLog | 10 ++++++++++ widgets/table/e-table-config.c | 2 +- widgets/table/e-table-specification.c | 15 +++------------ widgets/table/e-table-state.c | 8 ++++---- 4 files changed, 18 insertions(+), 17 deletions(-) diff --git a/widgets/table/ChangeLog b/widgets/table/ChangeLog index 862f334bb5..b7f82c7f59 100644 --- a/widgets/table/ChangeLog +++ b/widgets/table/ChangeLog @@ -1,3 +1,13 @@ +2005-12-18 Tor Lillqvist + + * e-table-config.c (find_model_column_by_name): Use + g_ascii_strcasecmp() instead of g_strcasecmp(). This function + handles the English column names. + + * e-table-specification.c (e_table_specification_load_from_file) + * e-table-state.c (e_table_state_load_from_file): + Use e_xml_parse_file(). + 2005-12-17 Tor Lillqvist * Makefile.am: Link with bootstrap libs on Win32. Use diff --git a/widgets/table/e-table-config.c b/widgets/table/e-table-config.c index cefd5f3491..7923a21d9a 100644 --- a/widgets/table/e-table-config.c +++ b/widgets/table/e-table-config.c @@ -181,7 +181,7 @@ find_model_column_by_name (ETableSpecification *spec, const char *s) if ((*column)->disabled) continue; - if (g_strcasecmp ((*column)->title, s) == 0) + if (g_ascii_strcasecmp ((*column)->title, s) == 0) return (*column)->model_col; } return -1; diff --git a/widgets/table/e-table-specification.c b/widgets/table/e-table-specification.c index 9d2e24b09a..dca17e1bd1 100644 --- a/widgets/table/e-table-specification.c +++ b/widgets/table/e-table-specification.c @@ -31,6 +31,8 @@ #include #include +#include + #include "e-util/e-util.h" #include "e-util/e-xml-utils.h" @@ -131,18 +133,7 @@ e_table_specification_load_from_file (ETableSpecification *specification, { xmlDoc *doc; - if (!g_file_test (filename, G_FILE_TEST_EXISTS)) - return FALSE; - -#ifdef G_OS_WIN32 - { - gchar *locale_filename = g_win32_locale_filename_from_utf8 (filename); - doc = xmlParseFile (locale_filename); - g_free (locale_filename); - } -#else - doc = xmlParseFile (filename); -#endif + doc = e_xml_parse_file (filename); if (doc) { xmlNode *node = xmlDocGetRootElement (doc); e_table_specification_load_from_node (specification, node); diff --git a/widgets/table/e-table-state.c b/widgets/table/e-table-state.c index 1cb9e369c7..e21db9707c 100644 --- a/widgets/table/e-table-state.c +++ b/widgets/table/e-table-state.c @@ -29,6 +29,8 @@ #include #include +#include + #include "e-util/e-util.h" #include "e-util/e-xml-utils.h" @@ -120,10 +122,7 @@ e_table_state_load_from_file (ETableState *state, { xmlDoc *doc; - if (!g_file_test (filename, G_FILE_TEST_EXISTS)) - return FALSE; - - doc = xmlParseFile (filename); + doc = e_xml_parse_file (filename); if (doc) { xmlNode *node = xmlDocGetRootElement(doc); e_table_state_load_from_node(state, node); @@ -138,6 +137,7 @@ e_table_state_load_from_string (ETableState *state, const char *xml) { xmlDoc *doc; + doc = xmlParseMemory ((char *) xml, strlen(xml)); if (doc) { xmlNode *node = xmlDocGetRootElement(doc); -- cgit v1.2.3