Commit Graph

76 Commits

Author SHA1 Message Date
Christian Stimming
8a25065a54 Make sure not to pass NULL to PERR() message macro
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@14795 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-09-04 16:27:31 +00:00
David Hampton
fc5fe1e5a6 Regularize the account type names into the form ACCT_TYPE_xxx.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@14599 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-08-06 22:07:12 +00:00
David Hampton
ea0bd0c5a1 Restore the auto decimal places settings from gconf at startup. Fixes
#344938.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@14369 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-06-15 03:54:53 +00:00
Christian Stimming
a0bbda961f Fix retrieval of reconcile abbreviation if the translators erroneously
did not use the same string length as the english string. Bug #339722.




git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13888 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-04-30 10:32:34 +00:00
Derek Atkins
d9c78bd0fe Fix a bunch of 64-bit compile issues.
* src/engine/Transaction.c:
	* src/engine/test/test-date.c:
	* src/backend/file/test/test-dom-converters1.c:
	  Fix 64-bit compile: Use G_GUINT64_FORMAT instead of %llu or lld
	  for Timespec seconds.
	* src/app-utils/gnc-ui-util.c:
	  Fix 64-bit compile issues:
	  - Use QOF_SCANF_LLD instead of GNC_SCANF_LLD.
	  - Use QOF_SCANF_LLD and G_GINT64_FORMAT properly.
	  - replace %lld with G_GINT64_FORMAT



git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13780 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-04-14 16:45:10 +00:00
David Hampton
9c24273f83 Replace NS_ISO with NS_CURRENCY. This substitution was already
performed by the called functions, so there this change is purely
cosmetic.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13776 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-04-14 02:36:00 +00:00
Neil Williams
ba61372f97 Replacing deprecated code.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13750 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-04-07 18:52:28 +00:00
Christian Stimming
7ce02733e8 Replace index(3) by strchr(3) and rindex(3) by strrchr(3) because the
latter is more widely available.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13540 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-03-08 15:52:51 +00:00
David Hampton
fb9607fcbd Cache the result of a gconf lookup for a currency choice. Add a new
callback hook for when a user changes a currency setting (default
account or report).


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13536 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-03-08 05:14:54 +00:00
David Hampton
8090e0ee3c Update the preferences dialog to allow any unicode character as the
separator.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13470 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-03-04 06:49:23 +00:00
David Hampton
22ee7eb47f Convert the account separator from a single character to a character
string.  This allows multibyte unicode characters to be the account
separator character. Fixes 333061.  Reworked a couple of routines that
pull account names into their component parts.  Also fixed a bug in
the new account dialog when creating multiple accounts at once.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13467 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-03-04 03:04:46 +00:00
David Hampton
bf46ee7847 Move the storage for the account separator character into Account.c
(default ':') and set it with an accessor function at startup and when
it is changed in the preferences/gconf.  Eliminate unnecessary passing
around of the account separator character.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13435 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-03-02 07:20:33 +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
David Hampton
7694d2f473 Rework of Sylvain Defresne's patch to support multi-byte unicode
thousands separator and decimal point characters when printing
numbers.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13433 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-03-01 23:01:43 +00:00
David Hampton
d85c866635 Add 'const' qualifiers to various functions.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13414 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-02-27 23:57:16 +00:00
David Hampton
f0445f9aa3 Mark a couple of function arguments as const.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13401 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-02-26 20:06:15 +00:00
Chris Shoemaker
53cd1da9cf Remove uses of deprecated qof_session_get_current_session() and
qof_session_set_current_session().  GnuCash now manages its own current
   session.  New function: gnc_current_session_exist() to test whether there
   is a current session.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13355 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-02-22 02:39:02 +00:00
Christian Stimming
1f61299d0d When translation potentially empty strings, check always for nonemptyness. Should avoid #330179 in the rest of the code as well.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13206 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-02-11 11:14:43 +00:00
Chris Shoemaker
bbb8d1be33 Teach PrintAmountInternal() to correctly handle a reciprocal denominator.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13091 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-02-04 15:06:19 +00:00
Derek Atkins
36f92f2d23 Thomas Klausner's NetBSD patch.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@12928 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-01-22 00:27:11 +00:00
Chris Shoemaker
6400638073 Don't test numeric parsing for numbers that overflow, we'd fail.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@12306 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-01-09 03:33:46 +00:00
Chris Shoemaker
d20e593428 Fix floating point exception by checking for overflow.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@12278 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-01-06 22:28:38 +00:00
David Hampton
9771d0f80c Use the g_get_home_dir() function instead of getenv("HOME"). The
former tries multiple places to get the path to the users home
directory.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@12025 57a11ea4-9604-0410-9ed3-97b8803252fd
2005-11-23 22:43:32 +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
0b8a944f30 Update FSF street address.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@11964 57a11ea4-9604-0410-9ed3-97b8803252fd
2005-11-17 05:35:02 +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
Christian Stimming
f61dfb488e Make experimental locale-specific taxes depending on configure switch.
2005-01-29  Christian Stimming  <stimming@tuhh.de>

	* configure.in, src/tax/us/gncmod-tax-us.c,
	src/report/locale-specific/us/gncmod-locale-reports-us.c,
	src/app-utils/gnc-ui-util.c: Make localized tax categories
	disabled by default; can be enabled by
	--enable-locale-specific-tax switch.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10432 57a11ea4-9604-0410-9ed3-97b8803252fd
2005-01-29 12:54:31 +00:00
Christian Stimming
ef435bc0ac More German tax work.
2005-01-16  Christian Stimming  <stimming@tuhh.de>

	* src/app-utils/gnc-ui-util.c: Modify tax option code to load
	tax-de_DE module in the appropriate locale.

	* src/report/locale-specific/us/gncmod-locale-reports-us.c,
	de_DE.scm: Add scheme module for locale-report/us
	resp. locale-report/de_DE again because it seems to be required.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10417 57a11ea4-9604-0410-9ed3-97b8803252fd
2005-01-16 16:41:39 +00:00
Derek Atkins
b2635e8ba8 * src/app-utils/options.scm: Create two new functions to centralize
date-selection option creation.
	* src/app-utils/app-utils.scm: export the new scheme functions
	* src/app-utils/prefs.scm: Modify Herbert's patch to centralize
	  the date-selection option code.
	* src/report/report-system/options-utilities.scm: use the new
	  centralized date-selection option-creation code.

	* src/app-utils/global-options.c:
	* src/app-utils/global-options.h: add gnc_lookup_date_option()
	  function
	* src/app-utils/gnc-ui-util.c:
	* src/app-utils/gnc-ui-util.h: add
	  gnc_ui_account_get_balance_in_currency() function
	* src/app-utils/prefs.scm: add preferences for summarybar
	* src/engine/Account.c:
	* src/engine/Account.h: add
	  xaccAccountConvertBalanceToCurrencyAsOfDate() function
	* src/gnome/window-main-summarybar.c: summarybar can now display
	  a grand total of all commodities, profits of a period of time
	  and net assets at the end of the period; summarybar can be
	  configured with some options under edit->preferences


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@9780 57a11ea4-9604-0410-9ed3-97b8803252fd
2004-01-15 23:41:53 +00:00
Derek Atkins
e703054fb7 * src/app-utils/gnc-ui-util.[ch]: add a function to parse a numeric
with the caller providing all the locale-specific information


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@8847 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-07-10 03:10:08 +00:00
David Hampton
b9bf61723a Move the F::Q stuff from the util files to live with the rest of the
commodity code in gnc-commodity.c.  Turn quote sources into an object.
Eliminate the gnucash internal quote source names in favor of the F::Q
names.  Dynamically find and add installed F::Q sources that aren't
hard coded into gnucash.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@8812 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-07-02 03:35:20 +00:00
Linas Vepstas
cfdbd2e916 start mergine in qof book and session changes
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@8761 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-06-27 02:38:40 +00:00
David Hampton
2fc7cc7372 Consolidate all the tests for an ISO 4217 commodity into a pair of
functions.  Use these functions throughout the code.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@8252 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-04-29 06:15:34 +00:00
David Hampton
f906f0b11b Push gui independent functions into the engine.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@8146 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-04-01 04:05:32 +00:00
Christian Stimming
1c2adca030 2003-03-31 Herbert Thoma <herbie@hthoma.de>
* src/engine/gnc-pricedb.c
	* src/engine/gnc-pricedb.h: new function
	gnc_pricedb_lookup_latest_any_currency, return any available
	prices for given commodity regardless of currency

	* src/app-utils/gnc-ui-util.c: do a "two stage" price lookup in
	gnc_ui_convert_balance_to_currency if no price for the commodity
	is found in the requested currency, then look for prices in any
	currency and for a exchange rate from the price currency to the
	requested currency

	* src/gnome/gnc-split-reg.c: do currency conversion and show the
	value in the status line of stock and mutual fund accounts


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@8145 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-03-31 19:12:21 +00:00
Derek Atkins
7572f487b0 * src/app-utils/gnc-ui-util.c:
* src/gnome/top-level.c:
	  the Account Separator option was moved to the Accounts page --
	  reference is correctly.
	Fixes #106673


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@8072 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-03-13 04:51:24 +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
Derek Atkins
772c25105f Herbert Thoma's patch to add a "display currency" column to the account tree.
* src/app-utils/gnc-ui-util.c:
	* src/app-utils/gnc-ui-util.h:
	* src/gnome-utils/gnc-account-tree.c:
	* src/gnome/window-acct-tree.c:
	* src/scm/main-window.scm:
	  recycle ACCOUNT_BALANCE_EURO and ACCOUNT_TOTAL_EURO account tree
	  columns to display balance resp. total in default report currency

	* src/import-export/import-backend.c: in
	  gnc_import_TransInfo_refresh_destacc move g_assert before first
	  assignment, otherwise I get a syntax error


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7977 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-02-11 04:06:55 +00:00
Derek Atkins
10d6ff1c68 * src/app-utils/gnc-ui-utils.c: Don't round unless force_fit is true.
Fixes Debian Bug #179802.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7948 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-02-05 16:01:19 +00:00
David Hampton
f931ae8c42 Provide reasonable default directories for the "Save As" and "Export"
operations.  #94428


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7822 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-01-13 01:09:27 +00:00
David Hampton
4ee7b8d775 Fix a missed reference from when the preferences were rearranged.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7811 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-01-11 23:17:06 +00:00
David Hampton
66b943f4c8 Add support to the GNCPrintAmountInfo data structure to allow
truncation/rounding of numbers when the maximum number of decimal
places is reached.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7690 57a11ea4-9604-0410-9ed3-97b8803252fd
2002-12-16 01:40:26 +00:00
Joshua Sled
ab20128481 2002-12-15 Joshua Sled <jsled@asynchronous.org>
* src/gnome/glade/sched-xact.glade: Clarified some text, removed
	unused widgets.

	* src/app-utils/gnc-ui-util.c (xaccSPrintAmount): Added useful comment.

	* src/gnome/druid-loan.c (ld_create_sxes): Re-written; now a much
	more principled implementation which passes a test-script; fixes
	Bug#100088, Bug#100085.

	* src/engine/SX-ttinfo.c (gnc_ttsplitinfo_get_debit_formula):
	Fixed potentially-nasty mem-handling bug.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7688 57a11ea4-9604-0410-9ed3-97b8803252fd
