gnucash maint: Multiple changes pushed

Robert Fewell bobit at code.gnucash.org
Mon Apr 19 06:08:06 EDT 2021


Updated	 via  https://github.com/Gnucash/gnucash/commit/cd355c20 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/2da78db5 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/c2a7b8ea (commit)
	from  https://github.com/Gnucash/gnucash/commit/33b8a192 (commit)



commit cd355c20fc7f17aa27c84d2793248b9661dea2ac
Author: Robert Fewell <14uBobIT at gmail.com>
Date:   Sun Apr 18 13:35:09 2021 +0100

    Bug 648335 - Add preference for 'Review Created Transactions'
    
    Add a preference for the 'Review Created Transactions' setting in the
    'Sinse Last Run' dialog so that the default can be specified.

diff --git a/gnucash/gnome/dialog-sx-since-last-run.c b/gnucash/gnome/dialog-sx-since-last-run.c
index 2d435507d..a597c647d 100644
--- a/gnucash/gnome/dialog-sx-since-last-run.c
+++ b/gnucash/gnome/dialog-sx-since-last-run.c
@@ -992,6 +992,9 @@ gnc_ui_sx_since_last_run_dialog (GtkWindow *parent, GncSxInstanceModel *sx_insta
     dialog->editing_model = gnc_sx_slr_tree_model_adapter_new (sx_instances);
     dialog->review_created_txns_toggle = GTK_TOGGLE_BUTTON(gtk_builder_get_object (builder, "review_txn_toggle"));
 
+    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(dialog->review_created_txns_toggle),
+                                  gnc_prefs_get_bool (GNC_PREFS_GROUP_STARTUP, GNC_PREF_SET_REVIEW));
+
     dialog->created_txns = auto_created_txn_guids;
 
     {
diff --git a/gnucash/gnome/dialog-sx-since-last-run.h b/gnucash/gnome/dialog-sx-since-last-run.h
index 4d7d91294..e86b6188e 100644
--- a/gnucash/gnome/dialog-sx-since-last-run.h
+++ b/gnucash/gnome/dialog-sx-since-last-run.h
@@ -34,6 +34,7 @@
 #define GNC_PREFS_GROUP_STARTUP "dialogs.sxs.since-last-run"
 #define GNC_PREF_RUN_AT_FOPEN   "show-at-file-open"
 #define GNC_PREF_SHOW_AT_FOPEN  "show-notify-window-at-file-open"
+#define GNC_PREF_SET_REVIEW     "review-transactions"
 
 typedef struct _GncSxSlrTreeModelAdapter GncSxSlrTreeModelAdapter;
 typedef struct _GncSxSinceLastRunDialog GncSxSinceLastRunDialog;
diff --git a/gnucash/gschemas/org.gnucash.dialogs.sxs.gschema.xml.in b/gnucash/gschemas/org.gnucash.dialogs.sxs.gschema.xml.in
index 6fbfd4c4b..bdd25e2eb 100644
--- a/gnucash/gschemas/org.gnucash.dialogs.sxs.gschema.xml.in
+++ b/gnucash/gschemas/org.gnucash.dialogs.sxs.gschema.xml.in
@@ -22,6 +22,11 @@
       <summary>Show "since last run" notification dialog when a file is opened.</summary>
       <description>This setting controls whether the scheduled transactions notification-only "since last run" dialog is shown when a data file is opened (if "since last run" processing is enabled on file open).  This includes the initial opening of the data file when GnuCash starts.  If this setting is active, show the dialog, otherwise it is not shown.</description>
     </key>
+    <key name="review-transactions" type="b">
+      <default>false</default>
+      <summary>Set "Review Created Transactions" as the default for the "since last run" dialog.</summary>
+      <description>This setting controls whether as default the "review created transactions" is set for the "since last run" dialog.</description>
+    </key>
   </schema>
 
   <schema id="org.gnucash.dialogs.sxs.transaction-editor" path="/org/gnucash/dialogs/scheduled-trans/transaction-editor/">
diff --git a/gnucash/gtkbuilder/dialog-sx.glade b/gnucash/gtkbuilder/dialog-sx.glade
index b13052791..5d73f7849 100644
--- a/gnucash/gtkbuilder/dialog-sx.glade
+++ b/gnucash/gtkbuilder/dialog-sx.glade
@@ -524,7 +524,7 @@
           </object>
           <packing>
             <property name="left_attach">1</property>
-            <property name="top_attach">3</property>
+            <property name="top_attach">4</property>
           </packing>
         </child>
         <child>
@@ -537,7 +537,7 @@
           </object>
           <packing>
             <property name="left_attach">0</property>
-            <property name="top_attach">4</property>
+            <property name="top_attach">5</property>
           </packing>
         </child>
         <child>
@@ -588,7 +588,7 @@
           </object>
           <packing>
             <property name="left_attach">0</property>
-            <property name="top_attach">5</property>
+            <property name="top_attach">6</property>
           </packing>
         </child>
         <child>
@@ -627,7 +627,7 @@
           </object>
           <packing>
             <property name="left_attach">1</property>
-            <property name="top_attach">8</property>
+            <property name="top_attach">9</property>
           </packing>
         </child>
         <child>
@@ -666,7 +666,7 @@
           </object>
           <packing>
             <property name="left_attach">1</property>
-            <property name="top_attach">7</property>
+            <property name="top_attach">8</property>
           </packing>
         </child>
         <child>
@@ -685,7 +685,7 @@
           </object>
           <packing>
             <property name="left_attach">0</property>
-            <property name="top_attach">6</property>
+            <property name="top_attach">7</property>
             <property name="width">2</property>
           </packing>
         </child>
@@ -701,7 +701,7 @@
           </object>
           <packing>
             <property name="left_attach">0</property>
-            <property name="top_attach">7</property>
+            <property name="top_attach">8</property>
           </packing>
         </child>
         <child>
@@ -716,7 +716,24 @@
           </object>
           <packing>
             <property name="left_attach">0</property>
-            <property name="top_attach">8</property>
+            <property name="top_attach">9</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkCheckButton" id="pref/dialogs.sxs.since-last-run/review-transactions">
+            <property name="label" translatable="yes">Set 'Re_view Created Transactions' as default</property>
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="receives_default">False</property>
+            <property name="tooltip_text" translatable="yes">Set Review Created Transactions as the default in the Since Last Run dialog.</property>
+            <property name="halign">start</property>
+            <property name="use_underline">True</property>
+            <property name="draw_indicator">True</property>
+          </object>
+          <packing>
+            <property name="left_attach">0</property>
+            <property name="top_attach">3</property>
+            <property name="width">2</property>
           </packing>
         </child>
         <child>

commit 2da78db5e46448d5322bc80c4aec73423c47759d
Author: Robert Fewell <14uBobIT at gmail.com>
Date:   Sun Apr 18 13:05:29 2021 +0100

    Reformat schedule transaction source files for white space

diff --git a/gnucash/gnome-utils/gnc-sx-list-tree-model-adapter.c b/gnucash/gnome-utils/gnc-sx-list-tree-model-adapter.c
index fead85072..b40c2785c 100644
--- a/gnucash/gnome-utils/gnc-sx-list-tree-model-adapter.c
+++ b/gnucash/gnome-utils/gnc-sx-list-tree-model-adapter.c
@@ -1,34 +1,36 @@
-/*
- * gnc-sx-list-tree-model-adapter.c
- *
- * Copyright (C) 2006 Josh Sled <jsled at asynchronous.org>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 and/or version 3 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * As a special exception, permission is granted to link the binary module
- * resultant from this code with the OpenSSL project's "OpenSSL" library (or
- * modified versions of it that use the same license as the "OpenSSL"
- * library), and distribute the linked executable.  You must obey the GNU
- * General Public License in all respects for all of the code used other than
- * "OpenSSL". If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not
- * wish to do so, delete this exception statement from your version of this
- * file.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, contact:
- *
- * Free Software Foundation           Voice:  +1-617-542-5942
- * 51 Franklin Street, Fifth Floor    Fax:    +1-617-542-2652
- * Boston, MA  02110-1301,  USA       gnu at gnu.org
- */
+/********************************************************************\
+ * gnc-sx-list-tree-model-adapter.c                                 *
+ *                                                                  *
+ * Copyright (C) 2006 Joshua Sled <jsled at asynchronous.org>          *
+ *                                                                  *
+ * This program is free software; you can redistribute it and/or    *
+ * modify it under the terms of version 2 and/or version 3 of the   *
+ * GNU General Public License as published by the Free Software     *
+ * Foundation.                                                      *
+ *                                                                  *
+ * As a special exception, permission is granted to link the binary *
+ * module resultant from this code with the OpenSSL project's       *
+ * "OpenSSL" library (or modified versions of it that use the same  *
+ * license as the "OpenSSL" library), and distribute the linked     *
+ * executable.  You must obey the GNU General Public License in all *
+ * respects for all of the code used other than "OpenSSL". If you   *
+ * modify this file, you may extend this exception to your version  *
+ * of the file, but you are not obligated to do so. If you do not   *
+ * wish to do so, delete this exception statement from your version *
+ * of this file.                                                    *
+ *                                                                  *
+ * This program is distributed in the hope that it will be useful,  *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of   *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    *
+ * GNU General Public License for more details.                     *
+ *                                                                  *
+ * You should have received a copy of the GNU General Public License*
+ * along with this program; if not, contact:                        *
+ *                                                                  *
+ * Free Software Foundation           Voice:  +1-617-542-5942       *
+ * 51 Franklin Street, Fifth Floor    Fax:    +1-617-542-2652       *
+ * Boston, MA  02110-1301,  USA       gnu at gnu.org                   *
+\********************************************************************/
 
 #include <config.h>
 #include <glib.h>
@@ -66,19 +68,19 @@ enum
 
 static GObjectClass *parent_class = NULL;
 
-static void gnc_sx_list_tree_model_adapter_class_init(GncSxListTreeModelAdapterClass *klass);
-static void gsltma_tree_model_interface_init(gpointer g_iface, gpointer iface_data);
-static void gsltma_tree_sortable_interface_init(gpointer g_iface, gpointer iface_data);
-static void gnc_sx_list_tree_model_adapter_init(GTypeInstance *instance, gpointer klass);
-static void gnc_sx_list_tree_model_adapter_dispose(GObject *obj);
-static void gnc_sx_list_tree_model_adapter_finalize(GObject *obj);
+static void gnc_sx_list_tree_model_adapter_class_init (GncSxListTreeModelAdapterClass *klass);
+static void gsltma_tree_model_interface_init (gpointer g_iface, gpointer iface_data);
+static void gsltma_tree_sortable_interface_init (gpointer g_iface, gpointer iface_data);
+static void gnc_sx_list_tree_model_adapter_init (GTypeInstance *instance, gpointer klass);
+static void gnc_sx_list_tree_model_adapter_dispose (GObject *obj);
+static void gnc_sx_list_tree_model_adapter_finalize (GObject *obj);
 
 static guint gnc_sx_list_tree_model_adapter_signals[LAST_SIGNAL] = {0};
 
-static GncSxInstances* gsltma_get_sx_instances_from_orig_iter(GncSxListTreeModelAdapter *model, GtkTreeIter *orig_iter);
+static GncSxInstances* gsltma_get_sx_instances_from_orig_iter (GncSxListTreeModelAdapter *model, GtkTreeIter *orig_iter);
 
 GType
-gnc_sx_list_tree_model_adapter_get_type(void)
+gnc_sx_list_tree_model_adapter_get_type (void)
 {
     static GType type = 0;
     if (type == 0)
@@ -111,29 +113,29 @@ gnc_sx_list_tree_model_adapter_get_type(void)
         type = g_type_register_static (G_TYPE_OBJECT,
                                        "GncSxListTreeModelAdapterType",
                                        &info, 0);
-        g_type_add_interface_static(type,
-                                    GTK_TYPE_TREE_MODEL,
-                                    &itree_model_info);
-        g_type_add_interface_static(type,
-                                    GTK_TYPE_TREE_SORTABLE,
-                                    &itree_sortable_info);
+        g_type_add_interface_static (type,
+                                     GTK_TYPE_TREE_MODEL,
+                                     &itree_model_info);
+        g_type_add_interface_static (type,
+                                     GTK_TYPE_TREE_SORTABLE,
+                                     &itree_sortable_info);
     }
     return type;
 }
 
 static void
