summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHuang Peng <shawn.p.huang@gmail.com>2008-06-23 18:29:48 +0800
committerHuang Peng <shawn.p.huang@gmail.com>2008-06-23 18:29:48 +0800
commitc380db468f4e1f6276e19604e38b9db137d7a40f (patch)
tree395480841ae15dcb5d3455a6df1ff48b52381c8a
parent19f10da3a3a680269f51554a3a5b98ef2a7e3c7e (diff)
downloadibus-c380db468f4e1f6276e19604e38b9db137d7a40f.tar.gz
ibus-c380db468f4e1f6276e19604e38b9db137d7a40f.tar.xz
ibus-c380db468f4e1f6276e19604e38b9db137d7a40f.zip
Add prop_state arg in PropertyActivate. And add PROP_TYPE_MENU
-rw-r--r--ibus/interface/iengine.py4
-rw-r--r--ibus/interface/ipanel.py2
-rw-r--r--ibus/property.py6
3 files changed, 7 insertions, 5 deletions
diff --git a/ibus/interface/iengine.py b/ibus/interface/iengine.py
index c49d361..62cc501 100644
--- a/ibus/interface/iengine.py
+++ b/ibus/interface/iengine.py
@@ -74,8 +74,8 @@ class IEngine (dbus.service.Object):
@method (in_signature = "b")
def SetEnable (self, enable): pass
- @method (in_signature = "s")
- def PropertyActivate (self, prop_name): pass
+ @method (in_signature = "si")
+ def PropertyActivate (self, prop_name, prop_state): pass
@method ()
def Destroy (self): pass
diff --git a/ibus/interface/ipanel.py b/ibus/interface/ipanel.py
index 7d10478..0dfb3dc 100644
--- a/ibus/interface/ipanel.py
+++ b/ibus/interface/ipanel.py
@@ -85,4 +85,4 @@ class IPanel (dbus.service.Object):
def CursorDown (self): pass
@signal ()
- def PropertyActivate (self, name): pass
+ def PropertyActivate (self, prop_name, prop_state): pass
diff --git a/ibus/property.py b/ibus/property.py
index 55fb08e..7810124 100644
--- a/ibus/property.py
+++ b/ibus/property.py
@@ -24,6 +24,7 @@ __all__ = (
"PROP_TYPE_TOGGLE",
"PROP_TYPE_RADIO",
"PROP_TYPE_SEPARATOR",
+ "PROP_TYPE_MENU",
"PROP_STATE_UNCHECKED",
"PROP_STATE_CHECKED",
"PROP_STATE_INCONSISTENT",
@@ -38,7 +39,8 @@ import dbus
PROP_TYPE_NORMAL = 0
PROP_TYPE_TOGGLE = 1
PROP_TYPE_RADIO = 2
-PROP_TYPE_SEPARATOR = 3
+PROP_TYPE_MENU = 3
+PROP_TYPE_SEPARATOR = 4
PROP_STATE_UNCHECKED = 0
PROP_STATE_CHECKED = 1
@@ -52,7 +54,7 @@ class Property:
tip = "",
sensitive = True,
visible = True,
- state = PROP_STATE_CHECKED):
+ state = PROP_STATE_UNCHECKED):
self._name = name
self._type = type
self._label = label