Some problems with the current plugin system in gnucash GUI
hampton-gnucash at rainbolthampton.net
Sun Nov 13 21:33:56 EST 2005
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.
> In particular in this case, while all the main-window UI pieces are
> called "plugin-pages", they're not necessarily plugins in the
> traditional sense.
Its something that plugs into a main window.
> We definitely want to have an architecture that lets
> optional functionality integrate with the system ... e.g. a inventory
> subsystem that registers a new plugin-page and menu/toolbar-additions
> when its module is loaded at runtime. And if we have that, then
> everything should be implemented in that manner if only for consistency.
A gnc-plugin provides menu items only. A gnc-plugin-page provides a
content page and menu items.
More information about the gnucash-devel