aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTor Lillqvist <tml@novell.com>2005-12-18 18:21:24 +0800
committerTor Lillqvist <tml@src.gnome.org>2005-12-18 18:21:24 +0800
commit86c90c049e0f4d793c38c6dd239e1bb0b1aeff5f (patch)
treed86ffa9f2a1cb1bd3f0804b6387a172b7b042201
parentfc17a49138e2134bf14816950fd764f21f08df34 (diff)
downloadgsoc2013-evolution-86c90c049e0f4d793c38c6dd239e1bb0b1aeff5f.tar
gsoc2013-evolution-86c90c049e0f4d793c38c6dd239e1bb0b1aeff5f.tar.gz
gsoc2013-evolution-86c90c049e0f4d793c38c6dd239e1bb0b1aeff5f.tar.bz2
gsoc2013-evolution-86c90c049e0f4d793c38c6dd239e1bb0b1aeff5f.tar.lz
gsoc2013-evolution-86c90c049e0f4d793c38c6dd239e1bb0b1aeff5f.tar.xz
gsoc2013-evolution-86c90c049e0f4d793c38c6dd239e1bb0b1aeff5f.tar.zst
gsoc2013-evolution-86c90c049e0f4d793c38c6dd239e1bb0b1aeff5f.zip
Use g_ascii_strcasecmp() instead of g_strcasecmp(). This function handles
2005-12-18 Tor Lillqvist <tml@novell.com> * 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
-rw-r--r--widgets/table/ChangeLog10
-rw-r--r--widgets/table/e-table-config.c2
-rw-r--r--widgets/table/e-table-specification.c15
-rw-r--r--widgets/table/e-table-state.c8
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 <tml@novell.com>
+
+ * 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 <tml@novell.com>
* 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 <libxml/parser.h>
#include <libxml/xmlmemory.h>
+#include <libedataserver/e-xml-utils.h>
+
#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 <libxml/parser.h>
#include <libxml/xmlmemory.h>
+#include <libedataserver/e-xml-utils.h>
+
#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);