summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/help_about.py
diff options
context:
space:
mode:
authorterryjreedy <tjreedy@udel.edu>2017-06-27 03:09:45 (GMT)
committerGitHub <noreply@github.com>2017-06-27 03:09:45 (GMT)
commit8047f02a4b0db81cb023df1f5ce4cc1c42d17821 (patch)
tree1a33b4bef73c3ca7ca95b480874f29dab8656688 /Lib/idlelib/help_about.py
parent938e73809d10f6073c85ecd330c88a85c6095530 (diff)
downloadcpython-8047f02a4b0db81cb023df1f5ce4cc1c42d17821.zip
cpython-8047f02a4b0db81cb023df1f5ce4cc1c42d17821.tar.gz
cpython-8047f02a4b0db81cb023df1f5ce4cc1c42d17821.tar.bz2
[3.6] bpo-24813: IDLE: Add build bitness to About Idle title (GH-2380) (#2426)
Patch by Cheryl Sabella. (cherry picked from commit 9a02ae3)
Diffstat (limited to 'Lib/idlelib/help_about.py')
-rw-r--r--Lib/idlelib/help_about.py18
1 files changed, 14 insertions, 4 deletions
diff --git a/Lib/idlelib/help_about.py b/Lib/idlelib/help_about.py
index a2ac316..967f034 100644
--- a/Lib/idlelib/help_about.py
+++ b/Lib/idlelib/help_about.py
@@ -2,7 +2,8 @@
"""
import os
-from platform import python_version
+import sys
+from platform import python_version, architecture
from tkinter import Toplevel, Frame, Label, Button, PhotoImage
from tkinter import SUNKEN, TOP, BOTTOM, LEFT, X, BOTH, W, EW, NSEW, E
@@ -10,6 +11,14 @@ from tkinter import SUNKEN, TOP, BOTTOM, LEFT, X, BOTH, W, EW, NSEW, E
from idlelib import textview
+def build_bits():
+ "Return bits for platform."
+ if sys.platform == 'darwin':
+ return '64' if sys.maxsize > 2**32 else '32'
+ else:
+ return architecture()[0][:2]
+
+
class AboutDialog(Toplevel):
"""Modal about dialog for idle
@@ -28,11 +37,12 @@ class AboutDialog(Toplevel):
self.geometry("+%d+%d" % (
parent.winfo_rootx()+30,
parent.winfo_rooty()+(30 if not _htest else 100)))
- self.bg = "#707070"
- self.fg = "#ffffff"
+ self.bg = "#bbbbbb"
+ self.fg = "#000000"
self.create_widgets()
self.resizable(height=False, width=False)
- self.title(title or f'About IDLE {python_version()}')
+ self.title(title or
+ f'About IDLE {python_version()} ({build_bits()} bit)')
self.transient(parent)
self.grab_set()
self.protocol("WM_DELETE_WINDOW", self.ok)