Commit Graph

14880 Commits

Author SHA1 Message Date
Geert Janssens
8f2af017d5 Move configure test to a more appropriate location
And remove a reference in the comment to a no longer existing function

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22657 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-12-15 19:15:23 +00:00
Geert Janssens
a643447edf Replace now obsolete wrappers by the functions they called directly
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22656 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-12-15 19:15:14 +00:00
Geert Janssens
935c613267 Drop workarounds for potential guile issues with long long
- The workarounds for long long were added more than 12
years back (pre guile 1.6). One would reasonably assume this issue would
have been fixed by now.
- But more importantly, we can guarantee a proper 64 type
conversion by replacing scm_to/from_long_long with scm_to/from_int64
which is always 64bit, just as gint64

I have chosen nonetheless to keep this change in a separate commit so
it's easier to track if some obscure platform still manages to screw
this up.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22655 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-12-15 17:59:35 +00:00
Geert Janssens
f10395dade Guile 2: drop custom kvtable in favour of standard hashtable
The kvtable code is causing segfaults in guile 2 and I don't see any
obvious advantages to using this custom code of the standard hash-table
functions

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22654 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-12-15 17:59:26 +00:00
Geert Janssens
d02bf10986 Guile 2 : replace deprecated scm_makfrom0str function
The replacement function (scm_to_locale_string) doesn't deal well when
the C string is NULL, so all replacements were adapted to handle this
case. Depending on the context the replacement in case of a NULL input
string will return SCM_BOOL_F or a sensible default string.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22653 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-12-15 17:59:14 +00:00
Geert Janssens
bf896bcdfa Guile 2: replace deprecated functions
These are all simple one to one mappings.
The replacements require guile 1.8 or newer.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22652 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-12-15 17:58:58 +00:00
Geert Janssens
37b65abff1 Guile 2: replace deprecated SCM_SYMBOL_CHARS function
The replacements require guile 1.8 or above

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22651 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-12-15 17:58:40 +00:00
Geert Janssens
5b03182435 Rewrite option dialog callback in C
This reduces the number of guile<->c roundtrips for the book options
dialog and eliminates the guile dependency from one more file.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22650 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-12-15 17:58:27 +00:00
Geert Janssens
45708e5620 Fix some warnings generated by Eclipse's static code analysis plugin
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22649 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-12-15 10:30:35 +00:00
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