how to hook OpenHBCI menu items in the register window
Derek Atkins
warlord@MIT.EDU
22 Aug 2002 20:25:29 -0400
My personal feeling is that adding HBCI dependencies to src/gnome/*
is the wrong idea. Instead, we should have an interface to allow
a gnc-module to auto-add items to menus -- ANY menu. The business
code would like to do it, too.
-derek
Christian Stimming <stimming@tuhh.de> writes:
> Hi,
>
> I'm about to create new actions that can be performed on a Gnucash account
> online by means of HBCI. Those online actions include balance retrieval,
> transaction retrieval, and others. I'd like to add menu items for the user to
> invoke those, preferably under a submenu Actions->Online->... or similar.
> These menu items should appear both in the Register's action menu as well as
> the account tree's action menu.
>
> Of course, those menu items should only be there for those who compile gnucash
> with --enable-hbci. I wonder what would be the best way to have menu items
> appear in the mentioned menus, conditioned on --enable-hbci. For the account
> tree window, this would be the menu initialization code in
> src/gnome/window-acct-tree.c. For the register view, I would probably have to
> add menu items manually in src/gnome/window-register.c, as the existing menu
> items are all defined directly in the glade file.
>
> I was thinking of defining HBCI_CFLAGS to contain "-DHAS_OPENHBCI" if
> --enable-hbci was given, and to add that to src/gnome/Makefile.am's
> AM_CFLAGS. Then, all menu code that gets added for HBCI online actions
> support would be surrounded by #ifdef HAS_OPENHBCI / #endif.
>
> I know that this is not the most elegant solution possible. However, does
> anybody have a better proposal? Are there plans to enable adding menu items
> from outside the src/gnome/window-*.c code, i.e., so that I can write the
> menu item adding code into src/import-export/hbci/*.c? Otherwise the
> mentioned solution is pretty much the only thing I can think of.
>
> Christian
>
> _______________________________________________
> gnucash-devel mailing list
> gnucash-devel@lists.gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-devel
--
Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
Member, MIT Student Information Processing Board (SIPB)
URL: http://web.mit.edu/warlord/ PP-ASEL-IA N1NWH
warlord@MIT.EDU PGP key available