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
ec73dc67
Commit
ec73dc67
authored
Feb 15, 2000
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support for Moshe's status bar.
parent
17752f7c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
2 deletions
+20
-2
Tools/idle/EditorWindow.py
Tools/idle/EditorWindow.py
+20
-2
No files found.
Tools/idle/EditorWindow.py
View file @
ec73dc67
...
...
@@ -85,6 +85,7 @@ class EditorWindow:
from
IOBinding
import
IOBinding
import
Bindings
from
Tkinter
import
Toplevel
from
MultiStatusBar
import
MultiStatusBar
about_title
=
about_title
about_text
=
about_text
...
...
@@ -101,7 +102,8 @@ class EditorWindow:
self
.
menubar
=
Menu
(
root
)
self
.
top
=
top
=
self
.
Toplevel
(
root
,
menu
=
self
.
menubar
)
self
.
vbar
=
vbar
=
Scrollbar
(
top
,
name
=
'vbar'
)
self
.
text
=
text
=
Text
(
top
,
name
=
'text'
,
padx
=
5
,
self
.
text_frame
=
text_frame
=
Frame
(
top
)
self
.
text
=
text
=
Text
(
text_frame
,
name
=
'text'
,
padx
=
5
,
foreground
=
cprefs
.
CNormal
[
0
],
background
=
cprefs
.
CNormal
[
1
],
highlightcolor
=
cprefs
.
CHilite
[
0
],
...
...
@@ -139,7 +141,8 @@ class EditorWindow:
if
sys
.
platform
[:
3
]
==
'win'
:
text
[
'font'
]
=
(
"lucida console"
,
8
)
# text['font'] = ("courier new", 10)
text
.
pack
(
side
=
LEFT
,
fill
=
BOTH
,
expand
=
1
)
text_frame
.
pack
(
side
=
LEFT
,
fill
=
BOTH
,
expand
=
1
)
text
.
pack
(
side
=
TOP
,
fill
=
BOTH
,
expand
=
1
)
text
.
focus_set
()
self
.
per
=
per
=
self
.
Percolator
(
text
)
...
...
@@ -186,6 +189,21 @@ class EditorWindow:
if
self
.
extensions
.
has_key
(
'AutoIndent'
):
self
.
extensions
[
'AutoIndent'
].
set_indentation_params
(
self
.
ispythonsource
(
filename
))
self
.
set_status_bar
()
def
set_status_bar
(
self
):
self
.
status_bar
=
self
.
MultiStatusBar
(
self
.
text_frame
)
self
.
status_bar
.
set_label
(
'column'
,
'Col: ?'
,
side
=
RIGHT
)
self
.
status_bar
.
set_label
(
'line'
,
'Ln: ?'
,
side
=
RIGHT
)
self
.
status_bar
.
pack
(
side
=
BOTTOM
,
fill
=
X
)
self
.
text
.
bind
(
'<KeyRelease>'
,
self
.
set_line_and_column
)
self
.
text
.
bind
(
'<ButtonRelease>'
,
self
.
set_line_and_column
)
self
.
text
.
after_idle
(
self
.
set_line_and_column
)
def
set_line_and_column
(
self
,
event
=
None
):
line
,
column
=
string
.
split
(
self
.
text
.
index
(
INSERT
),
'.'
)
self
.
status_bar
.
set_label
(
'column'
,
'Col: %s'
%
column
)
self
.
status_bar
.
set_label
(
'line'
,
'Ln: %s'
%
line
)
def
wakeup
(
self
):
if
self
.
top
.
wm_state
()
==
"iconic"
:
...
...
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