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

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


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

Modified:
   gnucash/trunk/src/engine/Transaction.c
   gnucash/trunk/src/engine/Transaction.h
   gnucash/trunk/src/gnome-utils/gnc-tree-control-split-reg.c
   gnucash/trunk/src/gnome-utils/gnc-tree-control-split-reg.h
   gnucash/trunk/src/gnome-utils/gnc-tree-model-split-reg.c
   gnucash/trunk/src/gnome-utils/gnc-tree-model-split-reg.h
   gnucash/trunk/src/gnome-utils/gnc-tree-util-split-reg.c
   gnucash/trunk/src/gnome-utils/gnc-tree-util-split-reg.h
   gnucash/trunk/src/gnome-utils/gnc-tree-view-split-reg.c
   gnucash/trunk/src/gnome/gnc-plugin-basic-commands.c
Log:
Register rewrite Update, bug fixes and allow mouse to change reconcile flag.

This update fixes the following, wrong title spelling, allows the mouse to change reconcile / type flags, change transaction paste, allow changes when in sub account view, reduce view default title lengths, missing help text and changing default find on account page to the new view.
Author: Robert Fewell

Modified: gnucash/trunk/src/engine/Transaction.c
===================================================================
--- gnucash/trunk/src/engine/Transaction.c	2013-05-18 14:01:10 UTC (rev 22990)
+++ gnucash/trunk/src/engine/Transaction.c	2013-05-18 14:23:12 UTC (rev 22991)
@@ -646,7 +646,7 @@
  *   Neither 'from_trans', nor 'from_acc', nor any of 'from's splits may
  *   be modified in any way.
  *
- *   'no_start' if TRUE will not copy the date posted or Num.
+ *   'no_date' if TRUE will not copy the date posted.
  *
  *   The 'to_trans' transaction will end up with valid copies of from's
  *   splits.  In addition, the copies of any of from's splits that were
@@ -654,7 +654,7 @@
 \********************************************************************/
 void
 xaccTransCopyFromClipBoard(const Transaction *from_trans, Transaction *to_trans,
-                           const Account *from_acc, Account *to_acc, gboolean no_start)
+                           const Account *from_acc, Account *to_acc, gboolean no_date)
 {
     Timespec ts = {0,0};
     gboolean change_accounts = FALSE;
@@ -671,10 +671,12 @@
     xaccTransSetCurrency(to_trans, xaccTransGetCurrency(from_trans));
     xaccTransSetDescription(to_trans, xaccTransGetDescription(from_trans));
 
+    if ((xaccTransGetNum(to_trans) == NULL) || (g_strcmp0 (xaccTransGetNum(to_trans), "") == 0))
+        xaccTransSetNum(to_trans, xaccTransGetNum(from_trans));
+
     xaccTransSetNotes(to_trans, xaccTransGetNotes(from_trans));
-    if(!no_start)
+    if(!no_date)
     {
-        xaccTransSetNum(to_trans, xaccTransGetNum(from_trans));
         xaccTransGetDatePostedTS(from_trans, &ts);
         xaccTransSetDatePostedTS(to_trans, &ts);
     }

Modified: gnucash/trunk/src/engine/Transaction.h
===================================================================
--- gnucash/trunk/src/engine/Transaction.h	2013-05-18 14:01:10 UTC (rev 22990)
+++ gnucash/trunk/src/engine/Transaction.h	2013-05-18 14:23:12 UTC (rev 22991)
@@ -244,14 +244,14 @@
  *   Neither 'from_trans', nor 'from_acc', nor any of 'from's splits may be modified
  *   in any way.
  *
- *   'no_start' if TRUE will not copy the date posted or Num.
+ *   'no_date' if TRUE will not copy the date posted.
  *
  *   The 'to_trans' transaction will end up with valid copies of from's
  *   splits.  In addition, the copies of any of from's splits that were
  *   in from_acc (or at least claimed to be) will end up in to_acc.
  */
 void xaccTransCopyFromClipBoard(const Transaction *from_trans, Transaction *to_trans,
-                           const Account *from_acc, Account *to_acc, gboolean no_start);
+                           const Account *from_acc, Account *to_acc, gboolean no_date);
 
 /*################## Added for Reg2 #################*/
 

Modified: gnucash/trunk/src/gnome/gnc-plugin-basic-commands.c
===================================================================
--- gnucash/trunk/src/gnome/gnc-plugin-basic-commands.c	2013-05-18 14:01:10 UTC (rev 22990)
+++ gnucash/trunk/src/gnome/gnc-plugin-basic-commands.c	2013-05-18 14:23:12 UTC (rev 22991)
@@ -624,9 +624,9 @@
 static void
 gnc_main_window_cmd_tools_find_transactions (GtkAction *action, GncMainWindowActionData *data)
 {
-    gnc_ui_find_transactions_dialog_create (NULL);
+//    gnc_ui_find_transactions_dialog_create (NULL);
 /*################## Added for Reg2 #################*/
-//    gnc_ui_find_transactions_dialog_create2 (NULL);
+    gnc_ui_find_transactions_dialog_create2 (NULL);
 /*################## Added for Reg2 #################*/
 }
 

Modified: gnucash/trunk/src/gnome-utils/gnc-tree-control-split-reg.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-tree-control-split-reg.c	2013-05-18 14:01:10 UTC (rev 22990)
+++ gnucash/trunk/src/gnome-utils/gnc-tree-control-split-reg.c	2013-05-18 14:23:12 UTC (rev 22991)
@@ -190,58 +190,6 @@
 /*****************************************************************************/
 /*****************************************************************************/
 
