[Python-checkins] r71189 - in python/branches/py3k: Lib/idlelib/EditorWindow.py Lib/idlelib/NEWS.txt

kurt.kaiser python-checkins at python.org
Sat Apr 4 22:38:52 CEST 2009


Author: kurt.kaiser
Date: Sat Apr 4 22:38:52 2009
New Revision: 71189
Log:
Merged revisions 70723 via svnmerge from 
svn+ssh://pythondev@svn.python.org/python/trunk
........
 r70723 | kurt.kaiser | 2009年03月30日 12:22:00 -0400 (2009年3月30日) | 1 line
 
 Tk 8.5 Text widget requires 'wordprocessor' tabstyle attr to handle mixed space/tab properly. Issue 5120, patch by Guilherme Polo.
........
Modified:
 python/branches/py3k/ (props changed)
 python/branches/py3k/Lib/idlelib/EditorWindow.py
 python/branches/py3k/Lib/idlelib/NEWS.txt
Modified: python/branches/py3k/Lib/idlelib/EditorWindow.py
==============================================================================
--- python/branches/py3k/Lib/idlelib/EditorWindow.py	(original)
+++ python/branches/py3k/Lib/idlelib/EditorWindow.py	Sat Apr 4 22:38:52 2009
@@ -107,10 +107,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/branches/py3k/Lib/idlelib/NEWS.txt
==============================================================================
--- python/branches/py3k/Lib/idlelib/NEWS.txt	(original)
+++ python/branches/py3k/Lib/idlelib/NEWS.txt	Sat Apr 4 22:38:52 2009
@@ -6,6 +6,9 @@
 - Remove port spec from run.py and fix bug where subprocess fails to
 extract port from command line when warnings are present.
 
+- Tk 8.5 Text widget requires 'wordprocessor' tabstyle attr to handle
+ mixed space/tab properly. Issue 5120, patch by Guilherme Polo.
+
 - Issue #4815: Offer conversion to UTF-8 if source files have
 no encoding declaration and are not encoded in UTF-8.
 


More information about the Python-checkins mailing list

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