Fix the binding of the extra business items when

gnucash started with --nofile
This commit is contained in:
Robert Fewell 2022-10-28 16:58:44 +01:00
parent 19cfbd6cd3
commit 239820c5a6
2 changed files with 7 additions and 1 deletions

View File

@ -4113,6 +4113,10 @@ main_window_realize_cb (GtkWidget *widget, gpointer user_data)
GncMainWindowPrivate *priv = GNC_MAIN_WINDOW_GET_PRIVATE(window);
gnc_add_accelerator_keys_for_menu (GTK_WIDGET(priv->menubar), priv->accel_group);
/* need to signal menu has been changed, this will call the
business function 'bind_extra_toolbuttons_visibility' */
g_signal_emit_by_name (window, "menu_changed", nullptr);
}
static void

View File

@ -840,9 +840,11 @@ gnc_plugin_business_main_window_menu_changed (GncMainWindow *window,
GncPluginPage *page,
gpointer user_data)
{
// page could be NULL when gnucash started with --nofile
if (page == gnc_main_window_get_current_page (window))
{
gnc_plugin_business_main_window_page_changed (window, page, user_data);
if (page)
gnc_plugin_business_main_window_page_changed (window, page, user_data);
bind_extra_toolbuttons_visibility (window);
}
}