diff options
| author | Kurt B. Kaiser <kbk@shore.net> | 2003-06-06 21:58:38 +0000 | 
|---|---|---|
| committer | Kurt B. Kaiser <kbk@shore.net> | 2003-06-06 21:58:38 +0000 | 
| commit | 260cb9034c861fa159f26fba8679ac265af47109 (patch) | |
| tree | b71f9585e1e49b9a892587748b35bbaeea9881cc /Lib/idlelib | |
| parent | b268f0345956603cfae226946b80060b6fc28be1 (diff) | |
| download | cpython-git-260cb9034c861fa159f26fba8679ac265af47109.tar.gz | |
1. Update WindowList registry when filename changes so that
   Window menu updates.
2. Display Python Shell window in Window menu
3. Remove some dead code in FileList.py
M EditorWindow.py
M FileList.py
M WindowList.py
Diffstat (limited to 'Lib/idlelib')
| -rw-r--r-- | Lib/idlelib/EditorWindow.py | 1 | ||||
| -rw-r--r-- | Lib/idlelib/FileList.py | 4 | ||||
| -rw-r--r-- | Lib/idlelib/WindowList.py | 6 | 
3 files changed, 4 insertions, 7 deletions
diff --git a/Lib/idlelib/EditorWindow.py b/Lib/idlelib/EditorWindow.py index 86532f873b..da08d7151a 100644 --- a/Lib/idlelib/EditorWindow.py +++ b/Lib/idlelib/EditorWindow.py @@ -486,6 +486,7 @@ class EditorWindow:          if self.flist:              self.flist.filename_changed_edit(self)          self.saved_change_hook() +        self.top.update_windowlist_registry(self)          if self.ispythonsource(self.io.filename):              self.addcolorizer()          else: diff --git a/Lib/idlelib/FileList.py b/Lib/idlelib/FileList.py index 7a46afaa02..4e08e705d6 100644 --- a/Lib/idlelib/FileList.py +++ b/Lib/idlelib/FileList.py @@ -61,10 +61,6 @@ class FileList:      def new(self, filename=None):          return self.EditorWindow(self, filename) -    def new_callback(self, event): -        self.new() -        return "break" -      def close_all_callback(self, event):          for edit in self.inversedict.keys():              reply = edit.close() diff --git a/Lib/idlelib/WindowList.py b/Lib/idlelib/WindowList.py index 542b738674..ba9f3b34c9 100644 --- a/Lib/idlelib/WindowList.py +++ b/Lib/idlelib/WindowList.py @@ -29,9 +29,6 @@ class WindowList:              list.append((title, window))          list.sort()          for title, window in list: -            if title == "Python Shell": -                # Hack -- until we have a better way to this -                continue              menu.add_command(label=title, command=window.wakeup)      def register_callback(self, callback): @@ -72,6 +69,9 @@ class ListedToplevel(Toplevel):          if not registry.dict:              self.quit() +    def update_windowlist_registry(self, window): +        registry.call_callbacks() +      def get_title(self):          # Subclass can override          return self.wm_title()  | 
