Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
ba8f8d61
Commit
ba8f8d61
authored
Aug 14, 2014
by
Terry Jan Reedy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #17390: Adjust Editor window title. Remove 'Python', move version to end.
parent
82b46ee1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
Lib/idlelib/EditorWindow.py
Lib/idlelib/EditorWindow.py
+5
-4
No files found.
Lib/idlelib/EditorWindow.py
View file @
ba8f8d61
import
sys
import
os
from
platform
import
python_version
import
platform
import
re
import
imp
from
Tkinter
import
*
...
...
@@ -22,6 +22,8 @@ from idlelib import macosxSupport
# The default tab setting for a Text widget, in average-width characters.
TK_TABWIDTH_DEFAULT
=
8
_py_version
=
' (%s)'
%
platform
.
python_version
()
def
_sphinx_version
():
"Format sys.version_info to produce the Sphinx version string used to install the chm docs"
major
,
minor
,
micro
,
level
,
serial
=
sys
.
version_info
...
...
@@ -944,7 +946,7 @@ class EditorWindow(object):
short
=
self
.
short_title
()
long
=
self
.
long_title
()
if
short
and
long
:
title
=
short
+
" - "
+
long
title
=
short
+
" - "
+
long
+
_py_version
elif
short
:
title
=
short
elif
long
:
...
...
@@ -968,14 +970,13 @@ class EditorWindow(object):
self
.
undo
.
reset_undo
()
def
short_title
(
self
):
pyversion
=
"Python "
+
python_version
()
+
": "
filename
=
self
.
io
.
filename
if
filename
:
filename
=
os
.
path
.
basename
(
filename
)
else
:
filename
=
"Untitled"
# return unicode string to display non-ASCII chars correctly
return
pyversion
+
self
.
_filename_to_unicode
(
filename
)
return
self
.
_filename_to_unicode
(
filename
)
def
long_title
(
self
):
# return unicode string to display non-ASCII chars correctly
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment