Commit Graph

12630 Commits

Author SHA1 Message Date
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
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