-gnc_sx_list_tree_model_adapter_class_init(GncSxListTreeModelAdapterClass *klass)
+gnc_sx_list_tree_model_adapter_class_init (GncSxListTreeModelAdapterClass *klass)
 {
     GObjectClass *obj_class = G_OBJECT_CLASS(klass);
 
-    parent_class = g_type_class_peek_parent(klass);
+    parent_class = g_type_class_peek_parent (klass);
 
     obj_class->dispose = gnc_sx_list_tree_model_adapter_dispose;
     obj_class->finalize = gnc_sx_list_tree_model_adapter_finalize;
 
     gnc_sx_list_tree_model_adapter_signals[MODEL_POPULATED] =
         g_signal_new("model_populated",
-                     G_TYPE_FROM_CLASS (obj_class),
+                     G_TYPE_FROM_CLASS(obj_class),
                      G_SIGNAL_RUN_LAST,
                      G_STRUCT_OFFSET (GncSxListTreeModelAdapterClass, model_populated),
                      NULL, NULL,
@@ -144,109 +146,109 @@ gnc_sx_list_tree_model_adapter_class_init(GncSxListTreeModelAdapterClass *klass)
 }
 
 static GtkTreeModelFlags
-gsltma_get_flags(GtkTreeModel *tree_model)
+gsltma_get_flags (GtkTreeModel *tree_model)
 {
-    return gtk_tree_model_get_flags(GTK_TREE_MODEL(GNC_SX_LIST_TREE_MODEL_ADAPTER(tree_model)->real));
+    return gtk_tree_model_get_flags (GTK_TREE_MODEL(GNC_SX_LIST_TREE_MODEL_ADAPTER(tree_model)->real));
 }
 
 static gint
-gsltma_get_n_columns(GtkTreeModel *tree_model)
+gsltma_get_n_columns (GtkTreeModel *tree_model)
 {
-    return gtk_tree_model_get_n_columns(GTK_TREE_MODEL(GNC_SX_LIST_TREE_MODEL_ADAPTER(tree_model)->real));
+    return gtk_tree_model_get_n_columns (GTK_TREE_MODEL(GNC_SX_LIST_TREE_MODEL_ADAPTER(tree_model)->real));
 }
 
 static GType
-gsltma_get_column_type(GtkTreeModel *tree_model, gint index)
+gsltma_get_column_type (GtkTreeModel *tree_model, gint index)
 {
-    return gtk_tree_model_get_column_type(GTK_TREE_MODEL(GNC_SX_LIST_TREE_MODEL_ADAPTER(tree_model)->real), index);
+    return gtk_tree_model_get_column_type (GTK_TREE_MODEL(GNC_SX_LIST_TREE_MODEL_ADAPTER(tree_model)->real), index);
 }
 
 static gboolean
-gsltma_get_iter(GtkTreeModel *tree_model,
-                GtkTreeIter *iter,
-                GtkTreePath *path)
+gsltma_get_iter (GtkTreeModel *tree_model,
+                 GtkTreeIter *iter,
+                 GtkTreePath *path)
 {
-    return gtk_tree_model_get_iter(GTK_TREE_MODEL(GNC_SX_LIST_TREE_MODEL_ADAPTER(tree_model)->real), iter, path);
+    return gtk_tree_model_get_iter (GTK_TREE_MODEL(GNC_SX_LIST_TREE_MODEL_ADAPTER(tree_model)->real), iter, path);
 }
 
 static GtkTreePath*
-gsltma_get_path(GtkTreeModel *tree_model,
-                GtkTreeIter *iter)
+gsltma_get_path (GtkTreeModel *tree_model,
+                 GtkTreeIter *iter)
 {
-    return gtk_tree_model_get_path(GTK_TREE_MODEL(GNC_SX_LIST_TREE_MODEL_ADAPTER(tree_model)->real), iter);
+    return gtk_tree_model_get_path (GTK_TREE_MODEL(GNC_SX_LIST_TREE_MODEL_ADAPTER(tree_model)->real), iter);
 }
 
 static void
-gsltma_get_value(GtkTreeModel *tree_model,
-                 GtkTreeIter *iter,
-                 gint column,
-                 GValue *value)
+gsltma_get_value (GtkTreeModel *tree_model,
+                  GtkTreeIter *iter,
+                  gint column,
+                  GValue *value)
 {
-    gtk_tree_model_get_value(GTK_TREE_MODEL(GNC_SX_LIST_TREE_MODEL_ADAPTER(tree_model)->real), iter, column, value);
+    gtk_tree_model_get_value (GTK_TREE_MODEL(GNC_SX_LIST_TREE_MODEL_ADAPTER(tree_model)->real), iter, column, value);
 }
 
 static gboolean
-gsltma_iter_next(GtkTreeModel *tree_model,
-                 GtkTreeIter *iter)
+gsltma_iter_next (GtkTreeModel *tree_model,
+                  GtkTreeIter *iter)
 {
-    return gtk_tree_model_iter_next(GTK_TREE_MODEL(GNC_SX_LIST_TREE_MODEL_ADAPTER(tree_model)->real), iter);
+    return gtk_tree_model_iter_next (GTK_TREE_MODEL(GNC_SX_LIST_TREE_MODEL_ADAPTER(tree_model)->real), iter);
 }
 
 static gboolean
-gsltma_iter_children(GtkTreeModel *tree_model,
-                     GtkTreeIter *iter,
-                     GtkTreeIter *parent)
+gsltma_iter_children (GtkTreeModel *tree_model,
+                      GtkTreeIter *iter,
+                      GtkTreeIter *parent)
 {
-    return gtk_tree_model_iter_children(GTK_TREE_MODEL(GNC_SX_LIST_TREE_MODEL_ADAPTER(tree_model)->real), iter, parent);
+    return gtk_tree_model_iter_children (GTK_TREE_MODEL(GNC_SX_LIST_TREE_MODEL_ADAPTER(tree_model)->real), iter, parent);
 }
 
 static gboolean
-gsltma_iter_has_child(GtkTreeModel *tree_model,
-                      GtkTreeIter *iter)
+gsltma_iter_has_child (GtkTreeModel *tree_model,
+                       GtkTreeIter *iter)
 {
-    return gtk_tree_model_iter_has_child(GTK_TREE_MODEL(GNC_SX_LIST_TREE_MODEL_ADAPTER(tree_model)->real), iter);
+    return gtk_tree_model_iter_has_child (GTK_TREE_MODEL(GNC_SX_LIST_TREE_MODEL_ADAPTER(tree_model)->real), iter);
 }
 
 static gint
-gsltma_iter_n_children(GtkTreeModel *tree_model,
-                       GtkTreeIter *iter)
+gsltma_iter_n_children (GtkTreeModel *tree_model,
+                        GtkTreeIter *iter)
 {
-    return gtk_tree_model_iter_n_children(GTK_TREE_MODEL(GNC_SX_LIST_TREE_MODEL_ADAPTER(tree_model)->real), iter);
+    return gtk_tree_model_iter_n_children (GTK_TREE_MODEL(GNC_SX_LIST_TREE_MODEL_ADAPTER(tree_model)->real), iter);
 }
 
 static gboolean
-gsltma_iter_nth_child(GtkTreeModel *tree_model,
-                      GtkTreeIter *iter,
-                      GtkTreeIter *parent,
-                      gint n)
+gsltma_iter_nth_child (GtkTreeModel *tree_model,
+                       GtkTreeIter *iter,
+                       GtkTreeIter *parent,
+                       gint n)
 {
-    return gtk_tree_model_iter_nth_child(GTK_TREE_MODEL(GNC_SX_LIST_TREE_MODEL_ADAPTER(tree_model)->real), iter, parent, n);
+    return gtk_tree_model_iter_nth_child (GTK_TREE_MODEL(GNC_SX_LIST_TREE_MODEL_ADAPTER(tree_model)->real), iter, parent, n);
 }
 
 static gboolean
-gsltma_iter_parent(GtkTreeModel *tree_model,
-                   GtkTreeIter *iter,
-                   GtkTreeIter *child)
+gsltma_iter_parent (GtkTreeModel *tree_model,
+                    GtkTreeIter *iter,
+                    GtkTreeIter *child)
 {
-    return gtk_tree_model_iter_parent(GTK_TREE_MODEL(GNC_SX_LIST_TREE_MODEL_ADAPTER(tree_model)->real), iter, child);
+    return gtk_tree_model_iter_parent (GTK_TREE_MODEL(GNC_SX_LIST_TREE_MODEL_ADAPTER(tree_model)->real), iter, child);
 }
 
 static void
-gsltma_ref_node(GtkTreeModel *tree_model,
-                GtkTreeIter *iter)
+gsltma_ref_node (GtkTreeModel *tree_model,
+                 GtkTreeIter *iter)
 {
-    gtk_tree_model_ref_node(GTK_TREE_MODEL(GNC_SX_LIST_TREE_MODEL_ADAPTER(tree_model)->real), iter);
+    gtk_tree_model_ref_node (GTK_TREE_MODEL(GNC_SX_LIST_TREE_MODEL_ADAPTER(tree_model)->real), iter);
 }
 
 static void
-gsltma_unref_node(GtkTreeModel *tree_model,
-                  GtkTreeIter *iter)
+gsltma_unref_node (GtkTreeModel *tree_model,
+                   GtkTreeIter *iter)
 {
-    gtk_tree_model_unref_node(GTK_TREE_MODEL(GNC_SX_LIST_TREE_MODEL_ADAPTER(tree_model)->real), iter);
+    gtk_tree_model_unref_node (GTK_TREE_MODEL(GNC_SX_LIST_TREE_MODEL_ADAPTER(tree_model)->real), iter);
 }
 
 static void
-gsltma_tree_model_interface_init(gpointer g_iface, gpointer iface_data)
+gsltma_tree_model_interface_init (gpointer g_iface, gpointer iface_data)
 {
     GtkTreeModelIface *tree_model = (GtkTreeModelIface*)g_iface;
     tree_model->get_flags = gsltma_get_flags;
@@ -266,57 +268,59 @@ gsltma_tree_model_interface_init(gpointer g_iface, gpointer iface_data)
 }
 
 static gboolean
-gsltma_get_sort_column_id(GtkTreeSortable        *sortable,
-                          gint                   *sort_column_id,
-                          GtkSortType            *order)
+gsltma_get_sort_column_id (GtkTreeSortable *sortable,
+                           gint            *sort_column_id,
+                           GtkSortType     *order)
 {
-    return gtk_tree_sortable_get_sort_column_id(GTK_TREE_SORTABLE(GNC_SX_LIST_TREE_MODEL_ADAPTER(sortable)->real),
-            sort_column_id,
-            order);
+    return gtk_tree_sortable_get_sort_column_id (GTK_TREE_SORTABLE(GNC_SX_LIST_TREE_MODEL_ADAPTER(sortable)->real),
+                                                 sort_column_id,
+                                                 order);
 }
 
 static void
-gsltma_set_sort_column_id(GtkTreeSortable        *sortable,
-                          gint                    sort_column_id,
-                          GtkSortType             order)
+gsltma_set_sort_column_id (GtkTreeSortable *sortable,
+                           gint             sort_column_id,
+                           GtkSortType      order)
 {
-    gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(GNC_SX_LIST_TREE_MODEL_ADAPTER(sortable)->real),
-                                         sort_column_id,
-                                         order);
+    gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE(GNC_SX_LIST_TREE_MODEL_ADAPTER(sortable)->real),
+                                          sort_column_id,
+                                          order);
 }
 
 static void
-gsltma_set_sort_func(GtkTreeSortable        *sortable,
-                     gint                    sort_column_id,
-                     GtkTreeIterCompareFunc  func,
-                     gpointer                data,
-                     GDestroyNotify          destroy)
+gsltma_set_sort_func (GtkTreeSortable        *sortable,
+                      gint                    sort_column_id,
+                      GtkTreeIterCompareFunc  func,
+                      gpointer                data,
+                      GDestroyNotify          destroy)
 {
-    gtk_tree_sortable_set_sort_func(GTK_TREE_SORTABLE(GNC_SX_LIST_TREE_MODEL_ADAPTER(sortable)->real),
-                                    sort_column_id,
-                                    func,
-                                    data,
-                                    destroy);
+    gtk_tree_sortable_set_sort_func (GTK_TREE_SORTABLE(GNC_SX_LIST_TREE_MODEL_ADAPTER(sortable)->real),
+                                     sort_column_id,
+                                     func,
+                                     data,
+                                     destroy);
 }
 
 static void
-gsltma_set_default_sort_func(GtkTreeSortable        *sortable,
-                             GtkTreeIterCompareFunc  func,
-                             gpointer                data,
-                             GDestroyNotify          destroy)
+gsltma_set_default_sort_func (GtkTreeSortable        *sortable,
+                              GtkTreeIterCompareFunc  func,
+                              gpointer                data,
+                              GDestroyNotify          destroy)
 {
-    gtk_tree_sortable_set_default_sort_func(GTK_TREE_SORTABLE(GNC_SX_LIST_TREE_MODEL_ADAPTER(sortable)->real),
-                                            func, data, destroy);
+    gtk_tree_sortable_set_default_sort_func (GTK_TREE_SORTABLE(GNC_SX_LIST_TREE_MODEL_ADAPTER(sortable)->real),
+                                             func,
+                                             data,
+                                             destroy);
 }
 
 static gboolean
-gsltma_has_default_sort_func(GtkTreeSortable        *sortable)
+gsltma_has_default_sort_func (GtkTreeSortable  *sortable)
 {
-    return gtk_tree_sortable_has_default_sort_func(GTK_TREE_SORTABLE(GNC_SX_LIST_TREE_MODEL_ADAPTER(sortable)->real));
+    return gtk_tree_sortable_has_default_sort_func (GTK_TREE_SORTABLE(GNC_SX_LIST_TREE_MODEL_ADAPTER(sortable)->real));
 }
 
 static void
-gsltma_tree_sortable_interface_init(gpointer g_iface, gpointer iface_data)
+gsltma_tree_sortable_interface_init (gpointer g_iface, gpointer iface_data)
 {
     GtkTreeSortableIface *tree_sortable = (GtkTreeSortableIface*)g_iface;
     tree_sortable->get_sort_column_id = gsltma_get_sort_column_id;
@@ -332,193 +336,189 @@ gsltma_tree_sortable_interface_init(gpointer g_iface, gpointer iface_data)
 }
 
 static void
-gsltma_proxy_row_changed(GtkTreeModel *treemodel,
-                         GtkTreePath *arg1,
-                         GtkTreeIter *arg2,
-                         gpointer user_data)
+gsltma_proxy_row_changed (GtkTreeModel *treemodel,
+                          GtkTreePath *arg1,
+                          GtkTreeIter *arg2,
+                          gpointer user_data)
 {
-    g_signal_emit_by_name(user_data, "row-changed", arg1, arg2);
+    g_signal_emit_by_name (user_data, "row-changed", arg1, arg2);
 }
 
 static void
-gsltma_proxy_row_deleted(GtkTreeModel *treemodel,
-                         GtkTreePath *arg1,
-                         gpointer user_data)
+gsltma_proxy_row_deleted (GtkTreeModel *treemodel,
+                          GtkTreePath *arg1,
+                          gpointer user_data)
 {
-    g_signal_emit_by_name(user_data, "row-deleted", arg1);
+    g_signal_emit_by_name (user_data, "row-deleted", arg1);
 }
 
 static void
-gsltma_proxy_row_has_child_toggled(GtkTreeModel *treemodel,
-                                   GtkTreePath *arg1,
-                                   GtkTreeIter *arg2,
-                                   gpointer user_data)
+gsltma_proxy_row_has_child_toggled (GtkTreeModel *treemodel,
+                                    GtkTreePath *arg1,
+                                    GtkTreeIter *arg2,
+                                    gpointer user_data)
 {
-    g_signal_emit_by_name(user_data, "row-has-child-toggled", arg1, arg2);
+    g_signal_emit_by_name (user_data, "row-has-child-toggled", arg1, arg2);
 }
 
 static void
-gsltma_proxy_row_inserted(GtkTreeModel *treemodel,
-                          GtkTreePath *arg1,
-                          GtkTreeIter *arg2,
-                          gpointer user_data)
+gsltma_proxy_row_inserted (GtkTreeModel *treemodel,
+                           GtkTreePath *arg1,
+                           GtkTreeIter *arg2,
+                           gpointer user_data)
 {
-    g_signal_emit_by_name(user_data, "row-inserted", arg1, arg2);
+    g_signal_emit_by_name (user_data, "row-inserted", arg1, arg2);
 }
 
 static void
-gsltma_proxy_rows_reordered(GtkTreeModel *treemodel,
-                            GtkTreePath *arg1,
-                            GtkTreeIter *arg2,
-                            gpointer arg3,
-                            gpointer user_data)
+gsltma_proxy_rows_reordered (GtkTreeModel *treemodel,
+                             GtkTreePath *arg1,
+                             GtkTreeIter *arg2,
+                             gpointer arg3,
+                             gpointer user_data)
 {
-    g_signal_emit_by_name(user_data, "rows-reordered", arg1, arg2, arg3);
+    g_signal_emit_by_name (user_data, "rows-reordered", arg1, arg2, arg3);
 }
 
 static void
-gsltma_proxy_sort_column_changed(GtkTreeSortable *sortable, gpointer user_data)
+gsltma_proxy_sort_column_changed (GtkTreeSortable *sortable, gpointer user_data)
 {
-    g_signal_emit_by_name(user_data, "sort-column-changed");
+    g_signal_emit_by_name (user_data, "sort-column-changed");
 }
 
 static gint
-_name_comparator(GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, gpointer user_data)
+_name_comparator (GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, gpointer user_data)
 {
     gint rtn;
     GncSxListTreeModelAdapter *adapter = GNC_SX_LIST_TREE_MODEL_ADAPTER(user_data);
     GncSxInstances *a_inst, *b_inst;
     gchar *a_caseless, *b_caseless;
 
-    a_inst = gsltma_get_sx_instances_from_orig_iter(adapter, a);
-    b_inst = gsltma_get_sx_instances_from_orig_iter(adapter, b);
+    a_inst = gsltma_get_sx_instances_from_orig_iter (adapter, a);
+    b_inst = gsltma_get_sx_instances_from_orig_iter (adapter, b);
 
     if (a_inst == NULL && b_inst == NULL) return 0;
     if (a_inst == NULL) return 1;
     if (b_inst == NULL) return -1;
 
-    a_caseless = g_utf8_casefold(xaccSchedXactionGetName(a_inst->sx), -1);
-    b_caseless = g_utf8_casefold(xaccSchedXactionGetName(b_inst->sx), -1);
-    rtn = g_strcmp0(a_caseless, b_caseless);
-    g_free(a_caseless);
-    g_free(b_caseless);
+    a_caseless = g_utf8_casefold (xaccSchedXactionGetName (a_inst->sx), -1);
+    b_caseless = g_utf8_casefold (xaccSchedXactionGetName (b_inst->sx), -1);
+    rtn = g_strcmp0 (a_caseless, b_caseless);
+    g_free (a_caseless);
+    g_free (b_caseless);
 
     return rtn;
 }
 
 static gint
-_freq_comparator(GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, gpointer user_data)
+_freq_comparator (GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, gpointer user_data)
 {
     GncSxListTreeModelAdapter *adapter = GNC_SX_LIST_TREE_MODEL_ADAPTER(user_data);
     GncSxInstances *a_inst, *b_inst;
 
-    a_inst = gsltma_get_sx_instances_from_orig_iter(adapter, a);
-    b_inst = gsltma_get_sx_instances_from_orig_iter(adapter, b);
+    a_inst = gsltma_get_sx_instances_from_orig_iter (adapter, a);
+    b_inst = gsltma_get_sx_instances_from_orig_iter (adapter, b);
 
     if (a_inst == NULL && b_inst == NULL) return 0;
     if (a_inst == NULL) return 1;
     if (b_inst == NULL) return -1;
 
-    return recurrenceListCmp(gnc_sx_get_schedule(a_inst->sx), gnc_sx_get_schedule(b_inst->sx));
+    return recurrenceListCmp (gnc_sx_get_schedule (a_inst->sx), gnc_sx_get_schedule (b_inst->sx));
 }
 
 static gint
-_safe_invalidable_date_compare(const GDate *a, const GDate *b)
+_safe_invalidable_date_compare (const GDate *a, const GDate *b)
 {
-    if (!g_date_valid(a) && !g_date_valid(b))
+    if (!g_date_valid (a) && !g_date_valid (b))
     {
         return 0;
     }
-    if (!g_date_valid(a))
+    if (!g_date_valid (a))
     {
         return 1;
     }
-    if (!g_date_valid(b))
+    if (!g_date_valid (b))
     {
         return -1;
     }
-    return g_date_compare(a, b);
+    return g_date_compare (a, b);
 }
 
 static gint
-_last_occur_comparator(GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, gpointer user_data)
+_last_occur_comparator (GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, gpointer user_data)
 {
     GncSxListTreeModelAdapter *adapter = GNC_SX_LIST_TREE_MODEL_ADAPTER(user_data);
     GncSxInstances *a_inst, *b_inst;
 
-    a_inst = gsltma_get_sx_instances_from_orig_iter(adapter, a);
-    b_inst = gsltma_get_sx_instances_from_orig_iter(adapter, b);
+    a_inst = gsltma_get_sx_instances_from_orig_iter (adapter, a);
+    b_inst = gsltma_get_sx_instances_from_orig_iter (adapter, b);
 
-    return _safe_invalidable_date_compare(xaccSchedXactionGetLastOccurDate(a_inst->sx),
-                                          xaccSchedXactionGetLastOccurDate(b_inst->sx));
+    return _safe_invalidable_date_compare (xaccSchedXactionGetLastOccurDate (a_inst->sx),
+                                           xaccSchedXactionGetLastOccurDate (b_inst->sx));
 }
 
 static gint
-_next_occur_comparator(GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, gpointer user_data)
+_next_occur_comparator (GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, gpointer user_data)
 {
     GncSxListTreeModelAdapter *adapter = GNC_SX_LIST_TREE_MODEL_ADAPTER(user_data);
     GncSxInstances *a_inst, *b_inst;
 
-    a_inst = gsltma_get_sx_instances_from_orig_iter(adapter, a);
-    b_inst = gsltma_get_sx_instances_from_orig_iter(adapter, b);
+    a_inst = gsltma_get_sx_instances_from_orig_iter (adapter, a);
+    b_inst = gsltma_get_sx_instances_from_orig_iter (adapter, b);
 
-    return _safe_invalidable_date_compare(&a_inst->next_instance_date,
-                                          &b_inst->next_instance_date);
+    return _safe_invalidable_date_compare (&a_inst->next_instance_date,
+                                           &b_inst->next_instance_date);
 }
 
 static gint
-_enabled_comparator(GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, gpointer user_data)
+_enabled_comparator (GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, gpointer user_data)
 {
     GncSxListTreeModelAdapter *adapter = GNC_SX_LIST_TREE_MODEL_ADAPTER(user_data);
     GncSxInstances *a_inst, *b_inst;
 
-    a_inst = gsltma_get_sx_instances_from_orig_iter(adapter, a);
-    b_inst = gsltma_get_sx_instances_from_orig_iter(adapter, b);
+    a_inst = gsltma_get_sx_instances_from_orig_iter (adapter, a);
+    b_inst = gsltma_get_sx_instances_from_orig_iter (adapter, b);
 
-    if (xaccSchedXactionGetEnabled(a_inst->sx) && !xaccSchedXactionGetEnabled(b_inst->sx)) return 1;
-    if (!xaccSchedXactionGetEnabled(a_inst->sx) && xaccSchedXactionGetEnabled(b_inst->sx)) return -1;
+    if (xaccSchedXactionGetEnabled (a_inst->sx) && !xaccSchedXactionGetEnabled (b_inst->sx)) return 1;
+    if (!xaccSchedXactionGetEnabled (a_inst->sx) && xaccSchedXactionGetEnabled (b_inst->sx)) return -1;
     return 0;
 }
 
 static void
-gnc_sx_list_tree_model_adapter_init(GTypeInstance *instance, gpointer klass)
+gnc_sx_list_tree_model_adapter_init (GTypeInstance *instance, gpointer klass)
 {
     GncSxListTreeModelAdapter *adapter = GNC_SX_LIST_TREE_MODEL_ADAPTER(instance);
-    adapter->orig = gtk_tree_store_new(5, G_TYPE_STRING, G_TYPE_BOOLEAN, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING);
-    adapter->real = GTK_TREE_MODEL_SORT(gtk_tree_model_sort_new_with_model(GTK_TREE_MODEL(adapter->orig)));
+    adapter->orig = gtk_tree_store_new (5, G_TYPE_STRING, G_TYPE_BOOLEAN, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING);
+    adapter->real = GTK_TREE_MODEL_SORT(gtk_tree_model_sort_new_with_model (GTK_TREE_MODEL(adapter->orig)));
 
     // setup sorting
-    gtk_tree_sortable_set_sort_func(GTK_TREE_SORTABLE(adapter->real), SXLTMA_COL_NAME, _name_comparator, adapter, NULL);
-    gtk_tree_sortable_set_sort_func(GTK_TREE_SORTABLE(adapter->real), SXLTMA_COL_ENABLED, _enabled_comparator, adapter, NULL);
-    gtk_tree_sortable_set_sort_func(GTK_TREE_SORTABLE(adapter->real), SXLTMA_COL_FREQUENCY, _freq_comparator, adapter, NULL);
-    gtk_tree_sortable_set_sort_func(GTK_TREE_SORTABLE(adapter->real), SXLTMA_COL_LAST_OCCUR, _last_occur_comparator, adapter, NULL);
-    gtk_tree_sortable_set_sort_func(GTK_TREE_SORTABLE(adapter->real), SXLTMA_COL_NEXT_OCCUR, _next_occur_comparator, adapter, NULL);
-    gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(adapter->real), SXLTMA_COL_NEXT_OCCUR, GTK_SORT_ASCENDING);
+    gtk_tree_sortable_set_sort_func (GTK_TREE_SORTABLE(adapter->real), SXLTMA_COL_NAME, _name_comparator, adapter, NULL);
+    gtk_tree_sortable_set_sort_func (GTK_TREE_SORTABLE(adapter->real), SXLTMA_COL_ENABLED, _enabled_comparator, adapter, NULL);
+    gtk_tree_sortable_set_sort_func (GTK_TREE_SORTABLE(adapter->real), SXLTMA_COL_FREQUENCY, _freq_comparator, adapter, NULL);
+    gtk_tree_sortable_set_sort_func (GTK_TREE_SORTABLE(adapter->real), SXLTMA_COL_LAST_OCCUR, _last_occur_comparator, adapter, NULL);
+    gtk_tree_sortable_set_sort_func (GTK_TREE_SORTABLE(adapter->real), SXLTMA_COL_NEXT_OCCUR, _next_occur_comparator, adapter, NULL);
+    gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE(adapter->real), SXLTMA_COL_NEXT_OCCUR, GTK_SORT_ASCENDING);
 
-    g_signal_connect(adapter->real, "row-changed", G_CALLBACK(gsltma_proxy_row_changed), adapter);
-    g_signal_connect(adapter->real, "row-deleted", G_CALLBACK(gsltma_proxy_row_deleted), adapter);
-    g_signal_connect(adapter->real, "row-has-child-toggled", G_CALLBACK(gsltma_proxy_row_has_child_toggled), adapter);
-    g_signal_connect(adapter->real, "row-inserted", G_CALLBACK(gsltma_proxy_row_inserted), adapter);
-    g_signal_connect(adapter->real, "rows-reordered", G_CALLBACK(gsltma_proxy_rows_reordered), adapter);
+    g_signal_connect (adapter->real, "row-changed", G_CALLBACK(gsltma_proxy_row_changed), adapter);
+    g_signal_connect (adapter->real, "row-deleted", G_CALLBACK(gsltma_proxy_row_deleted), adapter);
+    g_signal_connect (adapter->real, "row-has-child-toggled", G_CALLBACK(gsltma_proxy_row_has_child_toggled), adapter);
+    g_signal_connect (adapter->real, "row-inserted", G_CALLBACK(gsltma_proxy_row_inserted), adapter);
+    g_signal_connect (adapter->real, "rows-reordered", G_CALLBACK(gsltma_proxy_rows_reordered), adapter);
 
-    g_signal_connect(adapter->real, "sort-column-changed", G_CALLBACK(gsltma_proxy_sort_column_changed), adapter);
+    g_signal_connect (adapter->real, "sort-column-changed", G_CALLBACK(gsltma_proxy_sort_column_changed), adapter);
 }
 
 static void
-_format_conditional_date(const GDate *date, char *date_buf, int buf_max_length)
+_format_conditional_date (const GDate *date, char *date_buf, int buf_max_length)
 {
-    if (date == NULL || !g_date_valid(date))
-    {
-        g_stpcpy(date_buf, _("never"));
-    }
+    if (date == NULL || !g_date_valid (date))
+        g_stpcpy (date_buf, _("never"));
     else
-    {
-        qof_print_gdate(date_buf, buf_max_length, date);
-    }
+        qof_print_gdate (date_buf, buf_max_length, date);
 }
 
 static void
