diff options
author | Guillaume Seguin <guillaume@segu.in> | 2013-06-04 16:40:55 +0400 |
---|---|---|
committer | Guillaume Seguin <guillaume@segu.in> | 2013-06-04 16:40:55 +0400 |
commit | d06bc65bb96234a8606d3e43098f48d8fcc4bcd3 (patch) | |
tree | 615cc77be1578f56c29405d9aa9b51c140030d8b /pronsole.py | |
parent | 5f00454c810d50c42393862f98b88138baabc8dc (diff) |
Add callbacks to update gviz params on the fly from options dialog
Diffstat (limited to 'pronsole.py')
-rwxr-xr-x | pronsole.py | 4 |
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: |