Commit Graph

389 Commits

Author SHA1 Message Date
Charles Day
399a1eb989 Add a new function to the gnc_numeric library that converts denominators to exact powers of ten.
BP


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17421 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-07-27 15:33:23 +00:00
Derek Atkins
ef25c17cd4 Get GnuCash building again.
- 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
2008-06-24 23:28:31 +00:00
Charles Day
fe554f7fd9 Bug #532405: Make the default strftime format use %#d instead of %e on win32 platforms.
BP


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17249 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-06-24 22:28:40 +00:00
Charles Day
669470ad48 Bug #539829: Make sure msg gets assigned before it can get dereferenced.
BP


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17248 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-06-24 22:08:12 +00:00
Phil Longstaff
3370604c8d Fix memory leak in qof_session_save() - "msg" is never freed.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17228 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-06-13 00:21:35 +00:00
Derek Atkins
8d532f650c Match NULL and guid_null() for NULL GUID Matches
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17160 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-05-17 17:46:40 +00:00
Andreas Köhler
733d0dfe70 Fix two memory leaks in QOF. Add qof_backend_destroy().
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
2008-03-29 01:20:01 +00:00
Andreas Köhler
7d5e0985f4 A few doxygen fixes.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17041 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-03-23 00:01:05 +00:00
Andreas Köhler
a53fecde93 Pass better size parameter to qof_strftime() to make use of whole buffer.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17005 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-03-04 00:20:07 +00:00
Andreas Köhler
2cbd6ccdd6 Improve performance of qof_query_invert().
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
2008-03-02 22:12:00 +00:00
Andreas Köhler
5d303b9c2d #506074: Handle fractional timezone offsets correctly in gnc_timespec_to_iso8601_buff().
Patch from Daniel Harding
BP


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16776 57a11ea4-9604-0410-9ed3-97b8803252fd
2007-12-31 13:52:24 +00:00
Andreas Köhler
e576797c0f Fix a few automake warnings.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16770 57a11ea4-9604-0410-9ed3-97b8803252fd
2007-12-30 18:34:08 +00:00
Phil Longstaff
0ed4af2ef1 Make some parameters const
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16764 57a11ea4-9604-0410-9ed3-97b8803252fd
2007-12-29 19:40:28 +00:00
Andreas Köhler
9c1785f933 Fix two memory leaks.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16756 57a11ea4-9604-0410-9ed3-97b8803252fd
2007-12-28 21:44:25 +00:00
Andreas Köhler
15039eaaa9 Remove deprecated qof wrappers.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16579 57a11ea4-9604-0410-9ed3-97b8803252fd
2007-11-03 01:56:28 +00:00
Andreas Köhler
a6839478a4 Merge csv-import branch back into trunk.
configure.in                                       |    2
 lib/Makefile.am                                    |    4
 lib/stf/Makefile.am                                |   13
 lib/stf/README                                     |    2
 lib/stf/stf-parse.c                                | 1414 +++++++++++++++++++++
 lib/stf/stf-parse.h                                |  112 +
 src/bin/gnucash-bin.c                              |    1
 src/import-export/Makefile.am                      |    4
 src/import-export/csv/Makefile.am                  |   59
 src/import-export/csv/example-file.csv             |    4
 src/import-export/csv/gnc-csv-gnumeric-popup.c     |  194 ++
 src/import-export/csv/gnc-csv-gnumeric-popup.h     |   78 +
 src/import-export/csv/gnc-csv-import.c             | 1173 +++++++++++++++++
 src/import-export/csv/gnc-csv-import.h             |   33
 src/import-export/csv/gnc-csv-model.c              | 1199 +++++++++++++++++
 src/import-export/csv/gnc-csv-model.h              |  122 +
 src/import-export/csv/gnc-csv-preview-dialog.glade |  496 +++++++
 src/import-export/csv/gnc-csv2glist.c              |  187 --
 src/import-export/csv/gnc-csv2glist.h              |   39
 src/import-export/csv/gnc-plugin-csv-ui.xml        |   11
 src/import-export/csv/gnc-plugin-csv.c             |  160 ++
 src/import-export/csv/gnc-plugin-csv.h             |   60
 src/import-export/csv/gncmod-csv-import.c          |   91 +
 23 files changed, 5228 insertions(+), 230 deletions(-)


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16561 57a11ea4-9604-0410-9ed3-97b8803252fd
2007-10-12 22:51:34 +00:00
Andreas Köhler
fcfb7bdb95 #438360: Replace str{,n}casestr and strcasecmp by qof_utf8_{substr_nocase,strcasecmp}.
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
2007-10-03 01:18:13 +00:00
Joshua Sled
86f3842984 Move g_strdup inside of set_log_level to be a slightly better citizen and fix a serious bug. :/
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16402 57a11ea4-9604-0410-9ed3-97b8803252fd
2007-08-08 04:19:22 +00:00
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
Andreas Köhler
5400c53b2a Drop internal copies of libgsf and goffice.
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
2007-03-09 19:26:03 +00:00
David Hampton
6fbada92ec Remove all traces of the AccountGroup data structure. Accounts now
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
2007-02-23 01:23:31 +00:00
Joshua Sled
016afcf3da More doc updates.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15579 57a11ea4-9604-0410-9ed3-97b8803252fd
2007-02-14 01:34:02 +00:00
Joshua Sled
41e5b3540f Update qoflog documentation.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15576 57a11ea4-9604-0410-9ed3-97b8803252fd
2007-02-14 00:59:40 +00:00
Joshua Sled
5cc69350f4 Better handling of NULL filename.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15556 57a11ea4-9604-0410-9ed3-97b8803252fd
2007-02-10 20:05:56 +00:00
Joshua Sled
ff3405f4c8 Fix parsing of log config file without [output] sections.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15553 57a11ea4-9604-0410-9ed3-97b8803252fd
2007-02-10 18:52:39 +00:00
Joshua Sled
1e1077078f use correct datatype.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15552 57a11ea4-9604-0410-9ed3-97b8803252fd
2007-02-10 16:28:24 +00:00
Andreas Köhler
6eeefe21e3 Remove lib/glib28/gwin32-2.8.[ch] again.
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
2007-02-10 13:15:52 +00:00
Joshua Sled
8ebec0de11 Support for ~/.gnucash/log.conf, a key-value file of logging settings; see comment-doc for qof_log_parse_log_config(...) for the file format.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15545 57a11ea4-9604-0410-9ed3-97b8803252fd
2007-02-10 01:29:29 +00:00
Joshua Sled
f9863e3ba9 Add G_LOG_DOMAIN for qof.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15544 57a11ea4-9604-0410-9ed3-97b8803252fd
2007-02-10 01:28:10 +00:00
Joshua Sled
d372dbb81a Restore enter/leave indentation. Cleanup some deprecated and (nearly-)unused qoflog code. Audit fraction enter/leave pairs. :/
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15539 57a11ea4-9604-0410-9ed3-97b8803252fd
2007-02-09 21:52:09 +00:00
Joshua Sled
c91cb881bd Overhaul gnc/qof logging: Add default log handler that implements a "log4x"-style log level hierarchy. Correctly use G_LOG_DOMAIN, raw glib logging. Cleanup tests that are too loud afterwards.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15537 57a11ea4-9604-0410-9ed3-97b8803252fd
2007-02-09 17:35:00 +00:00
Joshua Sled
b39d84252c Remove basically-unused qof date manipulation code better provided by GDate.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15499 57a11ea4-9604-0410-9ed3-97b8803252fd
2007-02-04 16:50:27 +00:00
Andreas Köhler
c71c7ecd24 Add lib/libc/pow.h to avoid calculation errors on Windows.
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
2007-02-01 01:08:05 +00:00
Derek Atkins
9160a39948 Make sure we properly add the glib28 sources to EXTRA_DIST
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15450 57a11ea4-9604-0410-9ed3-97b8803252fd
2007-01-28 14:13:27 +00:00
Andreas Köhler
f0d6aab958 Replace mkstemp and rename by g_mkstemp and g_rename.
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
2007-01-28 13:40:54 +00:00
David Hampton
0927d97115 Fix glib28 utils on non-win32 system.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15447 57a11ea4-9604-0410-9ed3-97b8803252fd
2007-01-28 06:19:45 +00:00
Andreas Köhler
5d79c1a22f Add a few functions from GLib 2.8 in lib/glib28.
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
2007-01-28 05:13:54 +00:00
Derek Atkins
a929bcdf33 /tmp/qof.trace or /tmp/gnucash.trace is opened for writing directly.
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
2007-01-28 03:16:39 +00:00
Andreas Köhler
5c126dea86 Use g_open, g_fopen, g_stat and g_unlink.
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
2007-01-21 16:38:42 +00:00
Andreas Köhler
6783775210 Use g_dir_{open,read_name,close}.
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
2007-01-20 18:37:35 +00:00
Andreas Köhler
35f43c0a1a Raise dependencies: GLib 2.6, Pango 1.8, GTK+ 2.6.
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
2007-01-20 15:21:35 +00:00
Andreas Köhler
b34a1c9f3f Unify library names and installation directories.
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
2007-01-07 07:04:23 +00:00
Andreas Köhler
96e1ed071d Call g_module_make_resident in qof backend provider modules.
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
2007-01-07 07:04:17 +00:00
Derek Atkins
7a763898d3 Use G_GINT64_MODIFIER for qofmath test.
Fixes the problem Andreas noticed on amd64.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15304 57a11ea4-9604-0410-9ed3-97b8803252fd
2007-01-03 00:12:19 +00:00
Derek Atkins
d122eddbb6 Fix the printf routines in the qofmath tests.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15303 57a11ea4-9604-0410-9ed3-97b8803252fd
2007-01-02 18:37:16 +00:00
Derek Atkins
078d3d0cd8 Uncomment the test-qofmath to make it easier to use.
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
2007-01-02 18:00:13 +00:00
Christian Stimming
def1a50c61 For convenience, add commented-out build rules for testing the qofmath128 test program
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15301 57a11ea4-9604-0410-9ed3-97b8803252fd
2007-01-02 17:26:18 +00:00
Christian Stimming
bf3e8f4c1b Make math128 test program compilable again
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15300 57a11ea4-9604-0410-9ed3-97b8803252fd
2007-01-02 17:18:19 +00:00
Christian Stimming
320c1af625 Code cleanup: Move variable declaration into block where it is used.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15209 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-12-12 11:34:42 +00:00
Christian Stimming
a95ff05967 Check for return value of regcomp() and return NULL on failure, as suggested by Jon Arney.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15208 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-12-12 11:33:03 +00:00
Andreas Köhler
47f406a9b7 Fix some printf's of NULL in DEBUG, ENTER and LEAVE macro invocations.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15188 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-12-06 20:03:30 +00:00