r22992 - gnucash/trunk/src/gnome-utils - Register rewrite Update, bug fixes and allow mouse to change reconcile flag.

Geert Janssens gjanssens at code.gnucash.org
Sat May 18 10:23:23 EDT 2013


Author: gjanssens
Date: 2013-05-18 10:23:22 -0400 (Sat, 18 May 2013)
New Revision: 22992
Trac: http://svn.gnucash.org/trac/changeset/22992

Modified:
   gnucash/trunk/src/gnome-utils/gnc-tree-view-split-reg.c
Log:
Register rewrite Update, bug fixes and allow mouse to change reconcile flag.

Author:    Robert Fewell <14uBobIT at gmail.com>

Modified: gnucash/trunk/src/gnome-utils/gnc-tree-view-split-reg.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-tree-view-split-reg.c	2013-05-18 14:23:12 UTC (rev 22991)
+++ gnucash/trunk/src/gnome-utils/gnc-tree-view-split-reg.c	2013-05-18 14:23:22 UTC (rev 22992)
@@ -4580,12 +4580,29 @@
     case COL_RECN:
         /* Column is RECONCILE */
         gtv_sr_begin_edit (view, NULL, trans);
-
         {
             char rec = 'n';
+
             if (new_text != NULL)
-                rec = new_text[0];
+            {
+                const gchar *cflag = gnc_get_reconcile_str (CREC);
+                const gchar *nflag = gnc_get_reconcile_str (NREC);
+                const char recn_flags[] = {NREC, CREC, 0}; // List of reconciled flags
+                const gchar *flags;
+                gchar *this_flag;
+                gint index = 0;
 
+                flags = g_strconcat (nflag, cflag, NULL); // List of translated strings.
+
+                /* Find the current flag in the list of flags */
+                this_flag = strstr (flags, new_text);
+
+                if (this_flag != NULL)
+                {
+                    index = this_flag - flags;
+                    rec = recn_flags[index];
+                }
+            }
             if (is_trow1)
                 xaccSplitSetReconcile (gtv_sr_get_this_split (view, trans), rec);
             if (is_split)



More information about the gnucash-changes mailing list