summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Spillaz <smspillaz@gmail.com>2008-04-23 13:58:58 +0800
committerSam Spillaz <smspillaz@gmail.com>2008-04-23 13:58:58 +0800
commit62d09f51a83b1fec2b982cf6dbb786457840a3cb (patch)
tree546246bf897b2f6ad9193370ba348f2971b010a5
parente0ef7e42ea4ae1106d6f08997db27239660cb15f (diff)
downloadcompiz-tools-62d09f51a83b1fec2b982cf6dbb786457840a3cb.tar.gz
compiz-tools-62d09f51a83b1fec2b982cf6dbb786457840a3cb.tar.bz2
* Fix for API change
-rwxr-xr-xCompiz-Fusion-Preferences/compiz-fusion-settings34
-rwxr-xr-xCompiz-Fusion-Preferences/compiz-fusion-settings.in4
2 files changed, 23 insertions, 15 deletions
diff --git a/Compiz-Fusion-Preferences/compiz-fusion-settings b/Compiz-Fusion-Preferences/compiz-fusion-settings
index 791d012..3104696 100755
--- a/Compiz-Fusion-Preferences/compiz-fusion-settings
+++ b/Compiz-Fusion-Preferences/compiz-fusion-settings
@@ -832,7 +832,7 @@ class Base:
if Option[0] != None:
# First Disable the Old Option
if self.context.Plugins[Option[0]].Display[Option[1]].Value == Edge:
- self.context.Plugins[Option[0]].Display[Option[1]].Value = "Disabled"
+ self.context.Plugins[Option[0]].Display[Option[1]].Value[2] = "Disabled"
self.context.Write()
OldOptionDisabled = True
else:
@@ -843,7 +843,7 @@ class Base:
if CurrentValue != 0:
Setting = self.context.Plugins[Option[0]].Display[Option[1]]
# Enable the plugin
- Conflict = ccm.ActionConflict(Setting, edges = Edge)
+ Conflict = ccm.EdgeConflict(Setting, Edge, autoResolve = True)
if Conflict.Resolve(self.GlobalUpdater):
self.context.Plugins[Option[0]].Display[Option[1]].Value = Edge
self.context.Plugins[Option[0]].Enabled = True
@@ -927,7 +927,7 @@ class Base:
for boxName, settingName in boxes.items():
box = self.gladefile.get_widget(boxName)
setting = plugin.Screens[0][settingName]
- items = sorted(setting.Info[1][2].items(), ccm.EnumSettingSortCompare)
+ items = sorted(setting.Info[1][2].items(), key=ccm.EnumSettingKeyFunc)
self.SetupBoxModel(box)
for key, value in items:
box.append_text(key)
@@ -965,8 +965,8 @@ class Base:
NewDecrValue = CurValue + "Button5"
for i in self.OBSModifiers:
if i[0] == NameOfWidget:
- self.plugins[self.pluginnames.index(pluginName)].Display[OptionName].Value = NewIncrValue
- self.plugins[self.pluginnames.index(pluginName)].Display[OptionName.replace("_increase", "_decrease")].Value = NewDecrValue
+ self.plugins[self.pluginnames.index(pluginName)].Display[OptionName] = NewIncrValue
+ self.plugins[self.pluginnames.index(pluginName)].Display[OptionName.replace("_increase", "_decrease")].Value[1] = NewDecrValue
self.context.Write()
@@ -1117,15 +1117,15 @@ class Base:
self.context.Write()
else:
- Value = i.Value[0]
+ Value = i.Value
Val = (4000 - (CurrentSpeed * 800))
- Value = int(Val)
+ Value[0] = int(Val)
# We dont want it to be too slow
- Value = Value - 2000
+ Value[0] = Value[0] - 2000
# Leave it if it hits 100
- if Value < 100:
- Value = 100
- i.Value[0] = Value
+ if Value[0] < 100:
+ Value[0] = 100
+ i.Value = Value
self.context.Write()
def PluginEnableDisable(self, widget, name, name2=None):
@@ -1162,6 +1162,14 @@ class Base:
self.context.Write()
+ def SettingButtonChanged(self, signal, name, settingName, settingType, widget):
+ if settingType == "Screen":
+ self.plugins[self.pluginnames.index(name)].Screens[0][settingName].Value[1] = widget.get_text()
+ else:
+ plugin.Display[settingName].Value = widget.get_text()
+
+ self.context.Write()
+
def CreatePluginSetting(self, widgetName, name, sensitive, name2=None):
self.Widget = self.gladefile.get_widget(widgetName)
self.Widget.set_sensitive(sensitive)
@@ -1225,14 +1233,14 @@ class Base:
def ActionKeyEdited(self, cell, path, text):
keyIter = self.KeyBindingsStore.get_iter(path)
settingObject = self.KeyBindingsStore.get_value(keyIter, 3)
- settingObject.Value = text
+ settingObject.Value[0] = text
self.context.Write()
self.KeyBindingsStore.set_value(keyIter, 2, settingObject.Value)
def ActionButtonEdited(self, cell, path, text):
mouseIter = self.KeyBindingsStore.get_iter(path)
settingObject = self.KeyBindingsStore.get_value(mouseIter, 6)
- settingObject.Value = text
+ settingObject.Value[1] = text
self.context.Write()
self.KeyBindingsStore.set_value(mouseIter, 5, settingObject.Value)
diff --git a/Compiz-Fusion-Preferences/compiz-fusion-settings.in b/Compiz-Fusion-Preferences/compiz-fusion-settings.in
index 8897b07..91648e4 100755
--- a/Compiz-Fusion-Preferences/compiz-fusion-settings.in
+++ b/Compiz-Fusion-Preferences/compiz-fusion-settings.in
@@ -843,9 +843,9 @@ class Base:
if CurrentValue != 0:
Setting = self.context.Plugins[Option[0]].Display[Option[1]]
# Enable the plugin
- Conflict = ccm.ActionConflict(Setting, edges = Edge)
+ Conflict = ccm.EdgeConflict(Setting, Edge, autoResolve = True)
if Conflict.Resolve(self.GlobalUpdater):
- self.context.Plugins[Option[0]].Display[Option[1]].Value[2] = Edge
+ self.context.Plugins[Option[0]].Display[Option[1]].Value = Edge
self.context.Plugins[Option[0]].Enabled = True
self.context.Write()
break