-gsltma_populate_tree_store(GncSxListTreeModelAdapter *model)
+gsltma_populate_tree_store (GncSxListTreeModelAdapter *model)
 {
     GtkTreeIter iter;
     GList *list;
@@ -530,124 +530,124 @@ gsltma_populate_tree_store(GncSxListTreeModelAdapter *model)
         char last_occur_date_buf[MAX_DATE_LENGTH+1];
         char next_occur_date_buf[MAX_DATE_LENGTH+1];
 
-        frequency_str = recurrenceListToCompactString(gnc_sx_get_schedule(instances->sx));
-
-        _format_conditional_date(xaccSchedXactionGetLastOccurDate(instances->sx),
-                                 last_occur_date_buf, MAX_DATE_LENGTH);
-        _format_conditional_date(&instances->next_instance_date,
-                                 next_occur_date_buf, MAX_DATE_LENGTH);
-
-        gtk_tree_store_append(model->orig, &iter, NULL);
-        gtk_tree_store_set(model->orig, &iter,
-                           SXLTMA_COL_NAME, xaccSchedXactionGetName(instances->sx),
-                           SXLTMA_COL_ENABLED, xaccSchedXactionGetEnabled(instances->sx),
-                           SXLTMA_COL_FREQUENCY, frequency_str,
-                           SXLTMA_COL_LAST_OCCUR, last_occur_date_buf,
-                           SXLTMA_COL_NEXT_OCCUR, next_occur_date_buf,
-                           -1);
-        g_free(frequency_str);
+        frequency_str = recurrenceListToCompactString (gnc_sx_get_schedule (instances->sx));
+
+        _format_conditional_date (xaccSchedXactionGetLastOccurDate (instances->sx),
+                                  last_occur_date_buf, MAX_DATE_LENGTH);
+        _format_conditional_date (&instances->next_instance_date,
+                                  next_occur_date_buf, MAX_DATE_LENGTH);
+
+        gtk_tree_store_append (model->orig, &iter, NULL);
+        gtk_tree_store_set (model->orig, &iter,
+                            SXLTMA_COL_NAME, xaccSchedXactionGetName (instances->sx),
+                            SXLTMA_COL_ENABLED, xaccSchedXactionGetEnabled (instances->sx),
+                            SXLTMA_COL_FREQUENCY, frequency_str,
+                            SXLTMA_COL_LAST_OCCUR, last_occur_date_buf,
+                            SXLTMA_COL_NEXT_OCCUR, next_occur_date_buf,
+                            -1);
+        g_free (frequency_str);
     }
     g_signal_emit_by_name (model, "model_populated");
 }
 
 static void
-gsltma_added_cb(GncSxInstanceModel *instances, SchedXaction *sx_added, gpointer user_data)
+gsltma_added_cb (GncSxInstanceModel *instances, SchedXaction *sx_added, gpointer user_data)
 {
     GncSxListTreeModelAdapter *model = GNC_SX_LIST_TREE_MODEL_ADAPTER(user_data);
-    gtk_tree_store_clear(model->orig);
-    gsltma_populate_tree_store(model);
+    gtk_tree_store_clear (model->orig);
+    gsltma_populate_tree_store (model);
 }
 
 static void
-gsltma_updated_cb(GncSxInstanceModel *instances, SchedXaction *sx_updated, gpointer user_data)
+gsltma_updated_cb (GncSxInstanceModel *instances, SchedXaction *sx_updated, gpointer user_data)
 {
     GncSxListTreeModelAdapter *model = GNC_SX_LIST_TREE_MODEL_ADAPTER(user_data);
-    gnc_sx_instance_model_update_sx_instances(instances, sx_updated);
-    gtk_tree_store_clear(model->orig);
-    gsltma_populate_tree_store(model);
+    gnc_sx_instance_model_update_sx_instances (instances, sx_updated);
+    gtk_tree_store_clear (model->orig);
+    gsltma_populate_tree_store (model);
 }
 
 static void
-gsltma_removing_cb(GncSxInstanceModel *instances, SchedXaction *sx_removing, gpointer user_data)
+gsltma_removing_cb (GncSxInstanceModel *instances, SchedXaction *sx_removing, gpointer user_data)
 {
     GncSxListTreeModelAdapter *model = GNC_SX_LIST_TREE_MODEL_ADAPTER(user_data);
-    gnc_sx_instance_model_remove_sx_instances(instances, sx_removing);
-    gtk_tree_store_clear(model->orig);
-    gsltma_populate_tree_store(model);
+    gnc_sx_instance_model_remove_sx_instances (instances, sx_removing);
+    gtk_tree_store_clear (model->orig);
+    gsltma_populate_tree_store (model);
 }
 
 GncSxListTreeModelAdapter*
-gnc_sx_list_tree_model_adapter_new(GncSxInstanceModel *instances)
+gnc_sx_list_tree_model_adapter_new (GncSxInstanceModel *instances)
 {
     GncSxListTreeModelAdapter *rtn;
 
-    rtn = GNC_SX_LIST_TREE_MODEL_ADAPTER(g_object_new(GNC_TYPE_SX_LIST_TREE_MODEL_ADAPTER, NULL));
+    rtn = GNC_SX_LIST_TREE_MODEL_ADAPTER(g_object_new (GNC_TYPE_SX_LIST_TREE_MODEL_ADAPTER, NULL));
     rtn->instances = instances;
-    g_object_ref(G_OBJECT(rtn->instances));
+    g_object_ref (G_OBJECT(rtn->instances));
 
     gsltma_populate_tree_store(rtn);
 
-    g_signal_connect(G_OBJECT(rtn->instances), "added", (GCallback)gsltma_added_cb, (gpointer)rtn);
-    g_signal_connect(G_OBJECT(rtn->instances), "updated", (GCallback)gsltma_updated_cb, (gpointer)rtn);
-    g_signal_connect(G_OBJECT(rtn->instances), "removing", (GCallback)gsltma_removing_cb, (gpointer)rtn);
+    g_signal_connect (G_OBJECT(rtn->instances), "added", (GCallback)gsltma_added_cb, (gpointer)rtn);
+    g_signal_connect (G_OBJECT(rtn->instances), "updated", (GCallback)gsltma_updated_cb, (gpointer)rtn);
+    g_signal_connect (G_OBJECT(rtn->instances), "removing", (GCallback)gsltma_removing_cb, (gpointer)rtn);
 
     return rtn;
 }
 
 GncSxInstances*
-gsltma_get_sx_instances_from_orig_iter(GncSxListTreeModelAdapter *model, GtkTreeIter *orig_iter)
+gsltma_get_sx_instances_from_orig_iter (GncSxListTreeModelAdapter *model, GtkTreeIter *orig_iter)
 {
     GtkTreePath *path;
     gint *indices;
     gint index;
 
-    path = gtk_tree_model_get_path(GTK_TREE_MODEL(model->orig), orig_iter);
-    if (gtk_tree_path_get_depth(path) > 1)
+    path = gtk_tree_model_get_path (GTK_TREE_MODEL(model->orig), orig_iter);
+    if (gtk_tree_path_get_depth (path) > 1)
     {
-        gtk_tree_path_free(path);
+        gtk_tree_path_free (path);
         return NULL;
     }
-    indices = gtk_tree_path_get_indices(path);
+    indices = gtk_tree_path_get_indices (path);
     index = indices[0];
 
-    gtk_tree_path_free(path);
-    return (GncSxInstances*)g_list_nth_data(model->instances->sx_instance_list, index);
+    gtk_tree_path_free (path);
+    return (GncSxInstances*)g_list_nth_data (model->instances->sx_instance_list, index);
 }
 
 GncSxInstances*
-gnc_sx_list_tree_model_adapter_get_sx_instances(GncSxListTreeModelAdapter *model, GtkTreeIter *sort_iter)
+gnc_sx_list_tree_model_adapter_get_sx_instances (GncSxListTreeModelAdapter *model, GtkTreeIter *sort_iter)
 {
     GtkTreeIter translated_iter;
-    gtk_tree_model_sort_convert_iter_to_child_iter(model->real,
-            &translated_iter,
-            sort_iter);
-    return gsltma_get_sx_instances_from_orig_iter(model, &translated_iter);
+    gtk_tree_model_sort_convert_iter_to_child_iter (model->real,
+                                                    &translated_iter,
+                                                    sort_iter);
+    return gsltma_get_sx_instances_from_orig_iter (model, &translated_iter);
 }
 
 static void
-gnc_sx_list_tree_model_adapter_dispose(GObject *obj)
+gnc_sx_list_tree_model_adapter_dispose (GObject *obj)
 {
     GncSxListTreeModelAdapter *adapter;
 
-    g_return_if_fail(obj != NULL);
+    g_return_if_fail (obj != NULL);
     adapter = GNC_SX_LIST_TREE_MODEL_ADAPTER(obj);
 
     if (adapter->disposed) return;
     adapter->disposed = TRUE;
 
-    g_object_unref(G_OBJECT(adapter->instances));
+    g_object_unref (G_OBJECT(adapter->instances));
     adapter->instances = NULL;
-    g_object_unref(G_OBJECT(adapter->real));
+    g_object_unref (G_OBJECT(adapter->real));
     adapter->real = NULL;
-    g_object_unref(G_OBJECT(adapter->orig));
+    g_object_unref (G_OBJECT(adapter->orig));
     adapter->orig = NULL;
 
-    G_OBJECT_CLASS(parent_class)->dispose(obj);
+    G_OBJECT_CLASS(parent_class)->dispose (obj);
 }
 
 static void
-gnc_sx_list_tree_model_adapter_finalize(GObject *obj)
+gnc_sx_list_tree_model_adapter_finalize (GObject *obj)
 {
-    g_return_if_fail(obj != NULL);
-    G_OBJECT_CLASS(parent_class)->finalize(obj);
+    g_return_if_fail (obj != NULL);
+    G_OBJECT_CLASS(parent_class)->finalize (obj);
 }
diff --git a/gnucash/gnome-utils/gnc-sx-list-tree-model-adapter.h b/gnucash/gnome-utils/gnc-sx-list-tree-model-adapter.h
index 00211944f..f391f9c0d 100644
--- a/gnucash/gnome-utils/gnc-sx-list-tree-model-adapter.h
+++ b/gnucash/gnome-utils/gnc-sx-list-tree-model-adapter.h
@@ -1,24 +1,36 @@
-/*
- * gnc-sx-list-tree-model-adapter.h
- *
- * Copyright (C) 2006 Josh Sled <jsled at asynchronous.org>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 and/or version 3 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, contact:
- *
- * Free Software Foundation           Voice:  +1-617-542-5942
- * 51 Franklin Street, Fifth Floor    Fax:    +1-617-542-2652
- * Boston, MA  02110-1301,  USA       gnu at gnu.org
- */
+/********************************************************************\
+ * gnc-sx-list-tree-model-adapter.h                                 *
+ *                                                                  *
+ * Copyright (C) 2006 Joshua Sled <jsled at asynchronous.org>          *
+ *                                                                  *
+ * This program is free software; you can redistribute it and/or    *
+ * modify it under the terms of version 2 and/or version 3 of the   *
+ * GNU General Public License as published by the Free Software     *
+ * Foundation.                                                      *
+ *                                                                  *
+ * As a special exception, permission is granted to link the binary *
+ * module resultant from this code with the OpenSSL project's       *
+ * "OpenSSL" library (or modified versions of it that use the same  *
+ * license as the "OpenSSL" library), and distribute the linked     *
+ * executable.  You must obey the GNU General Public License in all *
+ * respects for all of the code used other than "OpenSSL". If you   *
+ * modify this file, you may extend this exception to your version  *
+ * of the file, but you are not obligated to do so. If you do not   *
+ * wish to do so, delete this exception statement from your version *
+ * of this file.                                                    *
+ *                                                                  *
+ * This program is distributed in the hope that it will be useful,  *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of   *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    *
+ * GNU General Public License for more details.                     *
+ *                                                                  *
+ * You should have received a copy of the GNU General Public License*
+ * along with this program; if not, contact:                        *
+ *                                                                  *
+ * Free Software Foundation           Voice:  +1-617-542-5942       *
+ * 51 Franklin Street, Fifth Floor    Fax:    +1-617-542-2652       *
+ * Boston, MA  02110-1301,  USA       gnu at gnu.org                   *
+\********************************************************************/
 
 #ifndef _GNC_SX_LIST_TREE_MODEL_ADAPTER_H
 #define _GNC_SX_LIST_TREE_MODEL_ADAPTER_H
@@ -31,12 +43,12 @@
 
 G_BEGIN_DECLS
 