-void
-gnc_tree_control_split_reg_parse_date (GDate *parsed, const char *datestr)
-{
-    int day, month, year;
-    gboolean use_autoreadonly = qof_book_uses_autoreadonly (gnc_get_current_book ());
-
-    if (!parsed) return;
-    if (!datestr) return;
-
-    if (!qof_scan_date (datestr, &day, &month, &year))
-    {
-        // Couldn't parse date, use today
-        struct tm tm_today;
-        gnc_tm_get_today_start (&tm_today);
-        day = tm_today.tm_mday;
-        month = tm_today.tm_mon + 1;
-        year = tm_today.tm_year + 1900;
-    }
-
-    // If we have an auto-read-only threshold, do not accept a date that is
-    // older than the threshold.
-    if (use_autoreadonly)
-    {
-        GDate *d = g_date_new_dmy (day, month, year);
-        GDate *readonly_threshold = qof_book_get_autoreadonly_gdate (gnc_get_current_book());
-        if (g_date_compare (d, readonly_threshold) < 0)
-        {
-            g_warning("Entered date %s is before the \"auto-read-only threshold\"; resetting to the threshold.", datestr);
-#if 0
-            GtkWidget *dialog = gtk_message_dialog_new (NULL,
-                                                       0,
-                                                       GTK_MESSAGE_ERROR,
-                                                       GTK_BUTTONS_OK,
-                                                       "%s", _("Cannot store a transaction at this date"));
-            gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
-                                                     "%s", _("The entered date of the new transaction is older than the \"Read-Only Threshold\" set for this book.  "
-                                                             "This setting can be changed in File -> Properties -> Accounts."));
-            gtk_dialog_run (GTK_DIALOG (dialog));
-            gtk_widget_destroy (dialog);
-#endif
-
-            // Reset the date to the threshold date
-            day = g_date_get_day (readonly_threshold);
-            month = g_date_get_month (readonly_threshold);
-            year = g_date_get_year (readonly_threshold);
-        }
-        g_date_free (d);
-        g_date_free (readonly_threshold);
-    }
-    g_date_set_dmy (parsed, day, month, year);
-}
-
 gboolean
 gnc_tree_control_split_reg_balance_trans (GncTreeViewSplitReg *view, Transaction *trans)
 {
@@ -747,7 +695,7 @@
 
     anchor = gnc_tree_model_split_reg_get_anchor (model);
 
-    split = xaccTransFindSplitByAccount (trans, anchor);
+    split = gnc_tree_model_split_reg_trans_get_split_equal_to_ancestor (trans, anchor);
 
     gtk_tree_path_free (mpath);
 
@@ -952,6 +900,8 @@
 void
 gnc_tree_control_split_reg_delete (GncTreeViewSplitReg *view, gpointer data)
 {
+    GncTreeModelSplitReg *model;
+    Account *anchor;
     RowDepth depth;
     Transaction *trans;
     Split *split;
@@ -971,6 +921,10 @@
         }
     }
 
+    model = gnc_tree_view_split_reg_get_model_from_view (view);
+
+    anchor = gnc_tree_model_split_reg_get_anchor (model);
+
     trans = xaccSplitGetParent (split);
 
     if (trans == NULL)
@@ -1015,8 +969,8 @@
         const char *memo;
         const char *desc;
         char recn;
