Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/kliment/Printrun.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Seguin <guillaume@segu.in>2013-06-04 16:40:55 +0400
committerGuillaume Seguin <guillaume@segu.in>2013-06-04 16:40:55 +0400
commitd06bc65bb96234a8606d3e43098f48d8fcc4bcd3 (patch)
tree615cc77be1578f56c29405d9aa9b51c140030d8b /pronsole.py
parent5f00454c810d50c42393862f98b88138baabc8dc (diff)
Add callbacks to update gviz params on the fly from options dialog
Diffstat (limited to 'pronsole.py')
-rwxr-xr-xpronsole.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/pronsole.py b/pronsole.py
index 43125ad..d055608 100755
--- a/pronsole.py
+++ b/pronsole.py
@@ -279,8 +279,10 @@ class Settings(object):
return object.__getattribute__(self, name)
return getattr(self, "_" + name).value
- def _add(self, setting):
+ def _add(self, setting, callback = None):
setattr(self, setting.name, setting)
+ if callback:
+ setattr(self, "_" + setting.name + "_cb", callback)
def _set(self, key, value):
try: