summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Niklaus <marex@opencompositing.org>2007-06-14 00:53:18 +0200
committerPatrick Niklaus <marex@opencompositing.org>2007-06-14 00:53:18 +0200
commit3059342cc07b48be063f677b53a39d4ead21e3db (patch)
tree4400710d247cfcc9432e40215df1c3eb86cb605b
parente9b036829962ef5b9317fb776046a5e53bbc1fcb (diff)
downloadccsm-3059342cc07b48be063f677b53a39d4ead21e3db.tar.gz
ccsm-3059342cc07b48be063f677b53a39d4ead21e3db.tar.bz2
Disable ReadOnly options
-rwxr-xr-xccsm.in10
1 files changed, 9 insertions, 1 deletions
diff --git a/ccsm.in b/ccsm.in
index e00b8b8..1851d18 100755
--- a/ccsm.in
+++ b/ccsm.in
@@ -156,6 +156,8 @@ class SettingItem:
self._Init()
def Attach(self, table, row):
+ self.Reset.set_sensitive(not self.Setting.ReadOnly)
+ self.Widget.set_sensitive(not self.Setting.ReadOnly)
if self.Custom:
table.attach(self.Widget, 0, 100, row, row+1, TDef, TDef, TXp, TYp)
else:
@@ -204,7 +206,6 @@ class SettingItem:
self.PureVirtual('_Changed')
-
class StringMatchSetting(SettingItem):
def _Init(self):
self.Widget = gtk.Entry()
@@ -329,6 +330,9 @@ class IntFloatSetting(SettingItem):
self.Adj.connect('value-changed', self.Changed)
def Attach(self, Table, row):
+ self.Reset.set_sensitive(not self.Setting.ReadOnly)
+ self.Scale.set_sensitive(not self.Setting.ReadOnly)
+ self.Spin.set_sensitive(not self.Setting.ReadOnly)
Table.attach(self.Label, 0, 1, row, row+1, gtk.FILL, TDef, TXp, TYp)
Table.attach(self.Scale, 1, 2, row, row+1, TDef, TDef, TXp, TYp)
Table.attach(self.Spin, 2, 3, row, row+1, gtk.FILL, TDef, TXp, TYp)
@@ -707,6 +711,8 @@ class ListSetting(SettingItem):
self.Setting.Value = values
def Attach(self, table, row):
+ self.Widget.set_sensitive(not self.Setting.ReadOnly)
+ self.Reset.set_sensitive(not self.Setting.ReadOnly)
table.attach(self.Widget, 0, 100, row, row+1, xpadding=5)
class StringMatchListSetting(ListSetting):
@@ -780,6 +786,8 @@ class IntDescListSetting(SettingItem):
self.Setting.Value = values
def Attach(self, table, row):
+ self.Widget.set_sensitive(not self.Setting.ReadOnly)
+ self.Reset.set_sensitive(not self.Setting.ReadOnly)
table.attach(self.Widget, 0, 100, row, row+1, xpadding = 5)
class IntFloatListSetting(ListSetting):