Commit Graph

12633 Commits

Author SHA1 Message Date
Geert Janssens
510f9ac555 Replace Income Tax Options with Tax Report Options. Patch by J. Alex Aycinena.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18895 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-12 10:20:50 +00:00
Phil Longstaff
ae562ac78e Implement the object reference infrastructure routines to allow a list of business objects referring to a specific other object (e.g. an account) to be determined. This will help fix bug 140400 because the account delete code can now determine a list of business (or other) objects which have references to that account, and prevent the account from being deleted while references still exist.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18894 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-12 10:16:16 +00:00
Phil Longstaff
a7cf1dc37a Add some new gobject-related infrastructure so that when deleting an object, it can be determined if there are other objects with references to that object (bug 140400).
Some routines are normal routines, and some routines use the gobject structure to allow different implementations by different object types.

Per-instance routine: gboolean qof_instance_refers_to_object(QofInstance* A, QofInstance* B) - returns TRUE/FALSE whether object A contains a reference to object B.
Normal routine: GList* qof_instance_get_referring_object_list_from_collection(QofCollection* c, QofInstance* B) - Calls qof_instance_refers_to_object() for each object in the collection, and returns a list of the objects which contain a reference to B.
Per-instance routine: GList* qof_instance_get_typed_referring_object_list(QofInstance* A, QofInstance* B) - returns a list of all objects of the same type as A which contain a reference to B.  Being per-instance allows an object to use knowledge to avoid scanning cases where there are no references (e.g. billterms do not contain references to splits), or a scan is not needed (references from splits to an account can be determined using xaccAccountGetSplitList()).  This routine can do a scan by calling qof_instnace_get_referring_object_list_from_collection().
Normal routine: qof_instance_get_referring_object_list(QofInstance* A) - For all collections in the book, gets an instance and calls its qof_instance_get_typed_referring_object_list() routine, concatenating all of the returned lists.  This is the routine that external code can call to get a list of all objects with references to an object A.  The list must be freed by the caller but the contents must not.
Per-instance routine: gchar* qof_instance_get_display_name(QofInstance* A) - returns a string which can identify object A to the user.  This could be used to display a list of the objects returned by qof_instance_get_referring_object_list() ("Invoice 0004 for customer C") so that the user can modify those objects to remove the references.  Note that this is going to require internationalization, which has not been implemented yet.  If not overridden by the object class, the default string is "Object <type> <address>" e.g. "Object gncCustomer 0x12345678".


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18893 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-12 10:14:27 +00:00
Christian Stimming
4212c0c786 Cutecash: Enable entering of more cells in register. Some code cleanup. Add class documentation.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18890 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-11 21:59:45 +00:00
Christian Stimming
81ec044f82 Enable editing of the "Description" column in the split list view - WITH UNDO!
The Qt Undo framework is almost like magic. We just have to create a
command object instead of directly manipulating the value, and suddenly
the undo/redo just works. This is fun!

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18889 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-10 21:40:58 +00:00
Christian Stimming
0a2d901f71 Updated Japanese translation, copied from the Translation Project.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18888 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-10 19:38:03 +00:00
Christian Stimming
0f09fc5e32 Cutecash: Add QUndoStack to implement all editing through the Command pattern and make it undoable.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18887 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-10 17:51:12 +00:00
Christian Stimming
4bb186ef14 Cutecash: Enable closing and re-opening the different tab views.
Also, change many main window slots to make use of the auto-connection
feature because it makes the slot intention much easier to read.

Also, note how we store the Tab position, title, isEnabled state
in dynamically allocated properties in the Tab widget itself -
this is a rather cool feature of QObject here (see reallyRemoveTab()
and viewOrHideTab()).

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18886 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-10 17:50:51 +00:00
Geert Janssens
1b7c9778f0 Patch my patch in r18884. Spotted by Herbert Thoma.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18885 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-10 16:05:55 +00:00
Geert Janssens
fcd0b01931 Regression fix: patch for colored tabs segfault in trunk, patch by Tom Van Braeckel
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18884 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-10 13:17:21 +00:00
Geert Janssens
18ecb2c28c Bug #525821 new or edited account names should be checked for reserved chars like ":"
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18883 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-09 22:50:08 +00:00
Christian Stimming
cec36eea50 Cutecash: Add Recent-File menu.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18882 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-09 21:53:43 +00:00
Geert Janssens
994c6dcda7 Bug #610675 Register Tabs Do Not Display Since Nightly Build r18685
Apply Bob's patch after fixing the whitespace. This patch may cause issues on Windows
(a previous version of the patch did). If the next Windows nightly build exhibits
the missing register tab names again, it will have to be reverted again
and improved upon.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18881 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-09 19:38:41 +00:00
Geert Janssens
8b3528f47d Bug #611645 gnc-svnversion returns "too long" a string for git users, patch by Jeff Kletsky
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18880 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-09 18:28:04 +00:00
Geert Janssens
e6b0b15948 Fix failing core-utils tests
I simply removed the obsolete test cases. More work is still needed to add new valid tests.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18879 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-09 12:17:12 +00:00
Geert Janssens
03480a5484 Bug#325436 creating income account for invoice doesn't restrict account type
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18878 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-08 21:57:23 +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
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