Commit Graph

15261 Commits

Author SHA1 Message Date
Geert Janssens
3c341a37ed Add back translation support in combo boxes that was accidentally removed in 1286a896a6
Author:    Aurimas Fišeras <aurimas@members.fsf.org>

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23093 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-07-05 17:11:46 +00:00
Geert Janssens
a9f715e59f Fix crash when saved-reports file doesn't exist
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23092 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-07-05 16:38:21 +00:00
Geert Janssens
7ae2ba4998 A whitespace cleanup, no functional changes
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23091 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-07-05 16:38:06 +00:00
Cristian Marchi
576becaa5e Update Lithuanian translation thanks to Aurimas Fišeras.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23090 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-07-04 20:13:34 +00:00
Geert Janssens
13cb1fa54f Bug #699686 - Startup dialog windows should be top level windows
Author: Simon Arlott <bugzilla.gnome.simon@arlott.org>
BP

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23088 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-07-03 08:08:00 +00:00
Derek Atkins
ba884bb18e Fix typo
Patch from Aurimas Fišeras <aurimas@members.fsf.org>

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23087 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-07-02 20:28:01 +00:00
John Ralls
45fe4ea83f Bug 701670: Command-V in reconcile window pastes data in register
Disable quartz accelerators: They grab menu accelerators without regard
to focus GtkWindows, breaking bindings.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23085 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-07-02 20:16:11 +00:00
Christian Stimming
2655c4aaf0 Cutecash: Fix linker flags for guile so that it links again.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23084 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-07-02 18:47:31 +00:00
Geert Janssens
eb68ec0e41 Custom reports dialog - track template guids directly in model instead of separate list
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23083 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-07-02 11:18:46 +00:00
Geert Janssens
ba9004273e Require custom report template names to be unique (among other custom report templates)
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23082 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-07-02 11:18:04 +00:00
Geert Janssens
7722379b9c Rework custom reports dialog
Each saved report now has 3 actions
- run
- rename
- delete

Rename is a new feature that allows to rename a report without having to
delete/readd.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23081 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-07-02 11:17:47 +00:00
Geert Janssens
78c8b5e3ba New function to rename a saved report
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23080 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-07-02 11:17:33 +00:00
Geert Janssens
3daa53b3b8 New functions to check for custom templates
- whether a report template is a custom one
- whether a report is based on a custom report

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23079 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-07-02 11:17:22 +00:00
Geert Janssens
d494e37b54 Define 'custom-template' property on report instances (not used yet)
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23078 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-07-02 11:17:10 +00:00
Geert Janssens
7e049feddd Return guid of newly-created report template to calling function
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23077 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-07-02 11:16:59 +00:00
Geert Janssens
5f4c9835e0 Return success or failure when writing report templates to save file
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23076 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-07-02 11:16:50 +00:00
Geert Janssens
dbd9229149 Delete report function: use less ambiguous variable name
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23075 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-07-02 11:16:38 +00:00
Christian Stimming
e7537f85e9 Bug #702899: Fix crash in scrubbing code
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23074 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-06-30 20:38:14 +00:00
Christian Stimming
ca7bb16d69 Bug #703305: Fix crash on entering a non-valid date.
For now, the date that couldn't get parsed is replaced by today. Improvements
to this behaviour are welcome, though :-)

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23073 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-06-30 20:18:37 +00:00
Mike Alexander
86434e10e5 Add back, and bring up to date, the debugging function qof_book_print_dirty.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23072 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-06-29 05:57:52 +00:00
Mike Alexander
d81cb73e0c Make it possible to post multiple invoices from the find dialog.
GnuCash was crashing if you searched for all unposted invoices, selected two or
more of them, and posted them.  This was because the list of invoices to be posted
changed while it was being processed.  As part of fixing this the prompt for post date,
due date, etc. will only be given once, not once per invoice.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23071 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-06-29 05:57:44 +00:00
Mike Alexander
e7d58f756a Fix the crash that occurs when duplicating multiple invoices from Find results.
The biggest problem was that it was adding an invoice's entries to both the old
and the new invoice when duplicating the invoice.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23070 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-06-29 05:57:35 +00:00
Geert Janssens
433744c8bb Report system - emit warning when trying to restore named-based saved reports
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23069 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-06-27 09:09:04 +00:00
Geert Janssens
0ba42c0231 Report system: regroup legacy functions
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23068 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-06-27 09:08:52 +00:00
Geert Janssens
00846f0732 Report system legacy code cleanup
- Rename two functions that work with guids instead of names (legacy)
- Don't sort the a list of guids. This doesn't add value and slows down the report loading code
- Add/improve some comments
- Reorder record accessors for the report-template record

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23067 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-06-27 09:08:39 +00:00
Geert Janssens
3a722d0be8 Lookup business reports by id instead of by name
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23066 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-06-27 09:08:25 +00:00
Christian Stimming
ef9b8a8920 Remove the unused code for feature "shift txn forward", disabled already in r18450.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23065 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-06-25 18:44:52 +00:00
John Ralls
5c3ec9980b Really Redo r23043 Don't print "warning" output in comparison functions.
Without pulling in the extra junk.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23064 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-06-25 17:04:47 +00:00
John Ralls
6fb2a93a85 Revert "Redo r23043 Don't print "warning" output in comparison functions."
Some extra files got pulled in...

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23063 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-06-25 17:04:30 +00:00
John Ralls
cd4f5d337d Redo r23043 Don't print "warning" output in comparison functions.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23062 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-06-25 16:49:16 +00:00
Christian Stimming
8237afd97f Bug #700804: Add up/down buttons for ordering of transactions in register2.
This changes the ordering but only for txn with the same date
and same number.  The buttons are active only in cases where this is
possible, otherwise the buttons are inactive anyway.

