gnucash master: Multiple changes pushed

Robert Fewell bobit at code.gnucash.org
Tue Jan 31 08:38:49 EST 2023


Updated	 via  https://github.com/Gnucash/gnucash/commit/63f8e731 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/30d2b972 (commit)
	from  https://github.com/Gnucash/gnucash/commit/2fc63d62 (commit)



commit 63f8e731425e8a0aebde97e9f5625643efb7f7ef
Author: Robert Fewell <14uBobIT at gmail.com>
Date:   Tue Jan 31 13:37:20 2023 +0000

    Fix sensitivity of invoice toolbar buttons
    
    In gnc_plugin_page_invoice_update_menus change the location of saving
    the is_posted and can_post values and remove saving of is_readonly.

diff --git a/gnucash/gnome/gnc-plugin-page-invoice.c b/gnucash/gnome/gnc-plugin-page-invoice.c
index fa835b6f0..3859e7904 100644
--- a/gnucash/gnome/gnc-plugin-page-invoice.c
+++ b/gnucash/gnome/gnc-plugin-page-invoice.c
@@ -314,7 +314,6 @@ typedef struct GncPluginPageInvoicePrivate
     GtkWidget *widget;
     gboolean is_posted;
     gboolean can_unpost;
-    gboolean is_readonly;
 
     gint component_manager_id;
 } GncPluginPageInvoicePrivate;
@@ -507,18 +506,17 @@ gnc_plugin_page_invoice_update_menus (GncPluginPage *page, gboolean is_posted, g
 
     g_return_if_fail (GNC_IS_PLUGIN_PAGE_INVOICE(page));
 
-    window = (GncMainWindow*)gnc_plugin_page_get_window (GNC_PLUGIN_PAGE(page));
-
-    if (gnc_main_window_get_current_page (window) != page)
-        return;
-
     priv = GNC_PLUGIN_PAGE_INVOICE_GET_PRIVATE(page);
-    invoice_type = gnc_invoice_get_type_from_window(priv->iw);
 
     // lets remember these settings
     priv->is_posted = is_posted;
     priv->can_unpost = can_unpost;
-    priv->is_readonly = is_readonly;
+
+    window = (GncMainWindow*)gnc_plugin_page_get_window (GNC_PLUGIN_PAGE(page));
+    if (gnc_main_window_get_current_page (window) != page)
+        return;
+
+    invoice_type = gnc_invoice_get_type_from_window(priv->iw);
 
     switch (invoice_type) {
         case GNC_INVOICE_CUST_INVOICE:

commit 30d2b97252e55b19c4ce876ec4670000f717d959
Author: Robert Fewell <14uBobIT at gmail.com>
Date:   Tue Jan 31 13:24:00 2023 +0000

    Fix toolbar Print action for invoices

diff --git a/gnucash/ui/gnc-plugin-page-invoice.ui b/gnucash/ui/gnc-plugin-page-invoice.ui
index 1f8df24f0..3cd852af5 100644
--- a/gnucash/ui/gnc-plugin-page-invoice.ui
+++ b/gnucash/ui/gnc-plugin-page-invoice.ui
@@ -285,7 +285,7 @@
         <property name="visible">True</property>
         <property name="can-focus">False</property>
         <property name="label" translatable="yes">_Print Invoice</property>
-        <property name="action-name">gnc-plugin-business-actions.FilePrintAction</property>
+        <property name="action-name">GncPluginPageInvoiceActions.FilePrintAction</property>
         <property name="tooltip-text" translatable="yes">Make a printable invoice</property>
         <property name="use-underline">True</property>
         <property name="icon-name">document-print</property>



Summary of changes:
 gnucash/gnome/gnc-plugin-page-invoice.c | 14 ++++++--------
 gnucash/ui/gnc-plugin-page-invoice.ui   |  2 +-
 2 files changed, 7 insertions(+), 9 deletions(-)



More information about the gnucash-changes mailing list