Skip to content

Commit

Permalink
2001-06-02 Dave Peticolas <dave@krondo.com>
Browse files Browse the repository at this point in the history
	* src/scm/report/price-scatter.scm: same as below

	* src/scm/prefs.scm: same as below

	* src/gnc-ui-util.c: same as below

	* src/gnome/druid-qif-import.c: same as below

	* src/gnome/dialog-price-editor.c: same as below

	* src/gnome/dialog-fincalc.c: same as below

	* src/SplitLedger.c: use gnc_default_currency instead
	of gnc_locale_default_currency.

	* src/scm/options-utilities.scm: use new func

	* src/scm/report/transaction-report.scm: handle splits with no
	account

	* src/gnome/dialog-account.c: use new func

	* src/gnome/window-main-summarybar.c: use new func

	* src/guile/gnc.gwp: wrap new func below

	* src/guile/global-options.c (gnc_default_currency): new func
	to return user-set default currency

	* src/engine/gnc-book.c (gnc_book_backup_file): use g_free
	instead of free.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@4377 57a11ea4-9604-0410-9ed3-97b8803252fd
  • Loading branch information
jdavisp3 committed Jun 2, 2001
1 parent 18b559e commit e078856
Show file tree
Hide file tree
Showing 13 changed files with 538 additions and 503 deletions.
34 changes: 34 additions & 0 deletions ChangeLog
@@ -1,3 +1,37 @@
2001-06-02 Dave Peticolas <dave@krondo.com>

* src/scm/report/price-scatter.scm: same as below

* src/scm/prefs.scm: same as below

* src/gnc-ui-util.c: same as below

* src/gnome/druid-qif-import.c: same as below

* src/gnome/dialog-price-editor.c: same as below

* src/gnome/dialog-fincalc.c: same as below

* src/SplitLedger.c: use gnc_default_currency instead
of gnc_locale_default_currency.

* src/scm/options-utilities.scm: use new func

* src/scm/report/transaction-report.scm: handle splits with no
account

* src/gnome/dialog-account.c: use new func

* src/gnome/window-main-summarybar.c: use new func

* src/guile/gnc.gwp: wrap new func below

* src/guile/global-options.c (gnc_default_currency): new func
to return user-set default currency

* src/engine/gnc-book.c (gnc_book_backup_file): use g_free
instead of free.

2001-06-02 Christian Stimming <stimming@tuhh.de>

