Commit Graph

14871 Commits

Author SHA1 Message Date
Geert Janssens
a7a30aa24f Use correct parameter sequence for g_date_time_get_ymd
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22648 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-12-14 17:37:26 +00:00
Geert Janssens
2e8bd476b0 Make sure all functions are defined only once in the header file
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22647 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-12-14 13:07:32 +00:00
Mike Alexander
8d32361ede Improvements to exchange rate dialog.
Use a price on the same day as the transaction as default if there is one.
Don't add a new price to the price DB if the nearest one on the same day
is equivalent to the one being added.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22646 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-12-13 05:13:49 +00:00
Mike Alexander
6ed3bfa6a3 Better detection of unbalanced transactions with trading accounts.
A transaction's value should be balanced independently in trading and
non-trading splits to be considered balanced.  Incorrect adjustment
of exchange rates on existing splits can cause this to be an issue.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22645 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-12-13 05:13:42 +00:00
Mike Alexander
366411853d Don't leak a GNCPrice after fetching prices from finance-quote.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22644 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-12-13 05:13:34 +00:00
Geert Janssens
1116226aaa Drop non-functioning old test functions
These functions were used in debugging business reports, but they don't
work anymore. The report system has moved on to using unique guids.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22643 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-12-12 17:43:29 +00:00
Geert Janssens
47778a8325 Remove unused guile references in various source files
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22642 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-12-12 17:43:18 +00:00
Geert Janssens
a9a6d3677d Drop gnc:main; it is an empty function by now
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22641 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-12-12 17:43:04 +00:00
Geert Janssens
2ed088bdd3 Remove guile commandline handling
It's not used anymore and if someone wants to re-establish it, he/she
should use (ice-9 getopt-long) to implement it instead of our own custom
functions.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22640 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-12-12 17:42:53 +00:00
Geert Janssens
53cec70f87 Remove now unused scm file
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22639 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-12-12 17:42:43 +00:00
Geert Janssens
c11dfec1d0 Eliminate use of gnc:find-file
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22638 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-12-12 17:42:33 +00:00
Geert Janssens
cdb4628375 Rewrite gncFindFile function in C and move it to file-utils.
The code made a roundtrip into guile (for historical reasons I guess).
The guile code used to be able to provide custom paths to search for
based on some command line parameter set at startup. This parameter
is no longer accepted since a very long time back.

Also note that the gncFindFile function is not actively in use. It is
only called by gncReadFile, which in turn is only called when our html
code is asked to load a generic file or a help file to stream (protocol
file or help). Both protocols are used nowhere in the current GnuCash
code.

