Commit Graph

321 Commits

Author SHA1 Message Date
Joshua Sled
f5923ae956 Remove FreqSpec.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16387 57a11ea4-9604-0410-9ed3-97b8803252fd
2007-08-05 21:24:16 +00:00
Joshua Sled
1a9a4fb4de Bug#361604: patch from Mike Alexander <mta umich edu> to fix datatype for gnc-date.h to allow ranging negative, which is important in a few places.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16370 57a11ea4-9604-0410-9ed3-97b8803252fd
2007-07-29 16:00:06 +00:00
Christian Stimming
ea0d0c6274 Add warning when overwriting an already installed dirty-callback.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16228 57a11ea4-9604-0410-9ed3-97b8803252fd
2007-06-30 11:38:33 +00:00
Andreas Köhler
dcfda18f7c Revert some qof_instance_get_guid() calls to qof_entity_get_guid().
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
2007-06-25 17:18:28 +00:00
Andreas Köhler
fa28f0e4f0 Avoid a global static variable by using g_list_sort_with_data.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16211 57a11ea4-9604-0410-9ed3-97b8803252fd
2007-06-25 17:18:11 +00:00
Andreas Köhler
4251bd7f84 Return NULL on qof_instance_get_guid(NULL) again, #448853.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16201 57a11ea4-9604-0410-9ed3-97b8803252fd
2007-06-22 17:42:52 +00:00
Andreas Köhler
dfde8ebcb7 Do not register qof backend modules on first load, #433779.
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
2007-06-22 13:31:29 +00:00
Andreas Köhler
0bca303440 Correct use of xmlNodeGetContent in qsf backend module.
Its return value is a char pointer, not a char.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16199 57a11ea4-9604-0410-9ed3-97b8803252fd
2007-06-22 13:31:23 +00:00
Andreas Köhler
c892d648b9 Do not call setlocale &friends from within the file backend library.
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
2007-06-22 13:31:18 +00:00
Andreas Köhler
8c5d2fe40b Avoid stripping the win drive letter on qsf export. Fixes #448900.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16184 57a11ea4-9604-0410-9ed3-97b8803252fd
2007-06-18 21:08:30 +00:00
Andreas Köhler
c24fca6d1e Check for QOF_LIB_DIR environment variable and try to load qof backends from there first.
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
2007-06-01 22:44:33 +00:00
Derek Atkins
b378cd8898 Fix space->tab issue in a Makefile (need tabs, not spaces)
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16113 57a11ea4-9604-0410-9ed3-97b8803252fd
2007-05-20 20:56:19 +00:00
Andreas Köhler
1413a11989 Add some delimiters for parsing CJK dates, #437898.
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
2007-05-13 15:02:40 +00:00
Andreas Köhler
c402307aba Further improve date parsing on Windows. Revert parts of r16049 on Unix.
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
2007-05-12 16:50:49 +00:00
Andreas Köhler
e4b8923fb0 On strptime('%X') and Windows, first translate the time picture to a format spec, cf. #437751.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16071 57a11ea4-9604-0410-9ed3-97b8803252fd
2007-05-11 20:21:18 +00:00
Christian Stimming
439ad78323 Fix memory leak where a free was forgotten
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16058 57a11ea4-9604-0410-9ed3-97b8803252fd
2007-05-06 21:47:16 +00:00
David Hampton
5990e0be74 Fix several problems with the QOF book merge code. Use unique error
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
2007-05-06 00:27:43 +00:00
Andreas Köhler
9f44e3155d Do not use langinfo to determine date format spec, but %x, %X or %c.
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
2007-05-05 21:02:56 +00:00
Andreas Köhler
b9664b2cab Add Windows-specific code to lib/libc/strptime.c to eat %x, %X and %c.
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
2007-05-05 20:44:24 +00:00
David Hampton
9ec864163d Collapse the various "idata" fields into a single field attached to
the QofInstance object.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16042 57a11ea4-9604-0410-9ed3-97b8803252fd
2007-05-03 03:56:31 +00:00
David Hampton
cad2164810 Collapse the various "version" and "version_check" fields into a
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
2007-05-03 02:56:56 +00:00
David Hampton
62dce55fb8 Fix a problem copying a guid from an object to a local variable.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16040 57a11ea4-9604-0410-9ed3-97b8803252fd
2007-05-03 02:56:15 +00:00
David Hampton
285a5216b3 Move QofInstance guid property from its public data structure to its
private data structure.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16039 57a11ea4-9604-0410-9ed3-97b8803252fd
2007-05-02 05:42:41 +00:00
David Hampton
4f6fd1b090 Move QofInstance book properties from its public data structure to its
private data structure.



