Skip to content

Commit

Permalink
Fix sensitivity of invoice toolbar buttons
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Bob-IT committed Jan 31, 2023
1 parent 30d2b97 commit 63f8e73
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions gnucash/gnome/gnc-plugin-page-invoice.c
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,6 @@ typedef struct GncPluginPageInvoicePrivate
GtkWidget *widget;
gboolean is_posted;
gboolean can_unpost;
gboolean is_readonly;

gint component_manager_id;
} GncPluginPageInvoicePrivate;
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 63f8e73

Please sign in to comment.