Commit Graph

12616 Commits

Author SHA1 Message Date
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
c2ac86abb6 Cutecash: Enable tab moving and other UI features of Qt.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18875 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-08 18:48:24 +00:00
Christian Stimming
95fa70fec6 Cutecash: Add Timespec conversion to QDateTime. Add display of transaction date in register tabs.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18874 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-08 18:48:03 +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
c6065b0afa Cutecash: Display account balance in tree and split amount in account register.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18872 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-07 21:27:55 +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
Geert Janssens
0bfd892d37 Update POTFILES.in for the moved dialog-userpass.c and the newely added gnc-jalali.c
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18870 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-07 21:02:50 +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
cad5dc6214 Implement a table widget with the list of the splits of one account, and open this if an account in the tree is double-clicked.
Date and values/amounts can follow next, once those types are suitably
wrapped into C++ as well.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18868 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-07 17:51:37 +00:00
Christian Stimming
63fc328029 Add implementation of Gregorian - Jalali converter code.
Copied from http://www.farsiweb.ir/wiki/Iranian_calendar

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18867 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-07 13:51:54 +00:00
Christian Stimming
4f2d9bb34c Cutecash: Add progress bar during loading the file.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18866 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-07 13:36:11 +00:00
Geert Janssens
9453d0712a Fix circular dependency between gnome and gnome-utils introduced in r18842
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18865 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-07 13:09:37 +00:00
Christian Stimming
7cd0515ffb MSVC compatiblity: snprintf is required to have a prefixing underscore.
Also, more symbols of libguile/gc.h need explicit declspec on MSVC.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18864 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-07 13:06:03 +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
Christian Stimming
c1c706c0ef Implement the account list data model as a specialization of the account tree model.
This is helpful in order to understand Qt's Model/View structure, so both
(list and tree) are still available.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18862 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-07 11:21:26 +00:00
Christian Stimming
657e58a5c4 Cutecash: Fix guile version number query. Patch by Herbert Thoma.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18861 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-06 21:42:39 +00:00
Christian Stimming
3b23787cbb Updated Japanese translation, copied from the Translation Project.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18860 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-06 21:38:28 +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
Phil Longstaff
c3997d495a Only use long long format specifiers if available - avoids error message when compiler thinks they're not available.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18858 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-06 20:33:42 +00:00
Phil Longstaff
ddf85bd445 Fix parent/child relationships in billterms in case the parent hasn't been loaded yet.
Remove child column from billterm table because it duplicates info in the parent column and just complicates loading objects.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18857 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-06 16:08:08 +00:00
Phil Longstaff
7744613e2b Fix parent/child links for tax tables. If a tax table's parent table has not been loaded yet, remember the relationship, and after all tables have been loaded, fix up the rest of the parent/child links.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18856 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-06 14:54:55 +00:00
Phil Longstaff
c4e929a9ae Handle NULL string pointer as a NULL guid
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18855 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-06 14:32:26 +00:00
Christian Stimming
2e40a324b3 Cutecash: Add a tree view of the accounts.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18854 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-06 14:32:05 +00:00
Christian Stimming
e290144aa8 Updated Persian (Farsi) translation by Mehdi Alidoost.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18853 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-06 11:09:24 +00:00
Phil Longstaff
0c944231f6 Add a mechanism so that the business sql backend module can provide the main sql backend with the order in which objects should be loaded. This will allow billterms and taxtables to be loaded before objects which contain references to those objects.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18852 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-06 11:02:09 +00:00
Christian Stimming
5396817936 MSVC compatiblity: Replace QOF_BOOK_LOOKUP_ENTITY macro by a RETURN_ENTITY macro and add inline functions for lookup.
MSVC doesn't accept the syntax with an inlined block,
x = ({ foo; bar; value;}). Hence, this is being replaced
by actual function definitions, and the body of those functions
is defined by the new macro.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18851 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-06 11:01:37 +00:00
Christian Stimming
3b44812c29 Delete unused variables.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18850 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-06 11:01: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
Phil Longstaff
f1cabaa310 Fix bug 611885 - Crash when opening postgresql file
Previous work setting Timespec values via gobject properties missed the case where the timespec loaded from the database was NULL.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18848 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-06 10:40:53 +00:00
Christian Stimming
d6a0ecd174 Cutecash: Remove QSharedPointer because manual delete is sufficient.
Also, the QSharedPointer cannot be used for bookkeeping of a C pointer
to any gnucash object because it refuses to work if it doesn't know the
actual struct definition, which in gnucash is always private. The
boost::shared_ptr would work without (by the custom deleter argument in the
constructor), but QSharedPointer doesn't (the custom deleter is accepted
only in addition to the known storage size, not alternatively), so it is
pointless here.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18847 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-05 20:46:35 +00:00
Christian Stimming
650b6ffa10 Cutecash: Add version check for guile and define HAVE_GUILE18 if appropriate.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18846 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-05 20:41:40 +00:00
Christian Stimming
18f663de25 Adapt cutecash to r18842.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18845 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-05 20:32:13 +00:00
Christian Stimming
c6e43486f8 Cutecash: Fix extern "C" usage: Must not enclose system includes, supposedly.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18844 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-05 20:31:51 +00:00
Christian Stimming
57f38d14ea Cutecash: Allow older glib versions as well.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18843 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-05 20:31:31 +00:00
Geert Janssens
6a6fe1690e Use a normalized uri format internally to refer to data stores.
Data stores for GC can be a file (xml or sqlite3) or a database
one some server (mysql or postgres).
Wherever it makes sense internally, data stores will be referred to
via a normalized uri:
protocol://user:password@host:port/path
Depending on the context and story type some of these parts are optional or unused.

