Commit Graph
22 Commits
Author SHA1 Message Date
Andreas Köhler cb5b3ab59c Bug #539947: Replace __FUNCTION__ by G_STRFUNC.
Patch from Halton Huo.
BP

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17585 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-09-21 15:18:50 +00:00
Christian Stimming 54cbbf778f Dont mark string translatable that is only visible to expert users in a special file.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16156 57a11ea4-9604-0410-9ed3-97b8803252fd
2007-06-09 13:49:59 +00:00
David Hampton 3a612f804f Play nicer with recent releases of glib that have tightened what's
considered a valid key in a key/value file. This change will cause
gnucash to rewrite any opened state file into a new version where all
key names fit the new glib requirements.

This code was originally committed to trunk as #15458 on 1/28/07, and
then backed out with #15461 on 1/29/07.  Backward compatibility
support for this code was committed to the 2.0 branch in #15460 and
was released as part of 2.0.5.  Now that 2.0.5 has now been out for
six weeks, this commit puts the original changes back into trunk.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15787 57a11ea4-9604-0410-9ed3-97b8803252fd
2007-04-04 03:40:14 +00:00
David Hampton 44e614a706 Back out #15458 on trunk. This is temporary until after 2.0.5
(w/backward compatibility support) has been released for a while, and
then this patch will be re-committed.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15461 57a11ea4-9604-0410-9ed3-97b8803252fd
2007-01-29 05:30:32 +00:00
David Hampton 4209e9bd88 Play nicer with recent releases of glib that have tightened what's
considered a valid key in a key/value file.  This change will cause
gnucash to rewrite any opened state file into a new version where all
key names fit the new glib requirements.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15458 57a11ea4-9604-0410-9ed3-97b8803252fd
2007-01-28 21:58:20 +00:00
Joshua Sled 2d1735aea1 Bug#157179: make multi-commodity SX handling a bit better. Expose the needed exchange rates as variables in the since-last-run dialog.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13881 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-04-29 21:51:42 +00:00
David Hampton cbedb5a5e9 Convert all locations that parse input using the locale
thousands/decimal point characters to use unicode functions.  This
should allow multi-byte unicode characters to work as these separators
on input.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13434 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-03-02 00:24:54 +00:00
Joshua Sled 9255df9093 Bug#137885: prevent crash on invalid function formula.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13415 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-02-28 01:01:44 +00:00
David Hampton cde5c432d0 Provide better arguments for specifying what to do when a key_file
doesn't exist.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@12906 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-01-20 01:38:15 +00:00
David Hampton 1b206fe862 Consolidate the creation of all file names under ~/.gnucash, and also
the checks for the existence of ~/.gnucash and ~/.gnucash/books.  Add
better error messages when there is a problem.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@12023 57a11ea4-9604-0410-9ed3-97b8803252fd
2005-11-23 22:40:03 +00:00
David Hampton 042f050b9b Andreas Köhler's patch to replace some deprecated glib functions.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@11995 57a11ea4-9604-0410-9ed3-97b8803252fd
2005-11-20 22:42:25 +00:00
David Hampton db2bed0e58 Include file cleanup. Remove the messages.[ch] files in favor of the
glib supplied gi18n.h file.  Replace includes of gnome.h with gtk.h
(or better yet glib.h) wherever possible.  Don't include gnome.h from
any header files.  Remove some extraneous includes.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@11981 57a11ea4-9604-0410-9ed3-97b8803252fd
2005-11-19 23:53:34 +00:00
David Hampton 7dee8e9032 Add a GError parameter to the gnc_key_file_save_to_file() function.
Check for an error condition on every system call.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@11903 57a11ea4-9604-0410-9ed3-97b8803252fd
2005-11-11 03:06:58 +00:00
David Hampton f28d033d74 Collapse the gnome2 branch back into HEAD.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@11565 57a11ea4-9604-0410-9ed3-97b8803252fd
2005-11-02 03:32:36 +00:00
Derek Atkins c5857de175 Heath Martin's x86_64 patch.
* macros/autogen.sh:
	  change "head -1" to "head -n 1"
	* src/engine/gnc-numeric.[ch]:
	  change string_to_gnc_numeric() to return gboolean.
	* src/app-utils/gnc-exp-parser.c:
	* src/backend/file/sixtp-dom-parsers.c:
	  use new string_to_gnc_numeric() API
	* src/engine/gnc-lot.c:
	  64-bit safe for x86_64
	* src/gnome/dialog-scheduledxaction.c:
	* src/gnome/dialog-sxsincelast.c:
	* src/gnome/druid-loan.c:
	* src/gnome-utils/dialog-account.c:
	* src/gnome-utils/gnc-query-list.c:
	* src/import-export/import-match-map.c:
	  use GPOINTER_TO_INT and GINT_TO_POINTER macros to be 64-bit safe.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10315 57a11ea4-9604-0410-9ed3-97b8803252fd
