]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Merged revisions 70723 via svnmerge from
authorKurt B. Kaiser <kbk@shore.net>
Sat, 25 Apr 2009 18:18:54 +0000 (18:18 +0000)
committerKurt B. Kaiser <kbk@shore.net>
Sat, 25 Apr 2009 18:18:54 +0000 (18:18 +0000)
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70723 | kurt.kaiser | 2009-03-30 12:22:00 -0400 (Mon, 30 Mar 2009) | 1 line

  Tk 8.5 Text widget requires 'wordprocessor' tabstyle attr to handle mixed space/tab properly. Issue 5120, patch by Guilherme Polo.
........

Lib/idlelib/EditorWindow.py
Lib/idlelib/NEWS.txt

index 3044f0657b8b5f2f2174ed7a9069e01367c519d8..da051ed6d0b5aeaa77ff6968d44752e7dbf186f5 100644 (file)
@@ -113,10 +113,18 @@ class EditorWindow(object):
         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()
index 2d74be4e3ff7fe734639f273a81e1ef05f42574f..297dd31b05fee3028f022c6c4e54fcec4128c50f 100644 (file)
@@ -6,6 +6,9 @@ What's New in IDLE 2.6.3rc1?
 - Windows: Version string for the .chm help file changed, file not being
   accessed  Patch 5783 Guilherme Polo
 
+- Tk 8.5 Text widget requires 'wordprocessor' tabstyle attr to handle
+  mixed space/tab properly. Issue 5129, patch by Guilherme Polo.
+
 What's New in IDLE 2.6.2rc1?
 ============================