diff options
author | Barry Warsaw <barry@python.org> | 1998-10-20 20:45:46 (GMT) |
---|---|---|
committer | Barry Warsaw <barry@python.org> | 1998-10-20 20:45:46 (GMT) |
commit | 8a09e1ccdab7e47780780761c3ea8355ca7ded60 (patch) | |
tree | 8f64e55bfe4e697aaef08bdc3cd05f9c2c090d04 /Tools/pynche/StripViewer.py | |
parent | 28e7b4cce1bc8186206bdcd1a08b560f55b65923 (diff) | |
download | cpython-8a09e1ccdab7e47780780761c3ea8355ca7ded60.zip cpython-8a09e1ccdab7e47780780761c3ea8355ca7ded60.tar.gz cpython-8a09e1ccdab7e47780780761c3ea8355ca7ded60.tar.bz2 |
Saving/Restoring state into ~/.pynche file
Diffstat (limited to 'Tools/pynche/StripViewer.py')
-rw-r--r-- | Tools/pynche/StripViewer.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Tools/pynche/StripViewer.py b/Tools/pynche/StripViewer.py index 84fe741..7bbfcca 100644 --- a/Tools/pynche/StripViewer.py +++ b/Tools/pynche/StripViewer.py @@ -298,11 +298,14 @@ class StripWidget: class StripViewer: def __init__(self, switchboard, parent=None): self.__sb = switchboard + optiondb = switchboard.optiondb() # create a frame inside the parent self.__frame = Frame(parent) #, relief=GROOVE, borderwidth=2) self.__frame.grid(row=1, column=0, columnspan=2, sticky='EW') - uwd = BooleanVar() - hexp = BooleanVar() + uwd = self.__uwdvar = BooleanVar() + uwd.set(optiondb.get('UPWHILEDRAG', 0)) + hexp = self.__hexpvar = BooleanVar() + hexp.set(optiondb.get('HEXSTRIP', 0)) self.__reds = StripWidget(switchboard, self.__frame, generator=constant_cyan_generator, axis=0, @@ -349,3 +352,7 @@ class StripViewer: def __togglehex(self, event=None): red, green, blue = self.__sb.current_rgb() self.update_yourself(red, green, blue) + + def save_options(self, optiondb): + optiondb['UPWHILEDRAG'] = self.__uwdvar.get() + optiondb['HEXSTRIP'] = self.__hexpvar.get() |