* po/gnc-glossary.txt: Updated glossary, 15 new terms, and lots of
Expand Down
8 changes: 4 additions & 4 deletions src/SplitLedger.c
Expand Up @@ -590,7 +590,7 @@ gnc_split_get_value_denom (Split *split)
denom = xaccAccountGetCurrencySCU (xaccSplitGetAccount (split));
if (denom == 0)
{
gnc_commodity *commodity = gnc_locale_default_currency ();
gnc_commodity *commodity = gnc_default_currency ();
denom = gnc_commodity_get_fraction (commodity);
if (denom == 0)
denom = 100;
Expand All @@ -607,7 +607,7 @@ gnc_split_get_quantity_denom (Split *split)
denom = xaccAccountGetCommoditySCU (xaccSplitGetAccount (split));
if (denom == 0)
{
gnc_commodity *commodity = gnc_locale_default_currency ();
gnc_commodity *commodity = gnc_default_currency ();
denom = gnc_commodity_get_fraction (commodity);
if (denom == 0)
denom = 100;
Expand Down Expand Up @@ -644,7 +644,7 @@ sr_set_cell_fractions (SplitRegister *reg, Split *split)

xaccSetPriceCellFraction (reg->sharesCell, 10000);

commodity = gnc_locale_default_currency ();
commodity = gnc_default_currency ();
fraction = gnc_commodity_get_fraction (commodity);

xaccSetPriceCellFraction (reg->debitCell, fraction);
Expand Down Expand Up @@ -3681,7 +3681,7 @@ xaccSRGetEntryHandler (VirtualLocation virt_loc,

currency = xaccTransGetCurrency (trans);
if (!currency)
currency = gnc_locale_default_currency ();
currency = gnc_default_currency ();

imbalance = gnc_numeric_convert (imbalance,
gnc_commodity_get_fraction (currency),
Expand Down
5 changes: 3 additions & 2 deletions src/engine/gnc-book.c
Expand Up @@ -463,14 +463,15 @@ gnc_book_backup_file(GNCBook *book)
}
g_free(bin_bkup);
}

timestamp = xaccDateUtilGetStampNow ();
backup = g_new (char, strlen (datafile) + strlen (timestamp) + 6);
strcpy (backup, datafile);
strcat (backup, ".");
strcat (backup, timestamp);
strcat (backup, ".xac");
free (timestamp);
g_free (timestamp);

if(link(datafile, backup) != 0)
{
gnc_book_push_error(
Expand Down
4 changes: 2 additions & 2 deletions src/gnc-ui-util.c
Expand Up @@ -520,7 +520,7 @@ gnc_find_or_create_equity_account (GNCEquityType equity_type,
}

if (!base_name_exists &&
gnc_commodity_equiv (currency, gnc_locale_default_currency ()))
gnc_commodity_equiv (currency, gnc_default_currency ()))
{
g_free (name);
name = g_strdup (base_name);
Expand Down Expand Up @@ -777,7 +777,7 @@ gnc_default_print_info (gboolean use_symbol)

lc = gnc_localeconv ();

info.commodity = gnc_locale_default_currency ();
info.commodity = gnc_default_currency ();

info.max_decimal_places = lc->frac_digits;
info.min_decimal_places = lc->frac_digits;
Expand Down
4 changes: 1 addition & 3 deletions src/gnome/dialog-account.c
Expand Up @@ -1849,9 +1849,7 @@ gnc_ui_new_account_window_internal (Account *base_account,

gnc_resume_gui_refresh ();

commodity = gnc_lookup_currency_option ("International",
"Default Currency",
gnc_locale_default_currency ());
commodity = gnc_default_currency ();

gnc_commodity_edit_set_commodity (GNC_COMMODITY_EDIT (aw->currency_edit),
commodity);
Expand Down
5 changes: 3 additions & 2 deletions src/gnome/dialog-fincalc.c
Expand Up @@ -32,6 +32,7 @@
#include "finvar.h"
#include "glade-gnc-dialogs.h"
#include "glade-support.h"
#include "global-options.h"
#include "gnc-amount-edit.h"
#include "gnc-commodity.h"
#include "gnc-component-manager.h"
Expand Down Expand Up @@ -148,7 +149,7 @@ fi_to_gui(FinCalcDialog *fcd)

pmt = double_to_gnc_numeric (fcd->financial_info.pmt, 100000, GNC_RND_ROUND);

commodity = gnc_locale_default_currency ();
commodity = gnc_default_currency ();

total = gnc_numeric_mul (npp, pmt, gnc_commodity_get_fraction (commodity),
GNC_RND_ROUND);
Expand Down Expand Up @@ -501,7 +502,7 @@ gnc_ui_fincalc_dialog_create(void)
GtkWidget *hbox;
GtkWidget *edit;

commodity = gnc_locale_default_currency ();
commodity = gnc_default_currency ();

fcd = g_new0(FinCalcDialog, 1);

Expand Down
3 changes: 2 additions & 1 deletion src/gnome/dialog-price-editor.c
Expand Up @@ -31,6 +31,7 @@
#include "dialog-utils.h"
#include "glade-gnc-dialogs.h"
#include "glade-support.h"
#include "global-options.h"
#include "gnc-amount-edit.h"
#include "gnc-commodity-edit.h"
#include "gnc-component-manager.h"
Expand Down Expand Up @@ -301,7 +302,7 @@ price_to_gui (PricesDialog *pdb_dialog)
else
{
commodity = NULL;
currency = gnc_locale_default_currency ();
currency = gnc_default_currency ();
date.tv_sec = time (NULL);
date.tv_nsec = 0;
source = "";
Expand Down
2 changes: 1 addition & 1 deletion src/gnome/druid-qif-import.c
Expand Up @@ -256,7 +256,7 @@ gnc_ui_qif_import_druid_make(void) {
gnc_ui_update_commodity_picker(retval->currency_picker,
GNC_COMMODITY_NS_ISO,
gnc_commodity_get_printname
(gnc_locale_default_currency()));
(gnc_default_currency()));

if(!retval->show_doc_pages) {
gnome_druid_set_page(GNOME_DRUID(retval->druid),
Expand Down
15 changes: 3 additions & 12 deletions src/gnome/window-main-summarybar.c
Expand Up @@ -260,10 +260,7 @@ gnc_ui_accounts_recurse (AccountGroup *group, GList **currency_list,
GList *list;
GList *node;

default_currency =
gnc_lookup_currency_option("International",
"Default Currency",
gnc_locale_default_currency ());
default_currency = gnc_default_currency ();

if (euro)
{
Expand Down Expand Up @@ -366,10 +363,7 @@ gnc_main_window_summary_refresh (GNCMainSummary * summary)
GList *current;
gboolean euro;

default_currency =
gnc_lookup_currency_option("International",
"Default Currency",
gnc_locale_default_currency ());
default_currency = gnc_default_currency ();

euro = gnc_lookup_boolean_option("International",
"Enable EURO support",
Expand Down Expand Up @@ -460,10 +454,7 @@ gnc_main_window_summary_new (void) {
GNCMainSummary * retval = g_new0(GNCMainSummary, 1);
GtkWidget * summarybar;
GNCCurrencyItem * def_item;
gnc_commodity * default_currency =
gnc_lookup_currency_option ("International",
"Default Currency",
gnc_locale_default_currency ());
gnc_commodity * default_currency = gnc_default_currency ();

retval->hbox = gtk_hbox_new (FALSE, 5);
retval->totals_combo = gtk_select_new ();
Expand Down
4 changes: 1 addition & 3 deletions src/scm/options-utilities.scm
Expand Up @@ -199,9 +199,7 @@
pagename name-report-currency
sort-tag
(N_ "Select the currency to display the values of this report in.")
(gnc:option-value
(gnc:lookup-global-option "International"
"Default Currency")))))
(gnc:default-currency))))

;; These are common options for the selection of the report's
;; currency/commodity.
Expand Down
3 changes: 1 addition & 2 deletions src/scm/prefs.scm
Expand Up @@ -168,8 +168,7 @@
(gnc:make-simple-boolean-option
(N_ "International") (N_ "Enable EURO support")
"d" (N_ "Enables support for the European Union EURO currency")
(gnc:is-euro-currency
(gnc:locale-default-currency))))
(gnc:is-euro-currency (gnc:default-currency))))


;;; Register options
Expand Down
6 changes: 3 additions & 3 deletions src/scm/report/price-scatter.scm
Expand Up @@ -63,14 +63,14 @@

(gnc:options-add-currency!
options pagename-price optname-report-currency "d")

(add-option
(gnc:make-commodity-option
pagename-price optname-price-commodity
"e"
(N_ "Calculate the price of this commodity.")
(gnc:locale-default-currency)))
(gnc:default-currency)))

(add-option
(gnc:make-multichoice-option
pagename-price optname-price-source
Expand Down

0 comments on commit e078856

Please sign in to comment.