-#define GNC_TYPE_SX_LIST_TREE_MODEL_ADAPTER	       (gnc_sx_list_tree_model_adapter_get_type ())
-#define GNC_SX_LIST_TREE_MODEL_ADAPTER(obj)	       (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNC_TYPE_SX_LIST_TREE_MODEL_ADAPTER, GncSxListTreeModelAdapter))
-#define GNC_SX_LIST_TREE_MODEL_ADAPTER_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GNC_TYPE_SX_LIST_TREE_MODEL_ADAPTER, GncSxListTreeModelAdapterClass))
-#define GNC_IS_SX_LIST_TREE_MODEL_ADAPTER(obj)	       (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNC_TYPE_SX_LIST_TREE_MODEL_ADAPTER))
-#define GNC_IS_SX_LIST_TREE_MODEL_ADAPTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNC_TYPE_SX_LIST_TREE_MODEL_ADAPTER))
-#define GNC_SX_LIST_TREE_MODEL_ADAPTER_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GNC_TYPE_SX_LIST_TREE_MODEL_ADAPTER, GncSxListTreeModelAdapterClass))
+#define GNC_TYPE_SX_LIST_TREE_MODEL_ADAPTER            (gnc_sx_list_tree_model_adapter_get_type ())
+#define GNC_SX_LIST_TREE_MODEL_ADAPTER(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), GNC_TYPE_SX_LIST_TREE_MODEL_ADAPTER, GncSxListTreeModelAdapter))
+#define GNC_SX_LIST_TREE_MODEL_ADAPTER_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass), GNC_TYPE_SX_LIST_TREE_MODEL_ADAPTER, GncSxListTreeModelAdapterClass))
+#define GNC_IS_SX_LIST_TREE_MODEL_ADAPTER(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), GNC_TYPE_SX_LIST_TREE_MODEL_ADAPTER))
+#define GNC_IS_SX_LIST_TREE_MODEL_ADAPTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GNC_TYPE_SX_LIST_TREE_MODEL_ADAPTER))
+#define GNC_SX_LIST_TREE_MODEL_ADAPTER_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj), GNC_TYPE_SX_LIST_TREE_MODEL_ADAPTER, GncSxListTreeModelAdapterClass))
 
 typedef struct _GncSxListTreeModelAdapter GncSxListTreeModelAdapter;
 typedef struct _GncSxListTreeModelAdapterClass GncSxListTreeModelAdapterClass;
@@ -51,10 +63,10 @@ enum
     SXLTMA_COL_NEXT_OCCUR
 };
 
-GType gnc_sx_list_tree_model_adapter_get_type(void);
-GncSxListTreeModelAdapter* gnc_sx_list_tree_model_adapter_new(GncSxInstanceModel *instances);
+GType gnc_sx_list_tree_model_adapter_get_type (void);
+GncSxListTreeModelAdapter* gnc_sx_list_tree_model_adapter_new (GncSxInstanceModel *instances);
 
-GncSxInstances* gnc_sx_list_tree_model_adapter_get_sx_instances(GncSxListTreeModelAdapter *model, GtkTreeIter *iter);
+GncSxInstances* gnc_sx_list_tree_model_adapter_get_sx_instances (GncSxListTreeModelAdapter *model, GtkTreeIter *iter);
 
 G_END_DECLS
 
diff --git a/gnucash/gnome/gnc-plugin-page-sx-list.c b/gnucash/gnome/gnc-plugin-page-sx-list.c
index 9ddbddcdb..accb5d309 100644
--- a/gnucash/gnome/gnc-plugin-page-sx-list.c
+++ b/gnucash/gnome/gnc-plugin-page-sx-list.c
@@ -100,7 +100,7 @@ typedef struct GncPluginPageSxListPrivate
 } GncPluginPageSxListPrivate;
 
 #define GNC_PLUGIN_PAGE_SX_LIST_GET_PRIVATE(o)  \
-   ((GncPluginPageSxListPrivate*)g_type_instance_get_private((GTypeInstance*)o, GNC_TYPE_PLUGIN_PAGE_SX_LIST))
+   ((GncPluginPageSxListPrivate*)g_type_instance_get_private ((GTypeInstance*)o, GNC_TYPE_PLUGIN_PAGE_SX_LIST))
 
 static GObjectClass *parent_class = NULL;
 
@@ -110,25 +110,25 @@ static GObjectClass *parent_class = NULL;
 /* Plugin Actions */
 static void gnc_plugin_page_sx_list_class_init (GncPluginPageSxListClass *klass);
 static void gnc_plugin_page_sx_list_init (GncPluginPageSxList *plugin_page);
-static void gnc_plugin_page_sx_list_dispose(GObject *object);
-static void gnc_plugin_page_sx_list_finalize(GObject *object);
+static void gnc_plugin_page_sx_list_dispose (GObject *object);
+static void gnc_plugin_page_sx_list_finalize (GObject *object);
 
 static GtkWidget *gnc_plugin_page_sx_list_create_widget (GncPluginPage *plugin_page);
 static void gnc_plugin_page_sx_list_destroy_widget (GncPluginPage *plugin_page);
 static void gnc_plugin_page_sx_list_save_page (GncPluginPage *plugin_page, GKeyFile *file, const gchar *group);
 static GncPluginPage *gnc_plugin_page_sx_list_recreate_page (GtkWidget *window, GKeyFile *file, const gchar *group);
 
-static void gppsl_row_activated_cb(GtkTreeView *tree_view, GtkTreePath *path, GtkTreeViewColumn *column, gpointer user_data);
+static void gppsl_row_activated_cb (GtkTreeView *tree_view, GtkTreePath *path, GtkTreeViewColumn *column, gpointer user_data);
 
-static void gnc_plugin_page_sx_list_cmd_new(GtkAction *action, GncPluginPageSxList *page);
-static void gnc_plugin_page_sx_list_cmd_edit(GtkAction *action, GncPluginPageSxList *page);
+static void gnc_plugin_page_sx_list_cmd_new (GtkAction *action, GncPluginPageSxList *page);
+static void gnc_plugin_page_sx_list_cmd_edit (GtkAction *action, GncPluginPageSxList *page);
 #ifdef REGISTER2_ENABLED
 /*################## Added for Reg2 #################*/
-static void gnc_plugin_page_sx_list_cmd_new2(GtkAction *action, GncPluginPageSxList *page);
-static void gnc_plugin_page_sx_list_cmd_edit2(GtkAction *action, GncPluginPageSxList *page);
+static void gnc_plugin_page_sx_list_cmd_new2 (GtkAction *action, GncPluginPageSxList *page);
+static void gnc_plugin_page_sx_list_cmd_edit2 (GtkAction *action, GncPluginPageSxList *page);
 /*################## Added for Reg2 #################*/
 #endif
-static void gnc_plugin_page_sx_list_cmd_delete(GtkAction *action, GncPluginPageSxList *page);
+static void gnc_plugin_page_sx_list_cmd_delete (GtkAction *action, GncPluginPageSxList *page);
 static void gnc_plugin_page_sx_list_cmd_refresh (GtkAction *action, GncPluginPageSxList *page);
 
 /* Command callbacks */
@@ -168,11 +168,11 @@ static GtkActionEntry gnc_plugin_page_sx_list_actions [] =
 
     {
         "ViewRefreshAction", "view-refresh", N_("_Refresh"), "<primary>r",
-        N_("Refresh this window"), G_CALLBACK (gnc_plugin_page_sx_list_cmd_refresh)
+        N_("Refresh this window"), G_CALLBACK(gnc_plugin_page_sx_list_cmd_refresh)
     },
 };
 /** The number of actions provided by this plugin. */
-static guint gnc_plugin_page_sx_list_n_actions = G_N_ELEMENTS (gnc_plugin_page_sx_list_actions);
+static guint gnc_plugin_page_sx_list_n_actions = G_N_ELEMENTS(gnc_plugin_page_sx_list_actions);
 
 GncPluginPage *
 gnc_plugin_page_sx_list_new (void)
@@ -255,40 +255,40 @@ gnc_plugin_page_sx_list_init (GncPluginPageSxList *plugin_page)
                  NULL);
 #endif
 
-    gnc_plugin_page_add_book(parent, gnc_get_current_book());
+    gnc_plugin_page_add_book (parent, gnc_get_current_book());
     action_group =
-        gnc_plugin_page_create_action_group(parent,
-                                            "GncPluginPageSxListActions");
-    gtk_action_group_add_actions(action_group,
-                                 gnc_plugin_page_sx_list_actions,
-                                 gnc_plugin_page_sx_list_n_actions,
-                                 plugin_page);
+        gnc_plugin_page_create_action_group (parent,
+                                             "GncPluginPageSxListActions");
+    gtk_action_group_add_actions (action_group,
+                                  gnc_plugin_page_sx_list_actions,
+                                  gnc_plugin_page_sx_list_n_actions,
+                                  plugin_page);
     /* gnc_plugin_init_short_names (action_group, toolbar_labels); */
 }
 
 
 static void
-gnc_plugin_page_sx_list_dispose(GObject *object)
+gnc_plugin_page_sx_list_dispose (GObject *object)
 {
     GncPluginPageSxList *page;
     GncPluginPageSxListPrivate *priv;
 
-    page = GNC_PLUGIN_PAGE_SX_LIST (object);
-    g_return_if_fail(GNC_IS_PLUGIN_PAGE_SX_LIST (page));
+    page = GNC_PLUGIN_PAGE_SX_LIST(object);
+    g_return_if_fail (GNC_IS_PLUGIN_PAGE_SX_LIST(page));
     priv = GNC_PLUGIN_PAGE_SX_LIST_GET_PRIVATE(page);
-    g_return_if_fail(priv != NULL);
+    g_return_if_fail (priv != NULL);
 
-    g_return_if_fail(!priv->disposed);
+    g_return_if_fail (!priv->disposed);
     priv->disposed = TRUE;
 
-    g_object_unref(G_OBJECT(priv->dense_cal_model));
+    g_object_unref (G_OBJECT(priv->dense_cal_model));
     priv->dense_cal_model = NULL;
-    g_object_unref(GTK_WIDGET(priv->gdcal));
+    g_object_unref (GTK_WIDGET(priv->gdcal));
     priv->gdcal = NULL;
-    g_object_unref(G_OBJECT(priv->instances));
+    g_object_unref (G_OBJECT(priv->instances));
     priv->instances = NULL;
 
-    G_OBJECT_CLASS (parent_class)->dispose(object);
+    G_OBJECT_CLASS(parent_class)->dispose (object);
 }
 
 
@@ -298,12 +298,12 @@ gnc_plugin_page_sx_list_finalize (GObject *object)
     GncPluginPageSxList *page;
     GncPluginPageSxListPrivate *priv;
 
-    page = GNC_PLUGIN_PAGE_SX_LIST (object);
-    g_return_if_fail(GNC_IS_PLUGIN_PAGE_SX_LIST (page));
+    page = GNC_PLUGIN_PAGE_SX_LIST(object);
+    g_return_if_fail (GNC_IS_PLUGIN_PAGE_SX_LIST(page));
     priv = GNC_PLUGIN_PAGE_SX_LIST_GET_PRIVATE(page);
-    g_return_if_fail(priv != NULL);
+    g_return_if_fail (priv != NULL);
 
-    G_OBJECT_CLASS (parent_class)->finalize (object);
+    G_OBJECT_CLASS(parent_class)->finalize (object);
 }
 
 
@@ -314,14 +314,14 @@ gnc_plugin_page_sx_list_refresh_cb (GHashTable *changes, gpointer user_data)
     GncPluginPageSxList *page = user_data;
     GncPluginPageSxListPrivate *priv;
 
-    g_return_if_fail(GNC_IS_PLUGIN_PAGE_SX_LIST(page));
+    g_return_if_fail (GNC_IS_PLUGIN_PAGE_SX_LIST(page));
 
     /* We're only looking for forced updates here. */
     if (changes)
         return;
 
     priv = GNC_PLUGIN_PAGE_SX_LIST_GET_PRIVATE(page);
-    gtk_widget_queue_draw(priv->widget);
+    gtk_widget_queue_draw (priv->widget);
 }
 
 
@@ -329,26 +329,26 @@ static void
 gnc_plugin_page_sx_list_close_cb (gpointer user_data)
 {
     GncPluginPage *plugin_page = GNC_PLUGIN_PAGE(user_data);
-    gnc_main_window_close_page(plugin_page);
+    gnc_main_window_close_page (plugin_page);
 }
 
 
 static void
-gppsl_selection_changed_cb(GtkTreeSelection *selection, gpointer user_data)
+gppsl_selection_changed_cb (GtkTreeSelection *selection, gpointer user_data)
 {
     GncPluginPage *page;
     GtkAction *edit_action, *delete_action;
     gboolean selection_state = TRUE;
 
     page = GNC_PLUGIN_PAGE(user_data);
-    edit_action = gnc_plugin_page_get_action(page, "SxListEditAction");
-    delete_action = gnc_plugin_page_get_action(page, "SxListDeleteAction");
+    edit_action = gnc_plugin_page_get_action (page, "SxListEditAction");
+    delete_action = gnc_plugin_page_get_action (page, "SxListDeleteAction");
     selection_state
-    = gtk_tree_selection_count_selected_rows(selection) == 0
+    = gtk_tree_selection_count_selected_rows (selection) == 0
       ? FALSE
       : TRUE;
-    gtk_action_set_sensitive(edit_action, selection_state);
-    gtk_action_set_sensitive(delete_action, selection_state);
+    gtk_action_set_sensitive (edit_action, selection_state);
+    gtk_action_set_sensitive (delete_action, selection_state);
 }
 
 
@@ -435,74 +435,74 @@ gnc_plugin_page_sx_list_create_widget (GncPluginPage *plugin_page)
 
     /* Add vbox and label */
     vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
-    gtk_box_set_homogeneous (GTK_BOX (vbox), FALSE);
-    gtk_paned_pack1( GTK_PANED(widget), vbox, TRUE, FALSE);
+    gtk_box_set_homogeneous (GTK_BOX(vbox), FALSE);
+    gtk_paned_pack1 (GTK_PANED(widget), vbox, TRUE, FALSE);
 
     label = gtk_label_new (_("Transactions"));
     gnc_widget_style_context_add_class (GTK_WIDGET(label), "gnc-class-strong");
     gtk_widget_set_margin_start (GTK_WIDGET(label), 6);
     gnc_label_set_alignment (label, 0.0, 0);
     gtk_widget_show (label);
-    gtk_box_pack_start ( GTK_BOX(vbox), label, FALSE, FALSE, 0);
+    gtk_box_pack_start (GTK_BOX(vbox), label, FALSE, FALSE, 0);
     gtk_widget_show (vbox);
 
     /* Create scrolled window for top area */