-
-        if (split == gnc_tree_control_split_reg_get_current_trans_split (view))
+        if ((split == gnc_tree_control_split_reg_get_current_trans_split (view)) ||
+            (split == gnc_tree_model_split_reg_trans_get_split_equal_to_ancestor (trans, anchor)))
         {
             dialog = gtk_message_dialog_new (GTK_WINDOW (window),
                                             GTK_DIALOG_MODAL
@@ -1222,6 +1176,8 @@
     blank_split = gnc_tree_control_split_reg_get_blank_split (view);
     split = gnc_tree_view_split_reg_get_current_split (view);
     trans_split = gnc_tree_control_split_reg_get_current_trans_split (view);
+
+
     depth = gnc_tree_view_reg_get_selected_row_depth (view);
 
     use_split_action_for_num_field = qof_book_use_split_action_for_num_field (gnc_get_current_book());
@@ -1312,7 +1268,8 @@
             // Remove the blank split
             gnc_tree_model_split_reg_set_blank_split_parent (model, trans, TRUE);
 
-            xaccTransBeginEdit (trans);
+            if (!xaccTransIsOpen (trans))
+                xaccTransBeginEdit (trans);
             gnc_tree_view_split_reg_set_dirty_trans (view, trans);
 
             xaccSplitCopyOnto (split, new_split);
@@ -1544,7 +1501,7 @@
                 gtk_dialog_add_button (GTK_DIALOG (dialog),
                               _("_Return"), GTK_RESPONSE_ACCEPT);
 
-                gtk_widget_grab_focus (gtk_dialog_get_widget_for_response(GTK_DIALOG(dialog), GTK_RESPONSE_ACCEPT));
+                gtk_widget_grab_focus (gtk_dialog_get_widget_for_response (GTK_DIALOG(dialog), GTK_RESPONSE_ACCEPT));
 
                 response = gtk_dialog_run (GTK_DIALOG (dialog));
 //                response = gnc_dialog_run (GTK_DIALOG (dialog), "transaction_incomplete");
@@ -1642,7 +1599,8 @@
         trans = xaccSplitGetParent (split);
 
         gnc_tree_view_split_reg_set_dirty_trans (view, trans);
-        xaccTransBeginEdit (trans);
+        if (!xaccTransIsOpen (trans))
+            xaccTransBeginEdit (trans);
 
         xaccSplitSetReconcile (split, rec);
 
@@ -1811,16 +1769,43 @@
 static const Account *clipboard_acct = NULL;
 
 
+/* Return the split account for which ancestor is it's parent */
+static Account *
+gtc_sr_get_account_for_trans_ancestor (const Transaction *trans, const Account *ancestor)
+{
+    GList *node;
+
+    for (node = xaccTransGetSplitList (trans); node; node = node->next)
+    {
+        Split *split = node->data;
+        Account *split_acc = xaccSplitGetAccount (split);
+
+        if (!xaccTransStillHasSplit (trans, split))
+            continue;
+
+        if (ancestor == split_acc)
+            return split_acc;
+
+        if (ancestor && xaccAccountHasAncestor (split_acc, ancestor))
+            return split_acc;
+    }
+    return NULL;
+}
+
+
 void
 gnc_tree_control_split_reg_cut_trans (GncTreeViewSplitReg *view)
 {
     GncTreeModelSplitReg *model;
     Transaction *from_trans;
+    Account *anchor;
 
     g_return_if_fail (GNC_IS_TREE_VIEW_SPLIT_REG (view));
 
     model = gnc_tree_view_split_reg_get_model_from_view (view);
 
+    anchor = gnc_tree_model_split_reg_get_anchor (model);
+
     from_trans = gnc_tree_view_split_reg_get_current_trans (view);
     if (!from_trans)
         return;
@@ -1829,36 +1814,18 @@
     if (gtc_sr_is_trans_readonly_and_warn (view, from_trans))
         return;
 
-    xaccTransBeginEdit (clipboard_trans);
+    if (!xaccTransIsOpen (clipboard_trans))
+        xaccTransBeginEdit (clipboard_trans);
     if (clipboard_trans)
         xaccTransDestroy (clipboard_trans);
 
     clipboard_trans = xaccTransCopyToClipBoard (from_trans);
-    clipboard_acct = gnc_tree_model_split_reg_get_anchor (model);
+    clipboard_acct = gtc_sr_get_account_for_trans_ancestor (from_trans, anchor);
 
     gnc_tree_view_split_reg_delete_current_trans (view);
 }
 
-/* Return the split account for which ancestor is it's parent */
-static Account *
-gtc_sr_trans_get_account_for_splits_ancestor (const Transaction *trans, const Account *ancestor)
-{
-    GList *node;
 
-    for (node = xaccTransGetSplitList (trans); node; node = node->next)
-    {
-        Split *split = node->data;
-        Account *split_acc = xaccSplitGetAccount(split);
-
-        if (!xaccTransStillHasSplit(trans, split))
-            continue;
-
-        if (ancestor && xaccAccountHasAncestor(split_acc, ancestor))
-            return split_acc;
-    }
-    return NULL;
-}
-
 void
 gnc_tree_control_split_reg_copy_trans (GncTreeViewSplitReg *view)
 {
@@ -1876,9 +1843,10 @@
 
     anchor = gnc_tree_model_split_reg_get_anchor (model);
 
-    clipboard_acct = gtc_sr_trans_get_account_for_splits_ancestor (from_trans, anchor);
+    clipboard_acct = gtc_sr_get_account_for_trans_ancestor (from_trans, anchor);
 
-    xaccTransBeginEdit (clipboard_trans);
+    if (!xaccTransIsOpen (clipboard_trans))
+        xaccTransBeginEdit (clipboard_trans);
     if (clipboard_trans)
         xaccTransDestroy (clipboard_trans);
 
@@ -1920,8 +1888,9 @@
         return;
     }
 
-    xaccTransBeginEdit (to_trans);
     gnc_tree_view_split_reg_set_dirty_trans (view, to_trans);
+    if (!xaccTransIsOpen (to_trans))
+        xaccTransBeginEdit (to_trans);
 
     // Remove the blank split
     gnc_tree_model_split_reg_set_blank_split_parent (model, to_trans, TRUE);
@@ -1932,7 +1901,7 @@
     gnc_tree_model_split_reg_set_blank_split_parent (model, to_trans, FALSE);
 
     // Refresh the view
-    g_signal_emit_by_name (model, "refresh_view", NULL);
+    g_signal_emit_by_name (model, "refresh_trans", NULL);
 }
 
 void
@@ -1968,10 +1937,10 @@
         if (g_strcmp0 (text, new_text) == 0)
         {
             xaccTransCopyOnto (trans_from, trans);
-            g_free(text);
+            g_free (text);
             break;
         }
-        g_free(text);
+        g_free (text);
 
         valid = gtk_tree_model_iter_next (GTK_TREE_MODEL (desc_list), &iter);
     }
@@ -2402,8 +2371,8 @@
         if (anchor != NULL) // Registers and sub accounts.
         {
             // Get the split parent who has anchor as a parent, think of sub accounts.
-            accounta = gtc_sr_trans_get_account_for_splits_ancestor (tnodea->data, anchor);
-            accountb = gtc_sr_trans_get_account_for_splits_ancestor (tnodeb->data, anchor);
+            accounta = gtc_sr_get_account_for_trans_ancestor (tnodea->data, anchor);
+            accountb = gtc_sr_get_account_for_trans_ancestor (tnodeb->data, anchor);
 
             // Get the other split parent account.
             splita = xaccSplitGetOtherSplit (xaccTransFindSplitByAccount(tnodea->data, accounta));
@@ -2479,8 +2448,8 @@
     if (anchor != NULL) // Registers and sub accounts.
     {
         // Get the split parent who has anchor as a parent, think of sub accounts.
-        accounta = gtc_sr_trans_get_account_for_splits_ancestor (tnodea->data, anchor);
-        accountb = gtc_sr_trans_get_account_for_splits_ancestor (tnodeb->data, anchor);
+        accounta = gtc_sr_get_account_for_trans_ancestor (tnodea->data, anchor);
+        accountb = gtc_sr_get_account_for_trans_ancestor (tnodeb->data, anchor);
     }
     else // General ledger
     {

Modified: gnucash/trunk/src/gnome-utils/gnc-tree-control-split-reg.h
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-tree-control-split-reg.h	2013-05-18 14:01:10 UTC (rev 22990)
+++ gnucash/trunk/src/gnome-utils/gnc-tree-control-split-reg.h	2013-05-18 14:23:12 UTC (rev 22991)
@@ -80,8 +80,6 @@
 
 gboolean gnc_tree_control_split_reg_balance_trans (GncTreeViewSplitReg *view, Transaction *trans);
 
-void gnc_tree_control_split_reg_parse_date (GDate *parsed, const char *datestr);
-
 Account * gnc_tree_control_split_reg_get_account_by_name (GncTreeViewSplitReg *view, const char *name);
 
 /*****************************************************************************/

Modified: gnucash/trunk/src/gnome-utils/gnc-tree-model-split-reg.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-tree-model-split-reg.c	2013-05-18 14:01:10 UTC (rev 22990)
+++ gnucash/trunk/src/gnome-utils/gnc-tree-model-split-reg.c	2013-05-18 14:23:12 UTC (rev 22991)
@@ -257,7 +257,6 @@
                                      GTK_TYPE_TREE_MODEL,
                                      &tree_model_info);
     }
