From eea1c3e8d6351725a3879f2ef48c38bde07f1faa Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Sat, 17 Dec 2005 12:07:31 +0000 Subject: gui/widgets/gal-view-minicard.c Use libedataserver's e_xml_parse_file() 2005-12-17 Tor Lillqvist * gui/widgets/gal-view-minicard.c * printing/e-contact-print.c: Use libedataserver's e_xml_parse_file() and e_xml_save_file() instead of calling libxml functions directly, as they don't understand the GLib file name encoding (UTF-8) on Win32. svn path=/trunk/; revision=30800 --- addressbook/ChangeLog | 6 ++++++ addressbook/gui/widgets/gal-view-minicard.c | 12 +++++++++--- addressbook/printing/e-contact-print.c | 16 +++++++++++----- 3 files changed, 26 insertions(+), 8 deletions(-) (limited to 'addressbook') diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index ded8704283..006b60a848 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -5,6 +5,12 @@ wrappers. Use GDir API instead of dirent. Use GLib to convert file names to URIs and back. Open files in binary mode. + * gui/widgets/gal-view-minicard.c + * printing/e-contact-print.c: Use libedataserver's + e_xml_parse_file() and e_xml_save_file() instead of calling libxml + functions directly, as they don't understand the GLib file name + encoding (UTF-8) on Win32. + 2005-12-15 Srinivasa Ragavan * gui/search/e-addressbook-search-dialog.c: (dialog_response): Added diff --git a/addressbook/gui/widgets/gal-view-minicard.c b/addressbook/gui/widgets/gal-view-minicard.c index 05937ea990..3031f31d29 100644 --- a/addressbook/gui/widgets/gal-view-minicard.c +++ b/addressbook/gui/widgets/gal-view-minicard.c @@ -8,10 +8,15 @@ * (C) 2000, 2001 Ximian, Inc. */ #include -#include "gal-view-minicard.h" + #include + +#include + #include +#include "gal-view-minicard.h" + #define PARENT_TYPE gal_view_get_type () #define d(x) x @@ -22,7 +27,8 @@ gal_view_minicard_load (GalView *view, const char *filename) { xmlDoc *doc; - doc = xmlParseFile (filename); + + doc = e_xml_parse_file (filename); if (doc) { xmlNode *root = xmlDocGetRootElement(doc); GAL_VIEW_MINICARD (view)->column_width = e_xml_get_double_prop_by_name_with_default (root, "column_width", 150); @@ -41,7 +47,7 @@ gal_view_minicard_save (GalView *view, root = xmlNewNode (NULL, "EMinicardViewState"); e_xml_set_double_prop_by_name (root, "column_width", GAL_VIEW_MINICARD (view)->column_width); xmlDocSetRootElement(doc, root); - xmlSaveFile(filename, doc); + e_xml_save_file (filename, doc); xmlFreeDoc(doc); } diff --git a/addressbook/printing/e-contact-print.c b/addressbook/printing/e-contact-print.c index a662185838..e233aed5c4 100644 --- a/addressbook/printing/e-contact-print.c +++ b/addressbook/printing/e-contact-print.c @@ -20,13 +20,14 @@ */ #include -#include "e-contact-print.h" #include #include #include #include + #include + #include #include #include @@ -42,9 +43,14 @@ #include #include #include -#include -#include -#include + +#include + +#include "e-util/e-print.h" +#include "e-util/e-util.h" +#include "e-util/e-util-private.h" + +#include "e-contact-print.h" #define SCALE 5 #define HYPHEN_PIXELS 20 @@ -769,7 +775,7 @@ e_contact_build_style(EContactPrintStyle *style, GnomePrintConfig *config) style->right_footer = g_strdup(""); style->reverse_on_even_pages = FALSE; filename = g_concat_dir_and_file(EVOLUTION_ECPSDIR, "medbook.ecps"); - styledoc = xmlParseFile(filename); + styledoc = e_xml_parse_file (filename); g_free(filename); if (styledoc) { xmlNodePtr stylenode = xmlDocGetRootElement(styledoc); -- cgit v1.2.3