[Python-checkins] r65419 - sandbox/trunk/ttk-gsoc/src/idlelib/EditorWindow.py

guilherme.polo python-checkins at python.org
Sat Aug 2 20:23:24 CEST 2008


Author: guilherme.polo
Date: Sat Aug  2 20:23:24 2008
New Revision: 65419

Log:
Update window's title when tab changes

Modified:
   sandbox/trunk/ttk-gsoc/src/idlelib/EditorWindow.py

Modified: sandbox/trunk/ttk-gsoc/src/idlelib/EditorWindow.py
==============================================================================
--- sandbox/trunk/ttk-gsoc/src/idlelib/EditorWindow.py	(original)
+++ sandbox/trunk/ttk-gsoc/src/idlelib/EditorWindow.py	Sat Aug  2 20:23:24 2008
@@ -108,7 +108,7 @@
         self.text_notebook.bind('<<NotebookTabChanged>>',
             self._update_controls)
         self.new_tab(filename=filename)
-        self.text = text = self.current_page.text # XXX
+        self.text = self.current_page.text # XXX
         self.top.focused_widget = self.text
         self.text_notebook.pack(fill=BOTH, expand=True)
 
@@ -633,7 +633,10 @@
 
     def _update_controls(self, event):
         print self.short_title(), "<<"
-        self.current_page.text.focus_set()
+        curr_page = self.current_page
+        self.text = curr_page.text
+        curr_page.saved_change_hook() # update window title
+        curr_page.text.focus_set()
         self.set_line_and_column()
 
     def _create_statusbar(self):


More information about the Python-checkins mailing list