-
     return gnc_tree_model_split_reg_type;
 }
 
@@ -684,7 +683,7 @@
 }
 
 
-//FIXME this may not be required in the long run, return TRUE if this is a sub account view
+/* Return TRUE if this is a sub account view */
 gboolean
 gnc_tree_model_split_reg_get_sub_account (GncTreeModelSplitReg *model)
 {
@@ -1025,6 +1024,9 @@
         if (!xaccTransStillHasSplit(trans, split))
             continue;
 
+        if (ancestor == split_acc)
+            return split_acc;
+
         if (ancestor && xaccAccountHasAncestor(split_acc, ancestor))
             return split_acc;
     }
@@ -1096,6 +1098,9 @@
     else
         account = model->priv->anchor;
 
+    if (account == NULL)
+        return FALSE;
+
      // Test for the status field.
     if (model->filter_cleared_match & CLEARED_CLEARED)
         chars[i++] = CREC;
@@ -2745,6 +2750,30 @@
 }
 
 
+/* Return the split for which ancestor is it's parent */
+Split *
+gnc_tree_model_split_reg_trans_get_split_equal_to_ancestor (const Transaction *trans, const Account *ancestor)
+{
+    GList *node;
+
+    for (node = xaccTransGetSplitList (trans); node; node = node->next)
+    {
+        Split *split = node->data;
+        Account *split_acc = xaccSplitGetAccount (split);
+
+        if (!xaccTransStillHasSplit (trans, split))
+            continue;
+
+        if (ancestor == split_acc)
+            return split;
+
+        if (ancestor && xaccAccountHasAncestor (split_acc, ancestor))
+            return split;
+    }
+    return NULL;
+}
+
+
 /*******************************************************************/
 /*   Split Register Tree Model - Engine Event Handling Functions   */
 /*******************************************************************/
@@ -2819,9 +2848,16 @@
                     Split *find_split;
                     Transaction *trans;
                     trans = xaccSplitGetParent (split);
-                    find_split = xaccTransFindSplitByAccount (trans, priv->anchor);
+                    if (priv->display_subacc) // Sub accounts
+                        find_split = gnc_tree_model_split_reg_trans_get_split_equal_to_ancestor (trans, priv->anchor);
+                    else
+                        find_split = xaccTransFindSplitByAccount (trans, priv->anchor);
+
                     if (find_split == NULL)
+                    {
+                        g_signal_emit_by_name (model, "selection_move_delete", trans);
                         gtm_sr_delete_trans (model, trans);
+                    }
                 }
             }
             break;
@@ -2829,7 +2865,7 @@
             DEBUG ("ignored event for %p (%s)", split, name);
         }
     }
-    else if (g_strcmp0(type, GNC_ID_TRANS) == 0)
+    else if (g_strcmp0 (type, GNC_ID_TRANS) == 0)
     {
         /* Get the trans.*/
         trans = (Transaction *) entity;

Modified: gnucash/trunk/src/gnome-utils/gnc-tree-model-split-reg.h
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-tree-model-split-reg.h	2013-05-18 14:01:10 UTC (rev 22990)
+++ gnucash/trunk/src/gnome-utils/gnc-tree-model-split-reg.h	2013-05-18 14:23:12 UTC (rev 22991)
@@ -262,7 +262,7 @@
 gboolean
 gnc_tree_model_split_reg_get_read_only (GncTreeModelSplitReg *model, Transaction *trans);
 
-/*FIXME this may not be required in the long run, return TRUE if this is a sub account view */
+/* Return TRUE if this is a sub account view */
 gboolean
 gnc_tree_model_split_reg_get_sub_account (GncTreeModelSplitReg *model);
 
@@ -277,6 +277,9 @@
 void gnc_tree_model_split_reg_change_vis_rows (GncTreeModelSplitReg *model,
                GtkTreePath *start_path, GtkTreePath *end_path);
 
+/* Return the split for which ancestor is it's parent */
+Split * gnc_tree_model_split_reg_trans_get_split_equal_to_ancestor (const Transaction *trans, const Account *ancestor);
+
 /*****************************************************************************/
 
 G_END_DECLS

Modified: gnucash/trunk/src/gnome-utils/gnc-tree-util-split-reg.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-tree-util-split-reg.c	2013-05-18 14:01:10 UTC (rev 22990)
+++ gnucash/trunk/src/gnome-utils/gnc-tree-util-split-reg.c	2013-05-18 14:23:12 UTC (rev 22991)
@@ -462,11 +462,158 @@
     }
     else
         return g_strdup (" ");
+}
 
 
+void
+gnc_tree_util_split_reg_parse_date (GDate *parsed, const char *datestr)
+{
+    int day, month, year;
+    gboolean use_autoreadonly = qof_book_uses_autoreadonly (gnc_get_current_book ());
+
+    if (!parsed) return;
+    if (!datestr) return;
+
+    if (!qof_scan_date (datestr, &day, &month, &year))
+    {
+        // Couldn't parse date, use today
+        struct tm tm_today;
+        gnc_tm_get_today_start (&tm_today);
+        day = tm_today.tm_mday;
+        month = tm_today.tm_mon + 1;
+        year = tm_today.tm_year + 1900;
+    }
+
+    // If we have an auto-read-only threshold, do not accept a date that is
+    // older than the threshold.
+    if (use_autoreadonly)
+    {
+        GDate *d = g_date_new_dmy (day, month, year);
+        GDate *readonly_threshold = qof_book_get_autoreadonly_gdate (gnc_get_current_book());
+        if (g_date_compare (d, readonly_threshold) < 0)
+        {
+            g_warning("Entered date %s is before the \"auto-read-only threshold\"; resetting to the threshold.", datestr);
+#if 0
+            GtkWidget *dialog = gtk_message_dialog_new (NULL,
+                                                       0,
+                                                       GTK_MESSAGE_ERROR,
+                                                       GTK_BUTTONS_OK,
+                                                       "%s", _("Cannot store a transaction at this date"));
+            gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
+                                                     "%s", _("The entered date of the new transaction is older than the \"Read-Only Threshold\" set for this book.  "
+                                                             "This setting can be changed in File -> Properties -> Accounts."));
+            gtk_dialog_run (GTK_DIALOG (dialog));
+            gtk_widget_destroy (dialog);
+#endif
+
+            // Reset the date to the threshold date
+            day = g_date_get_day (readonly_threshold);
+            month = g_date_get_month (readonly_threshold);
+            year = g_date_get_year (readonly_threshold);
+        }
+        g_date_free (d);
+        g_date_free (readonly_threshold);
+    }
+    g_date_set_dmy (parsed, day, month, year);
 }
 
 
