mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
gh-96491: Deduplicate version in IDLE shell title (#139841)
Saving to a file added both the filename and repeated the version. --------- Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
This commit is contained in:
parent
ff7bb565d8
commit
d4e5802588
5 changed files with 10 additions and 5 deletions
|
|
@ -33,7 +33,6 @@
|
|||
|
||||
# The default tab setting for a Text widget, in average-width characters.
|
||||
TK_TABWIDTH_DEFAULT = 8
|
||||
_py_version = ' (%s)' % platform.python_version()
|
||||
darwin = sys.platform == 'darwin'
|
||||
|
||||
def _sphinx_version():
|
||||
|
|
@ -1008,12 +1007,16 @@ def open_recent_file(fn_closure=file_name):
|
|||
def saved_change_hook(self):
|
||||
short = self.short_title()
|
||||
long = self.long_title()
|
||||
_py_version = ' (%s)' % platform.python_version()
|
||||
if short and long and not macosx.isCocoaTk():
|
||||
# Don't use both values on macOS because
|
||||
# that doesn't match platform conventions.
|
||||
title = short + " - " + long + _py_version
|
||||
elif short:
|
||||
title = short
|
||||
if short == "IDLE Shell":
|
||||
title = short + " " + platform.python_version()
|
||||
else:
|
||||
title = short + _py_version
|
||||
elif long:
|
||||
title = long
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue