GNOME Bugzilla – Bug 330523
Have plugin support
Last modified: 2006-03-11 05:41:40 UTC
Rhythmbox should support plugins.
Created attachment 58998 [details] [review] initial patch This is an initial implementation based heavily on Gedit's plugin system. Known bugs: * the plugins listed in the gconf key aren't activated on startup Things to do: * allow plugins to be located when running uninstalled * steal the python-plugin stuff too * convert some things to plugins (e.g. AudioScrobbler) * better plugin manager UI * make it get beer for you automatically * add some --with-plugins=all, --with-plugins=default, --with-plugins=sample,foo autoconf magic * make things like backends (playback, metadata), rhythmdb criteria etc dynamically registerable
Created attachment 59460 [details] [review] updated patch Changed: * correctly activate plugins on startup * use eel-gconf-extensions, and rb util functions * work with build-uninstalled plugins * only use first plugin with name id - so per-user plugins override build-uninstalled plugins, which override installed plugins. * use keys like /apps/rhythmbox/plugins/FOO/active, instead of a string list under /apps/rhythmbox/plugins/active-plugins. This is nicer for people who use mandatory gconf stuff. * move the plugin manager to the edit menu, not inside the plugin dialog Still to do: * python plugin support * convert AudioScrobbler (and possible other stuff) to a plugin * configure options for plugin selection
Created attachment 59689 [details] [review] third iteration * turn audioscrobbler song submission into a plugin. This simply wraps the existing RBAudioscrobbler class from shell/, although it should really be moved to plugins/audioscrobbler/ * 97% working basic python support. Three issues: a) doesn't compile with -Werror, because "feature.h" and "pyconfig.h" both #define _POSIX_C_SOURCE to different values. b) our classes use RBWhatever, instead of RbWhatever, which confuses the automatic binding generator. c) the enum for error types (e.g. RBShellError) aren't a GType. The binding generator tries to use RB_TYPE_SHELL_ERROR instead of G_TYPE_ENUM. I've edited bindings/python/rb.defs manually, so unless you run "make regenerate-python-bindings" (b) and (c) won't show up. I'm sure these could be fixed by someone who actually knew what they were doing.
Created attachment 59754 [details] [review] fourth version This fixes (a) and (c). (b) is still kind of an issue, however the symptoms are now not generating the define-object clause and creating a extra _construct method. I've been informed that h2def should only be used for bootstrapping, so we just need to edit the .defs file whenever we add new API. One other feature that might be useful if a flag indicating that a plugin shouldn't be user-visible - so it doesn't show up in the manager and is always loaded. This would be useful for modules that aren't really plugins, e.g. if we got runtime-pluggable metadata/player backends.
Created attachment 60209 [details] [review] fifth patch Several bug fixes, and a much improved plugin-manager UI. Known issues: * python is doing something funky with stdout. It segfault is anything gets printed to stdout after python has been shutdown. * Authors and icons are not put in the info bit of the plugin manager
Committed to cvs with a few fixes. The segfault caused by pygobject's g_log handler appears to be a bug in that (filed as bug 334188), so I've disabled calling Py_Finalize for now.