[fusion-commits] compiz mirror: Changes to 'master' (9a1379596303e35d2bb1a4bbbb1d46d89304772d)

compiz at server.beryl-project.org compiz at server.beryl-project.org
Mon Jul 16 16:06:12 CEST 2007


New commits:
commit 9a1379596303e35d2bb1a4bbbb1d46d89304772d
Author: David Reveman <davidr at novell.com>
Date:   Mon Jul 16 05:30:29 2007 -0400

    Fix parsing of screen edge metadata.

commit fafab11381ed441ae3858b21294947a1a0ab45a0
Author: David Reveman <davidr at novell.com>
Date:   Thu Jul 12 22:23:31 2007 -0400

    Remove features and dependencies from plugin VTable.

commit 062c880506f4cc088c6ef3c90a0c2818ab6e9517
Author: David Reveman <davidr at novell.com>
Date:   Thu Jul 12 19:40:59 2007 -0400

    Remove plugin dependency checking from core.

commit c3aa8d8e5c17d4be7d0c293ca5aa7df5811bf868
Author: David Reveman <davidr at novell.com>
Date:   Thu Jul 12 19:37:53 2007 -0400

    Relation of type 'after' is unnecessary information when cube
    plugin is a requirement.

commit cac293fd44c822e0aaffa319dc6234399bf546ac
Author: David Reveman <davidr at novell.com>
Date:   Thu Jul 12 19:34:14 2007 -0400

    Clean up and indent metadata correctly.

commit b0b2b226eccbb28ca8281580aec9d59acc26ec83
Author: David Reveman <davidr at novell.com>
Date:   Thu Jul 12 18:01:38 2007 -0400

    Avoid unnecessary branching.


 include/compiz.h           |   26 +----------
 metadata/blur.xml.in       |   12 ++--
 metadata/cube.xml.in       |    8 ++--
 metadata/decoration.xml.in |   12 ++--
 metadata/fade.xml.in       |    8 ++--
 metadata/minimize.xml.in   |    8 ++--
 metadata/plane.xml.in      |    8 ++--
 metadata/rotate.xml.in     |   12 ++---
 metadata/svg.xml.in        |    1 -
 metadata/water.xml.in      |    8 ++--
 metadata/wobbly.xml.in     |   10 ++--
 plugins/annotate.c         |    6 +--
 plugins/blur.c             |   14 +-----
 plugins/clone.c            |    6 +--
 plugins/cube.c             |   15 +------
 plugins/dbus.c             |   91 +++---------------------------------
 plugins/decoration.c       |   17 +------
 plugins/fade.c             |   11 +----
 plugins/fuse.c             |    6 +--
 plugins/gconf.c            |   15 +------
 plugins/glib.c             |    6 +--
 plugins/ini.c              |    4 --
 plugins/inotify.c          |    6 +--
 plugins/minimize.c         |   11 +----
 plugins/move.c             |    6 +--
 plugins/place.c            |    6 +--
 plugins/plane.c            |   15 +------
 plugins/png.c              |    6 +--
 plugins/regex.c            |   38 ++++++----------
 plugins/resize.c           |    6 +--
 plugins/rotate.c           |   10 +----
 plugins/scale.c            |    6 +--
 plugins/screenshot.c       |    6 +--
 plugins/svg.c              |    6 +--
 plugins/switcher.c         |    6 +--
 plugins/video.c            |   10 +----
 plugins/water.c            |   11 +----
 plugins/wobbly.c           |   12 +----
 plugins/zoom.c             |    6 +--
 src/metadata.c             |    2 +-
 src/plugin.c               |  110 --------------------------------------------
 41 files changed, 90 insertions(+), 493 deletions(-)


Modified: compiz/include/compiz.h
===================================================================
--- compiz/include/compiz.h
+++ compiz/include/compiz.h
@@ -26,7 +26,7 @@
 #ifndef _COMPIZ_H
 #define _COMPIZ_H
 
-#define ABIVERSION 20070706
+#define ABIVERSION 20070707
 
 #include <stdio.h>
 #include <sys/time.h>
@@ -2827,21 +2827,6 @@ typedef void (*FiniPluginProc) (CompPlugin *plugin);
 
 typedef CompMetadata *(*GetMetadataProc) (CompPlugin *plugin);
 
