2005-12-17 Tor Lillqvist <tml@novell.com>
* e-xml-utils.c (e_xml_get_child_by_name, e_xml_save_file): Remove
these functions that are now in libedataserver/e-xml-utils.c
* e-xml-utils.h: Include libedataserver/e-xml-utils.h.
svn path=/trunk/; revision=30826
2005-11-26 Tor Lillqvist <tml@novell.com>
* e-menu.c (emph_construct_menu): Use g_get_tmp_dir() instead of
hardcoding /tmp.
* e-util.c (e_strstrcase): Use g_ascii_strncasecmp() instead of
the deprecated g_strncasecmp(). What kinds of strings this
function is supposed to be used on (UTF-8 or some random single-
or multi-byte encoding) is anybody's guess. This function isn't
used in Evolution and should probably go away, though. And this is
one of the files that have a partially duplicated copy in
e-d-s/libedataserver, too, so doubly so.
(e_filename_make_safe): Mark more bytes as unsafe on Win32. Add
comments. This function is really under-specified and weird, one
wonders whether it really does what the author thought it should
do.
(fsync): Add Win32 implementation of fsync().
* e-xml-utils.c (e_xml_get_bool_prop_by_name_with_default): Use
g_ascii_strcasecmp() instead of the deprecated g_strcasecmp(),
especially as we are comparing to literal ASCII strings.
svn path=/trunk/; revision=30684
2005-08-10 Tor Lillqvist <tml@novell.com>
* e-xml-utils.c (e_xml_get_child_by_name_by_lang): Use
g_win32_getlocale() to get locale on Win32. (setlocale() returns
strings like "Swedish_Finland.1252", we want the Unixish "sv_FI"
style.) Fix typo, use the lang parameter and not "lang" string
literal.
svn path=/trunk/; revision=30077
2005-04-29 Tor Lillqvist <tml@novell.com>
Port to Windows, initial commit:
* configure.in: Check for Win32, define Automake conditional
OS_WIN32. Check for regexec() perhaps in separate -lregex, define
REGEX_LIBS if so. Require glib-2.0 >= 2.6 (and thus also gtk+-2.0
>= 2.6) so that we can use the gstdio wrappers for full support of
non-ASCII filenames on Win32. Don't use -D_REENTRANT on Win32, has
ne special meaning.
* gal.pc.in: Require gtk+-2.0 >= 2.6 also here for consistency.
* gal-zip.in: New file, used to build zipfile format distribution
of gal for Win32.
* configure.in
* Makefile.am: Add gal-zip(.in).
* */Makefile.am
* */*.c: Harmonize -I and #include conventions. (Of course, this
hasn't anything to do with Windows porting as such, I just got
carried away...) Use only -I$(top_srcdir). Use paths to gal
headers staring with "gal", except for headers from the same
directory as the .c file, which are included as such. Include all
gal headers using doublequotes. Sort #includes and remove
duplicates and obvious redundancies. Include config.h first
without any HAVE_CONFIG_H, then system headers, then other GNOME
lib headers, than gal's own headers. Just include gtk.h instead of
separate gtk*.h headers. Don't include gi18n.h, include e-i18n.h
to use e_gettext() consistently.
* gal/Makefile.am: Use -no-undefined on Win32 so that libtool
agrees to build a shared library. Because of the bidirectional
dependency between libgal and libgal-a11y we can build libgal-a11y
sanely as a shared library on Win32, so we don't install any
separate libgal-a11y at all. So, on Win32, link the stuff that
goes into libgal-a11y also into libgal. Link with REGEX_LIBS.
* gal/a11y/Makefile.am: See above. Just build a dummy static
libgal-a11y on Win32 (can't convince Automake not to build the
library at all on one platform using Automake ifdef,
apparently). Then (this is a gross hack) explicitly remove the
library after installation in the install-data-local rule.
* gal/e-table/Makefile.am
* gal/e-table/e-table-config.c: Rename ETABLE_GLADEDIR to
GAL_GLADEDIR for consistency.
* gal/e-table/e-cell-date.c: No localtime_r() in Microsoft's C
library, but its localtime() *is* thread-safe.
* gal/e-table/e-cell-text.c
* gal/e-table/e-cell-tree.c
* gal/e-table/e-cell-vbox.c
* gal/e-text/e-text.c
* gal/widgets/e-unicode.c: Remove unnecessary inclusion of gdkx.h.
* gal/e-table/e-cell-tree.c (ect_realize): Instead of the Xlib
macro None (whose value is zero), use the corresponding
zero-valued enums from the appropriate GDK type.
* gal/e-table/e-table-config.c
* gal/e-table/e-table-field-chooser.c
* gal/menus/gal-define-views-dialog.c
* gal/menus/gal-view-instance-save-as-dialog.c
* gal/menus/gal-view-new-dialog.c
* gal/widgets/e-categories-master-list-array.c
* gal/widgets/e-categories-master-list-dialog.c
* gal/widgets/e-categories.c: Use g_build_filename() to construct
pathnames at run-time instead of compile-time. On Windows the
macros GAL_GLADEDIR and GAL_IMAGESDIR expand to function calls, in
order to support installing in a freely chosen location.
* gal/e-table/e-table-item.c
* gal/e-table/e-cell-vbox.c: Instrad of the Xlib GrabSuccess, use
GDK_GRAB_SUCCESS (which has the same value).
* gal/e-table/e-table-specification.c (e_table_specification_load_from_file)
* gal/e-table/e-table.c (e_table_load_specification)
* gal/e-table/e-tree-table-adapter.c (open_file)
* gal/menus/gal-view-instance.c (load_current_view)
* gal/menus/gal-view-instance.c (load_current_view): On Win32,
convert filename to the locale character set before passing to
xmlParseFile() which doesn't use UTF-8 filenames. Use gstdio
wrappers.
* gal/util/Makefile.am: Define GAL_PREFIX as $prefix. Define
GAL_LOCALEDIR, GAL_GLADEDIR and GAL_IMAGESDIR also here for
e-win32-reloc.c. Include e-win32-reloc.c on Win32.
* gal/util/e-iconv.c (e_iconv_init): Use g_win32_getlocale() on
Windows.
* gal/util/e-util.c
* gal/util/e-xml-utils.c: Use g_mkstemp() instead of non-portable
mkstemp(). Use GLib pathname manipulation functions. Use gstdio
wrappers.
* gal/util/e-util-private.h: New file. Contains just Win32 bits
for now that redefine the directory names from the Makefile as
functions calls.
* gal/util/e-win32-reloc.c: New file. Contains a minimal DllMain()
and functions to support freely chosen installation location on
Windows.
* gal/util/e-xml-utils.c: No fsync() in the Microsoft C library.
* gal/windgets/Makefile.am: Add -I$(top_srcdir)/gal for
consistency with the sibling Makefile.am files.
* gal/widgets/e-canvas.c: Instead of the Xlib AlreadyGrabbed, use
GDK_GRAB_ALREADY_GRABBED.
svn path=/trunk/; revision=29249
2003-03-13 Jeffrey Stedfast <fejj@ximian.com>
* gal/util/e-xml-utils.c (e_xml_save_file): Updated to use
xmlDocDumpFormatMemory() so that we get structured xml rather than
just a clump of xml mess.
svn path=/trunk/; revision=20275
2003-01-15 Jeffrey Stedfast <fejj@ximian.com>
* gal/util/e-xml-utils.c (e_xml_save_file): Back to the land of
the living we shall go.
svn path=/trunk/; revision=19482
* gal/util/e-iconv.c: Make locale_charset a char *, not
const char *. Kills a warning in the !HAVE_CODESET case.
(e_iconv_init): No longer need to cast locale_charset to (char *)
while mangling it in the HAVE_CODESET case.
* gal/util/e-xml-utils.c: #include <stdlib.h> for free()
* gal/widgets/e-categories-master-list-array.c: Likewise
svn path=/trunk/; revision=18129
2002-08-07 Jeffrey Stedfast <fejj@ximian.com>
* gal/util/e-xml-utils.c (e_xml_save_file): Do slightly better
error handling for close() and loop until it closes successfully.
svn path=/trunk/; revision=17733
2002-08-06 Jeffrey Stedfast <fejj@ximian.com>
* gal/util/e-xml-utils.c (e_xml_save_file): Changed to handle
saving to a temp file first, this allows us to remove a lot of
duplicate code from everywhere.
svn path=/trunk/; revision=17725
2002-08-06 Jeffrey Stedfast <fejj@ximian.com>
* configure.in: Bumped version to 0.19.99.18
* gal/util/e-xml-utils.c (e_xml_save_file): New convenience
function to save an xmlDocPtr. Replaces xmlSaveFile because
xmlSaveFile isn't dependable.
svn path=/trunk/; revision=17718
2002-04-26 Christopher James Lahey <clahey@ximian.com>
* gal/util/e-util.h (E_ASCII_DTOSTR_BUF_SIZE): Use DBL_DIG to
compute how much buffer space to use here.
* gal/util/e-xml-utils.c (e_xml_set_double_prop_by_name): Use
DBL_DIG here to decide how many digits to print.
svn path=/trunk/; revision=16604
* gal/util/e-xml-utils.c: #include <parser.h> and <xmlmemory.h>
instead of <gnome-xml/parser.h> and <gnome-xml/xmlmemory.h>. In
fact, the latter is incompatible with what `gnome-config --cflags
xml' is assuming, and breaks in the case where gnome-xml is not
installed in /usr/local.
svn path=/trunk/; revision=16424
2001-10-06 Christopher James Lahey <clahey@ximian.com>
* gal/util/e-util.c, gal/util/e-util.h (e_flexible_strtod): New
function that parses a string as a double either in the C locale
or the current locale.
(e_ascii_dtostr): New function that saves a double as a string as
it would be saved in the C locale.
* gal/util/e-xml-utils.c
(e_xml_get_double_prop_by_name_with_default): Use
e_flexible_strtod here.
(e_xml_set_double_prop_by_name): Use e_ascii_dtostr here.
svn path=/trunk/; revision=13479
2001-04-10 Christopher James Lahey <clahey@ximian.com>
* gal/widgets/e-unicode.c, gal/widgets/e-unicode.h
(e_xml_get_translated_utf8_string_prop_by_name): New function to
translate a string and then convert it to utf8. Acts just like
e_xml_get_translated_string and then calls
e_utf_from_locale_string on it.
* gal/util/e-xml-utils.c: Changed e_xml_get_translated_string to
take a string with no underscore at the beginning and search for
both that prop and the same prop with the underscore prepended.
If it finds it without the underscore, it returns it. If it finds
it with the underscore, it translates.
* gal/util/e-xml-utils.c, gal/util/e-xml-utils.h: Reformatted
these a bit.
svn path=/trunk/; revision=9216
(woohoo!):
2001-04-05 Gediminas Paulauskas <menesis@delfi.lt>
* gal/widgets/e-popup-menu.c: Copied gnome_app_helper_gettext function
here, and use it for translating menu names (they are passed from app as
well as from gal in arrays with N_(), and domains differ).
svn path=/trunk/; revision=9190
2001-04-04 Christopher James Lahey <clahey@ximian.com>
* gal/e-text/e-text-model-uri.c, gal/e-text/e-text.c,
gal/e-text/e-text.h, gal/e-text/e-text-event-processor.c,
gal/util/e-xml-utils.c, gal/widgets/e-cursors.c,
gal/widgets/e-cursors.h: Fixed headers. Moved the .h associated
with each .c to the top of the list of included files.
* gal/util/e-util.h: Removed the bonobo-xobject.h header here.
* gal/util/e-xml-utils.c: Replaced strcasecmp with g_strcasecmp.
* gal/widgets/e-canvas-vbox.c: Make this work even if the item is
destroyed after the vbox.
* gal/widgets/e-categories.c (do_parse_categories): Made this
translate using e_utf8_from_locale string as it should.
svn path=/trunk/; revision=9175
2001-03-11 Timur Bakeyev <timur@gnu.org>
* gal/util/e-xml-utils.c: Added condition and fallback to LC_CTYPE
if system doesn't define LC_MESSAGES. Usage of LC_CTYPE to determine
language is hackish and questionable, then... Still, gives nice re-
sults if there is no other ways to get that value.
svn path=/trunk/; revision=8632
2001-02-05 Christopher James Lahey <clahey@helixcode.com>
* gal/util/e-xml-utils.c: Rearranged the includes here a bit.
svn path=/trunk/; revision=7969
* gal/util/e-i18n.h: Don't #define __GNOME_I18N_H__ if it's already
defined.
*gal/util/e-xml-utils.c:
Functions moved from Gnumeric:
e_xml_get_child_by_name_by_lang_list,
e_xml_get_child_by_name_by_lang_list_with_score (static),
e_xml_get_child_by_name_no_lang.
New functions (for completness):
e_xml_get_integer_prop_by_name_with_default,
e_xml_get_string_prop_by_name_with_default,
e_xml_get_uint_prop_by_name,
e_xml_get_uint_prop_by_name_with_default,
e_xml_set_uint_prop_by_name.
Now every e_xml_get_*_prop_by_name function just calls
e_xml_get_*_prop_by_name_with_default with some sensible default
value.
Formatting fixes here and there.
svn path=/trunk/; revision=7874
2001-01-21 Christopher James Lahey <clahey@helixcode.com>
* gal/util/e-xml-utils.c, gal/util/e-xml-utils.h: Added function
e_xml_get_bool_prop_by_name_with_default.
svn path=/trunk/; revision=7675
This fixes translations of library messages compared to application messages.
2001-01-17 Miguel de Icaza <miguel@gnu.org>
* po/POTFILES.in: update.
* gal/widgets/color-palette.c: use e-i18n.h
* gal/util/e-i18n.h: Avoid inclussion of the GNOME i18n file as we
provide our own.
2001-01-17 Miguel de Icaza <miguel@gnu.org>
* e-table-header-item.c: Use e-i18n.h here.
* e-table.c (et_col_spec_to_col): Use gettext here.
(et_real_construct): Use gettext too.
(et_col_spec_to_col): Use gettext here.
* e-cell-date.c: Use e-i18n.h here.
* e-table-config.c (config_sort_info_update): Simplify column
grabbing code and drop item layout code.
(config_group_info_update): ditto.
* e-table-config.c: Get correct translation setup working.
2001-01-17 Miguel de Icaza <miguel@gnu.org>
* e-group-bar.c: Use e-i18n.h
svn path=/trunk/; revision=7565
2000-10-11 Christopher James Lahey <clahey@helixcode.com>
* gal/util/e-util.c: Included a missing #include.
* gal/util/e-xml-utils.c, gal/util/e-xml-utils.h: Added
e_xml_get_bool_prop_by_name, e_xml_set_bool_prop_by_name, and
e_xml_get_translated_string_prop_by_name. Reindented prototypes.
svn path=/trunk/; revision=5835
2000-05-16 Christopher James Lahey <clahey@helixcode.com>
* e-xml-utils.c: xmlGetProp appears to return malloced memory.
Thus we must free it.
svn path=/trunk/; revision=3087
2000-02-24 Christopher James Lahey <clahey@helixcode.com>
* e-util/e-xml-utils.c, e-util/e-xml-utils.h: Added
e_xml_get_integer_prop_by_name.
* e-util/Makefile.am: Added e-util.c.
* e-util/e-util.h: Added e-util.c functions.
* e-util/e-util.c: New file for compare functions
from mail:
2000-02-24 Christopher James Lahey <clahey@helixcode.com>
* message-list.c: Changed to match new e_table_simple interface.
svn path=/trunk/; revision=1931