gnucash stable: Multiple changes pushed

Robert Fewell bobit at code.gnucash.org
Thu Jan 16 06:32:11 EST 2025


Updated	 via  https://github.com/Gnucash/gnucash/commit/7a17d329 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/0a212f5b (commit)
	 via  https://github.com/Gnucash/gnucash/commit/cc2679e0 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/1fb79ef2 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/dd221e40 (commit)
	from  https://github.com/Gnucash/gnucash/commit/e8049a64 (commit)



commit 7a17d329ec23836b82071bf3290e01aedd80fc1e
Author: Robert Fewell <14uBobIT at gmail.com>
Date:   Thu Jan 16 11:24:01 2025 +0000

    Change the text string 'Accounts Selected:' to include number
    
    This is a follow up on the previous commit to change a couple of
    translatable text strings to include the placement of the number using
    %d

diff --git a/gnucash/gnome/dialog-tax-info.c b/gnucash/gnome/dialog-tax-info.c
index 06252dcb11..dd1feb2f79 100644
--- a/gnucash/gnome/dialog-tax-info.c
+++ b/gnucash/gnome/dialog-tax-info.c
@@ -868,8 +868,7 @@ gnc_tax_info_update_accounts (TaxInfoDialog *ti_dialog)
     num_accounts = gtk_tree_selection_count_selected_rows (selection);
 
     label = ti_dialog->num_acct_label;
-
-    string = g_strdup_printf ("%d", num_accounts);
+    string = g_strdup_printf (_("Accounts Selected: %d"), num_accounts);
     gtk_label_set_text (GTK_LABEL (label), string);
     g_free (string);
 
diff --git a/gnucash/gtkbuilder/assistant-csv-export.glade b/gnucash/gtkbuilder/assistant-csv-export.glade
index 5d297628b5..bd405dc069 100644
--- a/gnucash/gtkbuilder/assistant-csv-export.glade
+++ b/gnucash/gtkbuilder/assistant-csv-export.glade
@@ -313,24 +313,10 @@ Select the type of Export required and the separator that will be used.
                             <property name="position">0</property>
                           </packing>
                         </child>
-                        <child>
-                          <object class="GtkLabel" id="label847733">
-                            <property name="visible">True</property>
-                            <property name="can-focus">False</property>
-                            <property name="label" translatable="yes">Accounts Selected:</property>
-                            <property name="justify">center</property>
-                          </object>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">False</property>
-                            <property name="position">1</property>
-                          </packing>
-                        </child>
                         <child>
                           <object class="GtkLabel" id="num_accounts_label">
                             <property name="visible">True</property>
                             <property name="can-focus">False</property>
-                            <property name="label">0</property>
                             <property name="justify">center</property>
                           </object>
                           <packing>
diff --git a/gnucash/gtkbuilder/dialog-tax-info.glade b/gnucash/gtkbuilder/dialog-tax-info.glade
index 27904bfe7e..304f2a31a6 100644
--- a/gnucash/gtkbuilder/dialog-tax-info.glade
+++ b/gnucash/gtkbuilder/dialog-tax-info.glade
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.38.2 -->
+<!-- Generated with glade 3.40.0 -->
 <interface>
   <requires lib="gtk+" version="3.22"/>
   <object class="GtkAdjustment" id="copy_spin_adj">
@@ -369,24 +369,10 @@
                             <property name="position">0</property>
                           </packing>
                         </child>
-                        <child>
-                          <object class="GtkLabel" id="label847733">
-                            <property name="visible">True</property>
-                            <property name="can-focus">False</property>
-                            <property name="label" translatable="yes">Accounts Selected:</property>
-                            <property name="justify">center</property>
-                          </object>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">False</property>
-                            <property name="position">1</property>
-                          </packing>
-                        </child>
                         <child>
                           <object class="GtkLabel" id="num_accounts_label">
                             <property name="visible">True</property>
                             <property name="can-focus">False</property>
