Mark the collections as clean after the default items have been

created.  Fixes #337185.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13859 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
David Hampton 2006-04-26 04:14:04 +00:00
parent ccd29a0c12
commit 4a77848ad7
3 changed files with 15 additions and 0 deletions

View File

@ -1,5 +1,9 @@
2006-04-25 David Hampton <hampton@employees.org>
* src/engine/gnc-pricedb.c:
* src/engine/gnc-commodity.c: Mark the collections as clean after
the default items have been created. Fixes #337185.
* src/scm/price-quotes.scm: Fix the crash in #339764.
2006-04-25 Joshua Sled <jsled@asynchronous.org>

View File

@ -1712,6 +1712,8 @@ gnc_commodity_table_copy(gnc_commodity_table *dest,
gboolean
gnc_commodity_table_add_default_data(gnc_commodity_table *table, QofBook *book)
{
QofCollection *col;
ENTER ("table=%p", table);
gnc_commodity_table_add_namespace(table, GNC_COMMODITY_NS_AMEX, book);
gnc_commodity_table_add_namespace(table, GNC_COMMODITY_NS_NYSE, book);
@ -1721,6 +1723,14 @@ gnc_commodity_table_add_default_data(gnc_commodity_table *table, QofBook *book)
#include "iso-4217-currencies.c"
/* We've just created the default namespaces and currencies. Mark
* these collections as clean because there is no USER entered data
* in these collections as of yet. */
col = qof_book_get_collection(book, GNC_ID_COMMODITY);
qof_collection_mark_clean(col);
col = qof_book_get_collection(book, GNC_ID_COMMODITY_NAMESPACE);
qof_collection_mark_clean(col);
LEAVE ("table=%p", table);
return TRUE;
}

View File

@ -584,6 +584,7 @@ gnc_pricedb_create(QofBook * book)
result = g_new0(GNCPriceDB, 1);
qof_instance_init (&result->inst, GNC_ID_PRICEDB, book);
qof_collection_mark_clean(col);
/** \todo This leaks result when the collection is destroyed. When
qofcollection is fixed to allow a destroy notifier, we'll need to