+gboolean
+gnc_tree_util_split_reg_rotate (GncTreeViewSplitReg *view, GtkTreeViewColumn *col, Transaction *trans, Split *split)
+{
+    GtkCellRenderer *cr0 = NULL;
+    GList *renderers;
+    ViewCol viewcol;
+
+    // Get the first renderer, it has the view-column value.
+    renderers = gtk_cell_layout_get_cells (GTK_CELL_LAYOUT (col));
+    cr0 = g_list_nth_data (renderers, 0);
+    g_list_free (renderers);
+
+    viewcol = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (cr0), "view_column"));
+
+    if (viewcol == COL_RECN)
+    {
+        const char recn_flags[] = {NREC, CREC, 0}; // List of reconciled flags
+        const gchar *flags;
+        const gchar *text;
+        gchar *this_flag;
+        gint index = 0;
+        char rec;
+
+        flags = recn_flags;
+
+        text = g_strdup_printf("%c", xaccSplitGetReconcile (split));
+
+        /* Find the existing text in the list of flags */
+        this_flag = strstr (flags, text);
+
+        if (this_flag != NULL && *this_flag != '\0')
+        {
+            /* In the list, choose the next item in the list
+               (wrapping around as necessary). */
+            index = this_flag - flags;
+
+            if (flags[index + 1] != '\0')
+                index = index + 1;
+            else
+                index = 0;
+
+            rec = recn_flags[index];
+        }
+        else
+            rec = NREC;
+
+        gnc_tree_view_split_reg_set_dirty_trans (view, trans);
+        if (!xaccTransIsOpen (trans))
+            xaccTransBeginEdit (trans);
+
+        xaccSplitSetReconcile (split, rec);
+        return TRUE;
+    }
+
+    if (viewcol == COL_TYPE)
+    {
+        const char type_flags[] = {TXN_TYPE_INVOICE, TXN_TYPE_PAYMENT, 0}; // list of type flags
+        const gchar *flags;
+        const gchar *text;
+        gchar *this_flag;
+        gint index = 0;
+        char type;
+
+        flags = type_flags;
+
+        text = g_strdup_printf("%c", xaccTransGetTxnType (trans));
+
+        /* Find the existing text in the list of flags */
+        this_flag = strstr (flags, text);
+
+        if (this_flag != NULL && *this_flag != '\0')
+        {
+            /* In the list, choose the next item in the list
+               (wrapping around as necessary). */
+            index = this_flag - flags;
+
+            if (flags[index + 1] != '\0')
+                index = index + 1;
+            else
+                index = 0;
+
+            type = type_flags[index];
+        }
+        else
+            type = TXN_TYPE_NONE;
+
+        gnc_tree_view_split_reg_set_dirty_trans (view, trans);
+        if (!xaccTransIsOpen (trans))
+            xaccTransBeginEdit (trans);
+
+        xaccTransSetTxnType (trans, type);
+        return TRUE;
+    }
+    return FALSE;
+}
+
 /*###########################################################################*/
 
 /* returns TRUE if you need to convert the split's value to the local
@@ -894,13 +1041,15 @@
     gboolean recalc_value = FALSE;
     gboolean expanded = FALSE;
     int denom;
-    Account *account;
+    Account *account = NULL;
 
     ENTER("trans %p and split %p and input is %s and viewcol is %d", trans, split, gnc_numeric_to_string (input), viewcol);
 
     model = gnc_tree_view_split_reg_get_model_from_view (view);
 
-    account = gnc_tree_model_split_reg_get_anchor (model);
+    /* Check for sub account view */
+    if (!gnc_tree_model_split_reg_get_sub_account (model))
+        account = gnc_tree_model_split_reg_get_anchor (model);
 
     expanded = gnc_tree_view_split_reg_trans_expanded (view, trans);
 

Modified: gnucash/trunk/src/gnome-utils/gnc-tree-util-split-reg.h
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-tree-util-split-reg.h	2013-05-18 14:01:10 UTC (rev 22990)
+++ gnucash/trunk/src/gnome-utils/gnc-tree-util-split-reg.h	2013-05-18 14:23:12 UTC (rev 22991)
@@ -48,17 +48,17 @@
 
 const char * gnc_tree_util_split_reg_template_get_fcred_entry (Split *split);
 
-
 gchar * gnc_tree_util_split_reg_get_date_help (GDate *date);
 
+void gnc_tree_util_split_reg_parse_date (GDate *parsed, const char *datestr);
 
+gboolean gnc_tree_util_split_reg_rotate (GncTreeViewSplitReg *view, GtkTreeViewColumn *col,
+                                         Transaction *trans, Split *split);
 
-
 gboolean gnc_tree_util_split_reg_is_multi (Split *split);
 
 gboolean gnc_tree_util_split_reg_needs_amount (GncTreeViewSplitReg *view, Split *split);
 
