r23742 - gnucash/trunk/src/gnome - Bug 721211 - Reconciliation checkboxes fail to sync for split transactions across sub-accounts
Geert Janssens
gjanssens at code.gnucash.org
Wed Jan 22 09:40:19 EST 2014
Author: gjanssens
Date: 2014-01-22 09:40:19 -0500 (Wed, 22 Jan 2014)
New Revision: 23742
Trac: http://svn.gnucash.org/trac/changeset/23742
Modified:
gnucash/trunk/src/gnome/reconcile-view.c
Log:
Bug 721211 - Reconciliation checkboxes fail to sync for split transactions across sub-accounts
Modified: gnucash/trunk/src/gnome/reconcile-view.c
===================================================================
--- gnucash/trunk/src/gnome/reconcile-view.c 2014-01-22 10:56:54 UTC (rev 23741)
+++ gnucash/trunk/src/gnome/reconcile-view.c 2014-01-22 14:40:19 UTC (rev 23742)
@@ -347,6 +347,11 @@
Account *other_account;
GNCReconcileView *current_view;
+ GtkTreeModel *model;
+ GtkTreeIter iter;
+ gboolean valid;
+ gpointer pointer;
+
other_split = node->data;
other_account = xaccSplitGetAccount (other_split);
if (other_split == split)
@@ -366,6 +371,28 @@
/* We can't find it, nothing more I can do about it */
continue;
}
+
+ /* Found the other split. Toggle the reconciled check mark in the view... */
+ model = gtk_tree_view_get_model (GTK_TREE_VIEW (current_view));
+ valid = gtk_tree_model_get_iter_first (model, &iter);
+
+ while (valid)
+ {
+ // Walk through the list, reading each row
+ gtk_tree_model_get (model, &iter, 0, &pointer, -1);
+
+ if(pointer == other_split)
+ {
+ gboolean toggled;
+ gtk_tree_model_get (model, &iter, 5, &toggled, -1);
+ gtk_list_store_set (GTK_LIST_STORE (model), &iter, 5, !toggled, -1);
+ break;
+ }
+
+ valid = gtk_tree_model_iter_next (model, &iter);
+ }
+
+ /* ...and toggle its reconciled state in the internal hash */
gnc_reconcile_view_toggle_split (current_view, other_split);
}
g_list_free (child_accounts);
More information about the gnucash-changes
mailing list