← Back to team overview

zim-wiki team mailing list archive

Re: Disabling/Enabling plugins per Notebook


On Tue, Mar 6, 2012 at 5:25 AM, Adam Porter <adam@xxxxxxxxxxxxx> wrote:
> On Sat, Mar 3, 2012 at 21:56, Mariano Draghi <mdraghi@xxxxxxxxx> wrote:
>> How difficult could it be to (optionally) support the "plugins" list
>> and the [*Plugin] sections in the notebook.zim file?
> I really like this idea.  Even if it wasn't exposed in the UI, it would be nice.
> Does Zim load the plugins when a notebook is opened, or when the
> daemon is loaded?

They are opened per instance, but they open before the notebook is
opened. So may need a little bit of refactoring.

Zim first constructs the GtkInterface object, this loads the plugins,
than it loads the Notebook object. Probably we can delay loading
preferences in the GtkInterface until the notebook is loaded. Or load
the default ones, and replace them when the notebook turns out to have
a non-default profile.

Only complication is plugins like the "automount" plugin. This
actually hooks in *before* the notebook is loaded, so it can
manipulate the notebook location. We should still load this plugin
based on the default config, before we know the profile. Maybe we
should special case it by adding a flag that it is notebook



Follow ups