David Reveman wrote:
The switch to the new metadata system is almost complete. All plugins in the fdo repo except plane and ini have been converted. I'll probably go ahead and convert those plugins as well sometime soon unless the original authors of those plugins tells me not to.
The attached patch should save you the trouble. I cannot commit it at the moment.
The horrible gconf-dump plugin has been removed and replaced by a simple xslt stylesheet. gconf schemas are now generated from the xml meta data files as part of the build process and the stylesheet and a compiz-gconf pkg-config file is installed so a command similar to this:
I suppose we will need to work out an xslt for the ini plugin, but I am not in any hurry at the moment. I assume everything will continue to work because the default values are loaded from the metadata, so maybe this would not be needed at all?
xsltproc -o compiz-plugin.schemas `pkg-config --variable=xsltdir compiz-gconf`/schemas.xslt plugin.xml can be used to generate a schema file for a plugin outside the fdo repository. Plugin dependencies have not yet been moved to the meta data system. I'd like some feedback before we do this. I suggest that we use tags similar to this: <compiz> <plugin name="cube"> <feature>large-desktop</feature> <deps> <requirement> <plugin>png</plugin> <feature>some-feature</feature> <some_property>name-of-required-property</some_property> </requirement> <conflict> <plugin>plane</plugin> <feature>some-other-feature</feature> </conflict> </deps> </plugin> <compiz> It will make it easy to add new meta data tags that can be used as requirements or conflicts. The other thing that needs to be discussed related to this is whether the core should be aware of any of these dependencies. I think that not having the core be aware of any dependencies is definitely the best solution. It's up to the plugins to deal with conflicts. Whether that is to fail when loading or lack functionality doesn't matter but they will of course not be allowed to crash.
Agreed
- David _______________________________________________ compiz mailing list compiz@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/compiz
>From 007ae679212cd349da8aed3e79d25fae768130b1 Mon Sep 17 00:00:00 2001 From: Mike Dransfield <[EMAIL PROTECTED]> Date: Tue, 8 May 2007 00:41:42 +0100 Subject: [PATCH] Update ini to use metadata --- metadata/Makefile.am | 1 + metadata/ini.xml.in | 6 ++++++ plugins/ini.c | 19 ++++++++++++++++++- 3 files changed, 25 insertions(+), 1 deletions(-) create mode 100644 metadata/ini.xml.in diff --git a/metadata/Makefile.am b/metadata/Makefile.am index 6b99330..d52a73e 100644 --- a/metadata/Makefile.am +++ b/metadata/Makefile.am @@ -10,6 +10,7 @@ xml_in_files = \ fade.xml.in \ fs.xml.in \ gconf.xml.in \ + ini.xml.in \ inotify.xml.in \ minimize.xml.in \ move.xml.in \ diff --git a/metadata/ini.xml.in b/metadata/ini.xml.in new file mode 100644 index 0000000..3c3b32b --- /dev/null +++ b/metadata/ini.xml.in @@ -0,0 +1,6 @@ +<compiz> + <plugin name="ini"> + <_short>Ini</_short> + <_long>Ini Flat File Backend</_long> + </plugin> +</compiz> diff --git a/plugins/ini.c b/plugins/ini.c index f2d7dc4..1c5faac 100644 --- a/plugins/ini.c +++ b/plugins/ini.c @@ -53,6 +53,8 @@ static int displayPrivateIndex; +static CompMetadata iniMetadata; + /* * IniFileData */ @@ -1428,9 +1430,18 @@ iniFiniScreen (CompPlugin *p, CompScreen *s) static Bool iniInit (CompPlugin *p) { + if (!compInitPluginMetadataFromInfo (&iniMetadata, p->vTable->name, + 0, 0, 0, 0)) + return FALSE; + displayPrivateIndex = allocateDisplayPrivateIndex (); if (displayPrivateIndex < 0) + { + compFiniMetadata (&iniMetadata); return FALSE; + } + + compAddMetadataFromFile (&iniMetadata, p->vTable->name); return TRUE; } @@ -1448,10 +1459,16 @@ iniGetVersion (CompPlugin *plugin, int version) return ABIVERSION; } +static CompMetadata * +iniGetMetadata (CompPlugin *plugin) +{ + return &iniMetadata; +} + CompPluginVTable iniVTable = { "ini", iniGetVersion, - 0, /* GetMetadata */ + iniGetMetadata, iniInit, iniFini, iniInitDisplay, -- 1.5.0.7
_______________________________________________ compiz mailing list compiz@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/compiz