-typedef enum {
-    CompPluginRuleBefore,
-    CompPluginRuleAfter,
-    CompPluginRuleRequire
-} CompPluginRule;
-
-typedef struct _CompPluginDep {
-    CompPluginRule rule;
-    char	   *name;
-} CompPluginDep;
-
-typedef struct _CompPluginFeature {
-    char *name;
-} CompPluginFeature;
-
 typedef struct _CompPluginVTable {
     char *name;
 
@@ -2864,12 +2849,6 @@ typedef struct _CompPluginVTable {
     SetPluginDisplayOptionProc  setDisplayOption;
     GetPluginScreenOptionsProc  getScreenOptions;
     SetPluginScreenOptionProc   setScreenOption;
-
-    CompPluginDep *deps;
-    int		  nDeps;
-
-    CompPluginFeature *features;
-    int		      nFeatures;
 } CompPluginVTable;
 
 typedef CompPluginVTable *(*PluginGetInfoProc) (void);
@@ -2928,9 +2907,6 @@ windowFiniPlugins (CompWindow *w);
 CompPlugin *
 findActivePlugin (char *name);
 
-CompPluginFeature *
-findActiveFeature (char *name);
-
 CompPlugin *
 loadPlugin (char *plugin);
 

Modified: compiz/metadata/blur.xml.in
===================================================================
--- compiz/metadata/blur.xml.in
+++ compiz/metadata/blur.xml.in
@@ -4,12 +4,12 @@
 	<_long>Blur windows</_long>
 	<feature>blur</feature>
 	<deps>
-		<relation type="before">
-			<plugin>video</plugin>
-		</relation>
-		<relation type="after">
-			<plugin>decoration</plugin>
-		</relation>
+	    <relation type="before">
+		<plugin>video</plugin>
+	    </relation>
+	    <relation type="after">
+		<plugin>decoration</plugin>
+	    </relation>
 	</deps>
 	<display>
 	    <option name="pulse" type="action">

Modified: compiz/metadata/cube.xml.in
===================================================================
--- compiz/metadata/cube.xml.in
+++ compiz/metadata/cube.xml.in
@@ -4,10 +4,10 @@
 	<_long>Place windows on cube</_long>
 	<feature>largedesktop</feature>
 	<deps>
-		<relation type="before">
-			<plugin>switcher</plugin>
-			<plugin>scale</plugin>
-		</relation>
+	    <relation type="before">
+		<plugin>switcher</plugin>
+		<plugin>scale</plugin>
+	    </relation>
 	</deps>
 	<display>
 	    <option name="abi" type="int" read_only="true"/>

Modified: compiz/metadata/decoration.xml.in
===================================================================
--- compiz/metadata/decoration.xml.in
+++ compiz/metadata/decoration.xml.in
@@ -4,12 +4,12 @@
 	<_long>Window decorations</_long>
 	<feature>decorations</feature>
 	<deps>
-		<relation type="before">
-			<plugin>fade</plugin>
-			<plugin>cube</plugin>
-			<plugin>scale</plugin>
-			<plugin>wobbly</plugin>
-		</relation>
+	    <relation type="before">
+		<plugin>fade</plugin>
+		<plugin>cube</plugin>
+		<plugin>scale</plugin>
+		<plugin>wobbly</plugin>
+	    </relation>
 	</deps>
 	<display>
 	    <option name="shadow_radius" type="float">

Modified: compiz/metadata/fade.xml.in
===================================================================
--- compiz/metadata/fade.xml.in
+++ compiz/metadata/fade.xml.in
@@ -3,10 +3,10 @@
 	<_short>Fading Windows</_short>
 	<_long>Fade in windows when mapped and fade out windows when unmapped</_long>
 	<deps>
-		<relation type="before">
-			<plugin>cube</plugin>
-			<plugin>scale</plugin>
-		</relation>
+	    <relation type="before">
+		<plugin>cube</plugin>
+		<plugin>scale</plugin>
+	    </relation>
 	</deps>
 	<screen>
 	    <option name="fade_speed" type="float">

Modified: compiz/metadata/minimize.xml.in
===================================================================
--- compiz/metadata/minimize.xml.in
+++ compiz/metadata/minimize.xml.in
@@ -4,10 +4,10 @@
 	<_long>Transform windows when they are minimized and unminimized</_long>
 	<feature>windowanimations</feature>
 	<deps>
-		<relation type="before">
-			<plugin>cube</plugin>
-			<plugin>scale</plugin>
-		</relation>
+	    <relation type="before">
+		<plugin>cube</plugin>
+		<plugin>scale</plugin>
+	    </relation>
 	</deps>
 	<screen>
 	    <option name="speed" type="float">

Modified: compiz/metadata/plane.xml.in
===================================================================
--- compiz/metadata/plane.xml.in
+++ compiz/metadata/plane.xml.in
@@ -4,10 +4,10 @@
 	<_long>Place windows on a plane</_long>
 	<feature>largedesktop</feature>
 	<deps>
-		<relation type="before">
-			<plugin>switcher</plugin>
-			<plugin>scale</plugin>
-		</relation>
+	    <relation type="before">
+		<plugin>switcher</plugin>
+		<plugin>scale</plugin>
+	    </relation>
 	</deps>
 	<display>
 	    <option name="plane_left" type="action">

Modified: compiz/metadata/rotate.xml.in
===================================================================
--- compiz/metadata/rotate.xml.in
+++ compiz/metadata/rotate.xml.in
@@ -3,12 +3,9 @@
 	<_short>Rotate Cube</_short>
 	<_long>Rotate desktop cube</_long>
 	<deps>
-		<relation type="after">
-			<plugin>cube</plugin>
-		</relation>
-		<requirement>
-			<plugin>cube</plugin>
-		</requirement>
+	    <requirement>
+		<plugin>cube</plugin>
+	    </requirement>
 	</deps>
 	<display>
 	    <option name="initiate" type="action">
@@ -261,7 +258,7 @@
 		<max>50.0</max>
 		<precision>0.1</precision>
 	    </option>
-		<option name="zoom" type="float">
+	    <option name="zoom" type="float">
 		<_short>Zoom</_short>
 		<_long>Rotation Zoom</_long>
 		<default>0.0</default>
@@ -269,7 +266,6 @@
 		<max>2.0</max>
 		<precision>0.1</precision>
 	    </option>
-
 	</screen>
     </plugin>
 </compiz>

Modified: compiz/metadata/svg.xml.in
===================================================================
--- compiz/metadata/svg.xml.in
+++ compiz/metadata/svg.xml.in
@@ -1,5 +1,4 @@
 <compiz>
-    <!-- svg metadata -->
     <plugin name="svg">
 	<_short>Svg</_short>
 	<_long>Svg image loader</_long>

Modified: compiz/metadata/water.xml.in
===================================================================
--- compiz/metadata/water.xml.in
+++ compiz/metadata/water.xml.in
@@ -3,10 +3,10 @@
 	<_short>Water Effect</_short>
 	<_long>Adds water effects to different desktop actions</_long>
 	<deps>
-		<relation type="before">
-			<plugin>blur</plugin>
-			<plugin>video</plugin>
-		</relation>
+	    <relation type="before">
+		<plugin>blur</plugin>
+		<plugin>video</plugin>
+	    </relation>
 	</deps>
 	<display>
 	    <option name="initiate" type="action">

Modified: compiz/metadata/wobbly.xml.in
===================================================================
--- compiz/metadata/wobbly.xml.in
+++ compiz/metadata/wobbly.xml.in
@@ -3,11 +3,11 @@
 	<_short>Wobbly Windows</_short>
 	<_long>Use spring model for wobbly window effect</_long>
 	<deps>
-		<relation type="before">
-			<plugin>fade</plugin>
-			<plugin>cube</plugin>
-			<plugin>scale</plugin>
-		</relation>
+	    <relation type="before">
+		<plugin>fade</plugin>
+		<plugin>cube</plugin>
+		<plugin>scale</plugin>
+	    </relation>
 	</deps>
 	<display>
 	    <option name="snap" type="action">

Modified: compiz/plugins/annotate.c
===================================================================
--- compiz/plugins/annotate.c
+++ compiz/plugins/annotate.c
@@ -905,11 +905,7 @@ static CompPluginVTable annoVTable = {
     annoGetDisplayOptions,
     annoSetDisplayOption,
     0, /* GetScreenOptions */
-    0, /* SetScreenOption */
-    0, /* Deps */
-    0, /* nDeps */
-    0, /* Features */
-    0  /* nFeatures */
+    0  /* SetScreenOption */
 };
 
 CompPluginVTable *

Modified: compiz/plugins/blur.c
===================================================================
--- compiz/plugins/blur.c
+++ compiz/plugins/blur.c
@@ -2786,14 +2786,6 @@ blurGetMetadata (CompPlugin *plugin)
     return &blurMetadata;
 }
 
