diff options
author | Terry Jan Reedy <tjreedy@udel.edu> | 2014-02-08 14:02:26 (GMT) |
---|---|---|
committer | Terry Jan Reedy <tjreedy@udel.edu> | 2014-02-08 14:02:26 (GMT) |
commit | a7c07d320b528dbc991f5ef2a8791026e784ea1f (patch) | |
tree | 9bc3b39f4f7308b10d5e5d31899c57920d78f469 | |
parent | 98585b6c0442b1f186129aa1cf5db27dde74f829 (diff) | |
download | cpython-a7c07d320b528dbc991f5ef2a8791026e784ea1f.zip cpython-a7c07d320b528dbc991f5ef2a8791026e784ea1f.tar.gz cpython-a7c07d320b528dbc991f5ef2a8791026e784ea1f.tar.bz2 |
Issue #20406: Use Python application icons for Idle window title bars.
Patch mostly by Serhiy Storchaka.
-rw-r--r-- | Lib/idlelib/Icons/idle.ico | bin | 0 -> 19790 bytes | |||
-rw-r--r-- | Lib/idlelib/Icons/idle_16.gif | bin | 0 -> 1034 bytes | |||
-rw-r--r-- | Lib/idlelib/Icons/idle_16.png | bin | 0 -> 1264 bytes | |||
-rw-r--r-- | Lib/idlelib/Icons/idle_32.gif | bin | 0 -> 1435 bytes | |||
-rw-r--r-- | Lib/idlelib/Icons/idle_32.png | bin | 0 -> 2542 bytes | |||
-rw-r--r-- | Lib/idlelib/Icons/idle_48.gif | bin | 0 -> 1388 bytes | |||
-rw-r--r-- | Lib/idlelib/Icons/idle_48.png | bin | 0 -> 4710 bytes | |||
-rwxr-xr-x | Lib/idlelib/PyShell.py | 14 | ||||
-rw-r--r-- | Misc/NEWS | 3 |
9 files changed, 16 insertions, 1 deletions
diff --git a/Lib/idlelib/Icons/idle.ico b/Lib/idlelib/Icons/idle.ico Binary files differnew file mode 100644 index 0000000..3357aef --- /dev/null +++ b/Lib/idlelib/Icons/idle.ico diff --git a/Lib/idlelib/Icons/idle_16.gif b/Lib/idlelib/Icons/idle_16.gif Binary files differnew file mode 100644 index 0000000..9f001b1 --- /dev/null +++ b/Lib/idlelib/Icons/idle_16.gif diff --git a/Lib/idlelib/Icons/idle_16.png b/Lib/idlelib/Icons/idle_16.png Binary files differnew file mode 100644 index 0000000..6abde0a --- /dev/null +++ b/Lib/idlelib/Icons/idle_16.png diff --git a/Lib/idlelib/Icons/idle_32.gif b/Lib/idlelib/Icons/idle_32.gif Binary files differnew file mode 100644 index 0000000..af5b2d5 --- /dev/null +++ b/Lib/idlelib/Icons/idle_32.gif diff --git a/Lib/idlelib/Icons/idle_32.png b/Lib/idlelib/Icons/idle_32.png Binary files differnew file mode 100644 index 0000000..41b70db --- /dev/null +++ b/Lib/idlelib/Icons/idle_32.png diff --git a/Lib/idlelib/Icons/idle_48.gif b/Lib/idlelib/Icons/idle_48.gif Binary files differnew file mode 100644 index 0000000..fc5304f --- /dev/null +++ b/Lib/idlelib/Icons/idle_48.gif diff --git a/Lib/idlelib/Icons/idle_48.png b/Lib/idlelib/Icons/idle_48.png Binary files differnew file mode 100644 index 0000000..e5fa928 --- /dev/null +++ b/Lib/idlelib/Icons/idle_48.png diff --git a/Lib/idlelib/PyShell.py b/Lib/idlelib/PyShell.py index 55fd357..2e5ebb2 100755 --- a/Lib/idlelib/PyShell.py +++ b/Lib/idlelib/PyShell.py @@ -16,7 +16,7 @@ import io import linecache from code import InteractiveInterpreter -from platform import python_version +from platform import python_version, system try: from tkinter import * @@ -1524,6 +1524,18 @@ def main(): # start editor and/or shell windows: root = Tk(className="Idle") + # set application icon + icondir = os.path.join(os.path.dirname(__file__), 'Icons') + if system() == 'Windows': + iconfile = os.path.join(icondir, 'idle.ico') + root.wm_iconbitmap(default=iconfile) + elif TkVersion >= 8.5: + ext = '.png' if TkVersion >= 8.6 else '.gif' + iconfiles = [os.path.join(icondir, 'idle_%d%s' % (size, ext)) + for size in (16, 32, 48)] + icons = [PhotoImage(file=iconfile) for iconfile in iconfiles] + root.wm_iconphoto(True, *icons) + fixwordbreaks(root) root.withdraw() flist = PyShellFileList(root) @@ -316,6 +316,9 @@ Library IDLE ---- +- Issue #20406: Use Python application icons for Idle window title bars. + Patch mostly by Serhiy Storchaka. + - Update the python.gif icon for the Idle classbrowser and pathbowser from the old green snake to the new new blue and yellow snakes. |