To achieve this, a new utility interface has been setup:
gnc_uri_<xxx>_<yyy>
that can be used to manipulate the uris or convert from non-normalized
formats to normalized and back.
For example, when the user selects a file in the Open or Save As dialog,
gnc_uri_get_normalized_uri will convert the file into a normalized uri.
Or when the actual filename is needed this can be extracted with
gnc_uri_get_path.
You can also test if a uri defines a file or something else with
gnc_uri_is_file_uri.

For the complete documentation, see src/core-utils/gnc-uri-uitls.h

This commit installs gnc-uri-utils and modifies the source where it makes
sense to use its convenience functions. This concerns all functions that
had to deal with file access in some way or another, the history module
and the functions that generate the history menu list and the window titles.

Note that gnc-uri-utils replaces xaccResolveFilePath and xaccResolveUrl in all cases.
xaccResolveUrl has been removed, because gnc-uri-utils fully replaces its functionality.
xaccResolveFilePath is used internally in gnc-uri-utils to ensure an absolute path
is always returned (in case of a file uri, not for db uris). But it has been renamed to
gnc_resolve_file_path to be more consistent with the other functions.

Lastly, this commit also adds a first implementation to work with a keyring to
store and retrieve passwords, althoug

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18842 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-05 20:15:31 +00:00
Christian Stimming
a007db0301 Make business backend initialization functions accessible when statically linking
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18841 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-05 19:57:25 +00:00
Christian Stimming
8b646bb485 MSVC compatibility: Disable "C99 designated initializers" by a compiler-dependent macro
Same as r18755.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18840 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-05 19:57:04 +00:00
Christian Stimming
249a8c5612 Cutecash: Add business-core including business-core/xml into the executable.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18839 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-05 19:56:43 +00:00
Christian Stimming
52af11d179 Make the backend initialization functions accessible when statically linking
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18838 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-05 19:56:12 +00:00
Geert Janssens
7934771fe6 Change the definition of QOF_STDOUT
The old definition file: conflicts with normal uris that can
start with file: as well.
I have chosen > instead, which is never a valid filename and
on unixlike systems associated with standard out operations.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18837 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-05 19:55:20 +00:00
Phil Longstaff
5fefa33c7b Use proper qof CFLAGS/LDFLAGS since core-utils now uses qof
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18836 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-05 17:57:08 +00:00
Phil Longstaff
e822188f65 The webkit used on win32 has webkit_web_frame_print_full() defined in include files, so we don't need a potentially conflicting extern declaration.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18835 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-05 17:56:02 +00:00
Phil Longstaff
be4fce5ed5 If gmtime_r is defined as a macro, undef it
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18834 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-05 17:55:01 +00:00
Geert Janssens
8a66cc528b Add svn:ignore to src/core-utils/test
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18833 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-05 17:01:38 +00:00
Geert Janssens
ab9a4060c2 Remove invalid target (got copied from src/engine/test)
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18832 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-05 16:56:19 +00:00
Geert Janssens
23361112f1 Build test-core before core-utils
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18831 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-04 22:49:43 +00:00
Geert Janssens
65e51d1592 Add the core-utils tests in the automake system
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18830 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-04 22:48:38 +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
Phil Longstaff
78d8fba84e Undefine localtime_r as a macro (new mingw pthreads package defines it)
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18828 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-04 22:06:23 +00:00
Phil Longstaff
210472586c Add braces to make if-if-then-else structure clear and avoid GCC 4.4.0 error message
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18827 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-04 22:04:23 +00:00