-                            <property name="label">0</property>
                             <property name="justify">center</property>
                           </object>
                           <packing>
diff --git a/gnucash/import-export/csv-exp/assistant-csv-export.c b/gnucash/import-export/csv-exp/assistant-csv-export.c
index d71b17a443..eb0be03544 100644
--- a/gnucash/import-export/csv-exp/assistant-csv-export.c
+++ b/gnucash/import-export/csv-exp/assistant-csv-export.c
@@ -398,8 +398,7 @@ update_accounts_tree (CsvExportInfo *info)
     num_accounts = gtk_tree_selection_count_selected_rows (selection);
 
     label = info->csva.num_acct_label;
-
-    string = g_strdup_printf ("%d", num_accounts);
+    string = g_strdup_printf (_("Accounts Selected: %d"), num_accounts);
     gtk_label_set_text (GTK_LABEL (label), string);
     g_free (string);
 }

commit 0a212f5b982233d38293cd4a441c4ac718696ba4
Author: Robert Fewell <14uBobIT at gmail.com>
Date:   Thu Jan 16 11:21:34 2025 +0000

    Bug 799035 - CSV Export: 'Accounts Selected' text has bad formatting
    
    The initial problem is that the packing order was wrong in the glade
    file so have corrected that.

diff --git a/gnucash/gtkbuilder/assistant-csv-export.glade b/gnucash/gtkbuilder/assistant-csv-export.glade
index e29016424d..5d297628b5 100644
--- a/gnucash/gtkbuilder/assistant-csv-export.glade
+++ b/gnucash/gtkbuilder/assistant-csv-export.glade
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.38.2 -->
+<!-- Generated with glade 3.40.0 -->
 <interface>
   <requires lib="gtk+" version="3.22"/>
   <object class="GtkAssistant" id="csv_export_assistant">
@@ -336,7 +336,7 @@ Select the type of Export required and the separator that will be used.
                           <packing>
                             <property name="expand">False</property>
                             <property name="fill">False</property>
-                            <property name="position">1</property>
+                            <property name="position">2</property>
                           </packing>
                         </child>
                         <child>

commit cc2679e08f681a185027964579947fa4beb49629
Author: Robert Fewell <14uBobIT at gmail.com>
Date:   Thu Jan 16 11:16:49 2025 +0000

    Change a couple of accelerator keys to be the same

diff --git a/gnucash/gtkbuilder/dialog-account.glade b/gnucash/gtkbuilder/dialog-account.glade
index bf96496b95..b379b736cd 100644
--- a/gnucash/gtkbuilder/dialog-account.glade
+++ b/gnucash/gtkbuilder/dialog-account.glade
@@ -903,7 +903,7 @@
                     </child>
                     <child>
                       <object class="GtkButton" id="clear_all">
-                        <property name="label" translatable="yes">C_lear All</property>
+                        <property name="label" translatable="yes">Clear _All</property>
                         <property name="visible">True</property>
                         <property name="can-focus">True</property>
                         <property name="can-default">True</property>
diff --git a/gnucash/gtkbuilder/gnc-plugin-page-register.glade b/gnucash/gtkbuilder/gnc-plugin-page-register.glade
index 291a355c0f..f2f487e854 100644
--- a/gnucash/gtkbuilder/gnc-plugin-page-register.glade
+++ b/gnucash/gtkbuilder/gnc-plugin-page-register.glade
@@ -467,7 +467,7 @@ If 0, all previous days included</property>
                     </child>
                     <child>
                       <object class="GtkButton" id="button84">
-                        <property name="label" translatable="yes">Select _All</property>
+                        <property name="label" translatable="yes">_Select All</property>
                         <property name="visible">True</property>
                         <property name="can-focus">True</property>
                         <property name="receives-default">True</property>

commit 1fb79ef207153d7e72b3bba556f664e687b367c8
Author: Robert Fewell <14uBobIT at gmail.com>
Date:   Thu Jan 16 11:14:36 2025 +0000

    Bug 799491 - Add "Clear All" button to register filter
    
    Add a 'Clear All' button to the register filter dialog

