summaryrefslogtreecommitdiffstats
path: root/Tools/pynche/ListViewer.py
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>1998-10-20 20:45:46 (GMT)
committerBarry Warsaw <barry@python.org>1998-10-20 20:45:46 (GMT)
commit8a09e1ccdab7e47780780761c3ea8355ca7ded60 (patch)
tree8f64e55bfe4e697aaef08bdc3cd05f9c2c090d04 /Tools/pynche/ListViewer.py
parent28e7b4cce1bc8186206bdcd1a08b560f55b65923 (diff)
downloadcpython-8a09e1ccdab7e47780780761c3ea8355ca7ded60.zip
cpython-8a09e1ccdab7e47780780761c3ea8355ca7ded60.tar.gz
cpython-8a09e1ccdab7e47780780761c3ea8355ca7ded60.tar.bz2
Saving/Restoring state into ~/.pynche file
Diffstat (limited to 'Tools/pynche/ListViewer.py')
-rw-r--r--Tools/pynche/ListViewer.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/Tools/pynche/ListViewer.py b/Tools/pynche/ListViewer.py
index 8c8a6ee..9ba2a53 100644
--- a/Tools/pynche/ListViewer.py
+++ b/Tools/pynche/ListViewer.py
@@ -21,6 +21,7 @@ import ColorDB
class ListViewer:
def __init__(self, switchboard, parent=None):
self.__sb = switchboard
+ optiondb = switchboard.optiondb()
self.__lastbox = None
self.__dontcenter = 0
# GUI
@@ -76,7 +77,7 @@ class ListViewer:
#
# Update on click
self.__uoc = BooleanVar()
- self.__uoc.set(1)
+ self.__uoc.set(optiondb.get('UPONCLICK', 1))
self.__uocbtn = Checkbutton(root,
text='Update on Click',
variable=self.__uoc,
@@ -160,3 +161,6 @@ class ListViewer:
ig, ig, ig, y2 = canvas.coords(self.__bboxes[-1])
h = int(canvas['height']) * 0.5
canvas.yview('moveto', (y1-h) / y2)
+
+ def save_options(self, optiondb):
+ optiondb['UPONCLICK'] = self.__uoc.get()