[Gnucash-changes] r13859 - gnucash/trunk - Mark the collections as
clean after the default items have been
David Hampton
hampton at cvs.gnucash.org
Wed Apr 26 00:14:05 EDT 2006
Author: hampton
Date: 2006-04-26 00:14:04 -0400 (Wed, 26 Apr 2006)
New Revision: 13859
Trac: http://svn.gnucash.org/trac/changeset/13859
Modified:
gnucash/trunk/ChangeLog
gnucash/trunk/src/engine/gnc-commodity.c
gnucash/trunk/src/engine/gnc-pricedb.c
Log:
Mark the collections as clean after the default items have been
created. Fixes #337185.
Modified: gnucash/trunk/ChangeLog
===================================================================
--- gnucash/trunk/ChangeLog 2006-04-26 03:30:42 UTC (rev 13858)
+++ gnucash/trunk/ChangeLog 2006-04-26 04:14:04 UTC (rev 13859)
@@ -1,5 +1,9 @@
2006-04-25 David Hampton <hampton at 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 at asynchronous.org>
Modified: gnucash/trunk/src/engine/gnc-commodity.c
===================================================================
--- gnucash/trunk/src/engine/gnc-commodity.c 2006-04-26 03:30:42 UTC (rev 13858)
+++ gnucash/trunk/src/engine/gnc-commodity.c 2006-04-26 04:14:04 UTC (rev 13859)
@@ -1712,6 +1712,8 @@
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 @@
#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;
}
Modified: gnucash/trunk/src/engine/gnc-pricedb.c
===================================================================
--- gnucash/trunk/src/engine/gnc-pricedb.c 2006-04-26 03:30:42 UTC (rev 13858)
+++ gnucash/trunk/src/engine/gnc-pricedb.c 2006-04-26 04:14:04 UTC (rev 13859)
@@ -584,6 +584,7 @@
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
More information about the gnucash-changes
mailing list