- move the #include of g18n.h from gnc-date.h to gnc-date.c
- add gnc-date.c to POTFILES.in
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17250 57a11ea4-9604-0410-9ed3-97b8803252fd
Backends should call this function to make sure they free the kvp frame
for the backend configuration.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17058 57a11ea4-9604-0410-9ed3-97b8803252fd
Prepend terms and reverse once at the end instead of "reverse, prepend,
reverse" for each term.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17001 57a11ea4-9604-0410-9ed3-97b8803252fd
The functions used did not work for non-ascii characters. The new
implementations use g_utf8_casefold and g_utf8_normalize to improve case
insensitive searches and comparisons.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16547 57a11ea4-9604-0410-9ed3-97b8803252fd
Those two functions were merged into one, qof_instance_get_guid(), in
r15773, but they returned different values if the parameter was NULL.
Some code depends on the return value being guid_null(), or maybe even
NULL, so revert the changes entity->instance, where the entity is not
guaranteed to be non-NULL.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16212 57a11ea4-9604-0410-9ed3-97b8803252fd
Qof backend modules used to call qof_backend_register_provider() and
g_module_make_resident() directly in g_module_check_init(), i.e. they
could not be unloaded after the gnucash module crawler detected them.
Probably after the renaming of libgnc-backend-file the QSF backend
module started to register itself before the gnc file backend, spitting
a validation error on virtually every data file load.
So g_module_check_init() has been renamed to qof_backend_module_init()
and is now called by qof_load_backend_library().
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16200 57a11ea4-9604-0410-9ed3-97b8803252fd
The only valid call would be to bindtextdomain, but the library does not
use a different locale directory anyway.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16198 57a11ea4-9604-0410-9ed3-97b8803252fd
This is a minimally invasive way to make qof backends relocatable and
needed for the Windows port. Avoiding qofla-dir.h completely is
probably desirable anyway.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16141 57a11ea4-9604-0410-9ed3-97b8803252fd
On Windows, the short date formats are used, containing standard
delimiters.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16081 57a11ea4-9604-0410-9ed3-97b8803252fd
The recursive parsing of %x by strptime seems to work only for complete
strings, e.g. 4.6. in de_DE or 4/6 in en_UK will not be parsed
correctly. Therefore, readd LANGINFO_D_FMT_CHECK and use
qof_win32_get_time_format(QOF_WIN32_PICTURE_{DATE,TIME,DATETIME} on
Windows for printing and scanning. Make get_win32_locale_string and
translate_win32_picture accessible by QOF.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16073 57a11ea4-9604-0410-9ed3-97b8803252fd
codes in the qof_book_merge_commit() function. Fixes 343730.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16055 57a11ea4-9604-0410-9ed3-97b8803252fd
Remove check for HAVE_LANGINFO_D_FMT. Rather use standard strftime and
(standard?) strptime format specifiers %x (date), %X (time) and %c
(date&time, all in national representation).
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16049 57a11ea4-9604-0410-9ed3-97b8803252fd
Originally, it came from evolution-data-server,
/libedataserver/e-time-utils.c, but was modified to not depend on GLib.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16048 57a11ea4-9604-0410-9ed3-97b8803252fd
single pair of fields attached to the QofInstance object.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16041 57a11ea4-9604-0410-9ed3-97b8803252fd
structure to a private data structure, with access to them as properties
of the object.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16037 57a11ea4-9604-0410-9ed3-97b8803252fd
The function call versions of these routines should be used instead.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16033 57a11ea4-9604-0410-9ed3-97b8803252fd
private data structure, with access to them as properties of the
object.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15921 57a11ea4-9604-0410-9ed3-97b8803252fd
Save the current frame so we know where to build the new one.
BP
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15853 57a11ea4-9604-0410-9ed3-97b8803252fd
- Merge QofEntity into QofInstance
- Derive QofInstance from GObject
- Convert all QofInstance-derived objects to use GObject framework
- renamed qof_instance_init() to qof_instance_init_data()
- removed qof_instance_release() because it's no longer needed
Merge from branches/gobject-engine-dev-warlord (r15827)
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15846 57a11ea4-9604-0410-9ed3-97b8803252fd
migrate each object's "free()" function to a combination of
dispose() and finalize().
(and yes, "make check" still passes all its tests)
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/branches/gobject-engine-dev-warlord@15827 57a11ea4-9604-0410-9ed3-97b8803252fd
- fix a bunch of tests to use the new gobject defs
- make sure we initialize g_type_init() in qof_init()
- fix qofbook's destruction sequence (I broke it earlier)
- use dispose() in QofInstance
- use qof_init() for the business tests.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/branches/gobject-engine-dev-warlord@15826 57a11ea4-9604-0410-9ed3-97b8803252fd
* qof_time_format_from_utf8 converts an strftime format specification
from UTF-8 to the locale encoding
* qof_format_time calls strftime repeatedly with growing allocated
buffers until the result fits into one, or return NULL
* qof_formatted_time_to_utf8 converts the result back to UTF-8
* qof_strftime takes similar arguments to strftime, but in UTF-8
* the conversion functions on Windows are implemented in qof-win32.c to
allow them to use windows.h, as they need wcstombs and mbstowcs
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15795 57a11ea4-9604-0410-9ed3-97b8803252fd
- migrate QofBook to GObject
- move around some typedef to get libqof to build again
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/branches/gobject-engine-dev-warlord@15784 57a11ea4-9604-0410-9ed3-97b8803252fd
note that this breaks the build of this branch, and that the
build will remain broken until each of the objects is converted
over to basic GObject support.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/branches/gobject-engine-dev-warlord@15781 57a11ea4-9604-0410-9ed3-97b8803252fd
Granted, it's not used, yet. But it's there.
Also add some helpful macros for instances.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/gobject-engine-dev-warlord@15778 57a11ea4-9604-0410-9ed3-97b8803252fd
- Convert (QofEntity*)x to QOF_ENTITY(x)
- Move qof_entity_init() and friends into qof_instance and rename
- Move QofEntity contents into QofInstance
(note: this doesn't compile)
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/gobject-engine-dev-warlord@15772 57a11ea4-9604-0410-9ed3-97b8803252fd
Targeted distributions should have goffice packages by now.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15701 57a11ea4-9604-0410-9ed3-97b8803252fd
point directly to their parent and have a simple GList of children.
(The old method was alternating data structures in the form Account,
AccountGroup, Account, AccountGroup, etc.)
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15647 57a11ea4-9604-0410-9ed3-97b8803252fd
We depend on GLib >= 2.8 on Windows in configure.in, so there is no
reason to include unused GLib 2.8 Windows-specific code. Oops. OTOH,
gstdio-2.8.h is needed on Unix.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15549 57a11ea4-9604-0410-9ed3-97b8803252fd
If the return value of pow is not saved in a double but rather used for
other calculations or casts, results can be bad, like pow(10, 2) being
99 instead of 100. Wrap pow and store the return value first before
continuing.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15484 57a11ea4-9604-0410-9ed3-97b8803252fd
Mkstemp is unavailable on Windows and g_rename is preferred. Completes
r15435 on trunk and must not be backported.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15449 57a11ea4-9604-0410-9ed3-97b8803252fd
Remove empty directory lib/glib26. Add lib/glib28 instead with the
necessary sources and headers to have the following functions even on a
GLib 2.6 system (!defined(HAVE_GLIB_2_8))
- g_access, g_chmod,
- g_file_set_contents,
- g_win32_locale_filename_from_utf8.
Make use of them, improving r15429 and r15430.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15445 57a11ea4-9604-0410-9ed3-97b8803252fd
This could be a security issue if someone else, say, makes a symlink
to somewhere else. Instead, create a tempfile and then rename it
into place which is safe against the symlink attack.
Patch by Bill Nottingham <notting@redhat.com>
BP
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15435 57a11ea4-9604-0410-9ed3-97b8803252fd
Replace open, fopen, stat and unlink by their GLib wrappers so that
files on Windows will be handled with the wide character api.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15407 57a11ea4-9604-0410-9ed3-97b8803252fd
Replace opendir, readdir and closedir by their GLib wrappers so that
files on Windows will be retrieved with the wide character api.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15403 57a11ea4-9604-0410-9ed3-97b8803252fd
Ask for GLib 2.6 and GTK+ 2.6. Let the included GOffice 0.0.4 and LibGSF
1.12.3 use their native base dependencies. Remove all #ifdefs and
compatibility code that were necessary to make GnuCash, GOffice and
LibGSF compile on an older setup (GLib 2.4, Pango 1.6, GTK+ 2.4).
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15400 57a11ea4-9604-0410-9ed3-97b8803252fd
Rename libcore-utils to libgnc-core-utils
Rename libgncgnome to libgnc-gnome
Rename libgncmodule to libgnc-module
Rename libgncqof to libgnc-qof
Rename libgnc-backend-file to libgncmod-backend-file
Move libgnc-business-ledger to $prefix/lib
Move libgncqof-backend-qsf to $prefix/lib/gnucash
Move libgncmod-backend-file to $prefix/lib/gnucash
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15321 57a11ea4-9604-0410-9ed3-97b8803252fd
If the GncModule system finds a QofBackendProvider module M before that
has been initialized by QOF, M will register itself with QOF but does
not mark itself as resident, so the module system will unload it again,
leaving bogus pointers in QOF. Now it does.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15320 57a11ea4-9604-0410-9ed3-97b8803252fd
Change it to check_PROGRAMS
use <prog>_CPPFLAGS instead of DEFS -- this works great!
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15302 57a11ea4-9604-0410-9ed3-97b8803252fd