r19666 - gnucash/trunk/src - Rename old gnc_book_get_commodity_table into the newer gnc_commodity_table_get_table.
Geert Janssens
gjanssens at code.gnucash.org
Sat Oct 16 10:05:29 EDT 2010
Author: gjanssens
Date: 2010-10-16 10:05:29 -0400 (Sat, 16 Oct 2010)
New Revision: 19666
Trac: http://svn.gnucash.org/trac/changeset/19666
Modified:
gnucash/trunk/src/app-utils/gnc-euro.c
gnucash/trunk/src/app-utils/gnc-ui-util.c
gnucash/trunk/src/backend/sql/gnc-backend-sql.c
gnucash/trunk/src/backend/xml/gnc-book-xml-v2.c
gnucash/trunk/src/backend/xml/io-example-account.c
gnucash/trunk/src/backend/xml/io-gncxml-v1.c
gnucash/trunk/src/backend/xml/io-gncxml-v2.c
gnucash/trunk/src/backend/xml/test/test-xml-account.c
gnucash/trunk/src/engine/gnc-commodity.h
gnucash/trunk/src/gnome-utils/dialog-commodity.c
gnucash/trunk/src/gnome-utils/gnc-tree-view-commodity.c
gnucash/trunk/src/gnome/dialog-commodities.c
gnucash/trunk/src/import-export/hbci/druid-hbci-initial.c
Log:
Rename old gnc_book_get_commodity_table into the newer gnc_commodity_table_get_table.
Modified: gnucash/trunk/src/app-utils/gnc-euro.c
===================================================================
--- gnucash/trunk/src/app-utils/gnc-euro.c 2010-10-16 12:08:29 UTC (rev 19665)
+++ gnucash/trunk/src/app-utils/gnc-euro.c 2010-10-16 14:05:29 UTC (rev 19666)
@@ -238,7 +238,7 @@
{
gnc_commodity_table *table;
- table = gnc_book_get_commodity_table (gnc_get_current_book ());
+ table = gnc_commodity_table_get_table (gnc_get_current_book ());
return gnc_commodity_table_lookup (table, GNC_COMMODITY_NS_CURRENCY, "EUR");
}
Modified: gnucash/trunk/src/app-utils/gnc-ui-util.c
===================================================================
--- gnucash/trunk/src/app-utils/gnc-ui-util.c 2010-10-16 12:08:29 UTC (rev 19665)
+++ gnucash/trunk/src/app-utils/gnc-ui-util.c 2010-10-16 14:05:29 UTC (rev 19666)
@@ -236,7 +236,7 @@
gnc_commodity_table *
gnc_get_current_commodities (void)
{
- return gnc_book_get_commodity_table (gnc_get_current_book ());
+ return gnc_commodity_table_get_table (gnc_get_current_book ());
}
gchar *
Modified: gnucash/trunk/src/backend/sql/gnc-backend-sql.c
===================================================================
--- gnucash/trunk/src/backend/sql/gnc-backend-sql.c 2010-10-16 12:08:29 UTC (rev 19665)
+++ gnucash/trunk/src/backend/sql/gnc-backend-sql.c 2010-10-16 14:05:29 UTC (rev 19666)
@@ -297,7 +297,7 @@
g_return_if_fail( be != NULL );
g_return_if_fail( book != NULL );
- tbl = gnc_book_get_commodity_table( book );
+ tbl = gnc_commodity_table_get_table( book );
namespaces = gnc_commodity_table_get_namespaces( tbl );
if ( namespaces != NULL )
{
Modified: gnucash/trunk/src/backend/xml/gnc-book-xml-v2.c
===================================================================
--- gnucash/trunk/src/backend/xml/gnc-book-xml-v2.c 2010-10-16 12:08:29 UTC (rev 19665)
+++ gnucash/trunk/src/backend/xml/gnc-book-xml-v2.c 2010-10-16 14:05:29 UTC (rev 19666)
@@ -124,7 +124,7 @@
* And that's OK, since its probably a performance boost anyway.
*/
xmlAddChild(ret, gnc_commodity_dom_tree_create(
- gnc_book_get_commodity_table(book)));
+ gnc_commodity_table_get_table(book)));
xmlAddChild(ret, gnc_pricedb_dom_tree_create(gnc_pricedb_get_db(book)));
if (allow_incompat)
{
Modified: gnucash/trunk/src/backend/xml/io-example-account.c
===================================================================
--- gnucash/trunk/src/backend/xml/io-example-account.c 2010-10-16 12:08:29 UTC (rev 19665)
+++ gnucash/trunk/src/backend/xml/io-example-account.c 2010-10-16 14:05:29 UTC (rev 19666)
@@ -144,7 +144,7 @@
{
gnc_commodity_table *table;
- table = gnc_book_get_commodity_table (gea->book);
+ table = gnc_commodity_table_get_table (gea->book);
clear_up_account_commodity(table, act,
xaccAccountGetCommodity,
Modified: gnucash/trunk/src/backend/xml/io-gncxml-v1.c
===================================================================
--- gnucash/trunk/src/backend/xml/io-gncxml-v1.c 2010-10-16 12:08:29 UTC (rev 19665)
+++ gnucash/trunk/src/backend/xml/io-gncxml-v1.c 2010-10-16 14:05:29 UTC (rev 19666)
@@ -1985,7 +1985,7 @@
{
gnc_commodity_table *ctab;
- ctab = gnc_book_get_commodity_table (pstatus->book);
+ ctab = gnc_commodity_table_get_table (pstatus->book);
if (ctab)
{
@@ -2156,7 +2156,7 @@
gnc_commodity_table *table;
gnc_commodity *com;
- table = gnc_book_get_commodity_table (pstatus->book);
+ table = gnc_commodity_table_get_table (pstatus->book);
com = gnc_commodity_table_lookup(table, cpi->namespace, cpi->id);
Modified: gnucash/trunk/src/backend/xml/io-gncxml-v2.c
===================================================================
--- gnucash/trunk/src/backend/xml/io-gncxml-v2.c 2010-10-16 12:08:29 UTC (rev 19665)
+++ gnucash/trunk/src/backend/xml/io-gncxml-v2.c 2010-10-16 14:05:29 UTC (rev 19666)
@@ -193,7 +193,7 @@
Account *parent, *root;
int type;
- table = gnc_book_get_commodity_table (data->book);
+ table = gnc_commodity_table_get_table (data->book);
clear_up_account_commodity(table, act,
DxaccAccountGetCurrency,
@@ -247,7 +247,7 @@
{
gnc_commodity_table *table;
- table = gnc_book_get_commodity_table (data->book);
+ table = gnc_commodity_table_get_table (data->book);
gnc_commodity_table_insert(table, com);
@@ -262,7 +262,7 @@
{
gnc_commodity_table *table;
- table = gnc_book_get_commodity_table (data->book);
+ table = gnc_commodity_table_get_table (data->book);
xaccTransBeginEdit (trn);
clear_up_transaction_commodity(table, trn,
@@ -793,7 +793,7 @@
/* fix price quote sources */
root = gnc_book_get_root_account(book);
- xaccAccountTreeScrubQuoteSources (root, gnc_book_get_commodity_table(book));
+ xaccAccountTreeScrubQuoteSources (root, gnc_commodity_table_get_table(book));
/* Fix account and transaction commodities */
xaccAccountTreeScrubCommodities (root);
@@ -979,7 +979,7 @@
if (!write_counts(out,
"commodity",
gnc_commodity_table_get_size(
- gnc_book_get_commodity_table(book)),
+ gnc_commodity_table_get_table(book)),
"account",
1 + gnc_account_n_descendants(gnc_book_get_root_account(book)),
"transaction",
@@ -1026,7 +1026,7 @@
GList *lp;
gboolean success = TRUE;
- tbl = gnc_book_get_commodity_table(book);
+ tbl = gnc_commodity_table_get_table(book);
namespaces = gnc_commodity_table_get_namespaces(tbl);
if (namespaces)
@@ -1263,7 +1263,7 @@
be = qof_book_get_backend(book);
gd = gnc_sixtp_gdv2_new(book, FALSE, file_rw_feedback, be->percentage);
gd->counter.commodities_total =
- gnc_commodity_table_get_size(gnc_book_get_commodity_table(book));
+ gnc_commodity_table_get_size(gnc_commodity_table_get_table(book));
gd->counter.accounts_total = 1 +
gnc_account_n_descendants(gnc_book_get_root_account(book));
gd->counter.transactions_total = gnc_book_count_transactions(book);
@@ -1297,7 +1297,7 @@
root = gnc_book_get_root_account(book);
nacc = 1 + gnc_account_n_descendants(root);
- table = gnc_book_get_commodity_table(book);
+ table = gnc_commodity_table_get_table(book);
ncom = gnc_commodity_table_get_size(table);
if (!write_v2_header(out)
Modified: gnucash/trunk/src/backend/xml/test/test-xml-account.c
===================================================================
--- gnucash/trunk/src/backend/xml/test/test-xml-account.c 2010-10-16 12:08:29 UTC (rev 19665)
+++ gnucash/trunk/src/backend/xml/test/test-xml-account.c 2010-10-16 14:05:29 UTC (rev 19666)
@@ -210,7 +210,7 @@
com = xaccAccountGetCommodity (account);
- t = gnc_book_get_commodity_table (sixbook);
+ t = gnc_commodity_table_get_table (sixbook);
new_com = gnc_commodity_table_lookup (t,
gnc_commodity_get_namespace (com),
Modified: gnucash/trunk/src/engine/gnc-commodity.h
===================================================================
--- gnucash/trunk/src/engine/gnc-commodity.h 2010-10-16 12:08:29 UTC (rev 19665)
+++ gnucash/trunk/src/engine/gnc-commodity.h 2010-10-16 14:05:29 UTC (rev 19666)
@@ -691,14 +691,11 @@
@{
*/
-/** Returns the commodity table assoicated with a book.
+/** Returns the commodity table associated with a book.
*/
/*@ dependent @*/
gnc_commodity_table * gnc_commodity_table_get_table(QofBook *book);
-/* XXX backwards compat function; remove me someday */
-#define gnc_book_get_commodity_table gnc_commodity_table_get_table
-
/** compare two tables for equality */
gboolean gnc_commodity_table_equal(gnc_commodity_table *t_1,
gnc_commodity_table *t_2);
Modified: gnucash/trunk/src/gnome/dialog-commodities.c
===================================================================
--- gnucash/trunk/src/gnome/dialog-commodities.c 2010-10-16 12:08:29 UTC (rev 19665)
+++ gnucash/trunk/src/gnome/dialog-commodities.c 2010-10-16 14:05:29 UTC (rev 19666)
@@ -196,7 +196,7 @@
{
gnc_commodity_table *ct;
- ct = gnc_book_get_commodity_table (cd->book);
+ ct = gnc_commodity_table_get_table (cd->book);
for (node = prices; node; node = node->next)
gnc_pricedb_remove_price(pdb, node->data);
Modified: gnucash/trunk/src/gnome-utils/dialog-commodity.c
===================================================================
--- gnucash/trunk/src/gnome-utils/dialog-commodity.c 2010-10-16 12:08:29 UTC (rev 19665)
+++ gnucash/trunk/src/gnome-utils/dialog-commodity.c 2010-10-16 14:05:29 UTC (rev 19666)
@@ -457,7 +457,7 @@
gtk_list_store_clear(GTK_LIST_STORE(model));
gtk_combo_box_set_active(combo_box, -1);
- table = gnc_book_get_commodity_table (gnc_get_current_book ());
+ table = gnc_commodity_table_get_table (gnc_get_current_book ());
commodities = gnc_commodity_table_get_commodities(table, namespace);
for (iterator = commodities; iterator; iterator = iterator->next)
{
Modified: gnucash/trunk/src/gnome-utils/gnc-tree-view-commodity.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-tree-view-commodity.c 2010-10-16 12:08:29 UTC (rev 19665)
+++ gnucash/trunk/src/gnome-utils/gnc-tree-view-commodity.c 2010-10-16 14:05:29 UTC (rev 19666)
@@ -369,7 +369,7 @@
ENTER(" ");
/* Create/get a pointer to the existing model for this set of books. */
- ct = gnc_book_get_commodity_table (book);
+ ct = gnc_commodity_table_get_table (book);
model = gnc_tree_model_commodity_new (book, ct);
/* Set up the view private filter on the common model. */
Modified: gnucash/trunk/src/import-export/hbci/druid-hbci-initial.c
===================================================================
--- gnucash/trunk/src/import-export/hbci/druid-hbci-initial.c 2010-10-16 12:08:29 UTC (rev 19665)
+++ gnucash/trunk/src/import-export/hbci/druid-hbci-initial.c 2010-10-16 14:05:29 UTC (rev 19666)
@@ -389,7 +389,7 @@
(strlen(AB_Account_GetCurrency (hbci_acc)) > 0))
{
currency = gnc_commodity_table_lookup
- (gnc_book_get_commodity_table (gnc_get_current_book ()),
+ (gnc_commodity_table_get_table (gnc_get_current_book ()),
GNC_COMMODITY_NS_CURRENCY, AB_Account_GetCurrency (hbci_acc));
}
More information about the gnucash-changes
mailing list