gnucash maint: Multiple changes pushed
Christopher Lam
clam at code.gnucash.org
Tue Nov 3 22:22:30 EST 2020
Updated via https://github.com/Gnucash/gnucash/commit/7e4f120f (commit)
via https://github.com/Gnucash/gnucash/commit/d1d46473 (commit)
via https://github.com/Gnucash/gnucash/commit/54f614fe (commit)
from https://github.com/Gnucash/gnucash/commit/d867a9d5 (commit)
commit 7e4f120f97335f98457e41be0674c45248624631
Author: Cristian Klein <cristian.klein at elastisys.com>
Date: Wed Oct 28 22:36:11 2020 +0100
Add auto-clear to register page
diff --git a/gnucash/ui/gnc-plugin-page-register-ui.xml b/gnucash/ui/gnc-plugin-page-register-ui.xml
index a32b3bd5a..5a240a5b2 100644
--- a/gnucash/ui/gnc-plugin-page-register-ui.xml
+++ b/gnucash/ui/gnc-plugin-page-register-ui.xml
@@ -44,6 +44,7 @@
<separator name="ActionsSep1"/>
<menuitem name="ActionsTransfer" action="ActionsTransferAction"/>
<menuitem name="ActionsReconcile" action="ActionsReconcileAction"/>
+ <menuitem name="ActionsAutoClear" action="ActionsAutoClearAction"/>
<menuitem name="ActionsStockSplit" action="ActionsStockSplitAction"/>
<menuitem name="ActionLots" action="ActionsLotsAction"/>
<separator name="ActionsSep4"/>
diff --git a/gnucash/ui/gnc-plugin-page-register2-ui.xml b/gnucash/ui/gnc-plugin-page-register2-ui.xml
index 3d903d9ac..8c4c4afab 100644
--- a/gnucash/ui/gnc-plugin-page-register2-ui.xml
+++ b/gnucash/ui/gnc-plugin-page-register2-ui.xml
@@ -43,6 +43,7 @@
<separator name="ActionsSep1"/>
<menuitem name="ActionsTransfer" action="ActionsTransferAction"/>
<menuitem name="ActionsReconcile" action="ActionsReconcileAction"/>
+ <menuitem name="ActionsAutoClear" action="ActionsAutoClearAction"/>
<menuitem name="ActionsStockSplit" action="ActionsStockSplitAction"/>
<menuitem name="ActionLots" action="ActionsLotsAction"/>
<separator name="ActionsSep4"/>
commit d1d464738fb021a2c7bee1b9ed51531d556ef20d
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Wed Nov 4 11:18:36 2020 +0800
[autoclear] show cleared splits is optional
diff --git a/gnucash/gnome/window-autoclear.c b/gnucash/gnome/window-autoclear.c
index 31d2c40c6..f5270be82 100644
--- a/gnucash/gnome/window-autoclear.c
+++ b/gnucash/gnome/window-autoclear.c
@@ -50,6 +50,7 @@ struct _AutoClearWindow
GNCAmountEdit *end_value;/* The ending value */
GtkWidget *ok_button;
GtkWidget *cancel_button;
+ GtkWidget *show_cleared_splits_button;
GtkLabel *status_label;
};
@@ -151,7 +152,11 @@ gnc_autoclear_window_ok_cb (GtkWidget *widget,
for (GList *node = toclear_list; node; node = node->next)
xaccSplitSetReconcile (node->data, CREC);
xaccAccountCommitEdit (data->account);
- show_cleared_splits (toclear_list);
+
+ if (gtk_toggle_button_get_active
+ (GTK_TOGGLE_BUTTON (data->show_cleared_splits_button)))
+ show_cleared_splits (toclear_list);
+
g_list_free (toclear_list);
/* Close window */
@@ -207,6 +212,9 @@ autoClearWindow (GtkWidget *parent, Account *account)
// Set the name for this dialog so it can be easily manipulated with css
gtk_widget_set_name (GTK_WIDGET(data->window), "gnc-id-auto-clear");
+ data->show_cleared_splits_button =
+ GTK_WIDGET (gtk_builder_get_object (builder, "show_cleared_splits_button"));
+
/* Add amount edit box */
data->end_value = GNC_AMOUNT_EDIT(gnc_amount_edit_new());
g_signal_connect(GTK_WIDGET(data->end_value), "activate",
diff --git a/gnucash/gtkbuilder/window-autoclear.glade b/gnucash/gtkbuilder/window-autoclear.glade
index 7486f9f76..25730a6ff 100644
--- a/gnucash/gtkbuilder/window-autoclear.glade
+++ b/gnucash/gtkbuilder/window-autoclear.glade
@@ -135,6 +135,22 @@ Use this dialog if you want GnuCash to automatically find which transactions are
<property name="position">1</property>
</packing>
</child>
+ <child>
+ <object class="GtkCheckButton" id="show_cleared_splits_button">
+ <property name="label" translatable="yes">_Review cleared splits</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="tooltip_text" translatable="yes">Select this option to open a register tab with newly cleared splits.</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
</object>
<packing>
<property name="expand">False</property>
commit 54f614feedf58886896fe6c8a4fcbaea7254b199
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Tue Nov 3 11:19:16 2020 +0800
[html-text] compact gnc:html-markup-img
diff --git a/gnucash/report/html-text.scm b/gnucash/report/html-text.scm
index 94a04d420..7fb0da9c5 100644
--- a/gnucash/report/html-text.scm
+++ b/gnucash/report/html-text.scm
@@ -22,6 +22,7 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(use-modules (srfi srfi-9))
+(use-modules (ice-9 match))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; <html-text> class
@@ -184,15 +185,10 @@
rest))
(define (gnc:html-markup-img src . rest)
- (gnc:html-markup/attr/no-end
- "img"
- (with-output-to-string
- (lambda ()
- (for-each
- (lambda (kvp)
- (format #t "~a=~s " (car kvp) (cadr kvp)))
- (cons (list 'src src)
- rest))))))
+ (let lp ((tags (cons (list 'src src) rest)) (acc '()))
+ (match tags
+ (() (gnc:html-markup/attr/no-end "img" (string-concatenate-reverse acc)))
+ (((attr val) . tail) (lp tail (cons (format #f "~a=~s " attr val) acc))))))
(define (gnc:html-text-render p doc)
(let* ((retval '())
Summary of changes:
gnucash/gnome/window-autoclear.c | 10 +++++++++-
gnucash/gtkbuilder/window-autoclear.glade | 16 ++++++++++++++++
gnucash/report/html-text.scm | 14 +++++---------
gnucash/ui/gnc-plugin-page-register-ui.xml | 1 +
gnucash/ui/gnc-plugin-page-register2-ui.xml | 1 +
5 files changed, 32 insertions(+), 10 deletions(-)
More information about the gnucash-changes
mailing list