gncFindFile (now gnc_path_find_localized_html_file) is only kept for
a. custom reports that potentially use the file protocol
b. jqplot which uses the guile equivalent of this function
   (see a subsequent commit)

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22637 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-12-12 17:42:22 +00:00
Geert Janssens
e5d01077cf Fix gnc-help protocol and illustrate its use in the hello world report
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22636 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-12-12 17:42:10 +00:00
Cristian Marchi
72a85ee87b In Italy ICI is now IMU. BP
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22634 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-12-06 19:47:59 +00:00
Mike Alexander
6df1174719 Changes r22619 and r22620 broke online price quote retrieval.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22631 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-12-06 04:07:56 +00:00
John Ralls
4f51d0fa33 Fix 64-bit formatting failure
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22630 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-12-03 12:48:34 +00:00
John Ralls
f039fc7dea Fix includes in gnc-date-edit.c
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22629 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-12-02 02:04:46 +00:00
John Ralls
d17e41e886 Convert all time_t to time64: optional & plugins
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22628 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-12-01 22:46:08 +00:00
John Ralls
1cbd2d761b Convert all time_t to time64: register
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22627 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-12-01 22:45:59 +00:00
John Ralls
b641ef95c2 Convert all time_t to time64: gnome
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22626 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-12-01 22:45:49 +00:00
John Ralls
bfdc22959a Convert all time_t to time64: gnome-utils and gnome-search
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22625 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-12-01 22:45:34 +00:00
John Ralls
d6f8fe4f5c Convert all time_t to time64: import-export
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22624 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-12-01 22:45:23 +00:00
John Ralls
2a62fb551a Convert all time_t to time64: backend
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22623 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-12-01 22:45:13 +00:00
John Ralls
3f303811b2 Convert all time_t to time64:business
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22622 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-12-01 22:45:03 +00:00
John Ralls
7694f858d1 Convert all time_t to time64: engine
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22621 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-12-01 22:44:53 +00:00
John Ralls
6716e3ac5b Convert all time_t to time64: app-utils
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22620 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-12-01 22:44:41 +00:00
John Ralls
3b1ad26e5f Convert all time_t to time64: swig type maps
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22619 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-12-01 22:44:31 +00:00
John Ralls
f23eccfcd0 Convert all time_t to time64: core-utils
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22618 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-12-01 22:44:22 +00:00
John Ralls
10b567a79a Convert all time_t to time64: libqof
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22617 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-12-01 22:44:13 +00:00
John Ralls
8fa49c4a21 Convenience GDate functions to set to today and an arbitrary time64.
To replace most uses of g_date_set_time_t().

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22616 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-12-01 22:44:03 +00:00
John Ralls
17bdb2a679 Create 64-bit time type time64 and replace gint64 with time64
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22615 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-12-01 22:43:55 +00:00
John Ralls
369171ceff Remove date exceptions.
GncDate can now handle all dates between 1 Jan 0001 and 31 Dec 9999
(proleptic Gregorian).

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22614 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-12-01 22:43:44 +00:00
John Ralls
441b73d7d9 Replace the time_t-based timespec_secs_to_given_string with gnc-date functions.
Thus saving having to write gnc_timegm.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22613 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-12-01 22:43:34 +00:00
John Ralls
2c26cb7777 Work around the way g_date_time_new truncates microseconds.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22612 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-12-01 22:43:25 +00:00
John Ralls
bd13635a9a Rewrite gnc_timespec_to_iso8601_buff to use g_date_time_format.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22611 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-12-01 22:43:16 +00:00
John Ralls
21124e2ae3 New public function gnc_g_date_time_new_from_timespec_local
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22610 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-12-01 22:43:07 +00:00
John Ralls
5247cd1cad Clean up some comments
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22609 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-12-01 22:42:59 +00:00
John Ralls
880d3d301c Rewrite and rename xaccDateUtilGetStampNow to gnc_date_timestamp.
Removing an ugly and antiquated name and providing a more concise implementation.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22608 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-12-01 22:42:50 +00:00
John Ralls
c6c17fb34e Remove gnc_dmy2gdate, which isn't used.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22607 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-12-01 22:42:37 +00:00
John Ralls
16bf61fbcc Rewrite gnc_iso8601_to_timespec_gmt
Into something that isn't an ugly hack and actually works.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22606 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-12-01 22:42:28 +00:00
John Ralls
586e124ba5 Add a note pointing out the separate implementations in qof-win32.c
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22605 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-12-01 22:42:19 +00:00
John Ralls
2725d5a654 Implement internal replacements for localtime, mktime, etc.
The builtin time functions suffer from the "2038 bug" caused by
overflowing a 32-bit representation of seconds from 1 Jan 1970. Provide
functions based on GDateTime which use a 64-bit representation (like our
Timespec), replace all of the instances in gnc-date.c, and make other
adjustments needed to ensure that the tests pass on a 32-bit system.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22604 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-12-01 22:42:10 +00:00
John Ralls
f309e0c697 Fix gnc-date and test-gnc-date to pass with MinGW
Special-case MSWin results.

Create a private struct of function pointers so that we can continue to
use the Win32 workaround functions in test-gnc-date.c while we refactor
gnc-date.c to use GDateTime instead of gmtime, localtime, and mktime.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22603 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-12-01 22:42:00 +00:00
John Ralls
ca249052bb Update Makefile.decl to a newer version that works with MinGW
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22602 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-12-01 22:41:49 +00:00
John Ralls
c8c00253a9 Set up the modpath correctly for Win32, OSX, and Unix in test-dynload.c
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22601 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-12-01 22:41:41 +00:00
John Ralls
977ba846f7 Reformat a comment to fit on an 80-col term
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22600 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-12-01 22:41:26 +00:00
John Ralls
6e55278738 Multi-platform fixes to test-gnc-date.c
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22599 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-12-01 22:41:16 +00:00
Geert Janssens
47fb3a1b6f Synchronize DOCUMENTERS document with gnucash doc's AUTHORS file
BP

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22582 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-11-20 14:32:39 +00:00
Geert Janssens
89b65622e1 Fix potential crash with malformed reports
If reports contain an opening <object> tag, but omit the closing tag,
the html string is freed and still used some time later.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22544 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-11-13 12:32:09 +00:00
Geert Janssens
255d36f9e3 Bug #638971 - Multicolumn report does not show more than one graph
BP

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22542 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-11-12 22:07:48 +00:00