-    swin = gtk_scrolled_window_new(NULL, NULL);
-    gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (swin),
+    swin = gtk_scrolled_window_new (NULL, NULL);
+    gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW(swin),
                                     GTK_POLICY_AUTOMATIC,
                                     GTK_POLICY_AUTOMATIC);
-    gtk_box_pack_start ( GTK_BOX(vbox), swin, TRUE, TRUE, 5);
+    gtk_box_pack_start (GTK_BOX(vbox), swin, TRUE, TRUE, 5);
     gtk_widget_show (swin);
 
     {
         // gint half_way;
         // half_way = plugin_page->notebook_page->allocation.height * 0.5;
         // fixme; get a real value:
-        gtk_paned_set_position(GTK_PANED(priv->widget), 160);
+        gtk_paned_set_position (GTK_PANED(priv->widget), 160);
     }
 
     {
         GDate end;
-        g_date_clear(&end, 1);
+        g_date_clear (&end, 1);
         gnc_gdate_set_today (&end);
-        g_date_add_years(&end, 1);
-        priv->instances = GNC_SX_INSTANCE_MODEL(gnc_sx_get_instances(&end, TRUE));
+        g_date_add_years (&end, 1);
+        priv->instances = GNC_SX_INSTANCE_MODEL(gnc_sx_get_instances (&end, TRUE));
     }
 
     {
         GtkAction *edit_action, *delete_action;
-        edit_action = gnc_plugin_page_get_action(GNC_PLUGIN_PAGE(page), "SxListEditAction");
-        delete_action = gnc_plugin_page_get_action(GNC_PLUGIN_PAGE(page), "SxListDeleteAction");
-        gtk_action_set_sensitive(edit_action, FALSE);
-        gtk_action_set_sensitive(delete_action, FALSE);
+        edit_action = gnc_plugin_page_get_action (GNC_PLUGIN_PAGE(page), "SxListEditAction");
+        delete_action = gnc_plugin_page_get_action (GNC_PLUGIN_PAGE(page), "SxListDeleteAction");
+        gtk_action_set_sensitive (edit_action, FALSE);
+        gtk_action_set_sensitive (delete_action, FALSE);
     }
 
     {
         GtkTreeSelection *selection;
         GtkTreePath *path = gtk_tree_path_new_first ();
 
-        priv->tree_view = GTK_TREE_VIEW(gnc_tree_view_sx_list_new(priv->instances));
-        g_object_set(G_OBJECT(priv->tree_view),
-                     "state-section", STATE_SECTION,
-                     "show-column-menu", TRUE,
-                     NULL);
-        gtk_container_add(GTK_CONTAINER( swin ), GTK_WIDGET(priv->tree_view));
+        priv->tree_view = GTK_TREE_VIEW(gnc_tree_view_sx_list_new (priv->instances));
+        g_object_set (G_OBJECT(priv->tree_view),
+                      "state-section", STATE_SECTION,
+                      "show-column-menu", TRUE,
+                      NULL);
+        gtk_container_add (GTK_CONTAINER( swin ), GTK_WIDGET(priv->tree_view));
 
-        selection = gtk_tree_view_get_selection(priv->tree_view);
-        gtk_tree_selection_set_mode(selection, GTK_SELECTION_MULTIPLE);
+        selection = gtk_tree_view_get_selection (priv->tree_view);
+        gtk_tree_selection_set_mode (selection, GTK_SELECTION_MULTIPLE);
         gtk_tree_selection_select_path (selection, path);
         gtk_tree_path_free (path);
 
-        g_signal_connect(G_OBJECT(selection), "changed", (GCallback)gppsl_selection_changed_cb, (gpointer)page);
-        g_signal_connect(G_OBJECT(priv->tree_view), "row-activated", (GCallback)gppsl_row_activated_cb, (gpointer)page);
+        g_signal_connect (G_OBJECT(selection), "changed", (GCallback)gppsl_selection_changed_cb, (gpointer)page);
+        g_signal_connect (G_OBJECT(priv->tree_view), "row-activated", (GCallback)gppsl_row_activated_cb, (gpointer)page);
         g_signal_connect (G_OBJECT(gtk_tree_view_get_model (GTK_TREE_VIEW(priv->tree_view))),
                           "model-populated", (GCallback)gppsl_model_populated_cb, (gpointer)page);
     }
 
     /* Add vbox and label */
     vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
-    gtk_box_set_homogeneous (GTK_BOX (vbox), FALSE);
-    gtk_paned_pack2( GTK_PANED(widget), vbox, TRUE, FALSE);
+    gtk_box_set_homogeneous (GTK_BOX(vbox), FALSE);
+    gtk_paned_pack2 (GTK_PANED(widget), vbox, TRUE, FALSE);
 
     label = gtk_label_new (_("Upcoming Transactions"));
     gnc_widget_style_context_add_class (GTK_WIDGET(label), "gnc-class-strong");
@@ -510,34 +510,34 @@ gnc_plugin_page_sx_list_create_widget (GncPluginPage *plugin_page)
     gnc_label_set_alignment (label, 0.0, 0);
     gtk_widget_show (label);
 
-    gtk_box_pack_start ( GTK_BOX(vbox), label, FALSE, FALSE, 0);
+    gtk_box_pack_start (GTK_BOX(vbox), label, FALSE, FALSE, 0);
     gtk_widget_show (vbox);
 
     /* Create scrolled window for bottom area */
-    swin = gtk_scrolled_window_new(NULL, NULL);
-    gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (swin),
+    swin = gtk_scrolled_window_new (NULL, NULL);
+    gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW(swin),
                                     GTK_POLICY_AUTOMATIC,
                                     GTK_POLICY_AUTOMATIC);
-    gtk_box_pack_start ( GTK_BOX(vbox), swin, TRUE, TRUE, 5);
+    gtk_box_pack_start (GTK_BOX(vbox), swin, TRUE, TRUE, 5);
     gtk_widget_show (swin);
 
     {
-        priv->dense_cal_model = gnc_sx_instance_dense_cal_adapter_new(GNC_SX_INSTANCE_MODEL(priv->instances));
-        priv->gdcal = GNC_DENSE_CAL(gnc_dense_cal_new_with_model(GNC_DENSE_CAL_MODEL(priv->dense_cal_model)));
-        g_object_ref_sink(priv->gdcal);
+        priv->dense_cal_model = gnc_sx_instance_dense_cal_adapter_new (GNC_SX_INSTANCE_MODEL(priv->instances));
+        priv->gdcal = GNC_DENSE_CAL(gnc_dense_cal_new_with_model (GNC_DENSE_CAL_MODEL(priv->dense_cal_model)));
+        g_object_ref_sink (priv->gdcal);
 
-        gnc_dense_cal_set_months_per_col(priv->gdcal, 4);
-        gnc_dense_cal_set_num_months(priv->gdcal, 12);
+        gnc_dense_cal_set_months_per_col (priv->gdcal, 4);
+        gnc_dense_cal_set_num_months (priv->gdcal, 12);
 
         gtk_container_add (GTK_CONTAINER(swin), GTK_WIDGET(priv->gdcal));
     }
 
-    priv->gnc_component_id = gnc_register_gui_component("plugin-page-sx-list",
+    priv->gnc_component_id = gnc_register_gui_component ("plugin-page-sx-list",
                              gnc_plugin_page_sx_list_refresh_cb,
                              gnc_plugin_page_sx_list_close_cb,
                              page);
     gnc_gui_component_set_session (priv->gnc_component_id,
-                                   gnc_get_current_session());
+                                   gnc_get_current_session ());
 
     g_signal_connect (G_OBJECT(plugin_page), "inserted",
                       G_CALLBACK(gnc_plugin_page_inserted_cb),
@@ -553,7 +553,7 @@ gnc_plugin_page_sx_list_destroy_widget (GncPluginPage *plugin_page)
     GncPluginPageSxList *page;
     GncPluginPageSxListPrivate *priv;
 
-    page = GNC_PLUGIN_PAGE_SX_LIST (plugin_page);
+    page = GNC_PLUGIN_PAGE_SX_LIST(plugin_page);
     priv = GNC_PLUGIN_PAGE_SX_LIST_GET_PRIVATE(page);
 
     // Remove the page_changed signal callback
@@ -564,7 +564,7 @@ gnc_plugin_page_sx_list_destroy_widget (GncPluginPage *plugin_page)
 
     if (priv->widget)
     {
-        g_object_unref(G_OBJECT(priv->widget));
+        g_object_unref (G_OBJECT(priv->widget));
         priv->widget = NULL;
     }
 
@@ -573,7 +573,7 @@ gnc_plugin_page_sx_list_destroy_widget (GncPluginPage *plugin_page)
 
     if (priv->gnc_component_id)
     {
-        gnc_unregister_gui_component(priv->gnc_component_id);
+        gnc_unregister_gui_component (priv->gnc_component_id);
         priv->gnc_component_id = 0;
     }
 }
@@ -594,18 +594,18 @@ gnc_plugin_page_sx_list_save_page (GncPluginPage *plugin_page,
     GncPluginPageSxList *page;
     GncPluginPageSxListPrivate *priv;
 
-    g_return_if_fail(GNC_IS_PLUGIN_PAGE_SX_LIST(plugin_page));
-    g_return_if_fail(key_file != NULL);
-    g_return_if_fail(group_name != NULL);
+    g_return_if_fail (GNC_IS_PLUGIN_PAGE_SX_LIST(plugin_page));
+    g_return_if_fail (key_file != NULL);
+    g_return_if_fail (group_name != NULL);
 
     page = GNC_PLUGIN_PAGE_SX_LIST(plugin_page);
     priv = GNC_PLUGIN_PAGE_SX_LIST_GET_PRIVATE(page);
 
-    g_key_file_set_integer(key_file, group_name, "dense_cal_num_months",
-                           gnc_dense_cal_get_num_months(priv->gdcal));
+    g_key_file_set_integer (key_file, group_name, "dense_cal_num_months",
+                            gnc_dense_cal_get_num_months (priv->gdcal));
 
-    g_key_file_set_integer(key_file, group_name, "paned_position",
-                           gtk_paned_get_position(GTK_PANED(priv->widget)));
+    g_key_file_set_integer (key_file, group_name, "paned_position",
+                            gtk_paned_get_position (GTK_PANED(priv->widget)));
 }
 
 