2002-12-16 00:35:27 +00:00
David Hampton
eb868d71d5 Consolidate all knowledge about Finance::Quote sources into one
place. Rename functions.  Determine if F::Q is installed properly, and
if so, what quote sources are installed.  Clean up actual calls to
F::Q.  If F::Q isn't available, dim the entire quotes frame in the
Edit Account dialog, and add a warning message about F::Q.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7650 57a11ea4-9604-0410-9ed3-97b8803252fd
2002-12-08 00:21:25 +00:00
Christian Stimming
a0e5b8f830 2002-11-30 Christian Stimming <stimming@tuhh.de>
* src/app-utils/gnc-ui-util.[hc]: Added
	gnc_locale_default_currency_nodefault function since
	locale_default_currency might return a non-locale related
	currency. Fix xaccSPrintAmount. Fixes #95404.

	* src/engine/iso-4217-currencies.scm ("rouble"): Fix mnemonic for
	Russian Rouble which is "RUR" instead of RUB.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7574 57a11ea4-9604-0410-9ed3-97b8803252fd
2002-11-30 13:38:34 +00:00
Christian Stimming
63d2dedaf5 Your daily translation fix. Also, move html tags out of the translation
messages into format strings.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7423 57a11ea4-9604-0410-9ed3-97b8803252fd
2002-10-29 18:24:21 +00:00
David Hampton
870f8ecbb1 Move gnc_get_session function to a better location.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7294 57a11ea4-9604-0410-9ed3-97b8803252fd
2002-10-12 21:33:15 +00:00
Derek Atkins
e670560f59 Applied Joachim Breitner's patch for VWD price-sources:
It may not be appropriate for a newcomer in the gnucash community
	like me, but could you please please include this simple patch in
	the 1.6.7 release? The VWD source (already in Finance::Quote) is
	the only source that has the German Deka-Fonts.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7175 57a11ea4-9604-0410-9ed3-97b8803252fd
2002-08-14 21:20:25 +00:00
David Hampton
7c85fa2b35 If 'auto decimal places' is set then make sure all numbers have a
decimal point in them.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7077 57a11ea4-9604-0410-9ed3-97b8803252fd
2002-07-03 05:59:51 +00:00
David Hampton
5518f193e7 Tweak a warning message to provide more info.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6827 57a11ea4-9604-0410-9ed3-97b8803252fd
2002-05-07 03:22:04 +00:00