-
 void gnc_tree_util_split_reg_set_value_for (GncTreeViewSplitReg *view, Transaction *trans,
                                             Split *split, gnc_numeric input, gboolean force);
 

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:01:10 UTC (rev 22990)
+++ gnucash/trunk/src/gnome-utils/gnc-tree-view-split-reg.c	2013-05-18 14:23:12 UTC (rev 22991)
@@ -155,18 +155,18 @@
 
 static ColDef all_tree_view_split_reg_columns[] = {
     {COL_DATE, GNC_TREE_MODEL_SPLIT_REG_COL_DATE,
-     "Date", "date", "00/00/0000xxx",
+     "Date", "date", "00/00/0000",
      GNC_TREE_VIEW_COLUMN_VISIBLE_ALWAYS, 1,
      gtv_sr_edited_cb, gtv_sr_editable_start_editing_cb,
      gnc_tree_control_split_reg_sort_by_date},
 
     {COL_DUEDATE, -1,
-     "Due Date", "duedate", "00/00/0000xxx",
+     "Due Date", "duedate", "00/00/0000",
      GNC_TREE_VIEW_COLUMN_VISIBLE_ALWAYS, 1,
      gtv_sr_edited_cb, gtv_sr_editable_start_editing_cb, NULL},
 
     {COL_NUMACT, GNC_TREE_MODEL_SPLIT_REG_COL_NUMACT,
-     "Num / Act / Act", "numact", "0000xxx",
+     "Num / Act / Act", "numact", "0000",
      GNC_TREE_VIEW_COLUMN_VISIBLE_ALWAYS, 0,
      gtv_sr_edited_cb, gtv_sr_editable_start_editing_cb,
      gnc_tree_control_split_reg_sort_by_numact},
@@ -184,55 +184,55 @@
      gnc_tree_control_split_reg_sort_by_account},
 
     {COL_RECN, GNC_TREE_MODEL_SPLIT_REG_COL_RECN,
-     "R", "recn", "xxx",
+     "R", "recn", "xx",
      GNC_TREE_VIEW_COLUMN_VISIBLE_ALWAYS, 0,
      gtv_sr_edited_cb, gtv_sr_editable_start_editing_cb,
      gnc_tree_control_split_reg_sort_by_recn},
 
     {COL_TYPE, -1,
-     "Type", "type", "xxx",
+     "Type", "type", "xx",
      GNC_TREE_VIEW_COLUMN_VISIBLE_ALWAYS, 0,
      gtv_sr_edited_cb, gtv_sr_editable_start_editing_cb, NULL},
 
     {COL_VALUE, -1,
-     "Value", "value", "xxxxxxxx",
+     "Value", "value", "00000",
      GNC_TREE_VIEW_COLUMN_VISIBLE_ALWAYS, 0,
      gtv_sr_edited_cb, gtv_sr_editable_start_editing_cb, NULL},
 
     {COL_AMOUNT, -1,
-     "Amount", "amount", "xxxxxxxx",
+     "Amount", "amount", "00000",
      GNC_TREE_VIEW_COLUMN_VISIBLE_ALWAYS, 0,
      gtv_sr_edited_cb, gtv_sr_editable_start_editing_cb, NULL},
 
     {COL_AMTVAL, -1,
-     "Amount / Value", "amtval", "xxxxxxxx",
+     "Amount / Value", "amtval", "00000",
      GNC_TREE_VIEW_COLUMN_VISIBLE_ALWAYS, 1,
      gtv_sr_edited_cb, gtv_sr_editable_start_editing_cb, NULL},
 
     {COL_RATE, -1,
-     "Rate", "rate", "xxxxxxxx",
+     "Rate", "rate", "00000",
      GNC_TREE_VIEW_COLUMN_VISIBLE_ALWAYS, 0,
      gtv_sr_edited_cb, gtv_sr_editable_start_editing_cb, NULL},
 
     {COL_PRICE, -1,
-     "Price", "price", "xxxxxxxx",
+     "Price", "price", "00000",
      GNC_TREE_VIEW_COLUMN_VISIBLE_ALWAYS, 1,
      gtv_sr_edited_cb, gtv_sr_editable_start_editing_cb, NULL},
 
     {COL_DEBIT, GNC_TREE_MODEL_SPLIT_REG_COL_DEBIT,
-     "Debit", "debit", "xxxxxxxxxxxxx",
+     "Debit", "debit", "00000",
      GNC_TREE_VIEW_COLUMN_VISIBLE_ALWAYS, 1,
      gtv_sr_edited_cb, gtv_sr_editable_start_editing_cb,
      gnc_tree_control_split_reg_sort_by_value},
 
     {COL_CREDIT, GNC_TREE_MODEL_SPLIT_REG_COL_CREDIT,
-     "Credit", "credit", "xxxxxxxxxxxxx",
+     "Credit", "credit", "00000",
      GNC_TREE_VIEW_COLUMN_VISIBLE_ALWAYS, 1,
      gtv_sr_edited_cb, gtv_sr_editable_start_editing_cb,
      gnc_tree_control_split_reg_sort_by_value},
 
     {COL_BALANCE, -1,
-     "Balance", "balance", "xxxxxxxx",
+     "Balance", "balance", "00000",
      GNC_TREE_VIEW_COLUMN_VISIBLE_ALWAYS, 0,
      NULL, NULL, NULL},
 
@@ -242,7 +242,7 @@
      NULL, NULL, NULL},
 
     {COL_COMM, -1,
-     "Commodity", "commodity", "xxxxxxx",
+     "Commodity", "commodity", "xxxxxxxx",
      GNC_TREE_VIEW_COLUMN_VISIBLE_ALWAYS, 0,
      NULL, NULL, NULL},
 };
@@ -322,7 +322,6 @@
                                      "GncTreeViewSplitReg",
                                      &our_info, 0);
     }
-
     return gnc_tree_view_split_reg_type;
 }
 
@@ -1050,6 +1049,7 @@
     if ((!model->use_double_line) && (model->style != REG2_STYLE_JOURNAL))
     {
         gtk_tree_view_collapse_row (GTK_TREE_VIEW (view), spath);
+        priv->expanded = FALSE;
         LEAVE("single line transaction foramt");
     }
 
@@ -1059,6 +1059,7 @@
         gtk_tree_path_down (spath);
         gtk_tree_view_collapse_row (GTK_TREE_VIEW (view), spath);
         gtk_tree_path_up (spath);
+        priv->expanded = FALSE;
         LEAVE("double line transaction format");
     }
 
