[Python-checkins] r70723 - in python/trunk/Lib/idlelib: EditorWindow.py NEWS.txt

kurt.kaiser python-checkins at python.org
Mon Mar 30 18:22:00 CEST 2009


Author: kurt.kaiser
Date: Mon Mar 30 18:22:00 2009
New Revision: 70723
Log:
Tk 8.5 Text widget requires 'wordprocessor' tabstyle attr to handle mixed space/tab properly. Issue 5120, patch by Guilherme Polo.
Modified:
 python/trunk/Lib/idlelib/EditorWindow.py
 python/trunk/Lib/idlelib/NEWS.txt
Modified: python/trunk/Lib/idlelib/EditorWindow.py
==============================================================================
--- python/trunk/Lib/idlelib/EditorWindow.py	(original)
+++ python/trunk/Lib/idlelib/EditorWindow.py	Mon Mar 30 18:22:00 2009
@@ -105,10 +105,18 @@
 self.text_frame = text_frame = Frame(top)
 self.vbar = vbar = Scrollbar(text_frame, name='vbar')
 self.width = idleConf.GetOption('main','EditorWindow','width')
- self.text = text = MultiCallCreator(Text)(
- text_frame, name='text', padx=5, wrap='none',
- width=self.width,
- height=idleConf.GetOption('main','EditorWindow','height') )
+ text_options = {
+ 'name': 'text',
+ 'padx': 5,
+ 'wrap': 'none',
+ 'width': self.width,
+ 'height': idleConf.GetOption('main', 'EditorWindow', 'height')}
+ if TkVersion >= 8.5:
+ # Starting with tk 8.5 we have to set the new tabstyle option
+ # to 'wordprocessor' to achieve the same display of tabs as in
+ # older tk versions.
+ text_options['tabstyle'] = 'wordprocessor'
+ self.text = text = MultiCallCreator(Text)(text_frame, **text_options)
 self.top.focused_widget = self.text
 
 self.createmenubar()
Modified: python/trunk/Lib/idlelib/NEWS.txt
==============================================================================
--- python/trunk/Lib/idlelib/NEWS.txt	(original)
+++ python/trunk/Lib/idlelib/NEWS.txt	Mon Mar 30 18:22:00 2009
@@ -3,6 +3,9 @@
 
 *Release date: XX-XXX-2009*
 
+- Tk 8.5 Text widget requires 'wordprocessor' tabstyle attr to handle
+ mixed space/tab properly. Issue 5120, patch by Guilherme Polo.
+ 
 - Issue #3549: On MacOS the preferences menu was not present
 
 


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /