]> granicus.if.org Git - python/commitdiff
Added the ListViewer
authorBarry Warsaw <barry@python.org>
Fri, 2 Oct 1998 16:05:48 +0000 (16:05 +0000)
committerBarry Warsaw <barry@python.org>
Fri, 2 Oct 1998 16:05:48 +0000 (16:05 +0000)
Tools/pynche/PyncheWidget.py

index 2222c05490d0c7d04d10330ad20aa3da528ca667..b367fc2f6ae8b25ef6f73db4b31389cc4c60ab6c 100644 (file)
@@ -15,6 +15,7 @@ class PyncheWidget:
         self.__sb = switchboard
         self.__version = version
         self.__textwin = None
+        self.__listwin = None
         # create the first and top window
         root = self.__root = Tk(className='Pynche')
         root.protocol('WM_DELETE_WINDOW', self.__quit)
@@ -51,6 +52,9 @@ class PyncheWidget:
         viewmenu.add_command(label='Text Window...',
                              command=self.__popup_text,
                              underline=0)
+        viewmenu.add_command(label='Color List Window...',
+                             command=self.__popup_listwin,
+                             underline=0)
         #
         # Help menu
         #
@@ -98,3 +102,10 @@ email:   bwarsaw@python.org''')
             self.__textwin = TextViewer(self.__sb, self.__root)
             self.__sb.add_view(self.__textwin)
         self.__textwin.deiconify()
+
+    def __popup_listwin(self, event=None):
+        if not self.__listwin:
+            from ListViewer import ListViewer
+            self.__listwin = ListViewer(self.__sb, self.__root)
+            self.__sb.add_view(self.__listwin)
+        self.__listwin.deiconify()