- for reconciled splits, user will be asked
- book-closing txn are ignored as well as frozen splits
- After changing the sort order, update the UI buttons immediately as well

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23061 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-06-23 07:57:40 +00:00
Christian Stimming
db8a08a3d0 Register2: Minor code cleanup: Rename moved_cb to uiupdate_cb. Refactor common sanity check into extra function.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23060 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-06-20 20:44:43 +00:00
Christian Stimming
a8516187b7 Bug #691587: Catch scheme exceptions when converting error messages to a C string.
When loading a scheme data file such as ~/.gnucash/stylesheets that contains
invalid characters (e.g., all-zero bytes), the loading throws a scheme
exception and we are redirected into the error catch handler. When trying
to convert the erroneous scheme expression into a string for the
message output, scheme runs into an exception right again. Hence, the
conversion to string must be guarded by a stack_catch as well.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23059 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-06-19 15:48:13 +00:00
Christian Stimming
d8a0015a3c Bug #669964: Fix txn creation that forgot to set a txn currency.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23058 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-06-19 15:48:02 +00:00
Christian Stimming
9b093abc4a Register2: Improve commodity/currency handling: Try to always use account_or_default_currency lookup instead of code duplication.
The code for ensuring a commodity that is a currency was duplicated among
the file. This is now refactored into the reg_currency variable. Also, in
a non-currency register the currency is now taken from parent accounts or
the default currency, which matches the old register's policy but is different
from what register2 previously did.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23057 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-06-19 15:47:49 +00:00
Christian Stimming
fd9ea2d808 Improve transaction currency lookup by using the new account_or_default currency getter.
Previously, this could result in transactions that have a non-currency as
txn commodity, which is what the multi-currency register tried to avoid hard.
Now by using account_or_default_currency, the currency choosing policy from
the register is available in the other places where new transactions are
created, hence we better use that here.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23056 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-06-19 15:47:39 +00:00
Christian Stimming
2bbcd7733f Refactor lookup of a commodity that is a currency for a specific account into general function gnc_account_or_default_currency().
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23055 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-06-19 15:47:27 +00:00
Christian Stimming
2ed03ccc57 Cutecash: Adapt cmake files to recent file moves.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23054 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-06-19 15:47:13 +00:00
Christian Stimming
8e524a4370 Bug #672595: After creation of a new book, make sure to set it to dirty so that a cancelled save_as dialog leaves the book dirty.
The missing part was the line in assistant-hierarchy.c, but I've added
it to the two other calls to file_access_for_save_as() to be on the safe
side on those two other book creation places as well.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23053 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-06-16 08:30:09 +00:00
Christian Stimming
511c970256 Bug #700582: Enable online actions in Register2
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23052 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-06-14 21:43:17 +00:00
Christian Stimming
bff5edbb66 Minor code cleanup (again from r23043): Don't print a warning in a comparison.
This only changes the single line that doesn't break the existing utest-Split.c

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23051 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-06-13 20:42:46 +00:00
Christian Stimming
c52ac5de5b Minor code cleanup: Decrease verbosity of register2 that makes the debugging output unreadable.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23050 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-06-13 20:25:24 +00:00
Christian Stimming
b5c4d37af3 Register2: Add more sanity checks when converting TreePaths from one to another.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23049 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-06-13 20:25:12 +00:00
Christian Stimming
581f27825e Revert r23043 "Minor code cleanup: Don't print "warning" output in comparison function."
Sigh. It turns out the utest-Split.c relies on the "warning" log level
in order to check for specific code paths. This sucks. The log level
"warning" should please be reserved for things that are actual warnings,
not for code path checks that are used in the unittests.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23048 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-06-13 07:58:49 +00:00
Christian Stimming
91b8b3c14d Had to partly revert r23045 when it comes to the PostedDate of book-closing txns.
The book-closing txn currently assume that their
posted-date is the end date plus 12 hours, so that the closing txn can
be distinguished from normal txns of the last day. This is the only
case within GnuCash where the PostedDate is a different time-of-day
that what the GDate normally says as a normalized date.

