[Gnucash-changes] r13360 - gnucash/trunk/src/engine - Use correct function name qof_instance_set_dirty.

Chris Shoemaker chris at cvs.gnucash.org
Wed Feb 22 09:22:31 EST 2006


Author: chris
Date: 2006-02-22 09:22:30 -0500 (Wed, 22 Feb 2006)
New Revision: 13360
Trac: http://svn.gnucash.org/trac/changeset/13360

Modified:
   gnucash/trunk/src/engine/gnc-lot.c
Log:
   Use correct function name qof_instance_set_dirty.
   Comment on current state of Lot behavior.


Modified: gnucash/trunk/src/engine/gnc-lot.c
===================================================================
--- gnucash/trunk/src/engine/gnc-lot.c	2006-02-22 06:01:07 UTC (rev 13359)
+++ gnucash/trunk/src/engine/gnc-lot.c	2006-02-22 14:22:30 UTC (rev 13360)
@@ -29,9 +29,10 @@
  * src/doc/lots.txt for implmentation overview.
  *
  * XXX Lots are not currently treated in a correct transactional
- * manner.  There's no dirty flag, and, at this time, the backend
- * is not signalled about the fact that a lot has changed.  This
- * is true both in the Scrub2.c and in src/gnome/lot-viewer.c
+ * manner.  There's now a per-Lot dirty flag in the QofInstance, but
+ * this code still needs to emit the correct signals when a lot has
+ * changed.  This is true both in the Scrub2.c and in
+ * src/gnome/lot-viewer.c
  *
  * HISTORY:
  * Created by Linas Vepstas May 2002
@@ -171,7 +172,7 @@
 gnc_lot_set_title (GNCLot *lot, const char *str)
 {
    if (!lot) return;
-   qof_instance_mark_dirty(QOF_INSTANCE(lot));
+   qof_instance_set_dirty(QOF_INSTANCE(lot));
    return kvp_frame_set_str (lot->inst.kvp_data, "/title", str);
 }
 
@@ -179,7 +180,7 @@
 gnc_lot_set_notes (GNCLot *lot, const char *str)
 {
    if (!lot) return;
-   qof_instance_mark_dirty(QOF_INSTANCE(lot));
+   qof_instance_set_dirty(QOF_INSTANCE(lot));
    return kvp_frame_set_str (lot->inst.kvp_data, "/notes", str);
 }
 
@@ -235,7 +236,7 @@
         gnc_num_dbg_to_string (split->amount),
         gnc_num_dbg_to_string (split->value));
    acc = xaccSplitGetAccount (split);
-   qof_instance_mark_dirty(QOF_INSTANCE(lot));
+   qof_instance_set_dirty(QOF_INSTANCE(lot));
    if (NULL == lot->account)
    {
       xaccAccountInsertLot (acc, lot);
@@ -270,7 +271,7 @@
    if (!lot || !split) return;
 
    ENTER ("(lot=%p, split=%p)", lot, split);
-   qof_instance_mark_dirty(QOF_INSTANCE(lot));
+   qof_instance_set_dirty(QOF_INSTANCE(lot));
    lot->splits = g_list_remove (lot->splits, split);
    split->lot = NULL;
    lot->is_closed = -1;   /* force an is-closed computation */



More information about the gnucash-changes mailing list