-CompPluginDep blurDeps[] = {
-    { CompPluginRuleBefore, "video" }
-};
-
-CompPluginFeature blurFeatures[] = {
-    { "blur" }
-};
-
 static CompPluginVTable blurVTable = {
     "blur",
     blurGetVersion,
@@ -2809,11 +2801,7 @@ static CompPluginVTable blurVTable = {
     blurGetDisplayOptions,
     blurSetDisplayOption,
     blurGetScreenOptions,
-    blurSetScreenOption,
-    blurDeps,
-    sizeof (blurDeps) / sizeof (blurDeps[0]),
-    blurFeatures,
-    sizeof (blurFeatures) / sizeof (blurFeatures[0])
+    blurSetScreenOption
 };
 
 CompPluginVTable *

Modified: compiz/plugins/clone.c
===================================================================
--- compiz/plugins/clone.c
+++ compiz/plugins/clone.c
@@ -875,11 +875,7 @@ CompPluginVTable cloneVTable = {
     cloneGetDisplayOptions,
     cloneSetDisplayOption,
     0, /* GetScreenOptions */
-    0, /* SetScreenOption */
-    0, /* Deps */
-    0, /* nDeps */
-    0, /* Features */
-    0  /* nFeatures */
+    0  /* SetScreenOption */
 };
 
 CompPluginVTable *

Modified: compiz/plugins/cube.c
===================================================================
--- compiz/plugins/cube.c
+++ compiz/plugins/cube.c
@@ -2259,15 +2259,6 @@ cubeGetMetadata (CompPlugin *plugin)
     return &cubeMetadata;
 }
 