git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16038 57a11ea4-9604-0410-9ed3-97b8803252fd
2007-05-02 03:18:46 +00:00
David Hampton
7d3c6b9a38 More a large number of the QofInstance properties from the public data
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
2007-05-02 01:57:49 +00:00
David Hampton
fd26e126ec Remove the macro versions of qof_begin_edit and qof_commit_edit_part<x>.
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
2007-04-30 17:06:48 +00:00
David Hampton
ce65024722 Start putting an API in place for access to the members of the
QofInstance object.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16025 57a11ea4-9604-0410-9ed3-97b8803252fd
2007-04-30 05:33:33 +00:00
David Hampton
80a0403ebb Collapse two functions into their only caller. Move a third function
to the same file.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16003 57a11ea4-9604-0410-9ed3-97b8803252fd
2007-04-28 02:40:54 +00:00
David Hampton
2b16fa1f41 Use GNC_TYPE_NUMERIC instead of GNC_NUMERIC.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15967 57a11ea4-9604-0410-9ed3-97b8803252fd
2007-04-21 20:07:23 +00:00
David Hampton
c6a609b8f7 Move more account properties from the public data 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@15921 57a11ea4-9604-0410-9ed3-97b8803252fd
2007-04-18 04:50:34 +00:00
Andreas Köhler
70af105a88 Add qof-gobject.h to qofinclude_HEADERS.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15890 57a11ea4-9604-0410-9ed3-97b8803252fd
2007-04-14 22:30:11 +00:00
Derek Atkins
b15d6171c7 Phil Longstaff's patch to enable gnc_numeric to be a GValue
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15854 57a11ea4-9604-0410-9ed3-97b8803252fd
2007-04-09 23:02:47 +00:00
Derek Atkins
7990568f9b Phil Longstaff's patch to fix a kvp_frame bug.
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
2007-04-09 23:02:33 +00:00
Andreas Köhler
ec22b196e5 Remove unused code for gnc_timet_get_day_{start,end}_gdate from qof.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15850 57a11ea4-9604-0410-9ed3-97b8803252fd
2007-04-09 00:51:45 +00:00
Derek Atkins
18c4cbf122 First step of QOF/Object GObjectification.
- 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
2007-04-07 16:02:27 +00:00
Andreas Köhler
3fc5e23b51 Remove unused functions qof_print_{hours,minutes}_elapsed_buff().
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15845 57a11ea4-9604-0410-9ed3-97b8803252fd
2007-04-06 23:29:56 +00:00
Andreas Köhler
8f8a8a33b1 Remove unused function qof_is_same_day().
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15844 57a11ea4-9604-0410-9ed3-97b8803252fd
2007-04-06 22:59:34 +00:00
Joshua Sled
897633f01b Combine two copies of "dow abbrev[iation]" code.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15837 57a11ea4-9604-0410-9ed3-97b8803252fd
2007-04-06 02:22:29 +00:00
Derek Atkins
8c6e7b8394 Add hooks for the gobject dispose() function so that we can
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
2007-04-05 03:10:26 +00:00
Derek Atkins
b4323dbfcf Get "make check" to work with the gobjectified objects.
- 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
2007-04-05 02:44:47 +00:00
Joshua Sled
4a35a0eac8 unused variable removal.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15801 57a11ea4-9604-0410-9ed3-97b8803252fd
2007-04-04 22:21:38 +00:00
Andreas Köhler
e111fd32b0 Use qof_strftime instead of strftime in the C source code.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15796 57a11ea4-9604-0410-9ed3-97b8803252fd
2007-04-04 18:48:48 +00:00
Andreas Köhler
095c71a5f1 Improve printing of dates and times with non-UTF-8 locales and on Windows.
* 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
2007-04-04 18:48:42 +00:00
Derek Atkins
5bee77e41a get libqof to build using GObject
- 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
2007-04-03 22:30:58 +00:00
Derek Atkins
44103fd12f convert QofInstance to using GObject
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
2007-04-03 13:51:35 +00:00
Derek Atkins
06ec94e59c Hey, look! QofInstance has a GObject.
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
2007-04-03 02:14:13 +00:00
Derek Atkins
12461c5b30 * Merge QofEntity into QofInstance
- QofEntity -> QofInstance
  - qof_entity -> qof_instance
  - QOF_ENTITY -> QOF_INSTANCE
* remove references to instance.entity
* keep qof_entity_init() and qof_entity_release() for now


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/gobject-engine-dev-warlord@15773 57a11ea4-9604-0410-9ed3-97b8803252fd
2007-04-01 22:18:50 +00:00
Derek Atkins
4e43ae10f3 Preparation for QofEntity -> QofInstance:
- 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
2007-04-01 22:18:30 +00:00
Joshua Sled
09d90de350 Unused identifier cleanup.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15718 57a11ea4-9604-0410-9ed3-97b8803252fd
2007-03-15 00:56:52 +00:00
David Hampton
5246632fb4 ISO 8601 requires a four digit year.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15708 57a11ea4-9604-0410-9ed3-97b8803252fd
2007-03-13 01:18:42 +00:00