summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Reveman <davidr@novell.com>2007-08-13 19:39:24 -0400
committerDavid Reveman <davidr@novell.com>2007-08-13 19:39:24 -0400
commitfabb0ae3c4dec2147960f532a4fdc29c2f3e4352 (patch)
treee90af24e5f68f419460c5c81e4424e76e9c06a79
parentc83b2902e069393e4f8a1c99f927538b4225bfa7 (diff)
Use new action option types in zoom plugin.
-rw-r--r--metadata/zoom.xml.in28
-rw-r--r--plugins/zoom.c20
2 files changed, 18 insertions, 30 deletions
diff --git a/metadata/zoom.xml.in b/metadata/zoom.xml.in
index 440bef96..1a5bd5bb 100644
--- a/metadata/zoom.xml.in
+++ b/metadata/zoom.xml.in
@@ -3,37 +3,25 @@
<_short>Zoom Desktop</_short>
<_long>Zoom and pan desktop cube</_long>
<display>
- <option name="initiate" type="action">
+ <option name="initiate_button" type="button">
<_short>Initiate</_short>
<_long>Zoom In</_long>
- <allowed key="true" button="true"/>
- <default>
- <button>&lt;Super&gt;Button3</button>
- </default>
+ <default>&lt;Super&gt;Button3</default>
</option>
- <option name="zoom_in" type="action">
+ <option name="zoom_in_button" type="button">
<_short>Zoom In</_short>
<_long>Zoom In</_long>
- <allowed key="true" button="true"/>
- <default>
- <button>&lt;Super&gt;Button4</button>
- </default>
+ <default>&lt;Super&gt;Button4</default>
</option>
- <option name="zoom_out" type="action">
+ <option name="zoom_out_button" type="button">
<_short>Zoom Out</_short>
<_long>Zoom Out</_long>
- <allowed key="true" button="true"/>
- <default>
- <button>&lt;Super&gt;Button5</button>
- </default>
+ <default>&lt;Super&gt;Button5</default>
</option>
- <option name="zoom_pan" type="action">
+ <option name="zoom_pan_button" type="button">
<_short>Zoom Pan</_short>
<_long>Zoom pan</_long>
- <allowed key="true" button="true"/>
- <default>
- <button>&lt;Super&gt;Button2</button>
- </default>
+ <default>&lt;Super&gt;Button2</default>
</option>
</display>
<screen>
diff --git a/plugins/zoom.c b/plugins/zoom.c
index c2efa738..9808f1c6 100644
--- a/plugins/zoom.c
+++ b/plugins/zoom.c
@@ -37,11 +37,11 @@ static CompMetadata zoomMetadata;
static int displayPrivateIndex;
-#define ZOOM_DISPLAY_OPTION_INITIATE 0
-#define ZOOM_DISPLAY_OPTION_IN 1
-#define ZOOM_DISPLAY_OPTION_OUT 2
-#define ZOOM_DISPLAY_OPTION_PAN 3
-#define ZOOM_DISPLAY_OPTION_NUM 4
+#define ZOOM_DISPLAY_OPTION_INITIATE_BUTTON 0
+#define ZOOM_DISPLAY_OPTION_IN_BUTTON 1
+#define ZOOM_DISPLAY_OPTION_OUT_BUTTON 2
+#define ZOOM_DISPLAY_OPTION_PAN_BUTTON 3
+#define ZOOM_DISPLAY_OPTION_NUM 4
typedef struct _ZoomDisplay {
int screenPrivateIndex;
@@ -946,7 +946,7 @@ zoomSetDisplayOption (CompPlugin *plugin,
return FALSE;
switch (index) {
- case ZOOM_DISPLAY_OPTION_OUT:
+ case ZOOM_DISPLAY_OPTION_OUT_BUTTON:
if (compSetActionOption (o, value))
return TRUE;
break;
@@ -958,10 +958,10 @@ zoomSetDisplayOption (CompPlugin *plugin,
}
static const CompMetadataOptionInfo zoomDisplayOptionInfo[] = {
- { "initiate", "action", 0, zoomInitiate, zoomTerminate },
- { "zoom_in", "action", 0, zoomIn, 0 },
- { "zoom_out", "action", 0, zoomOut, 0 },
- { "zoom_pan", "action", 0, zoomInitiatePan, zoomTerminatePan }
+ { "initiate_button", "button", 0, zoomInitiate, zoomTerminate },
+ { "zoom_in_button", "button", 0, zoomIn, 0 },
+ { "zoom_out_button", "button", 0, zoomOut, 0 },
+ { "zoom_pan_button", "button", 0, zoomInitiatePan, zoomTerminatePan }
};
static Bool