@@ -1733,7 +1734,8 @@
                 {
                     Account *acct = xaccSplitGetAccount (split);
 
-                    if ((xaccTransCountSplits (trans) == 0) && model->type != GENERAL_LEDGER2 && model->type != SEARCH_LEDGER2) // First split on blank transaction
+                    // This will be all but the General Ledger which has anchor == NULL
+                    if ((xaccTransCountSplits (trans) == 0) && (anchor != NULL)) // First split on blank transaction
                         acct = anchor;
 
                     if (acct != NULL)
@@ -1767,6 +1769,8 @@
 
     case COL_RECN:
         /* Column is RECN */
+        /* Override default alignment */
+        g_object_set( cell, "xalign", 0.5, NULL );
         editable = FALSE;
         s = "";
         if (is_trow1 && !expanded)
@@ -1812,6 +1816,8 @@
 
     case COL_TYPE:
         /* Column is TYPE */
+        /* Override default alignment */
+        g_object_set( cell, "xalign", 0.5, NULL );
         if (is_split)
             g_object_set (cell, "cell-background", "white", (gchar*)NULL);
 
@@ -1919,7 +1925,7 @@
             {
                 num = xaccSplitGetAmount (split);
                 s = xaccPrintAmount (num, gnc_account_print_info (xaccSplitGetAccount (split), SHOW_SYMBOL));
-                editable = FALSE;
+                editable = TRUE;
             }
 
             if (gtv_sr_get_imbalance (trans))
@@ -2483,7 +2489,10 @@
 
     // Test if the transaction is balanced.
     if (gnc_tree_control_split_reg_balance_trans (view, view->priv->dirty_trans))
+    {
+        view->priv->trans_confirm = CANCEL;
         return TRUE;
+    }
 
     window = gnc_tree_view_split_reg_get_parent (view);
     dialog = gtk_message_dialog_new (GTK_WINDOW (window),
@@ -2592,7 +2601,8 @@
         Timespec ts = {0,0};
         xaccTransGetDatePostedTS (trans, &ts);
 
-        xaccTransBeginEdit (trans);
+        if (!xaccTransIsOpen (trans))
+            xaccTransBeginEdit (trans);
         view->priv->dirty_trans = trans;
 
         if (ts.tv_sec == 0)
@@ -2641,7 +2651,7 @@
         }
 
         /* Lets update the help text */
-        gnc_tree_control_split_reg_parse_date (&date, new_string);
+        gnc_tree_util_split_reg_parse_date (&date, new_string);
         date_string = gnc_tree_util_split_reg_get_date_help (&date);
 
         if (view->help_text)
@@ -2721,6 +2731,8 @@
         {
             g_object_set_data (G_OBJECT (view), "data-edited", GINT_TO_POINTER (TRUE));
         }
+        if (g_object_get_data (G_OBJECT (view->priv->temp_cr), "current-flag") != NULL) //recn flag
+            g_object_set_data (G_OBJECT (view->priv->temp_cr), "current-flag", NULL);
 
         g_object_set_data (G_OBJECT (view->priv->temp_cr), "cell-editable", NULL);
         view->priv->temp_cr = NULL;
@@ -3065,7 +3077,7 @@
                 {
                 case BANK_REGISTER2: //FIXME These if statements may not be required
                 if (depth == TRANS1 || depth == TRANS2 || depth == SPLIT3)
-                        gtk_tree_view_column_set_title (tvc, _("Withdrawl"));
+                        gtk_tree_view_column_set_title (tvc, _("Withdrawal"));
                     break;
 
                 case CASH_REGISTER2:
@@ -3346,7 +3358,7 @@
             else if (depth == TRANS2)
                 help = g_strdup (_("Reason the transaction was voided"));
             else if (depth == SPLIT3)
-                help = g_strdup (" ");
+                help = g_strdup (_("Enter the account to transfer from, or choose one from the list"));
             break;
         }
         break;
@@ -3629,6 +3641,7 @@
     ViewCol viewcol;
     GtkTreeIter m_iter;
     Split *split = NULL;
+    Split *rotate_split = NULL;
     Transaction *trans = NULL;
     gboolean is_trow1, is_trow2, is_split, is_blank;
 
@@ -3710,8 +3723,18 @@
                         return TRUE;
                     }
 
+                    // Get the right split for rotate test
+                    if (is_split)
+                        rotate_split = split;
+                    else
+                        rotate_split = gtv_sr_get_this_split (view, trans);
+
                     /* Set cursor to column */
-                    gtk_tree_view_set_cursor (GTK_TREE_VIEW (view), spath, col, TRUE);
+                    if (!gnc_tree_util_split_reg_rotate (view, col, trans, rotate_split))
+                        gtk_tree_view_set_cursor (GTK_TREE_VIEW (view), spath, col, TRUE);
+                    else
+                        gtk_tree_view_set_cursor (GTK_TREE_VIEW (view), spath, col, FALSE);
+
                     gtk_tree_path_free (spath);
                     gtk_tree_path_free (mpath);
                     return TRUE;
@@ -4143,7 +4166,7 @@
         if (is_trow1)
         {
             GDate parsed_date;
-            gnc_tree_control_split_reg_parse_date (&parsed_date, new_text);
+            gnc_tree_util_split_reg_parse_date (&parsed_date, new_text);
             if (g_date_valid (&parsed_date))
             {
                 gtv_sr_begin_edit (view, NULL, trans);
@@ -4218,12 +4241,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)
@@ -4247,6 +4287,7 @@
 
     case COL_TRANSFERVOID:
     case COL_AMTVAL:
+    case COL_AMOUNT:
     case COL_PRICE:
     case COL_DEBIT:
     case COL_CREDIT:
@@ -4384,6 +4425,13 @@
                 input_used = TRUE;
             }
 
+            // The price of stock / shares, editable only when expanded and sub_account
+            if (viewcol == COL_AMOUNT)
+            {
+                gnc_tree_util_set_number_for_input (view, trans, split, input, COL_AMTVAL);
+                input_used = TRUE;
+            }
+
             // The price of stock / shares
             if (viewcol == COL_PRICE)
             {
@@ -4651,15 +4699,7 @@
                                          GNC_SX_CREDIT_FORMULA,
                                          NULL);
 