@@ -625,33 +625,33 @@ gnc_plugin_page_sx_list_recreate_page (GtkWidget *window,
     GncPluginPageSxList *page;
     GncPluginPageSxListPrivate *priv;
 
-    g_return_val_if_fail(key_file, NULL);
-    g_return_val_if_fail(group_name, NULL);
+    g_return_val_if_fail (key_file, NULL);
+    g_return_val_if_fail (group_name, NULL);
 
     /* Create the new page. */
-    page = GNC_PLUGIN_PAGE_SX_LIST(gnc_plugin_page_sx_list_new());
+    page = GNC_PLUGIN_PAGE_SX_LIST(gnc_plugin_page_sx_list_new ());
     priv = GNC_PLUGIN_PAGE_SX_LIST_GET_PRIVATE(page);
 
     /* Install it now so we can them manipulate the created widget */
-    gnc_main_window_open_page(GNC_MAIN_WINDOW(window), GNC_PLUGIN_PAGE(page));
+    gnc_main_window_open_page (GNC_MAIN_WINDOW(window), GNC_PLUGIN_PAGE(page));
 
     {
         GError *err = NULL;
-        gint num_months = g_key_file_get_integer(key_file, group_name, "dense_cal_num_months", &err);
+        gint num_months = g_key_file_get_integer (key_file, group_name, "dense_cal_num_months", &err);
         if (err == NULL)
-            gnc_dense_cal_set_num_months(priv->gdcal, num_months);
+            gnc_dense_cal_set_num_months (priv->gdcal, num_months);
         else
-            g_error_free(err);
+            g_error_free (err);
     }
 
     {
         GError *err = NULL;
-        gint paned_position = g_key_file_get_integer(key_file, group_name,
+        gint paned_position = g_key_file_get_integer (key_file, group_name,
                               "paned_position", &err);
         if (err == NULL)
-            gtk_paned_set_position(GTK_PANED(priv->widget), paned_position);
+            gtk_paned_set_position (GTK_PANED(priv->widget), paned_position);
         else
-            g_error_free(err);
+            g_error_free (err);
     }
 
     return GNC_PLUGIN_PAGE(page);
@@ -659,26 +659,26 @@ gnc_plugin_page_sx_list_recreate_page (GtkWidget *window,
 
 
 static void
-gnc_plugin_page_sx_list_cmd_new(GtkAction *action, GncPluginPageSxList *page)
+gnc_plugin_page_sx_list_cmd_new (GtkAction *action, GncPluginPageSxList *page)
 {
-    GtkWindow *window = GTK_WINDOW (gnc_plugin_page_get_window (GNC_PLUGIN_PAGE (page)));
+    GtkWindow *window = GTK_WINDOW(gnc_plugin_page_get_window (GNC_PLUGIN_PAGE(page)));
     SchedXaction *new_sx;
     gboolean new_sx_flag = TRUE;
 
-    new_sx = xaccSchedXactionMalloc(gnc_get_current_book());
+    new_sx = xaccSchedXactionMalloc (gnc_get_current_book());
     {
         GDate now;
-        Recurrence *r = g_new0(Recurrence, 1);
+        Recurrence *r = g_new0 (Recurrence, 1);
         GList *schedule;
 
-        g_date_clear(&now, 1);
+        g_date_clear (&now, 1);
         gnc_gdate_set_today (&now);
-        recurrenceSet(r, 1, PERIOD_MONTH, &now, WEEKEND_ADJ_NONE);
-        schedule = gnc_sx_get_schedule(new_sx);
-        schedule = g_list_append(schedule, r);
-        gnc_sx_set_schedule(new_sx, schedule);
+        recurrenceSet (r, 1, PERIOD_MONTH, &now, WEEKEND_ADJ_NONE);
+        schedule = gnc_sx_get_schedule (new_sx);
+        schedule = g_list_append (schedule, r);
+        gnc_sx_set_schedule (new_sx, schedule);
     }
-    gnc_ui_scheduled_xaction_editor_dialog_create(window, new_sx, new_sx_flag);
+    gnc_ui_scheduled_xaction_editor_dialog_create (window, new_sx, new_sx_flag);
     gppsl_update_selected_list (page, TRUE, new_sx);
 }
 
@@ -687,7 +687,7 @@ gnc_plugin_page_sx_list_cmd_new(GtkAction *action, GncPluginPageSxList *page)
 static void
 gnc_plugin_page_sx_list_cmd_new2 (GtkAction *action, GncPluginPageSxList *page)
 {
-    GtkWindow *window = GTK_WINDOW (gnc_plugin_page_get_window (GNC_PLUGIN_PAGE (page)));
+    GtkWindow *window = GTK_WINDOW (gnc_plugin_page_get_window (GNC_PLUGIN_PAGE(page)));
     SchedXaction *new_sx;
     gboolean new_sx_flag = TRUE;
 
@@ -699,7 +699,7 @@ gnc_plugin_page_sx_list_cmd_new2 (GtkAction *action, GncPluginPageSxList *page)
 
         g_date_clear (&now, 1);
         gnc_gdate_set_today (&now);
-        recurrenceSet(r, 1, PERIOD_MONTH, &now, WEEKEND_ADJ_NONE);
+        recurrenceSet (r, 1, PERIOD_MONTH, &now, WEEKEND_ADJ_NONE);
         schedule = gnc_sx_get_schedule (new_sx);
         schedule = g_list_append (schedule, r);
         gnc_sx_set_schedule (new_sx, schedule);
@@ -723,7 +723,7 @@ gnc_plugin_page_sx_list_cmd_refresh (GtkAction *action, GncPluginPageSxList *pag
 static void
 _edit_sx(gpointer data, gpointer user_data)
 {
-    gnc_ui_scheduled_xaction_editor_dialog_create(GTK_WINDOW(user_data),
+    gnc_ui_scheduled_xaction_editor_dialog_create (GTK_WINDOW(user_data),
         (SchedXaction*)data, FALSE);
 }
 
@@ -739,44 +739,44 @@ _edit_sx2 (gpointer data, gpointer user_data)
 #endif
 
 static SchedXaction*
-_argument_reorder_fn(GtkTreePath* list_path_data, GncTreeViewSxList* user_tree_view)
+_argument_reorder_fn (GtkTreePath* list_path_data, GncTreeViewSxList* user_tree_view)
 {
-    return gnc_tree_view_sx_list_get_sx_from_path(user_tree_view, list_path_data);
+    return gnc_tree_view_sx_list_get_sx_from_path (user_tree_view, list_path_data);
 }
 
 
 static void
-gnc_plugin_page_sx_list_cmd_edit(GtkAction *action, GncPluginPageSxList *page)
+gnc_plugin_page_sx_list_cmd_edit (GtkAction *action, GncPluginPageSxList *page)
 {
     GncPluginPageSxListPrivate *priv = GNC_PLUGIN_PAGE_SX_LIST_GET_PRIVATE(page);
-    GtkWindow *window = GTK_WINDOW (gnc_plugin_page_get_window (GNC_PLUGIN_PAGE (page)));
+    GtkWindow *window = GTK_WINDOW(gnc_plugin_page_get_window (GNC_PLUGIN_PAGE(page)));
     GtkTreeSelection *selection;
     GList *selected_paths, *to_edit;
     GtkTreeModel *model;
 
-    selection = gtk_tree_view_get_selection(priv->tree_view);
-    selected_paths = gtk_tree_selection_get_selected_rows(selection, &model);
-    if (g_list_length(selected_paths) == 0)
+    selection = gtk_tree_view_get_selection (priv->tree_view);
+    selected_paths = gtk_tree_selection_get_selected_rows (selection, &model);
+    if (g_list_length (selected_paths) == 0)
     {
-        g_warning("no selection edit.");
+        g_warning ("no selection edit.");
         return;
     }
 
-    to_edit = gnc_g_list_map(selected_paths,
-                             (GncGMapFunc)_argument_reorder_fn,
-                             priv->tree_view);
+    to_edit = gnc_g_list_map (selected_paths,
+                              (GncGMapFunc)_argument_reorder_fn,
+                              priv->tree_view);
 
     gppsl_update_selected_list (page, TRUE, NULL);
     for (GList *list = to_edit; list != NULL; list = list->next)
     {
-        g_debug("to-edit [%s]\n", xaccSchedXactionGetName ((SchedXaction*)list->data));
+        g_debug ("to-edit [%s]\n", xaccSchedXactionGetName ((SchedXaction*)list->data));
         gppsl_update_selected_list (page, FALSE, list->data);
     }
 
-    g_list_foreach(to_edit, (GFunc)_edit_sx, window);
-    g_list_free(to_edit);
-    g_list_foreach(selected_paths, (GFunc)gtk_tree_path_free, NULL);
-    g_list_free(selected_paths);
+    g_list_foreach (to_edit, (GFunc)_edit_sx, window);
+    g_list_free (to_edit);
+    g_list_foreach (selected_paths, (GFunc)gtk_tree_path_free, NULL);
+    g_list_free (selected_paths);
 }
 
 #ifdef REGISTER2_ENABLED
@@ -784,8 +784,8 @@ gnc_plugin_page_sx_list_cmd_edit(GtkAction *action, GncPluginPageSxList *page)
 static void
 gnc_plugin_page_sx_list_cmd_edit2 (GtkAction *action, GncPluginPageSxList *page)
 {
-    GncPluginPageSxListPrivate *priv = GNC_PLUGIN_PAGE_SX_LIST_GET_PRIVATE (page);
-    GtkWindow *window = GTK_WINDOW (gnc_plugin_page_get_window (GNC_PLUGIN_PAGE (page)));
+    GncPluginPageSxListPrivate *priv = GNC_PLUGIN_PAGE_SX_LIST_GET_PRIVATE(page);
+    GtkWindow *window = GTK_WINDOW(gnc_plugin_page_get_window (GNC_PLUGIN_PAGE(page)));
     GtkTreeSelection *selection;
     GList *selected_paths, *to_edit;
     GtkTreeModel *model;
@@ -800,8 +800,8 @@ gnc_plugin_page_sx_list_cmd_edit2 (GtkAction *action, GncPluginPageSxList *page)
 
     to_edit = gnc_g_list_map (selected_paths,
                              (GncGMapFunc)_argument_reorder_fn,
-                             priv->tree_view);
-    g_list_foreach(to_edit, (GFunc)_edit_sx2, window);
+                              priv->tree_view);
+    g_list_foreach (to_edit, (GFunc)_edit_sx2, window);
     g_list_free (to_edit);
     g_list_foreach (selected_paths, (GFunc)gtk_tree_path_free, NULL);
     g_list_free (selected_paths);
@@ -810,17 +810,18 @@ gnc_plugin_page_sx_list_cmd_edit2 (GtkAction *action, GncPluginPageSxList *page)
 #endif
 
 static void
-gppsl_row_activated_cb(GtkTreeView *tree_view,
-                       GtkTreePath *path,
-                       GtkTreeViewColumn *column,
-                       gpointer user_data)
+gppsl_row_activated_cb (GtkTreeView *tree_view,
+                        GtkTreePath *path,
+                        GtkTreeViewColumn *column,
+                        gpointer user_data)
 {
     GncPluginPageSxList *page = GNC_PLUGIN_PAGE_SX_LIST(user_data);
     GncPluginPageSxListPrivate *priv = GNC_PLUGIN_PAGE_SX_LIST_GET_PRIVATE(page);
-    GtkWindow *window = GTK_WINDOW (gnc_plugin_page_get_window (GNC_PLUGIN_PAGE (page)));
+    GtkWindow *window = GTK_WINDOW(gnc_plugin_page_get_window (GNC_PLUGIN_PAGE(page)));
 
-    SchedXaction *sx = gnc_tree_view_sx_list_get_sx_from_path(GNC_TREE_VIEW_SX_LIST(priv->tree_view), path);
-    gnc_ui_scheduled_xaction_editor_dialog_create(window, sx, FALSE);
+    SchedXaction *sx = gnc_tree_view_sx_list_get_sx_from_path (
+                           GNC_TREE_VIEW_SX_LIST(priv->tree_view), path);
+    gnc_ui_scheduled_xaction_editor_dialog_create (window, sx, FALSE);
     gppsl_update_selected_list (page, TRUE, sx);
 }
 
@@ -831,16 +832,16 @@ _destroy_sx(gpointer data, gpointer user_data)
     SchedXactions *sxes;
     SchedXaction *sx = (SchedXaction*)data;
     QofBook *book;
-    book = gnc_get_current_book();
-    sxes = gnc_book_get_schedxactions(book);
-    gnc_sxes_del_sx(sxes, sx);
-    gnc_sx_begin_edit(sx);
-    xaccSchedXactionDestroy(sx);
+    book = gnc_get_current_book ();
+    sxes = gnc_book_get_schedxactions (book);
+    gnc_sxes_del_sx (sxes, sx);
+    gnc_sx_begin_edit (sx);
+    xaccSchedXactionDestroy (sx);
 }
 
 
 static void
-gnc_plugin_page_sx_list_cmd_delete(GtkAction *action, GncPluginPageSxList *page)
+gnc_plugin_page_sx_list_cmd_delete (GtkAction *action, GncPluginPageSxList *page)
 {
     GncPluginPageSxListPrivate *priv = GNC_PLUGIN_PAGE_SX_LIST_GET_PRIVATE(page);
     GtkTreeSelection *selection;
@@ -850,19 +851,19 @@ gnc_plugin_page_sx_list_cmd_delete(GtkAction *action, GncPluginPageSxList *page)
     gchar *message = NULL;
     gint length;
 
-    selection = gtk_tree_view_get_selection(priv->tree_view);
-    selected_paths = gtk_tree_selection_get_selected_rows(selection, &model);
-    if (g_list_length(selected_paths) == 0)
+    selection = gtk_tree_view_get_selection (priv->tree_view);
+    selected_paths = gtk_tree_selection_get_selected_rows (selection, &model);
+    if (g_list_length (selected_paths) == 0)
     {
-        g_warning("no selection for delete.");
+        g_warning ("no selection for delete.");
         return;
     }
 
-    to_delete = gnc_g_list_map(selected_paths,
-                               (GncGMapFunc)_argument_reorder_fn,
-                               priv->tree_view);
+    to_delete = gnc_g_list_map (selected_paths,
+                                (GncGMapFunc)_argument_reorder_fn,
+                                 priv->tree_view);
 
-    window = GTK_WINDOW (gnc_plugin_page_get_window (GNC_PLUGIN_PAGE (page)));
+    window = GTK_WINDOW(gnc_plugin_page_get_window (GNC_PLUGIN_PAGE(page)));
 
     length = g_list_length (to_delete);
 
@@ -876,16 +877,16 @@ gnc_plugin_page_sx_list_cmd_delete(GtkAction *action, GncPluginPageSxList *page)
         gppsl_update_selected_list (page, TRUE, NULL);
         for (GList *list = to_delete; list != NULL; list = list->next)
         {
-            g_debug("to-delete [%s]\n", xaccSchedXactionGetName((SchedXaction*)list->data));
+            g_debug("to-delete [%s]\n", xaccSchedXactionGetName ((SchedXaction*)list->data));
             gppsl_update_selected_list (page, FALSE, list->data);
         }
-        g_list_foreach(to_delete, (GFunc)_destroy_sx, NULL);
+        g_list_foreach (to_delete, (GFunc)_destroy_sx, NULL);
     }
 
     g_free (message);
-    g_list_free(to_delete);
-    g_list_foreach(selected_paths, (GFunc)gtk_tree_path_free, NULL);
-    g_list_free(selected_paths);
+    g_list_free (to_delete);
+    g_list_foreach (selected_paths, (GFunc)gtk_tree_path_free, NULL);
+    g_list_free (selected_paths);
 }
 
 /** @} */
diff --git a/gnucash/gnome/gnc-plugin-page-sx-list.h b/gnucash/gnome/gnc-plugin-page-sx-list.h
index dc3405630..6f819a0c1 100644
--- a/gnucash/gnome/gnc-plugin-page-sx-list.h
+++ b/gnucash/gnome/gnc-plugin-page-sx-list.h
@@ -55,11 +55,11 @@ G_BEGIN_DECLS
 
 /* type macros */
 #define GNC_TYPE_PLUGIN_PAGE_SX_LIST            (gnc_plugin_page_sx_list_get_type ())
-#define GNC_PLUGIN_PAGE_SX_LIST(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNC_TYPE_PLUGIN_PAGE_SX_LIST, GncPluginPageSxList))
-#define GNC_PLUGIN_PAGE_SX_LIST_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GNC_TYPE_PLUGIN_PAGE_SX_LIST, GncPluginPageSxListClass))
-#define GNC_IS_PLUGIN_PAGE_SX_LIST(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNC_TYPE_PLUGIN_PAGE_SX_LIST))
-#define GNC_IS_PLUGIN_PAGE_SX_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNC_TYPE_PLUGIN_PAGE_SX_LIST))
-#define GNC_PLUGIN_PAGE_SX_LIST_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GNC_TYPE_PLUGIN_PAGE_SX_LIST, GncPluginPageSxListClass))
+#define GNC_PLUGIN_PAGE_SX_LIST(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), GNC_TYPE_PLUGIN_PAGE_SX_LIST, GncPluginPageSxList))
+#define GNC_PLUGIN_PAGE_SX_LIST_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass), GNC_TYPE_PLUGIN_PAGE_SX_LIST, GncPluginPageSxListClass))
+#define GNC_IS_PLUGIN_PAGE_SX_LIST(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), GNC_TYPE_PLUGIN_PAGE_SX_LIST))
+#define GNC_IS_PLUGIN_PAGE_SX_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GNC_TYPE_PLUGIN_PAGE_SX_LIST))
+#define GNC_PLUGIN_PAGE_SX_LIST_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj), GNC_TYPE_PLUGIN_PAGE_SX_LIST, GncPluginPageSxListClass))
 
 #define GNC_PLUGIN_PAGE_SX_LIST_NAME "GncPluginPageSxList"
 
@@ -80,12 +80,12 @@ typedef struct
  * Retrieve the type number for an "sx list" plugin page.
  * @return The type number.
  */
-GType gnc_plugin_page_sx_list_get_type(void);
+GType gnc_plugin_page_sx_list_get_type (void);
 
 /**
  * @return The newly created plugin page.
  **/
-GncPluginPage *gnc_plugin_page_sx_list_new(void);
+GncPluginPage *gnc_plugin_page_sx_list_new (void);
 
 G_END_DECLS
 

commit c2a7b8eaaf9aada2f9fe78828113f7da0e79e2ee
Author: Robert Fewell <14uBobIT at gmail.com>
Date:   Sun Apr 18 12:03:59 2021 +0100

    Bug 753283 - Highlight missing when returning from schedule edit.
    
    When you return from editing a scheduled transaction the highlight is
    missing in the tree view. This is partly due to the model being
    recreated when ever a change is made to a scheduled transaction. To
    overcome this, the selected schedules are added to a GList which is
    used in a new call back signal that has been added to indicate when the
    model is populated. When this happens, the model is scanned for the
    schedules that are in the GList so they can be reselected.

diff --git a/gnucash/gnome-utils/gnc-sx-list-tree-model-adapter.c b/gnucash/gnome-utils/gnc-sx-list-tree-model-adapter.c
index bfd92080d..fead85072 100644
--- a/gnucash/gnome-utils/gnc-sx-list-tree-model-adapter.c
+++ b/gnucash/gnome-utils/gnc-sx-list-tree-model-adapter.c
@@ -52,6 +52,16 @@ struct _GncSxListTreeModelAdapter
 struct _GncSxListTreeModelAdapterClass
 {
     GObjectClass parent;
+
+    /* This signal is emitted when the model is populated */
+    void (*model_populated) (GncSxListTreeModelAdapter *model, gpointer user_data);
+};
+
+/* Signal codes */
+enum
+{
+    MODEL_POPULATED,
+    LAST_SIGNAL
 };
 
 static GObjectClass *parent_class = NULL;
@@ -63,6 +73,8 @@ static void gnc_sx_list_tree_model_adapter_init(GTypeInstance *instance, gpointe
 static void gnc_sx_list_tree_model_adapter_dispose(GObject *obj);
 static void gnc_sx_list_tree_model_adapter_finalize(GObject *obj);
 
+static guint gnc_sx_list_tree_model_adapter_signals[LAST_SIGNAL] = {0};
+
 static GncSxInstances* gsltma_get_sx_instances_from_orig_iter(GncSxListTreeModelAdapter *model, GtkTreeIter *orig_iter);
 
 GType
@@ -119,6 +131,16 @@ gnc_sx_list_tree_model_adapter_class_init(GncSxListTreeModelAdapterClass *klass)
     obj_class->dispose = gnc_sx_list_tree_model_adapter_dispose;
     obj_class->finalize = gnc_sx_list_tree_model_adapter_finalize;
 
+    gnc_sx_list_tree_model_adapter_signals[MODEL_POPULATED] =
+        g_signal_new("model_populated",
+                     G_TYPE_FROM_CLASS (obj_class),
+                     G_SIGNAL_RUN_LAST,
+                     G_STRUCT_OFFSET (GncSxListTreeModelAdapterClass, model_populated),
+                     NULL, NULL,
+                     g_cclosure_marshal_VOID__VOID,
+                     G_TYPE_NONE, 0);
+
+    klass->model_populated = NULL;
 }
 
 static GtkTreeModelFlags
@@ -525,6 +547,7 @@ gsltma_populate_tree_store(GncSxListTreeModelAdapter *model)
                            -1);
         g_free(frequency_str);
     }
+    g_signal_emit_by_name (model, "model_populated");
 }
 
 static void
diff --git a/gnucash/gnome/gnc-plugin-page-sx-list.c b/gnucash/gnome/gnc-plugin-page-sx-list.c
index bb49e7f48..9ddbddcdb 100644
--- a/gnucash/gnome/gnc-plugin-page-sx-list.c
+++ b/gnucash/gnome/gnc-plugin-page-sx-list.c
@@ -95,6 +95,7 @@ typedef struct GncPluginPageSxListPrivate
 
     GncSxInstanceModel* instances;
     GtkTreeView* tree_view;
+    GList *selected_list;
 
 } GncPluginPageSxListPrivate;
 
