summaryrefslogtreecommitdiff
path: root/kberylsettings/plugindialog.py
diff options
context:
space:
mode:
authornatural <natural>2007-01-07 06:00:34 +0000
committernatural <natural>2007-01-07 06:00:34 +0000
commite89937e2cf235c1560bdb3a7add8b3701bd4bfd4 (patch)
tree5b8c46e976b0296719b6134361664791e34ed476 /kberylsettings/plugindialog.py
parent3348c3e49865c5e6a32073e85a6d7a1574cac244 (diff)
downloadkberylsettings-e89937e2cf235c1560bdb3a7add8b3701bd4bfd4.tar.gz
kberylsettings-e89937e2cf235c1560bdb3a7add8b3701bd4bfd4.tar.bz2
Accounted for changes to berylsettings python extension in r2434.
Diffstat (limited to 'kberylsettings/plugindialog.py')
-rw-r--r--kberylsettings/plugindialog.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/kberylsettings/plugindialog.py b/kberylsettings/plugindialog.py
index 9a35164..0dd5a6b 100644
--- a/kberylsettings/plugindialog.py
+++ b/kberylsettings/plugindialog.py
@@ -29,7 +29,6 @@ class PluginList(ListView):
@param context berylsetting Context instance
@return mapping of plugin names and their enabled state
"""
- active = context.active
count = textlen = 0
loader = iconLoader()
cats = context.categories
@@ -41,11 +40,11 @@ class PluginList(ListView):
item.setText(1, cnames)
item.setText(2, p.LongDesc)
item.setPixmap(0, p.icon(KIcon.SizeSmall, loader))
- if p.Name in active:
- stateMap[p.Name] = 1
+ if p.Enabled:
+ stateMap[p.Name] = True
item.setState(QCheckListItem.On)
else:
- stateMap[p.Name] = 0
+ stateMap[p.Name] = False
count += 1
textlen = max(textlen, len(p.ShortDesc + p.LongDesc))
@@ -90,7 +89,7 @@ class PluginDialog(KDialogBase):
plugin = self.context.plugin(item.text(0))
state = item.state()
if state == item.On:
- self.pluginMap[plugin.Name] = 1
+ self.pluginMap[plugin.Name] = True
self.satisfy(plugin)
elif state == item.Off:
remaining = self.needs(plugin)
@@ -101,7 +100,7 @@ class PluginDialog(KDialogBase):
text %= (plugin.ShortDesc, str.join(', ', need))
KMessageBox.sorry(self, text)
else:
- self.pluginMap[plugin.Name] = 0
+ self.pluginMap[plugin.Name] = False
def satisfy(self, plugin):
""" enable requirement for plugin if necessary
@@ -113,7 +112,7 @@ class PluginDialog(KDialogBase):
for p in self.context.plugins:
if requirement in p.Provides:
if not self.pluginMap[p.Name]:
- self.pluginMap[p.Name] = 1
+ self.pluginMap[p.Name] = True
item = self.listView.findItem(p.ShortDesc, 0)
if item:
item.setState(item.On)