Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
dbfe92cd
Kaydet (Commit)
dbfe92cd
authored
Mar 18, 2002
tarafından
Steven M. Gava
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
further work on dynamic reconfiguration;
keybindings
üst
b845f3b4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
0 deletions
+34
-0
EditorWindow.py
Lib/idlelib/EditorWindow.py
+33
-0
configDialog.py
Lib/idlelib/configDialog.py
+1
-0
No files found.
Lib/idlelib/EditorWindow.py
Dosyayı görüntüle @
dbfe92cd
...
...
@@ -492,6 +492,39 @@ class EditorWindow:
idleConf
.
GetOption
(
'main'
,
'EditorWindow'
,
'font-size'
),
fontWeight
))
def
ResetKeybindings
(
self
):
#this function is called from configDialog.py
#to update the keybindings if they are changed
self
.
Bindings
.
default_keydefs
=
idleConf
.
GetCurrentKeySet
()
keydefs
=
self
.
Bindings
.
default_keydefs
for
event
,
keylist
in
keydefs
.
items
():
self
.
text
.
event_delete
(
event
)
self
.
apply_bindings
()
#update menu accelerators
menuEventDict
=
{}
for
menu
in
self
.
Bindings
.
menudefs
:
menuEventDict
[
menu
[
0
]]
=
{}
for
item
in
menu
[
1
]:
if
item
:
menuEventDict
[
menu
[
0
]][
prepstr
(
item
[
0
])[
1
]]
=
item
[
1
]
for
menubarItem
in
self
.
menudict
.
keys
():
menu
=
self
.
menudict
[
menubarItem
]
end
=
menu
.
index
(
END
)
+
1
for
index
in
range
(
0
,
end
):
if
menu
.
type
(
index
)
==
'command'
:
accel
=
menu
.
entrycget
(
index
,
'accelerator'
)
if
accel
:
itemName
=
menu
.
entrycget
(
index
,
'label'
)
event
=
''
if
menuEventDict
.
has_key
(
menubarItem
):
if
menuEventDict
[
menubarItem
]
.
has_key
(
itemName
):
event
=
menuEventDict
[
menubarItem
][
itemName
]
if
event
:
#print 'accel was:',accel
accel
=
get_accelerator
(
keydefs
,
event
)
menu
.
entryconfig
(
index
,
accelerator
=
accel
)
#print 'accel now:',accel,'\n'
def
saved_change_hook
(
self
):
short
=
self
.
short_title
()
long
=
self
.
long_title
()
...
...
Lib/idlelib/configDialog.py
Dosyayı görüntüle @
dbfe92cd
...
...
@@ -1096,6 +1096,7 @@ class ConfigDialog(Toplevel):
for
instance
in
winInstances
:
instance
.
ResetColorizer
()
instance
.
ResetFont
()
instance
.
ResetKeybindings
()
def
Cancel
(
self
):
self
.
destroy
()
...
...
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