-CompPluginDep cubeDeps[] = {
-    { CompPluginRuleBefore, "scale" },
-    { CompPluginRuleBefore, "switcher" }
-};
-
-CompPluginFeature cubeFeatures[] = {
-    { "largedesktop" }
-};
-
 CompPluginVTable cubeVTable = {
     "cube",
     cubeGetVersion,
@@ -2283,11 +2274,7 @@ CompPluginVTable cubeVTable = {
     cubeGetDisplayOptions,
     cubeSetDisplayOption,
     cubeGetScreenOptions,
-    cubeSetScreenOption,
-    cubeDeps,
-    sizeof (cubeDeps) / sizeof (cubeDeps[0]),
-    cubeFeatures,
-    sizeof (cubeFeatures) / sizeof (cubeFeatures[0])
+    cubeSetScreenOption
 };
 
 CompPluginVTable *

Modified: compiz/plugins/dbus.c
===================================================================
--- compiz/plugins/dbus.c
+++ compiz/plugins/dbus.c
@@ -1698,18 +1698,11 @@ dbusHandleGetPluginMetadataMessage (DBusConnection *connection,
 
     if (p)
     {
-	CompPluginDep	  *deps;
-	int		  nDeps;
-	CompPluginFeature *features;
-	int		  nFeatures;
-	dbus_bool_t	  supportedABI;
-	int		  version;
-	DBusMessageIter   iter;
-	DBusMessageIter   listIter;
-	char		  sig[2];
-	char		  *shortDesc = NULL;
-	char		  *longDesc = NULL;
-	const char	  *blankStr = "";
+	dbus_bool_t supportedABI;
+	int	    version;
+	char	    *shortDesc = NULL;
+	char	    *longDesc = NULL;
+	const char  *blankStr = "";
 
 	version = (*p->vTable->getVersion) (p, ABIVERSION);
 	supportedABI = (version == ABIVERSION) ? TRUE : FALSE;
@@ -1762,72 +1755,8 @@ dbusHandleGetPluginMetadataMessage (DBusConnection *connection,
 				  DBUS_TYPE_BOOLEAN, &supportedABI,
 				  DBUS_TYPE_INVALID);
 
-	sig[0] = DBUS_TYPE_STRING;
-	sig[1] = '\0';
-
-	dbus_message_iter_init_append (reply, &iter);
-	dbus_message_iter_open_container (&iter, DBUS_TYPE_ARRAY,
-					  sig, &listIter);
-
-	if (supportedABI)
-	{
-	    deps  = p->vTable->deps;
-	    nDeps = p->vTable->nDeps;
-
-	    while (nDeps--)
-	    {
-		char *str;
-
-		str = malloc ((strlen (deps->name) + 10) * sizeof (char));
-		if (str)
-		{
-		    switch (deps->rule) {
-		    case CompPluginRuleBefore:
-			sprintf (str, "before:%s", deps->name);
-			break;
-		    case CompPluginRuleAfter:
-			sprintf (str, "after:%s", deps->name);
-			break;
-		    case CompPluginRuleRequire:
-		    default:
-			sprintf (str, "required:%s", deps->name);
-			break;
-		    }
-
-		    dbus_message_iter_append_basic (&listIter,
-						DBUS_TYPE_STRING,
-						&str);
-
-		    free (str);
-		}
-
-		deps++;
-	    }
-
-	    dbus_message_iter_close_container (&iter, &listIter);
-
-	    dbus_message_iter_init_append (reply, &iter);
-	    dbus_message_iter_open_container (&iter, DBUS_TYPE_ARRAY,
-					      sig, &listIter);
-
-	    features  = p->vTable->features;
-	    nFeatures = p->vTable->nFeatures;
-
-	    while (nFeatures--)
-	    {
-		dbus_message_iter_append_basic (&listIter,
-						DBUS_TYPE_STRING,
-						&features->name);
-
-		features++;
-	    }
-
-	    dbus_message_iter_close_container (&iter, &listIter);
-
-	    if (loadedPlugin)
-		(*p->vTable->fini) (p);
-
-	}
+	if (supportedABI && loadedPlugin)
+	    (*p->vTable->fini) (p);
     }
     else
     {
@@ -2799,11 +2728,7 @@ CompPluginVTable dbusVTable = {
     0, /* GetDisplayOptions */
     0, /* SetDisplayOption */
     0, /* GetScreenOptions */
-    0, /* SetScreenOption */
-    0, /* Deps */
-    0, /* nDeps */
-    0, /* Features */
-    0  /* nFeatures */
+    0  /* SetScreenOption */
 };
 
 CompPluginVTable *

Modified: compiz/plugins/decoration.c
===================================================================
--- compiz/plugins/decoration.c
+++ compiz/plugins/decoration.c
@@ -1418,17 +1418,6 @@ decorGetMetadata (CompPlugin *plugin)
     return &decorMetadata;
 }
 
-CompPluginDep decorDeps[] = {
-    { CompPluginRuleBefore, "wobbly" },
-    { CompPluginRuleBefore, "fade" },
-    { CompPluginRuleBefore, "cube" },
-    { CompPluginRuleBefore, "scale" }
-};
-
-CompPluginFeature decorFeatures[] = {
-    { "decorations" }
-};
-
 static CompPluginVTable decorVTable = {
     "decoration",
     decorGetVersion,
@@ -1444,11 +1433,7 @@ static CompPluginVTable decorVTable = {
     decorGetDisplayOptions,
     decorSetDisplayOption,
     0, /* GetScreenOptions */
-    0, /* SetScreenOption */
-    decorDeps,
-    sizeof (decorDeps) / sizeof (decorDeps[0]),
-    decorFeatures,
-    sizeof (decorFeatures) / sizeof (decorFeatures[0])
+    0  /* SetScreenOption */
 };
 
 CompPluginVTable *

Modified: compiz/plugins/fade.c
===================================================================
--- compiz/plugins/fade.c
+++ compiz/plugins/fade.c
@@ -848,11 +848,6 @@ fadeGetMetadata (CompPlugin *plugin)
     return &fadeMetadata;
 }
 
-CompPluginDep fadeDeps[] = {
-    { CompPluginRuleBefore, "cube" },
-    { CompPluginRuleBefore, "scale" }
-};
-
 static CompPluginVTable fadeVTable = {
     "fade",
     fadeGetVersion,
@@ -868,11 +863,7 @@ static CompPluginVTable fadeVTable = {
     0, /* GetDisplayOptions */
     0, /* SetDisplayOption */
     fadeGetScreenOptions,
-    fadeSetScreenOption,
-    fadeDeps,
-    sizeof (fadeDeps) / sizeof (fadeDeps[0]),
-    0, /* Features */
-    0  /* nFeatures */
+    fadeSetScreenOption
 };
 
 CompPluginVTable *

Modified: compiz/plugins/fuse.c
===================================================================
--- compiz/plugins/fuse.c
+++ compiz/plugins/fuse.c
@@ -1559,11 +1559,7 @@ CompPluginVTable fuseVTable = {
     fuseGetDisplayOptions,
     fuseSetDisplayOption,
     0, /* GetScreenOptions */
-    0, /* SetScreenOption */
-    0, /* Deps */
-    0, /* nDeps */
-    0, /* Features */
-    0  /* nFeatures */
+    0  /* SetScreenOption */
 };
 
 CompPluginVTable *

Modified: compiz/plugins/gconf.c
===================================================================
--- compiz/plugins/gconf.c
+++ compiz/plugins/gconf.c
@@ -1189,15 +1189,6 @@ gconfGetMetadata (CompPlugin *plugin)
     return &gconfMetadata;
 }
 
-CompPluginDep gconfDeps[] = {
-    { CompPluginRuleAfter,  "glib" },
-    { CompPluginRuleBefore, "decoration" },
-    { CompPluginRuleBefore, "wobbly" },
-    { CompPluginRuleBefore, "fade" },
-    { CompPluginRuleBefore, "cube" },
-    { CompPluginRuleBefore, "scale" }
-};
-
 CompPluginVTable gconfVTable = {
     "gconf",
     gconfGetVersion,
@@ -1213,11 +1204,7 @@ CompPluginVTable gconfVTable = {
     0, /* GetDisplayOptions */
     0, /* SetDisplayOption */
     0, /* GetScreenOptions */
-    0, /* SetScreenOption */
-    gconfDeps,
-    sizeof (gconfDeps) / sizeof (gconfDeps[0]),
-    0, /* Features */
-    0  /* nFeatures */
+    0  /* SetScreenOption */
 };
 
 CompPluginVTable *

Modified: compiz/plugins/glib.c
===================================================================
--- compiz/plugins/glib.c
+++ compiz/plugins/glib.c
@@ -282,11 +282,7 @@ CompPluginVTable glibVTable = {
     0, /* GetDisplayOptions */
     0, /* SetDisplayOption */
     0, /* GetScreenOptions */
-    0, /* SetScreenOption */
-    0, /* Deps */
-    0, /* nDeps */
-    0, /* Features */
-    0  /* nFeatures */
+    0  /* SetScreenOption */
 };
 
 CompPluginVTable *

Modified: compiz/plugins/ini.c
===================================================================
--- compiz/plugins/ini.c
+++ compiz/plugins/ini.c
@@ -1528,10 +1528,6 @@ CompPluginVTable iniVTable = {
     0,
     0,
     0,
-    0,
-    0,
-    0,
-    0,
     0
 };
 

Modified: compiz/plugins/inotify.c
===================================================================
--- compiz/plugins/inotify.c
+++ compiz/plugins/inotify.c
@@ -291,11 +291,7 @@ CompPluginVTable inotifyVTable = {
     0, /* GetDisplayOptions */
     0, /* SetDisplayOption */
     0, /* GetScreenOptions */
-    0, /* SetScreenOption */
-    0, /* Deps */
-    0, /* nDeps */
-    0, /* Features */
-    0  /* nFeatures */
+    0  /* SetScreenOption */
 };
 
 CompPluginVTable *

Modified: compiz/plugins/minimize.c
===================================================================
--- compiz/plugins/minimize.c
+++ compiz/plugins/minimize.c
@@ -1014,11 +1014,6 @@ minGetMetadata (CompPlugin *plugin)
     return &minMetadata;
 }
 
-CompPluginDep minDeps[] = {
-    { CompPluginRuleBefore, "cube" },
-    { CompPluginRuleBefore, "scale" }
-};
-
 static CompPluginVTable minVTable = {
     "minimize",
     minGetVersion,
@@ -1034,11 +1029,7 @@ static CompPluginVTable minVTable = {
     0, /* GetDisplayOptions */
     0, /* SetDisplayOption */
     minGetScreenOptions,
-    minSetScreenOption,
-    minDeps,
-    sizeof (minDeps) / sizeof (minDeps[0]),
-    0, /* Features */
-    0  /* nFeatures */
+    minSetScreenOption
 };
 
 CompPluginVTable *

Modified: compiz/plugins/move.c
===================================================================
--- compiz/plugins/move.c
+++ compiz/plugins/move.c
@@ -917,11 +917,7 @@ CompPluginVTable moveVTable = {
     moveGetDisplayOptions,
     moveSetDisplayOption,
     0, /* GetScreenOptions */
-    0, /* SetScreenOption */
-    0, /* Deps */
-    0, /* nDeps */
-    0, /* Features */
-    0  /* nFeatures */
+    0  /* SetScreenOption */
 };
 
 CompPluginVTable *

Modified: compiz/plugins/place.c
===================================================================
--- compiz/plugins/place.c
+++ compiz/plugins/place.c
@@ -1525,11 +1525,7 @@ static CompPluginVTable placeVTable = {
     0, /* GetDisplayOptions */
     0, /* SetDisplayOption */
     placeGetScreenOptions,
-    placeSetScreenOption,
-    0, /* Deps */
-    0, /* nDeps */
-    0, /* Features */
-    0  /* nFeatures */
+    placeSetScreenOption
 };
 
 CompPluginVTable *

Modified: compiz/plugins/plane.c
===================================================================
--- compiz/plugins/plane.c
+++ compiz/plugins/plane.c
@@ -729,15 +729,6 @@ planeGetMetadata (CompPlugin *plugin)
     return &planeMetadata;
 }
 
-CompPluginDep planeDeps[] = {
-    { CompPluginRuleBefore, "scale" },
-    { CompPluginRuleBefore, "switcher" }
-};
-
-CompPluginFeature planeFeatures[] = {
-    { "largedesktop" }
-};
-
 CompPluginVTable planeVTable = {
     "plane",
     planeGetVersion,
@@ -753,11 +744,7 @@ CompPluginVTable planeVTable = {
     planeGetDisplayOptions,
     planeSetDisplayOption,
     NULL, /* planeGetScreenOptions, */
-    NULL, /* planeSetScreenOption, */
-    planeDeps,
-    sizeof (planeDeps) / sizeof (planeDeps[0]),
-    planeFeatures,
-    sizeof (planeFeatures) / sizeof (planeFeatures[0])
+    NULL  /* planeSetScreenOption, */
 };
 
 CompPluginVTable *

Modified: compiz/plugins/png.c
===================================================================
--- compiz/plugins/png.c
+++ compiz/plugins/png.c
@@ -552,11 +552,7 @@ CompPluginVTable pngVTable = {
     0, /* GetDisplayOptions */
     0, /* SetDisplayOption */
     0, /* GetScreenOptions */
-    0, /* SetScreenOption */
-    0, /* Deps */
-    0, /* nDeps */
-    0, /* Features */
-    0  /* nFeatures */
+    0  /* SetScreenOption */
 };
 
 CompPluginVTable *

Modified: compiz/plugins/regex.c
===================================================================
--- compiz/plugins/regex.c
+++ compiz/plugins/regex.c
@@ -230,32 +230,25 @@ regexMatchInitExp (CompDisplay  *d,
 
 static char *
 regexGetStringProperty (CompWindow *w,
-	  		Atom       atom,
-			Bool       getUtf8)
+			Atom       propAtom,
+			Atom       formatAtom)
 {
     Atom	  type;
-    Atom          stringFormat;
     unsigned long nItems;
     unsigned long bytesAfter;
     unsigned char *str = NULL;
     int		  format, result;
     char	  *retval;
 
-    if (getUtf8)
-	stringFormat = w->screen->display->utf8StringAtom;
-    else
-	stringFormat = XA_STRING;
-
     result = XGetWindowProperty (w->screen->display->display,
-				 w->id, atom,
-				 0, LONG_MAX,
-				 FALSE, stringFormat, &type, &format, &nItems,
+				 w->id, propAtom, 0, LONG_MAX,
+				 FALSE, formatAtom, &type, &format, &nItems,
 				 &bytesAfter, (unsigned char **) &str);
 
     if (result != Success)
 	return NULL;
 
-    if (type != stringFormat)
+    if (type != formatAtom)
     {
 	XFree (str);
 	return NULL;
@@ -271,19 +264,20 @@ regexGetStringProperty (CompWindow *w,
 static char *
 regexGetWindowTitle (CompWindow *w)
 {
-    char *title;
+    CompDisplay *d = w->screen->display;
+    char	*title;
 
-    REGEX_DISPLAY (w->screen->display);
+    REGEX_DISPLAY (d);
 
-    title = regexGetStringProperty (w, rd->visibleNameAtom, TRUE);
+    title = regexGetStringProperty (w, rd->visibleNameAtom, d->utf8StringAtom);
     if (title)
 	return title;
 
-    title = regexGetStringProperty (w, w->screen->display->wmNameAtom, TRUE);
+    title = regexGetStringProperty (w, d->wmNameAtom, d->utf8StringAtom);
     if (title)
 	return title;
 
-    return regexGetStringProperty (w, XA_WM_NAME, FALSE);
+    return regexGetStringProperty (w, XA_WM_NAME, XA_STRING);
 }
 
 static void
@@ -325,7 +319,7 @@ regexHandleEvent (CompDisplay *d,
 		if (rw->role)
 		    free (rw->role);
 
-		rw->role = regexGetStringProperty (w, rd->roleAtom, FALSE);
+		rw->role = regexGetStringProperty (w, rd->roleAtom, XA_STRING);
 
 		(*d->matchPropertyChanged) (d, w);
 	    }
@@ -446,7 +440,7 @@ regexInitWindow (CompPlugin *p,
 	return FALSE;
 
     rw->title = regexGetWindowTitle (w);
-    rw->role  = regexGetStringProperty (w, rd->roleAtom, FALSE);
+    rw->role  = regexGetStringProperty (w, rd->roleAtom, XA_STRING);
 
     w->privates[rs->windowPrivateIndex].ptr = rw;
 
@@ -522,11 +516,7 @@ static CompPluginVTable regexVTable = {
     0, /* GetDisplayOptions */
     0, /* SetDisplayOption */
     0, /* GetScreenOptions */
-    0, /* SetScreenOption */
-    0, /* Deps */
-    0, /* nDeps */
-    0, /* Features */
-    0  /* nFeatures */
+    0  /* SetScreenOption */
 };
 
 CompPluginVTable *

Modified: compiz/plugins/resize.c
===================================================================
--- compiz/plugins/resize.c
+++ compiz/plugins/resize.c
@@ -1402,11 +1402,7 @@ CompPluginVTable resizeVTable = {
     resizeGetDisplayOptions,
     resizeSetDisplayOption,
     0, /* GetScreenOptions */
-    0, /* SetScreenOption */
-    0, /* Deps */
-    0, /* nDeps */
-    0, /* Features */
-    0  /* nFeatures */
+    0  /* SetScreenOption */
 };
 
 CompPluginVTable *

Modified: compiz/plugins/rotate.c
===================================================================
--- compiz/plugins/rotate.c
+++ compiz/plugins/rotate.c
@@ -1915,10 +1915,6 @@ rotateGetMetadata (CompPlugin *plugin)
     return &rotateMetadata;
 }
 
-CompPluginDep rotateDeps[] = {
-    { CompPluginRuleAfter, "cube" }
-};
-
 CompPluginVTable rotateVTable = {
     "rotate",
     rotateGetVersion,
@@ -1934,11 +1930,7 @@ CompPluginVTable rotateVTable = {
     rotateGetDisplayOptions,
     rotateSetDisplayOption,
     rotateGetScreenOptions,
-    rotateSetScreenOption,
-    rotateDeps,
-    sizeof (rotateDeps) / sizeof (rotateDeps[0]),
-    0, /* Features */
-    0  /* nFeatures */
+    rotateSetScreenOption
 };
 
 CompPluginVTable *

Modified: compiz/plugins/scale.c
===================================================================
--- compiz/plugins/scale.c
+++ compiz/plugins/scale.c
@@ -2152,11 +2152,7 @@ CompPluginVTable scaleVTable = {
     scaleGetDisplayOptions,
     scaleSetDisplayOption,
     scaleGetScreenOptions,
-    scaleSetScreenOption,
-    0, /* Deps */
-    0, /* nDeps */
-    0, /* Features */
-    0  /* nFeatures */
+    scaleSetScreenOption
 };
 
 CompPluginVTable *

Modified: compiz/plugins/screenshot.c
===================================================================
--- compiz/plugins/screenshot.c
+++ compiz/plugins/screenshot.c
@@ -572,11 +572,7 @@ static CompPluginVTable shotVTable = {
     shotGetDisplayOptions,
     shotSetDisplayOption,
     0, /* GetScreenOptions */
-    0, /* SetScreenOption */
-    0, /* Deps */
-    0, /* nDeps */
-    0, /* Features */
-    0  /* nFeatures */
+    0  /* SetScreenOption */
 };
 
 CompPluginVTable *

Modified: compiz/plugins/svg.c
===================================================================
--- compiz/plugins/svg.c
+++ compiz/plugins/svg.c
@@ -994,11 +994,7 @@ CompPluginVTable svgVTable = {
     svgGetDisplayOptions,
     svgSetDisplayOption,
     0, /* GetScreenOptions */
-    0, /* SetScreenOption */
-    0, /* Deps */
-    0, /* nDeps */
-    0, /* Features */
-    0  /* nFeatures */
+    0  /* SetScreenOption */
 };
 
 CompPluginVTable *

Modified: compiz/plugins/switcher.c
===================================================================
--- compiz/plugins/switcher.c
+++ compiz/plugins/switcher.c
@@ -2062,11 +2062,7 @@ CompPluginVTable switchVTable = {
     switchGetDisplayOptions,
     switchSetDisplayOption,
     switchGetScreenOptions,
-    switchSetScreenOption,
-    0, /* Deps */
-    0, /* nDeps */
-    0, /* Features */
-    0  /* nFeatures */
+    switchSetScreenOption
 };
 
 CompPluginVTable *

Modified: compiz/plugins/video.c
===================================================================
--- compiz/plugins/video.c
+++ compiz/plugins/video.c
@@ -1258,10 +1258,6 @@ videoGetMetadata (CompPlugin *plugin)
     return &videoMetadata;
 }
 
-CompPluginFeature videoFeatures[] = {
-    { "video" }
-};
-
 static CompPluginVTable videoVTable = {
     "video",
     videoGetVersion,
@@ -1277,11 +1273,7 @@ static CompPluginVTable videoVTable = {
     videoGetDisplayOptions,
     videoSetDisplayOption,
     0, /* GetScreenOptions */
-    0, /* SetScreenOption */
-    0, /* Deps */
-    0, /* nDeps */
-    videoFeatures,
-    sizeof (videoFeatures) / sizeof (videoFeatures[0])
+    0  /* SetScreenOption */
 };
 
 CompPluginVTable *

Modified: compiz/plugins/water.c
===================================================================
--- compiz/plugins/water.c
+++ compiz/plugins/water.c
@@ -1754,11 +1754,6 @@ waterGetMetadata (CompPlugin *plugin)
     return &waterMetadata;
 }
 
-CompPluginDep waterDeps[] = {
-    { CompPluginRuleBefore, "blur" },
-    { CompPluginRuleBefore, "video" }
-};
-
 static CompPluginVTable waterVTable = {
     "water",
     waterGetVersion,
@@ -1774,11 +1769,7 @@ static CompPluginVTable waterVTable = {
     waterGetDisplayOptions,
     waterSetDisplayOption,
     0, /* GetScreenOptions */
-    0, /* SetScreenOption */
-    waterDeps,
-    sizeof (waterDeps) / sizeof (waterDeps[0]),
-    0, /* Features */
-    0  /* nFeatures */
+    0  /* SetScreenOption */
 };
 
 CompPluginVTable *

Modified: compiz/plugins/wobbly.c
===================================================================
--- compiz/plugins/wobbly.c
+++ compiz/plugins/wobbly.c
@@ -2880,12 +2880,6 @@ wobblyGetMetadata (CompPlugin *plugin)
     return &wobblyMetadata;
 }
 
-CompPluginDep wobblyDeps[] = {
-    { CompPluginRuleBefore, "fade" },
-    { CompPluginRuleBefore, "cube" },
-    { CompPluginRuleBefore, "scale" }
-};
-
 CompPluginVTable wobblyVTable = {
     "wobbly",
     wobblyGetVersion,
@@ -2901,11 +2895,7 @@ CompPluginVTable wobblyVTable = {
     wobblyGetDisplayOptions,
     wobblySetDisplayOption,
     wobblyGetScreenOptions,
-    wobblySetScreenOption,
-    wobblyDeps,
-    sizeof (wobblyDeps) / sizeof (wobblyDeps[0]),
-    0, /* Features */
-    0  /* nFeatures */
+    wobblySetScreenOption
 };
 
 CompPluginVTable *

Modified: compiz/plugins/zoom.c
===================================================================
--- compiz/plugins/zoom.c
+++ compiz/plugins/zoom.c
@@ -1147,11 +1147,7 @@ CompPluginVTable zoomVTable = {
     zoomGetDisplayOptions,
     zoomSetDisplayOption,
     zoomGetScreenOptions,
-    zoomSetScreenOption,
-    0, /* Deps */
-    0, /* nDeps */
-    0, /* Features */
-    0  /* nFeatures */
+    zoomSetScreenOption
 };
 
 CompPluginVTable *

Modified: compiz/src/metadata.c
===================================================================
--- compiz/src/metadata.c
+++ compiz/src/metadata.c
@@ -619,7 +619,7 @@ initActionValue (CompDisplay	 *d,
 
 	    for (i = 0; i < sizeof (edge) / sizeof (edge[0]); i++)
 	    {
-		value = xmlGetProp (child, BAD_CAST edge);
+		value = xmlGetProp (child, BAD_CAST edge[i]);
 		if (value)
 		{
 		    if (strcasecmp ((char *) value, "true") == 0)

Modified: compiz/src/plugin.c
===================================================================
--- compiz/src/plugin.c
+++ compiz/src/plugin.c
@@ -425,41 +425,6 @@ findActivePlugin (char *name)
     return 0;
 }
 
-static CompPlugin *
-findActivePluginWithFeature (char	       *name,
-			     CompPluginFeature **feature)
-{
-    CompPlugin *p;
-    int	       i;
-
-    for (p = plugins; p; p = p->next)
-    {
-	for (i = 0; i < p->vTable->nFeatures; i++)
-	{
-	    if (strcmp (p->vTable->features[i].name, name) == 0)
-	    {
-		if (feature)
-		    *feature = &p->vTable->features[i];
-
-		return p;
-	    }
-	}
-    }
-
-    return 0;
-}
-
-CompPluginFeature *
-findActiveFeature (char *name)
-{
-    CompPluginFeature *feature;
-
-    if (findActivePluginWithFeature (name, &feature))
-	return feature;
-
-    return 0;
-}
-
 void
 unloadPlugin (CompPlugin *p)
 {
@@ -511,60 +476,9 @@ loadPlugin (char *name)
     return 0;
 }
 
-static Bool
-checkPluginDeps (CompPlugin *p)
-{
-    CompPluginDep *deps = p->vTable->deps;
-    int	          nDeps = p->vTable->nDeps;
-
-    while (nDeps--)
-    {
-	switch (deps->rule) {
-	case CompPluginRuleBefore:
-	    if (findActivePlugin (deps->name))
-	    {
-		compLogMessage (NULL, "core", CompLogLevelError,
-				"'%s' plugin must be loaded before '%s' "
-				"plugin", p->vTable->name, deps->name);
-
-		return FALSE;
-	    }
-	    break;
-	case CompPluginRuleAfter:
-	    if (!findActivePlugin (deps->name))
-	    {
-		compLogMessage (NULL, "core", CompLogLevelError,
-				"'%s' plugin must be loaded after '%s' "
-				"plugin", p->vTable->name, deps->name);
-
-		return FALSE;
-	    }
-	    break;
-	case CompPluginRuleRequire:
-	    if (!findActiveFeature (deps->name))
-	    {
-		compLogMessage (NULL, "core", CompLogLevelError,
-				"'%s' plugin needs feature '%s' which "
-				"is currently not provided by any plugin",
-				p->vTable->name, deps->name);
-
-		return FALSE;
-	    }
-	    break;
-	}
-
-	deps++;
-    }
-
-    return TRUE;
-}
-
 Bool
 pushPlugin (CompPlugin *p)
 {
-    CompPlugin *plugin;
-    int	       i;
-
     if (findActivePlugin (p->vTable->name))
     {
 	compLogMessage (NULL, "core", CompLogLevelWarn,
@@ -574,30 +488,6 @@ pushPlugin (CompPlugin *p)
 	return FALSE;
     }
 
-    for (i = 0; i < p->vTable->nFeatures; i++)
-    {
-	plugin = findActivePluginWithFeature (p->vTable->features[i].name, 0);
-	if (plugin)
-	{
-	    compLogMessage (NULL, "core", CompLogLevelError,
-			    "Plugin '%s' can't be activated because "
-			    "plugin '%s' is already providing feature '%s'",
-			    p->vTable->name, plugin->vTable->name,
-			    p->vTable->features[i].name);
-
-	    return FALSE;
-	}
-    }
-
-    if (!checkPluginDeps (p))
-    {
-	compLogMessage (NULL, "core", CompLogLevelError,
-			"Can't activate '%s' plugin due to dependency "
-			"problems", p->vTable->name);
-
-	return FALSE;
-    }
-
     p->next = plugins;
     plugins = p;
 


More information about the commits mailing list