how to hook OpenHBCI menu items in the register window

Derek Atkins warlord@MIT.EDU
23 Aug 2002 10:25:15 -0400


Well, David Hampton was the person working on menus and turning
them all to glade.  I warned him that this was going to be an
issue.  I know that there is a programatic way to add items to
_some_ menus, but I do not know if there is a way to do it for
"any" menu.

Maybe Mr. Hampton would know?  David?

-derek

Christian Stimming <stimming@tuhh.de> writes:

> Derek Atkins wrote:
> 
> > 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.
> 
> 
> Certainly an interface for auto-adding menu items would absolutely be
> the right solution here. Are you volunteering to writing such an
> interface? I'm not. If you are not, too, then the question is how I
> can go ahead in the meantime.
> 
> My proposal for such an interim-solution was described in my previous
> msg. Do you or anyone else have alternative suggestions? I'd be
> grateful for them. Otherwise I'd just proceed as described, but as
> soon as somebody provides a generic menu-item-adding interface, I'd
> happily remove those code lines from src/gnome/ again.
> 
> Christian
> 
> > Christian Stimming <stimming@tuhh.de> writes:
> >> 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
> 
> 

-- 
       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