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

................
  r71189 | kurt.kaiser | 2009-04-04 16:38:52 -0400 (Sat, 04 Apr 2009) | 9 lines

  Merged revisions 70723 via svnmerge from
  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 fe97df60aee199a6dff25082423621f2eea4e4cf..00ff88169bc3a9781e70579625d9c885e00df988 100644 (file)
@@ -107,10 +107,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 86827b4cd8356949272f63f7768071c473650556..bdd7bb0c6ed6406750d04b062fdcd7b9f62db5ab 100644 (file)
@@ -18,6 +18,9 @@ What's New in IDLE 2.7? (UNRELEASED, but merged into 3.0 releases above.)
 
 *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
 
 What's New in IDLE 3.0 final?