Some problems with the current plugin system in gnucash GUI
Didier Vidal
didier-devel at 9online.fr
Mon Nov 14 16:02:10 EST 2005
Le lun 14/11/2005 à 03:33, David Hampton a écrit :
> On Sat, 2005-11-12 at 12:49 -0500, Josh Sled wrote:
>
> > The rule here is that we should create an account-tree page when a
> > main-window is created which doesn't otherwise have an account-tree
> > page. You want to hook in [:)] at a point after the UI is created, but
> > you don't want to create an account-tree page *if* the
> > saved-window-state contains one already, and you end up with two in the
> > window. And there's no
> > HOOK_NEW_MAIN_WINDOW_CREATED_WITHOUT_SAVED_STATE_ALREADY_WITH_AN_OPEN_ACCOUNT_TREE_PAGE. :)
>
> I believe I committed this on Friday. The window restoration code first
> looks for a gnucash-2.0 state file (which should always have an account
> tree page). If it doesn't find one, it opens an account tree page and
> looks for a gnucash-1.8 state file.
>
OK. This works. I also saw in this changeset the right way to call
actions exported by plugins, in gnucash design, using introspection:
action = gnc_main_window_find_action(window,
"FileNewAccountTreeAction");
gtk_action_activate(action);
Didier.
More information about the gnucash-devel
mailing list