We better change this sometime in the future so that the PostedDate
doesn't silently contain this hidden extra meaning...

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23047 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-06-13 07:32:23 +00:00
Christian Stimming
bae4862575 Register (old+new): Duplicated transactions need a DateEntered as well.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23046 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-06-09 21:39:34 +00:00
Christian Stimming
85749ec058 Change all usage of xaccTransSetDatePostedSecs to xaccTransSetDatePostedSecsNormalized.
In fact, all calls to this setter refer to the plain date and not to
any time-of-day. Consequently, only the normalized setter must be used
everywhere. (Subsequently, the previous setter could be removed, as
it turned out to be not used anywhere, but that's another story.)

As a side effect, this makes the register2 set the PostedDate in the
same way as the old register again. The register2 used to introduce a
time-of-day part in the PostedDate, but this should not be done. Only
the EnteredDate has a time-of-day part.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23045 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-06-09 21:33:19 +00:00
Christian Stimming
697d228eb3 Introduce transaction setter xaccTransSetDatePostedSecsNormalized() that ignores the time-of-day part.
We've struggled with the time-of-day part of the PostedDate for long
enough. The PostedDate field is just not meaningful with anything else
but a plain date, and no time-of-day at all. Hence, the correct setter
function for this particular field must ignore the time-of-day. Consequently,
a GDate should be used here anyway, but in many places the time64 is more
convenient. The new function will now redirect that time64 to the GDate
setter function to make sure we will now map everything to one single date.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23044 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-06-09 21:32:06 +00:00
Christian Stimming
581871813d Minor code cleanup: Don't print "warning" output in comparison function.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23043 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-06-09 21:31:51 +00:00
Christian Stimming
5adb56bd77 Minor code cleanup: Don't use "class" as identifier.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23042 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-06-08 22:20:34 +00:00