Issue #20406: Use Python application icons for Idle window title bars.
Patch mostly by Serhiy Storchaka.
BIN
Lib/idlelib/Icons/idle.ico
Normal file
After Width: | Height: | Size: 19 KiB |
BIN
Lib/idlelib/Icons/idle_16.gif
Normal file
After Width: | Height: | Size: 1 KiB |
BIN
Lib/idlelib/Icons/idle_16.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
Lib/idlelib/Icons/idle_32.gif
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
Lib/idlelib/Icons/idle_32.png
Normal file
After Width: | Height: | Size: 2.5 KiB |
BIN
Lib/idlelib/Icons/idle_48.gif
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
Lib/idlelib/Icons/idle_48.png
Normal file
After Width: | Height: | Size: 4.6 KiB |
|
@ -16,7 +16,7 @@ import io
|
||||||
|
|
||||||
import linecache
|
import linecache
|
||||||
from code import InteractiveInterpreter
|
from code import InteractiveInterpreter
|
||||||
from platform import python_version
|
from platform import python_version, system
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from tkinter import *
|
from tkinter import *
|
||||||
|
@ -1524,6 +1524,18 @@ def main():
|
||||||
# start editor and/or shell windows:
|
# start editor and/or shell windows:
|
||||||
root = Tk(className="Idle")
|
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)
|
fixwordbreaks(root)
|
||||||
root.withdraw()
|
root.withdraw()
|
||||||
flist = PyShellFileList(root)
|
flist = PyShellFileList(root)
|
||||||
|
|
|
@ -316,6 +316,9 @@ Library
|
||||||
IDLE
|
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
|
- Update the python.gif icon for the Idle classbrowser and pathbowser
|
||||||
from the old green snake to the new new blue and yellow snakes.
|
from the old green snake to the new new blue and yellow snakes.
|
||||||
|
|
||||||
|
|