gnucash stable: Adding custom report to a custom sub-menu

Robert Fewell bobit at code.gnucash.org
Fri Mar 13 10:18:44 EDT 2026


Updated	 via  https://github.com/Gnucash/gnucash/commit/672bb3c1 (commit)
	from  https://github.com/Gnucash/gnucash/commit/62af7f0d (commit)



commit 672bb3c11d20e6b21fa510a019260594619603a5
Author: Robert Fewell <14uBobIT at gmail.com>
Date:   Fri Mar 13 13:52:57 2026 +0000

    Adding custom report to a custom sub-menu
    
    If the custom sub-menu does not have an accelerator key defined then
    one is added if possible which changes the action label. This new label
    creates a new full path which is used in the build_menu_hash table to
    reference the created GMenuItem.
    
    When adding the menu entry, the full path used still comprises of the
    original label and hence the GMenuItem can not be found in the
    build_menu_hash table and so gets added as a top level menu entry.
    
    To fix this, a second entry is added to the build_menu_hash table using
    the original menu label so the required GMenuItem can be found.



Summary of changes:
 gnucash/gnome-utils/gnc-menu-extensions.c       |  2 ++
 gnucash/gnome-utils/gnc-menu-extensions.h       |  1 +
 gnucash/gnome-utils/gnc-plugin-menu-additions.c | 14 ++++++++++++++
 3 files changed, 17 insertions(+)



More information about the gnucash-patches mailing list