diff --git a/gnucash/gnome/gnc-plugin-page-register.cpp b/gnucash/gnome/gnc-plugin-page-register.cpp
index fddebc73d9..49d594b11d 100644
--- a/gnucash/gnome/gnc-plugin-page-register.cpp
+++ b/gnucash/gnome/gnc-plugin-page-register.cpp
@@ -162,8 +162,10 @@ void gnc_plugin_page_register_filter_end_cb (GtkWidget* radio,
                                              GncPluginPageRegister* page);
 void gnc_plugin_page_register_filter_response_cb (GtkDialog* dialog,
                                                   gint response, GncPluginPageRegister* plugin_page);
-void gnc_plugin_page_register_filter_status_all_cb (GtkButton* button,
-                                                    GncPluginPageRegister* plugin_page);
+void gnc_plugin_page_register_filter_status_select_all_cb (GtkButton* button,
+                                                           GncPluginPageRegister* plugin_page);
+void gnc_plugin_page_register_filter_status_clear_all_cb (GtkButton* button,
+                                                          GncPluginPageRegister* plugin_page);
 void gnc_plugin_page_register_filter_status_one_cb (GtkToggleButton* button,
                                                     GncPluginPageRegister* page);
 void gnc_plugin_page_register_filter_save_cb (GtkToggleButton* button,
@@ -2766,8 +2768,8 @@ gnc_plugin_page_register_filter_status_one_cb (GtkToggleButton* button,
  *  associated with this filter dialog.
  */
 void
-gnc_plugin_page_register_filter_status_all_cb (GtkButton* button,
-                                               GncPluginPageRegister* page)
+gnc_plugin_page_register_filter_status_select_all_cb (GtkButton* button,
+                                                      GncPluginPageRegister* page)
 {
     GncPluginPageRegisterPrivate* priv;
     GtkWidget* widget;
@@ -2797,6 +2799,48 @@ gnc_plugin_page_register_filter_status_all_cb (GtkButton* button,
 }
 
 
+
+/** This function is called whenever the "clear all" status button is
+ *  clicked.  It updates all of the checkbox widgets, then updates the
+ *  query on the register.
+ *
+ *  @param button The button that was clicked.
+ *
+ *  @param page A pointer to the GncPluginPageRegister that is
+ *  associated with this filter dialog.
+ */
+void
+gnc_plugin_page_register_filter_status_clear_all_cb (GtkButton* button,
+                                                     GncPluginPageRegister* page)
+{
+    GncPluginPageRegisterPrivate* priv;
+    GtkWidget* widget;
+    gint i;
+
+    g_return_if_fail (GTK_IS_BUTTON (button));
+    g_return_if_fail (GNC_IS_PLUGIN_PAGE_REGISTER (page));
+
+    ENTER ("(button %p, page %p)", button, page);
+
+    /* Turn off all the check menu items */
+    for (i = 0; status_actions[i].action_name; i++)
+    {
+        widget = status_actions[i].widget;
+        g_signal_handlers_block_by_func (widget,
+                                         (gpointer)gnc_plugin_page_register_filter_status_one_cb, page);
+        gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), FALSE);
+        g_signal_handlers_unblock_by_func (widget,
+                                           (gpointer)gnc_plugin_page_register_filter_status_one_cb, page);
+    }
+
+    /* Set the requested status */
+    priv = GNC_PLUGIN_PAGE_REGISTER_GET_PRIVATE (page);
+    priv->fd.cleared_match = CLEARED_NONE;
+    gnc_ppr_update_status_query (page);
+    LEAVE (" ");
+}
+
+
 /** This function computes the starting and ending times for the
  *  filter by examining the dialog widgets to see which ones are
  *  selected, and will pull times out of the data entry boxes if
diff --git a/gnucash/gtkbuilder/gnc-plugin-page-register.glade b/gnucash/gtkbuilder/gnc-plugin-page-register.glade
index 939a0f8faa..291a355c0f 100644
--- a/gnucash/gtkbuilder/gnc-plugin-page-register.glade
+++ b/gnucash/gtkbuilder/gnc-plugin-page-register.glade
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.38.2 -->
+<!-- Generated with glade 3.40.0 -->
 <interface>
   <requires lib="gtk+" version="3.22"/>
   <object class="GtkAdjustment" id="days_adjustment">
@@ -378,7 +378,7 @@ If 0, all previous days included</property>
                 <property name="can-focus">False</property>
                 <property name="orientation">vertical</property>
                 <child>
-                  <!-- n-columns=1 n-rows=7 -->
+                  <!-- n-columns=1 n-rows=8 -->
                   <object class="GtkGrid" id="table1">
                     <property name="visible">True</property>
                     <property name="can-focus">False</property>
@@ -473,7 +473,7 @@ If 0, all previous days included</property>
                         <property name="receives-default">True</property>
                         <property name="halign">center</property>
                         <property name="use-underline">True</property>
-                        <signal name="clicked" handler="gnc_plugin_page_register_filter_status_all_cb" swapped="no"/>
+                        <signal name="clicked" handler="gnc_plugin_page_register_filter_status_select_all_cb" swapped="no"/>
                       </object>
                       <packing>
                         <property name="left-attach">0</property>
@@ -493,6 +493,21 @@ If 0, all previous days included</property>
                         <property name="top-attach">5</property>
                       </packing>
                     </child>
+                    <child>
+                      <object class="GtkButton" id="button85">
+                        <property name="label" translatable="yes">Clear _All</property>
+                        <property name="visible">True</property>
+                        <property name="can-focus">True</property>
+                        <property name="receives-default">True</property>
+                        <property name="halign">center</property>
+                        <property name="use-underline">True</property>
+                        <signal name="clicked" handler="gnc_plugin_page_register_filter_status_clear_all_cb" swapped="no"/>
+                      </object>
+                      <packing>
+                        <property name="left-attach">0</property>
+                        <property name="top-attach">7</property>
+                      </packing>
+                    </child>
                   </object>
                   <packing>
                     <property name="expand">True</property>

commit dd221e409c718cd527d37e4506e9bb2e40f31a11
Author: Robert Fewell <14uBobIT at gmail.com>
Date:   Thu Jan 16 10:50:20 2025 +0000

    Bug 799465 - Register Filter Today radio buttons don't work correctly
    
    There was a typo in the callback for identifying the required widget to
    get the correct value as start_date_today instead of end_date_today.

diff --git a/gnucash/gnome/gnc-plugin-page-register.cpp b/gnucash/gnome/gnc-plugin-page-register.cpp
index ec9de039a8..fddebc73d9 100644
--- a/gnucash/gnome/gnc-plugin-page-register.cpp
+++ b/gnucash/gnome/gnc-plugin-page-register.cpp
@@ -2845,7 +2845,7 @@ get_filter_times (GncPluginPageRegister* page)
     else
     {
         if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (
-                                              priv->fd.start_date_today)))
+                                              priv->fd.end_date_today)))
         {
             priv->fd.end_time = gnc_time64_get_today_end();
         }



Summary of changes:
 gnucash/gnome/dialog-tax-info.c                    |  3 +-
 gnucash/gnome/gnc-plugin-page-register.cpp         | 54 ++++++++++++++++++++--
 gnucash/gtkbuilder/assistant-csv-export.glade      | 18 +-------
 gnucash/gtkbuilder/dialog-account.glade            |  2 +-
 gnucash/gtkbuilder/dialog-tax-info.glade           | 16 +------
 gnucash/gtkbuilder/gnc-plugin-page-register.glade  | 23 +++++++--
 .../import-export/csv-exp/assistant-csv-export.c   |  3 +-
 7 files changed, 74 insertions(+), 45 deletions(-)



More information about the gnucash-changes mailing list