Mike Alexander's patch to get currency quote retrieval working again,

and some other small currency quote bugfixes.  Closes 333572.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13723 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
David Hampton 2006-04-01 05:45:07 +00:00
parent 73e02ed09a
commit 9a3be57d8d
6 changed files with 17 additions and 6 deletions

View File

@ -1,3 +1,13 @@
2006-04-01 David Hampton <hampton@employees.org>
* src/backend/file/gnc-account-xml-v2.c:
* src/scm/price-quotes.scm:
* src/engine/Account.c:
* src/engine/engine-utilities.scm:
* src/engine/gnc-commodity.c: Mike Alexander's patch to get
currency quote retrieval working again, and some other small
currency quote bugfixes. Closes 333572.
2006-03-31 David Hampton <hampton@employees.org>
* src/engine/Transaction.c: Restore sorting transactions by date

View File

@ -129,7 +129,7 @@ gnc_account_dom_tree_create(Account *act, gboolean exporting)
com = xaccAccountGetCommodity(act);
if (com &&
!gnc_commodity_is_iso(com) &&
(!gnc_commodity_is_iso(com) || xaccAccountGetType(act) == CURRENCY) &&
gnc_commodity_get_quote_flag(com)) {
if (!kvpnode)
kvpnode= xmlNewNode(NULL, BAD_CAST act_slots_string);

View File

@ -1140,6 +1140,8 @@ xaccAccountSetCommodity (Account * acc, gnc_commodity * com)
/* compatability hack - Gnucash 1.8 gets currency quotes when a
non-default currency is assigned to an account. */
gnc_commodity_set_quote_flag(com, TRUE);
gnc_commodity_set_quote_source(com,
gnc_commodity_get_default_quote_source(com));
}
xaccAccountCommitEdit(acc);
}

View File

@ -21,14 +21,13 @@
;; Copyright 2000 Rob Browning <rlb@cs.utexas.edu>
(define (gnc:url->loaded-session url ignore-lock? create-if-needed?)
(define (gnc:url->loaded-session session url ignore-lock? create-if-needed?)
;; Return a <gnc:Book*> representing the data stored at the given
;; url or #f on failure -- this should later be changed to returning
;; the symbol representing the book error... On success, the book
;; will already be loaded.
(let* ((session (gnc:session-new))
(result (and session
(let* ((result (and session
(gnc:session-begin session url
ignore-lock?
create-if-needed?)

View File

@ -108,7 +108,7 @@ struct gnc_quote_source_s {
};
static gnc_quote_source currency_quote_source =
{ TRUE, 0, 0, "CURRENCY", "currency", "currency" };
{ TRUE, 0, 0, "Currency", "CURRENCY", "currency" };
static gnc_quote_source single_quote_sources[] = {
{ FALSE, 0, 0, "AEX", "AEX", "aex" },

View File

@ -738,7 +738,7 @@ Run 'gnc-fq-update' as root to install them.") "\n")))
prices)))))))
(define (gnc:add-quotes-to-book-at-url url)
(let* ((session (gnc:url->loaded-session url #f #f))
(let* ((session (gnc:url->loaded-session (gnc:get-current-session) url #f #f))
(quote-ok? #f))
(gnc:debug "in add-quotes-to-book-at-url")
(if session