2004-11-01 01:37:10 +00:00
David Hampton d154e92e71 Initial port from the deprecated (in 1.6) guile gh_xxx interface to
the supported scm_xxx interface.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@8013 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-02-22 08:15:53 +00:00
Joshua Sled b4986ed2de 2002-10-16 Joshua Sled <jsled@asynchronous.org>
* src/app-utils/gnc-exp-parser.c (gnc_exp_parser_parse): This
	function now fails correctly if there are un-bound variables in
	the expression.  This causes expressions like 'AUD 1.23' to fail.
	This is related to, but not a fix for, Bug#95474.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7328 57a11ea4-9604-0410-9ed3-97b8803252fd
2002-10-17 05:26:40 +00:00
Joshua Sled 64f30ce2a5 2002-10-14 Joshua Sled <jsled@asynchronous.org>
* src/app-utils/gnc-exp-parser.c (func_op): Remove
	seemed-like-a-bad-idea explicit negation of calculated values;
	fixes Bug#95781.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7316 57a11ea4-9604-0410-9ed3-97b8803252fd
2002-10-15 03:26:46 +00:00
Joshua Sled 135289725c 2002-07-24 Joshua Sled <jsled@asynchronous.org>
* src/scm/fin.scm: Made the exposed calcualtion functions output
	positive values.

	* src/gnome/window-main.c (gnc_main_window_create_menus): Added
	accelerators to SX-related menu items.

	* src/gnome/druid-loan.c: Primary change: actually create the
	Scheduled Transactions which are setup by the user.  Miscellaneous
	other cleanups, text, layout and consistency changes.

	* src/gnome/dialog-sxsincelast.c: Support handling of the
	instance-count in forward-looking transaction creation.  Simplfied
	some of the internal data-representation regarding lists of items
	to be created [removed autoCreateTuple, now uses toCreateTuple].
	Removed some DEBUGging output.  Handles setting up the implicit
	'i' variable.

	* src/gnome/dialog-sx-from-trans.c (sxftd_compute_sx): Create SXes
	with an appropriate initial instance-count value.

	* src/gnome/dialog-scheduledxaction.c
	(schedXact_editor_populate): Create SXes with an appropriate
	initial instance-count value.

	* src/engine/SchedXaction.[ch]: Added support for an
	instance-count, in order to support an implicit 'i' [of N]
	variable to SX formula/function processing.

	* src/engine/SX-ttinfo.c (gnc_ttsplitinfo_free): Made the
	ttsplitinfo_free'ing a bit safer.

	* src/calculation/expression_parser.c: Added support for
	parsing/handling quoted strings.  Intended to be parameters to
	functions.  Fixed bug regarding nested handling of strings in the
	parser.

	* src/backend/file/gnc-schedxaction-xml-v2.c: Added support for
	saving/restoring instance-count field of SXes.

	* src/app-utils/test/test-exp-parser.c
	(run_parser_test): Fixed pass/fail indication check.
	(test_parser): Added tests for string params to functions.

	* ChangeLog: Added entry I forgot from last time.

	* src/app-utils/gnc-exp-parser.c (func_op): Added support for
	typed parameters to functions; params are either numerics or
	strings.  Result of function is now parsed correctly.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7125 57a11ea4-9604-0410-9ed3-97b8803252fd
2002-07-24 22:04:57 +00:00
Joshua Sled 0ebf4e00d1 2002-07-10 Joshua Sled <jsled@asynchronous.org>
* src/gnome/druid-loan.[ch]: Added; Initial implementation of
	Gnome Druid for setting up loan-repayment Scheduled Transactions.

	* src/doc/loans.txt: Added; notes about how loans will be dealt
	with in GnuCash.

	* src/gnome/glade/sched-xact.glade: Added loan-druid.

	* src/gnome/window-main.c (gnc_main_window_create_menus): Added
	'Mortgage/Loan Repayment Setup' Druid invocation menu item.

	* src/scm/fin.scm: Added. Implementations of 'ipmt', 'ppmt', 'pmt'
	and supporting code.

	* src/app-utils/test/test-exp-parser.c (test_parser): Added tests
	for functions-in-expressions.  Added [passed] test for Conrad's
	bug.

	* src/app-utils/gnc-exp-parser.c (func_op): Added. gnc-side
	callback for dealing with a function in an expression.

	* src/calculation/expression_parser.c: Added initial, undocumented
	support for functions in expressions.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7115 57a11ea4-9604-0410-9ed3-97b8803252fd
2002-07-11 05:17:04 +00:00
Joshua Sled 9ca6b3d830 2002-05-21 Joshua Sled <jsled@asynchronous.org>
* src/gnome/dialog-sx-from-trans.c (sxftd_get_end_info): Changed
	to do the strtoul before we free the data itself; fixes "can't
	create once/number-of-occurance SXes" [in from-transaction dialog]
	bug.

	* src/gnome/dialog-scheduledxaction.c (editor_ok_button_clicked):
	Do a very lame but good-enough-for-now check to see if we can
	determine if the template transactions will still balance.  Note
	that we don't do anything with the result of that check, yet, but
	we perform it.

	* src/app-utils/gnc-exp-parser.c (gnc_exp_parser_real_init): Added
	so we can conditionaly add the "predefined variables" to the
	binding table for parsing a given expression.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6886 57a11ea4-9604-0410-9ed3-97b8803252fd
2002-05-22 03:01:43 +00:00
Dave Peticolas 1676f8c02b More work on tests. Make src/calculation a module.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@5187 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-08-19 08:36:47 +00:00