-                /* If the value can be parsed into a numeric result (without any
-                 * further variable definitions), store that numeric value
-                 * additionally in the kvp. Otherwise store a zero numeric
-                 * there.*/
-                parse_result = gnc_exp_parser_parse_separate_vars (NULL, &new_value, &error_loc, NULL);
-                if (!parse_result)
-                {
-                    new_value = gnc_numeric_zero();
-                }
+                new_value = gnc_numeric_zero();
                 kvp_frame_set_slot_path (kvpf, kvp_value_new_numeric (new_value),
                                          GNC_SX_ID,
                                          GNC_SX_CREDIT_NUMERIC,
@@ -4706,13 +4746,7 @@
                                          GNC_SX_DEBIT_FORMULA,
                                          NULL);
 
-                /* If the value can be parsed into a numeric result, store that
-                 * numeric value additionally. See above comment.*/
-                parse_result = gnc_exp_parser_parse_separate_vars (NULL, &new_value, &error_loc, NULL);
-                if (!parse_result)
-                {
-                    new_value = gnc_numeric_zero();
-                }
+                new_value = gnc_numeric_zero();
                 kvp_frame_set_slot_path (kvpf, kvp_value_new_numeric (new_value),
                                          GNC_SX_ID,
                                          GNC_SX_DEBIT_NUMERIC,
@@ -5001,27 +5035,33 @@
 {
     GtkEditable *editable = GTK_EDITABLE (entry);
     GncTreeViewSplitReg *view = GNC_TREE_VIEW_SPLIT_REG (user_data);
+
+    const gchar *cflag = gnc_get_reconcile_str (CREC);
+    const gchar *nflag = gnc_get_reconcile_str (NREC);
+
     const gchar *flags;
     gchar *this_flag;
     gchar *result;
     static char ss[2];
-
     gint index = 0;
 
-/*FIXME this works, but is there a simpler way ? */
-
-    flags = gnc_get_reconcile_flag_order();
-
     result = g_ascii_strdown (text, length);
 
     if (g_object_get_data (G_OBJECT (view->priv->temp_cr), "current-flag") != NULL)
         index = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (view->priv->temp_cr), "current-flag"));
+    else
+    {
+        if (g_strcmp0 (g_object_get_data (G_OBJECT (view->priv->temp_cr), "current-string"), nflag) == 0)
+            index = 0;
+    }
 
+    flags = g_strconcat (nflag, cflag, NULL);
+
     /* So we can test for space */
     ss[0] = ' ';
     ss[1] = '\0';
 
-    /* Find the current flag in the list of flags */
+    /* Find the entered text in the list of flags */
     this_flag = strstr (flags, text);
 
     if (this_flag == NULL || *this_flag == '\0')
@@ -5031,26 +5071,19 @@
             /* In the list, choose the next item in the list
                (wrapping around as necessary). */
 
-            flags = flags + index;
-            if (*flags != '\0')
-            {
+            if (flags[index + 1] != '\0')
                 index = index + 1;
-                g_free (result);
-                result = g_strdup (flags);
-            }
             else
-            {
-                flags = flags - index;
-                index = 1;
-                g_free (result);
-                result = g_strdup (flags);
-            }
+                index = 0;
+
+            g_free (result);
+            result = g_strdup_printf("%c", flags[index]);
         }
         else
         {
             /* If it's not there (or the list is empty) use default_flag */
             g_free (result);
-            result  = g_strdup (gnc_get_reconcile_str (NREC));
+            result = g_strdup (gnc_get_reconcile_str (NREC));
         }
     }
     else
@@ -5075,7 +5108,6 @@
 }
 
 
-
 /* Callback for changing type setting with space bar */
 static void
 gtv_sr_type_cb (GtkEntry    *entry,
@@ -5091,26 +5123,25 @@
     gchar *this_flag;
     gchar *result;
     static char ss[2];
-
     gint index = 0;
 
-/*FIXME this works, but is there a simpler way ? */
-
-
-//    flags = gnc_get_reconcile_flag_order();
-
     flags = type_flags;
 
     result = g_ascii_strup (text, length);
 
     if (g_object_get_data (G_OBJECT (view->priv->temp_cr), "current-flag") != NULL)
         index = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (view->priv->temp_cr), "current-flag"));
+    else
+    {
+        if (g_strcmp0 (g_object_get_data (G_OBJECT (view->priv->temp_cr), "current-string"), "I") == 0)
+            index = 0;
+    }
 
     /* So we can test for space */
     ss[0] = ' ';
     ss[1] = '\0';
 
-    /* Find the current flag in the list of flags */
+    /* Find the entered text in the list of flags */
     this_flag = strstr (flags, text);
 
     if (this_flag == NULL || *this_flag == '\0')
@@ -5120,20 +5151,13 @@
             /* In the list, choose the next item in the list
                (wrapping around as necessary). */
 
-            flags = flags + index;
-            if (*flags != '\0')
-            {
+            if (flags[index + 1] != '\0')
                 index = index + 1;
-                g_free (result);
-                result = g_strdup (flags);
-            }
             else
-            {
-                flags = flags - index;
-                index = 1;
-                g_free (result);
-                result = g_strdup (flags);
-            }
+                index = 0;
+
+            g_free (result);
+            result = g_strdup_printf("%c", flags[index]);
         }
         else
         {
@@ -5161,7 +5185,6 @@
     g_signal_stop_emission_by_name (editable, "insert_text");
 
     g_free (result);
-
 }
 
 /*###########################################################################*/
@@ -5262,9 +5285,6 @@
     /* NUMBER / ACTION COLUMN */
     else if (viewcol == COL_NUMACT)
     {
-        GtkTreeModel *listmodel;
-        GtkTreeIter iter;
-
         if ((depth == TRANS1) || ((depth == TRANS2) && (qof_book_use_split_action_for_num_field (gnc_get_current_book()))))
         {
             entry = GTK_ENTRY (editable);
@@ -5730,6 +5750,8 @@
             else
                 // Jump to the dirty_trans.
                 gnc_tree_control_split_reg_jump_to (view, view->priv->dirty_trans, NULL, FALSE);
+
+            return FALSE;
         }
 
         if (view->priv->trans_confirm == DISCARD)
@@ -5751,6 +5773,8 @@
             gnc_tree_view_split_reg_format_trans (view, view->priv->dirty_trans);
 
             view->priv->dirty_trans = NULL;
+
+            return FALSE;
         }
     }
     return TRUE;



More information about the gnucash-changes mailing list