summaryrefslogtreecommitdiff
path: root/kberylsettings/beryl.py
diff options
context:
space:
mode:
authornatural <natural>2006-12-25 01:45:59 +0000
committernatural <natural>2006-12-25 01:45:59 +0000
commitc8ad4394c474f9f6854904f377ab28a38172b867 (patch)
treea21e740fc8025ba86b9a0006317c58ef316cea46 /kberylsettings/beryl.py
parentefa1df0939d879cf18e0cf9fa342aaf86d3e9ea1 (diff)
downloadkberylsettings-c8ad4394c474f9f6854904f377ab28a38172b867.tar.gz
kberylsettings-c8ad4394c474f9f6854904f377ab28a38172b867.tar.bz2
Added (copies of) missing beryl-settings icon svgs.
Added catetories column to plugin dialog. Added bell binding to setting widgets. Finally enabled binding setting value() functions -- now saves!
Diffstat (limited to 'kberylsettings/beryl.py')
-rw-r--r--kberylsettings/beryl.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/kberylsettings/beryl.py b/kberylsettings/beryl.py
index f26c32f..2594361 100644
--- a/kberylsettings/beryl.py
+++ b/kberylsettings/beryl.py
@@ -27,6 +27,11 @@ class Context(QObject):
context.Read()
self.context = context
+ def getCategories(self):
+ return self.context.Categories
+ categories = property(getCategories)
+
+
def getPlugins(self):
""" sorted plugin sequence
@@ -35,7 +40,6 @@ class Context(QObject):
seq = [Plugin(p) for p in self.context.Plugins]
seq.sort(reverse=True)
return iter(seq)
-
plugins = property(getPlugins)
def plugin(self, value):
@@ -70,7 +74,6 @@ class Context(QObject):
@return None
"""
self.general.Setting(self.activePluginsSettingName).Value = active
-
active = property(getActive, setActive)
def getGeneral(self):
@@ -79,7 +82,6 @@ class Context(QObject):
@return Plugin wrapper instance
"""
return Plugin(self.context.Plugin(Plugin.generalName))
-
general = property(getGeneral)
def write(self):
@@ -113,8 +115,9 @@ class Plugin:
def __cmp__(self, other):
if self.isGeneral:
return -1
- return cmp(self.plugin.ShortDesc,
- getattr(other.plugin, 'ShortDesc', None))
+ if not isinstance(other, Plugin):
+ other = Plugin(other)
+ return cmp(self.plugin.ShortDesc, other.plugin.ShortDesc)
def isGeneral(self):
return self.plugin.Name == self.generalName