summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Niklaus <marex@opencompositing.org>2007-06-12 00:06:23 +0200
committerPatrick Niklaus <marex@opencompositing.org>2007-06-12 00:06:23 +0200
commite64df41a4425ac7251f7b6683f8fb1f8497708b0 (patch)
treedb69ba19562a15c2295cee1cdfc2d11d4a128da7
parentb390a741b8a4dbfaada16cb932bd1ff5255a9ff2 (diff)
downloadccsm-e64df41a4425ac7251f7b6683f8fb1f8497708b0.tar.gz
ccsm-e64df41a4425ac7251f7b6683f8fb1f8497708b0.tar.bz2
Fixed action conflict handling
-rwxr-xr-xccsm.in23
1 files changed, 12 insertions, 11 deletions
diff --git a/ccsm.in b/ccsm.in
index b44b48e..8b4ba75 100755
--- a/ccsm.in
+++ b/ccsm.in
@@ -60,8 +60,8 @@ def CheckConflict(setting, con, typ):
msg = "The new value for the %s binding for the action <b>%s</b> " +\
"in plugin <b>%s</b> conflicts with the action <b>%s</b> of the <b>%s</b> plugin.\n" +\
- "Do you wish to clear <b>%s</b> in the <b>%s</b> plugin?\n" +\
- "If you click No, the action will still be set."
+ "Do you wish to disable <b>%s</b> in the <b>%s</b> plugin?\n" +\
+ "If you click No, this option will not be set."
msg = msg % (typ, setting.ShortDesc, setting.Plugin.ShortDesc, con.ShortDesc, con.Plugin.ShortDesc, con.ShortDesc, con.Plugin.ShortDesc)
@@ -74,18 +74,19 @@ def CheckConflict(setting, con, typ):
return ret
def CheckActionConflicts(setting, key, button, bell, edges):
- # first gather settings list
- allSettings = sum((sum((z.values() for z in p.Screens+[p.Display]), []) for p in setting.Plugin.Context.Plugins.values()), [])
- allSettings.remove(setting)
keyCon = []
buttonCon = []
- for s in allSettings:
- if s.Type == 'Action':
- if s.Value[0] == key:
- keyCon.append(s)
- if s.Value[1] == button:
- buttonCon.append(s)
+ # this might be a bit slow but anyway...
+ for plugin in setting.Plugin.Context.Plugins.values():
+ if plugin.Enabled:
+ settings = sum((z.values() for z in [plugin.Screens[CurrentScreenNum]]+[plugin.Display]), [])
+ for s in settings:
+ if s.Type == 'Action' and s != setting:
+ if s.Value[0] == key:
+ keyCon.append(s)
+ if s.Value[1] == button:
+ buttonCon.append(s)
if len(keyCon) and key and key.lower() != 'disabled' and key.lower() != 'none':
for k in keyCon: