Commit Graph

12654 Commits

Author SHA1 Message Date
Phil Longstaff
147ad7d07b Fix Makefile.am handling of gncla-dir.h so that it will be removed so that 'make distcheck' will pass
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18916 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-16 09:27:08 +00:00
Phil Longstaff
a3eff8fc18 Update POTFILES.in based on new source files
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18915 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-16 09:25:29 +00:00
Geert Janssens
883d71cdb4 Fix guint32 vs gint32 in gnc-uri-utils test.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18914 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-15 20:06:18 +00:00
Christian Stimming
19ca6a75c1 Cutecash: Add Commodity wrapper. Use gnc-exp-parser for numbers.
- Allow amounts to be edited.
 - Let the date column be handled by the QDate delegate with a QDateEdit widget

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18913 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-15 18:39:21 +00:00
Christian Stimming
d3c970ac97 Add event registration and handling from the qof_event_handlers.
This way, the split view is updated correctly even on undo/redo.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18912 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-15 18:38:26 +00:00
Phil Longstaff
82d0a8b88a Partial fix for #611014 - CSV import crashes
Bug #611014 mentions a problem where after setting the columns, clicking OK and selecting a target account, the Date column is lost.  This is because of a difference in behaviour on windows and linux.  The code attaches to the "edited" signal of the renderer.  On linux, this signal is emitted when a new combo box item is selected.  On windows, the combo box needs to be selected and focus lost before the signal is emitted.  This is changed to the "changed" signal of the renderer which acts as expected on both platforms.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18911 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-15 16:10:26 +00:00
Phil Longstaff
447dc5e6a8 Bug #140400 - Crash when deleting an account that is still in use by the business features
Add a dialog which contains a list of objects referring to the account and an explanation that these need to be deleted or have the account reference modified.

Note: I'm no UI designer.  This is functional, but if anybody wants to pretty it up, go ahead.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18910 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-15 14:49:39 +00:00
Geert Janssens
4810a47d66 Bug #536108 - After cancelling "save as", user is not prompted 2nd time
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18909 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-15 09:01:50 +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
5265d4d070 MSVC compatiblity: Fix include files in MSVC. Replace QSTRCMP by g_strcmp0 on MSVC.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18907 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-14 21:02:13 +00:00
Christian Stimming
4426e3931f Improve non-gnome UI compatiblity: app-utils can compile without gtk as well.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18906 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-14 21:01:52 +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
08c0fb3fa0 Fix missing color in qif-import account copy, patch by Tom Van Braeckel
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18904 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-14 13:43:52 +00:00
Geert Janssens
1ea246dfaa Bug #507351 Terms not defined prior to use
This commit changes the text in the accounts druid to explain what a placeholder account is, together with some additional improvements in the wording of that page.

Since this increases the amount of text, the width of the label has been modified as well.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18903 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-14 13:33:50 +00:00
Phil Longstaff
0006aafc1b Fix Bug 590570 - When deleting more than one report in sequence the program crashes
Delete the custom report backup file before renaming the current custom report file.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18902 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-13 23:01:17 +00:00
Geert Janssens
9857442168 Complete unit tests for gnc-uri-utils api and fix bug found by running the tests.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18901 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-13 15:48:09 +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
Phil Longstaff
1e5a8ac128 Fix Bug 611346 - Crash in Saved Reports dialog if you select Delete button with no report selected
Test for no report selected before trying to use the selected report guid.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18899 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-13 12:02:02 +00:00
Geert Janssens
3bd815f74e Fix typo in previous commit
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18898 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-12 22:43:47 +00:00
Geert Janssens
3acea4eb53 Add first test for the gnc-uri-utils api.
This test verifies gnc_uri_get_components.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18897 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-12 22:39:48 +00:00
Geert Janssens
85795f8ca6 Bug #364358 - Import dialog unreadable with dark colored gtk theme (with solution)
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18896 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-12 21:38:43 +00:00
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