@@ -351,6 +352,64 @@ gppsl_selection_changed_cb(GtkTreeSelection *selection, gpointer user_data)
 }
 
 
+static void
+gppsl_update_selected_list (GncPluginPageSxList *page, gboolean reset, SchedXaction *sx)
+{
+    GncPluginPageSxListPrivate *priv = GNC_PLUGIN_PAGE_SX_LIST_GET_PRIVATE(page);
+
+    if (reset && priv->selected_list)
+    {
+        g_list_free (priv->selected_list);
+        priv->selected_list = NULL;
+    }
+    if (sx)
+        priv->selected_list = g_list_prepend (priv->selected_list, sx);
+}
+
+
+static void
+gppsl_model_populated_cb (GtkTreeModel *tree_model, GncPluginPageSxList *page)
+{
+    GncPluginPageSxListPrivate *priv = GNC_PLUGIN_PAGE_SX_LIST_GET_PRIVATE(page);
+    GtkTreeSelection *selection = gtk_tree_view_get_selection (GTK_TREE_VIEW(priv->tree_view));
+    gboolean found = FALSE;
+
+    if (priv->selected_list)
+    {
+        // walk the list to see if we can reselect the sx
+        for (GList *list = priv->selected_list; list != NULL; list = list->next)
+        {
+            SchedXaction *sx = list->data;
+            GtkTreePath *path = gtk_tree_path_new_first ();
+
+            // loop through the model trying to find selected sx's
+            while (gnc_tree_view_path_is_valid (GNC_TREE_VIEW(priv->tree_view), path))
+            {
+                SchedXaction *sx_tmp = gnc_tree_view_sx_list_get_sx_from_path (
+                                           GNC_TREE_VIEW_SX_LIST(priv->tree_view), path);
+                if (sx_tmp == sx)
+                {
+                    found = TRUE;
+                    break;
+                }
+                gtk_tree_path_next (path);
+            }
+            if (found)
+                gtk_tree_selection_select_path (selection, path);
+
+            gtk_tree_path_free (path);
+        }
+    }
+    // this could be on load or if sx is deleted
+    if (!found)
+    {
+        GtkTreePath *path = gtk_tree_path_new_first ();
+        gtk_tree_selection_select_path (selection, path);
+        gtk_tree_path_free (path);
+    }
+}
+
+
 static GtkWidget *
 gnc_plugin_page_sx_list_create_widget (GncPluginPage *plugin_page)
 {
@@ -420,6 +479,7 @@ gnc_plugin_page_sx_list_create_widget (GncPluginPage *plugin_page)
 
     {
         GtkTreeSelection *selection;
+        GtkTreePath *path = gtk_tree_path_new_first ();
 
         priv->tree_view = GTK_TREE_VIEW(gnc_tree_view_sx_list_new(priv->instances));
         g_object_set(G_OBJECT(priv->tree_view),
@@ -430,8 +490,13 @@ gnc_plugin_page_sx_list_create_widget (GncPluginPage *plugin_page)
 
         selection = gtk_tree_view_get_selection(priv->tree_view);
         gtk_tree_selection_set_mode(selection, GTK_SELECTION_MULTIPLE);
+        gtk_tree_selection_select_path (selection, path);
+        gtk_tree_path_free (path);
+
         g_signal_connect(G_OBJECT(selection), "changed", (GCallback)gppsl_selection_changed_cb, (gpointer)page);
         g_signal_connect(G_OBJECT(priv->tree_view), "row-activated", (GCallback)gppsl_row_activated_cb, (gpointer)page);
+        g_signal_connect (G_OBJECT(gtk_tree_view_get_model (GTK_TREE_VIEW(priv->tree_view))),
+                          "model-populated", (GCallback)gppsl_model_populated_cb, (gpointer)page);
     }
 
     /* Add vbox and label */
@@ -503,6 +568,9 @@ gnc_plugin_page_sx_list_destroy_widget (GncPluginPage *plugin_page)
         priv->widget = NULL;
     }
 
+    if (priv->selected_list)
+        g_list_free (priv->selected_list);
+
     if (priv->gnc_component_id)
     {
         gnc_unregister_gui_component(priv->gnc_component_id);
@@ -611,6 +679,7 @@ gnc_plugin_page_sx_list_cmd_new(GtkAction *action, GncPluginPageSxList *page)
         gnc_sx_set_schedule(new_sx, schedule);
     }
     gnc_ui_scheduled_xaction_editor_dialog_create(window, new_sx, new_sx_flag);
+    gppsl_update_selected_list (page, TRUE, new_sx);
 }
 
 #ifdef REGISTER2_ENABLED
@@ -696,6 +765,14 @@ gnc_plugin_page_sx_list_cmd_edit(GtkAction *action, GncPluginPageSxList *page)
     to_edit = gnc_g_list_map(selected_paths,
                              (GncGMapFunc)_argument_reorder_fn,
                              priv->tree_view);
+
+    gppsl_update_selected_list (page, TRUE, NULL);
+    for (GList *list = to_edit; list != NULL; list = list->next)
+    {
+        g_debug("to-edit [%s]\n", xaccSchedXactionGetName ((SchedXaction*)list->data));
+        gppsl_update_selected_list (page, FALSE, list->data);
+    }
+
     g_list_foreach(to_edit, (GFunc)_edit_sx, window);
     g_list_free(to_edit);
     g_list_foreach(selected_paths, (GFunc)gtk_tree_path_free, NULL);
@@ -744,6 +821,7 @@ gppsl_row_activated_cb(GtkTreeView *tree_view,
 
     SchedXaction *sx = gnc_tree_view_sx_list_get_sx_from_path(GNC_TREE_VIEW_SX_LIST(priv->tree_view), path);
     gnc_ui_scheduled_xaction_editor_dialog_create(window, sx, FALSE);
+    gppsl_update_selected_list (page, TRUE, sx);
 }
 
 
@@ -769,6 +847,8 @@ gnc_plugin_page_sx_list_cmd_delete(GtkAction *action, GncPluginPageSxList *page)
     GList *selected_paths, *to_delete = NULL;
     GtkTreeModel *model;
     GtkWindow *window;
+    gchar *message = NULL;
+    gint length;
 
     selection = gtk_tree_view_get_selection(priv->tree_view);
     selected_paths = gtk_tree_selection_get_selected_rows(selection, &model);
@@ -781,24 +861,28 @@ gnc_plugin_page_sx_list_cmd_delete(GtkAction *action, GncPluginPageSxList *page)
     to_delete = gnc_g_list_map(selected_paths,
                                (GncGMapFunc)_argument_reorder_fn,
                                priv->tree_view);
+
+    window = GTK_WINDOW (gnc_plugin_page_get_window (GNC_PLUGIN_PAGE (page)));
+
+    length = g_list_length (to_delete);
+
+    /* Translators: This is a ngettext(3) message, %d is the number of scheduled transactions deleted */
+    message = g_strdup_printf (ngettext ("Do you really want to delete this scheduled transaction?",
+                                         "Do you really want to delete %d scheduled transactions?",
+                                          length), length);
+
+    if (gnc_verify_dialog (window, FALSE, "%s", message))
     {
-        GList *list;
-        for (list = to_delete; list != NULL; list = list->next)
+        gppsl_update_selected_list (page, TRUE, NULL);
+        for (GList *list = to_delete; list != NULL; list = list->next)
         {
             g_debug("to-delete [%s]\n", xaccSchedXactionGetName((SchedXaction*)list->data));
+            gppsl_update_selected_list (page, FALSE, list->data);
         }
-    }
-
-    window = GTK_WINDOW (gnc_plugin_page_get_window (GNC_PLUGIN_PAGE (page)));
-    /* FIXME: Does this always refer to only one transaction? Or could
-       multiple SXs be deleted as well? Ideally, the number of
-       to-be-deleted SXs should be mentioned here; see
-       dialog-sx-since-last-run.c:807 */
-    if (gnc_verify_dialog (window, FALSE, "%s", _("Do you really want to delete this scheduled transaction?")))
-    {
         g_list_foreach(to_delete, (GFunc)_destroy_sx, NULL);
     }
 
+    g_free (message);
     g_list_free(to_delete);
     g_list_foreach(selected_paths, (GFunc)gtk_tree_path_free, NULL);
     g_list_free(selected_paths);



Summary of changes:
 .../gnome-utils/gnc-sx-list-tree-model-adapter.c   | 547 +++++++++++----------
 .../gnome-utils/gnc-sx-list-tree-model-adapter.h   |  72 +--
 gnucash/gnome/dialog-sx-since-last-run.c           |   3 +
 gnucash/gnome/dialog-sx-since-last-run.h           |   1 +
 gnucash/gnome/gnc-plugin-page-sx-list.c            | 417 +++++++++-------
 gnucash/gnome/gnc-plugin-page-sx-list.h            |  14 +-
 .../org.gnucash.dialogs.sxs.gschema.xml.in         |   5 +
 gnucash/gtkbuilder/dialog-sx.glade                 |  33 +-
 8 files changed, 619 insertions(+), 473 deletions(-)



More information about the gnucash-changes mailing list