gnucash master: Multiple changes pushed

John Ralls jralls at code.gnucash.org
Thu Mar 16 16:45:29 EDT 2023


Updated	 via  https://github.com/Gnucash/gnucash/commit/047dad29 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/8e9c65c1 (commit)
	from  https://github.com/Gnucash/gnucash/commit/68ece424 (commit)



commit 047dad29c2c2d65d12afd3e3fb42c1596570de27
Merge: 68ece42440 8e9c65c1eb
Author: John Ralls <jralls at ceridwen.us>
Date:   Thu Mar 16 11:30:12 2023 -0700

    Merge Richard Cohen's 'show-log-window-should-show-the-window' into master.


commit 8e9c65c1ebb593d985a03c67e43c36d64e1e6e35
Author: Richard Cohen <richard at daijobu.co.uk>
Date:   Fri Mar 10 15:19:00 2023 +0000

    Fix regression: Actions > Online Actions > Show log window
    
    .. does nothing
    
    Action activate needs to change the state
    
    Note that there is another bug (also present in maint) where the
    menu entry does nothing the first time it is clicked

diff --git a/gnucash/import-export/aqb/gnc-plugin-aqbanking.c b/gnucash/import-export/aqb/gnc-plugin-aqbanking.c
index 0d13fa05c4..711425f69c 100644
--- a/gnucash/import-export/aqb/gnc-plugin-aqbanking.c
+++ b/gnucash/import-export/aqb/gnc-plugin-aqbanking.c
@@ -605,11 +605,14 @@ gnc_plugin_ab_cmd_view_logwindow (GSimpleAction *simple,
                                   GVariant *parameter,
                                   gpointer user_data)
 {
-    GVariant *state;
+    GVariant *state = g_action_get_state (G_ACTION(simple));
+    gboolean toggle = g_variant_get_boolean (state);
+    g_variant_unref (state);
 
-    state = g_action_get_state (G_ACTION(simple));
+    gboolean new_toggle = !toggle;
+    g_action_change_state (G_ACTION(simple), g_variant_new_boolean (new_toggle));
 
-    if (g_variant_get_boolean (state))
+    if (new_toggle)
     {
         if (!gnc_GWEN_Gui_show_dialog())
         {
@@ -621,7 +624,6 @@ gnc_plugin_ab_cmd_view_logwindow (GSimpleAction *simple,
     {
         gnc_GWEN_Gui_hide_dialog();
     }
-    g_variant_unref (state);
 }
 
 static void



Summary of changes:
 gnucash/import-export/aqb/gnc-plugin-aqbanking.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)



More information about the gnucash-changes mailing list