Commit Graph

2755 Commits

Author SHA1 Message Date
Christian Stimming
dfc294652d MSVC compatibility: Always initialize all members of the QofObject struct.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18954 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-22 21:14:38 +00:00
John Ralls
bab6eb9072 Fixup binreloc, which wasn't working correctly on OSX
Most changes are to rename the functions named gbr_* to gnc_gbr_*, so
that our modified binreloc (to provide mac bundle support) doesn't
collide with binreloc implementations in other libraries. (The instant
case was in libenchant.)

Also moved the IGE_MAC_CFLAGS and IGE_MAC_LIBS lines from
engine/Makefile.am to core-utils/Makefile.am. This was missed when
binreloc was moved.

And last, there was a minor error in the original OSX binreloc patch:
At line 68, #elif MAC_INTEGRATION should be (and now is) #elif defined
MAC_INTEGRATION.



git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18940 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-21 00:40:24 +00:00
Christian Stimming
59be2dc692 Add getter/setter for transaction posted-date as a GDate.
In addition to the known timespec, the date is also stored
as a kvp_value of TYPE_GDATE so that we know afterwards this
date has really been set as a date.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18925 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-17 19:23:40 +00:00
Christian Stimming
0b7b3cf6a1 Add a GDate kvp_value type including conversions from and to all sorts of thingys.
Also, removed the default: switch clauses when handling a
kvp_value so that the compiler will already complain about
unhandled enum values.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18924 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-17 19:23:20 +00:00
Christian Stimming
ab1b493e2e Revert r18869, "Move gnc-ui-util.[hc] and gnc-euro.[hc] from app-utils to engine"
Those files indeed belong better into app-utils; the app-utils defines
several not-yet-GUI parts of gnucash, like many conversions from and to
strings (more than those in these two files), so these files are well
suited in here.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18908 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-14 21:10:26 +00:00
Christian Stimming
eba463bb30 Add src/calculation and src/app-utils to cmake build system.
app-utils is needed for the conversion from and to string
for gnc_numeric, date, and other values.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18905 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-14 21:01:32 +00:00
Geert Janssens
f099591e31 More doxygen.log-prompted typo fixes, patch by Jesse Weinstein
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18900 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-13 13:16:02 +00:00
Christian Stimming
c3f2cb1189 Remove some unused variables.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18877 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-08 18:49:08 +00:00
Christian Stimming
1efdb1a6c6 Win32/MSVC compatiblity
- Replace trunc() by floor()
 - Provide a round() workaround implementation for MSVC
 - Use g_strcasecmp instead of the libc one
 - Add include for libc replacements

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18876 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-08 18:48:44 +00:00
Christian Stimming
e42a405785 Some more const-correctness in engine functions.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18873 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-07 21:28:15 +00:00
Christian Stimming
190f7bac1a Cutecash: Add gnc::Numeric wrapper for gnc_numeric.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18871 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-07 21:27:38 +00:00
Christian Stimming
0055b6f2f8 Move gnc-ui-util.[hc] and gnc-euro.[hc] from app-utils to engine because they don't depend on gtk but are important additions for the engine types.
In particular, the formatting of a gnc_numeric is defined there.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18869 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-07 20:30:08 +00:00
Christian Stimming
9eff25ed38 Add variant of gnc_engine_init which is suitable for statically the linked-in library.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18863 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-07 12:54:33 +00:00
Phil Longstaff
c38ed298a9 Fix Bug 611810 - GC crashes when I click on File -> Properties
SCM files still refered to gnc-book-get-slots which had been removed.  gnc-book-get-slots was replaced everywhere by qof-book-get-slots.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18859 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-06 20:35:16 +00:00
Christian Stimming
31fe219109 Cutecash: Fix CMakeLists for change in guile lookup, r18846
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18849 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-06 11:00:54 +00:00
Geert Janssens
2b2f1ac001 Move filepath related tests to core-utils/test
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18829 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-04 22:13:58 +00:00
Geert Janssens
98bfef5845 Remove gncmod-test from test-core
It's not used and prevents test-core from being included in core-utils tests

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18826 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-04 22:03:42 +00:00
John Ralls
5cedef8da8 Removed erroneously re-created src/engine/gnc-filepath-utils.c
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18823 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-04 21:20:28 +00:00
Geert Janssens
fbf05a2522 Move binreloc library include
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18821 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-04 20:53:21 +00:00
Christian Stimming
1bf6bd2e38 Add missing link library after r18811.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18818 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-04 20:04:15 +00:00
Christian Stimming
2d045b67ae Adapt cmake to the file move in r18811.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18817 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-04 19:50:45 +00:00
John Ralls
870aed7740 Add src/engine/test/test-resolve-url
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18816 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-04 19:21:52 +00:00
Christian Stimming
dffacfefc7 Finish cmake build system for the C++ experiment.
To build this:

mkdir build-cpp
cd build-cpp
cmake ..
make
./src/gnc/cutecash

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18815 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-04 17:48:36 +00:00
Geert Janssens
58680c35b8 Move gnc-filepath-utils and dependencies from engine to core-utils
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18811 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-04 16:32:54 +00:00
Geert Janssens
2e5c6f1cee Typo fixes, as found by doxygen.log, patch by Jesse Weinstein
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18810 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-04 10:31:41 +00:00
Phil Longstaff
2eaa8345a9 Add "template-account" to schedxaction as a gobject property.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18807 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-04 00:56:41 +00:00
Christian Stimming
b7b34b87c9 Rename GNCBook into QofBook everywhere and remove separate header gnc-book.h.
The former was already #define'd on the latter, so its removal gets
rid of one level of indirection which makes function lookup easier.
Also, the macro (!) qof_book_get_slots was turned into a normal
function again because that's what functions are for (and otherwise
the additional declaration in engine.i would break).

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18800 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-03 20:47:10 +00:00
Christian Stimming
44b63315df Decrease compiler warnings by removing unused variables.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18799 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-03 20:46:41 +00:00
Christian Stimming
f6bf61feb5 Reduce compiler warnings by replacing strerror() with g_strerror() and similar glib replacements.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18798 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-03 20:46:20 +00:00
Geert Janssens
f220f915f7 Fix make dist
r18765 introduced test target test-resolve-url, but no source file test-resolve-url.c
Removed the target.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18793 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-03 10:03:52 +00:00
Christian Stimming
763e4c3d15 Re-indentation of source code, next batch: src/engine/*
This also strips trailing whitespaces from lines where they existed.
This re-indentation was done using astyle-1.24 using the following options:

astyle --indent=spaces=4 --brackets=break --pad-oper --pad-header --suffix=none

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18788 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-02 21:40:28 +00:00
Christian Stimming
b325f24c91 Replace and-let* in scheme script so that srfi-2 isn't needed.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18786 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-02 21:23:52 +00:00
Christian Stimming
24ad7391e1 C++ compatibility: namespace is a keyword, so don't use it as variable name.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18771 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-01 18:44:07 +00:00
Phil Longstaff
b491220bf9 Add more gobject property definitions to GNCPrice, Transaction, SchedXaction and Split.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18767 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-01 16:46:49 +00:00
Phil Longstaff
45203aec4b More conversion to read/write objects from sql backend using gobject parameters
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18766 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-02-28 23:19:34 +00:00
John Ralls
1d6e7701ac Redo of the dot-gnucash fix (so that GNC_DOT_DIR actually works) fixing bug 610707, adding Doxygen comments for all functions in gnc-filepath-utils, and adding testing for xaccResolveURI and more tests for xaccResolveFilePath.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18765 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-02-28 22:53:02 +00:00
Phil Longstaff
181286c970 Add a few gobject properties to some engine object types. This adds more of the gobject infrastructure to Transaction, Split, SchedXaction and GNCPrice. Gobject properties provides a standardized interface to the engine objects which should allow standard and simplified read/write mechanisms. For the sql backend, for example, db columns can be mapped to properties. In a generalized csv importer, csv columns can be mapped to properties.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18762 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-02-28 17:35:53 +00:00
Phil Longstaff
53d17d53aa Fix up some doxygen comments
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18759 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-02-28 13:18:40 +00:00
Phil Longstaff
46c071490b Don't include gnc-lot-p.h where not needed
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18758 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-02-28 13:13:27 +00:00
Christian Stimming
1ddcb88d0c MSVC compatibility: Microsoft doesn't have C99 "designated initializers".
Those were introduced in r17724, bug#539957, but apparently this
C99 is not supported by MSVC and won't be for some time to come.
Hence, for MSVC we need the workaround to define a macro that will
shadow the member names. However, the initialization itself works
fine and non-MSVC code is unchanged, so I think we can live with that.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18755 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-02-27 18:41:49 +00:00
Christian Stimming
9d6160cfd4 MSVC compatiblity: Struct initialization doesn't work as expected.
Somehow, the struct initialization containing a gnc_numeric
doesn't work. As an exception, we hand-initialize that member
afterwards.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18754 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-02-27 18:41:28 +00:00
Christian Stimming
1383ccae9e MSVC compatiblity: open() flags and S_ISDIR doesn't exist on MSVC.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18753 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-02-27 18:41:07 +00:00
Christian Stimming
1e7ecef77f MSVC compatiblity: Add defines for functions/types which are available under different names in MSVC.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18751 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-02-27 18:40:23 +00:00
Christian Stimming
3008b34922 MSVC compatiblity: Array initialization in MSVC requires a constant, not a variable.
That is, gcc accepts a constant variable in many cases now, but
MSVC doesn't accept it. So it must be turned into an old preprocessor
define.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18750 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-02-27 18:40:00 +00:00
Christian Stimming
f101adee5c Win32 compatibility: Use glib wrappers of non-usual POSIX functions.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18748 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-02-27 18:39:15 +00:00
Phil Longstaff
a3ca714396 Convert GNCLot to use more gobject features. Removes all direct access to lot object fields, which are now accessed through functions or property names (for backend sql load).
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18745 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-02-27 15:54:20 +00:00
Christian Stimming
3236b3c93c Also build backend/xml in cmake.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18743 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-02-27 11:37:14 +00:00
John Ralls
5f8890e675 Reverted 18699
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18741 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-02-26 21:56:50 +00:00
Christian Stimming
82b8b99c9d More minor MSVC code fixes.
However, this code doesn't compile with MSVC9.0 for a few reasons:

1. libguile.h comes with its own scmconfig.h which contains HAVE_STDINT_H
whereas MSVC doesn't have that. This is stupid guile which doesn't accept
the fact that the user uses a different compiler than how they compiled guile.

2. Some initializations are not supported: Account.c:3312 etc.

3. The C99 "designated initializers" of e.g. Account.c:4661 ff. (r17724,
bug#539957) are not supported by MSVC9.0 - this is the hardest problem
of these all.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18738 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-02-25 17:42:43 +00:00
Christian Stimming
69dc9107ff Make CMake system more complete so that it builds on win32/mingw.
Also, add a test executable to check that we got all the
library dependencies.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18737 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-02-25 17:42:21 +00:00