Re: [gedit-list] Dynamic loading of plug-ins?



ricardo lafuente wrote:
On 1/9/10 12:42 , Jesse van den Kieboom wrote:
ricardo lafuente wrote:
Hi all,

I was wondering if it is possible to call Gedit specifying which
plug-ins should be active.
It's not possible to specify them on the command line, but you could
change them in gconf where its stored which ones are activated. So, you
could write a little script that takes as an argument which plugins to
enable, and then use gconftool-2 to set the key
'/apps/gedit-2/plugins/active-plugins' which holds the active plugins.

Note that you just change the global settings with this, which also
means that any running gedit will deactivate/activate the new setting
and any new gedit processes will also use this setting.



Hi Jesse, thanks for the quick response!

This solution indeed carries the issue of affecting all instances of
Gedit... is there any way to activate/deactivate plugins from inside
Gedit, e.g. through a Python call in a plug-in? (wishful thinking... but
worth asking i guess.)
No, this is not possible at the moment. The plugins engine is private API and not available to plugins. There have been some thoughts on 'profile' support, in which you can save a certain configuration of gedit and simply do something like 'gedit --profile web', but it has not been implemented (and it would require non trivial changes in the core).

Now, if you really want to make this work and want to get your hands dirty, you could maybe launch a separate gconf daemon for such a gedit process and thus have one set of specific settings not affecting others. It should be doable, but it certainly a very dirty hack.


Jesse

_______________________________________________
gedit-list mailing list
gedit-list gnome org
http://mail.gnome.org/mailman/listinfo/gedit-list




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]