> On Nov 29, 2022, at 4:40 AM, Helmut Eller <eller.hel...@gmail.com> wrote:
> 
> Is there some easy way to add user-defined commands to the menus?
> 
> I wrote some Scheme code for various tasks and currently I execute this
> code via custom reports as a side effect.  This works, but it would be
> nicer if I could create proper menu items for these commands.  Ideally,
> the command would be called with some arguments, e.g. the currently
> selected transaction.
> 
> Is this possible?  Is it documented somewhere?

Yes, it's possible. No, it's not documented.

See the definition of gnc:add-report-template-menu-item at 
https://github.com/Gnucash/gnucash/blob/maint/gnucash/gnome/report-menus.scm#L42
 for example code. It's all specialized for report templates so you'll have to 
copy and modify a lot of code. Note the convention that functions starting with 
gnc: are written in Scheme and those starting with gnc- or xacc are written in 
C and exposed to Guile via SWIG.

Regards,
John Ralls

_______________________________________________
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.

Reply via email to