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
f31eec0e
Kaydet (Commit)
f31eec0e
authored
Mar 05, 2002
tarafından
Steven M. Gava
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
further work on new config system
üst
a8e1d81b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
9 deletions
+23
-9
configDialog.py
Lib/idlelib/configDialog.py
+14
-3
keybindingDialog.py
Lib/idlelib/keybindingDialog.py
+9
-6
No files found.
Lib/idlelib/configDialog.py
Dosyayı görüntüle @
f31eec0e
...
...
@@ -463,7 +463,10 @@ class ConfigDialog(Toplevel):
def
VarChanged_themeIsBuiltin
(
self
,
*
params
):
value
=
self
.
themeIsBuiltin
.
get
()
self
.
AddChangedItem
(
'main'
,
'Theme'
,
'default'
,
value
)
self
.
PaintThemeSample
()
if
value
:
self
.
VarChanged_builtinTheme
()
else
:
self
.
VarChanged_customTheme
()
def
VarChanged_highlightTarget
(
self
,
*
params
):
self
.
SetHighlightTarget
()
...
...
@@ -495,9 +498,9 @@ class ConfigDialog(Toplevel):
value
=
self
.
keysAreBuiltin
.
get
()
self
.
AddChangedItem
(
'main'
,
'Keys'
,
'default'
,
value
)
if
value
:
self
.
LoadKeysList
(
self
.
builtinKeys
.
get
()
)
self
.
VarChanged_builtinKeys
(
)
else
:
self
.
LoadKeysList
(
self
.
customKeys
.
get
()
)
self
.
VarChanged_customKeys
(
)
def
VarChanged_winWidth
(
self
,
*
params
):
value
=
self
.
winWidth
.
get
()
...
...
@@ -936,24 +939,31 @@ class ConfigDialog(Toplevel):
type
=
'bool'
,
default
=
1
))
##currently set theme
currentOption
=
idleConf
.
CurrentTheme
()
print
'current option'
,
currentOption
##load available theme option menus
if
self
.
themeIsBuiltin
.
get
():
#default theme selected
print
'builtin theme'
itemList
=
idleConf
.
GetSectionList
(
'default'
,
'highlight'
)
itemList
.
sort
()
print
'builtin items:'
,
itemList
self
.
optMenuThemeBuiltin
.
SetMenu
(
itemList
,
currentOption
)
itemList
=
idleConf
.
GetSectionList
(
'user'
,
'highlight'
)
itemList
.
sort
()
print
'user items:'
,
itemList
if
not
itemList
:
self
.
radioThemeCustom
.
config
(
state
=
DISABLED
)
self
.
customTheme
.
set
(
'- no custom themes -'
)
else
:
self
.
optMenuThemeCustom
.
SetMenu
(
itemList
,
itemList
[
0
])
else
:
#user theme selected
print
'user theme'
itemList
=
idleConf
.
GetSectionList
(
'user'
,
'highlight'
)
itemList
.
sort
()
print
'user items:'
,
itemList
self
.
optMenuThemeCustom
.
SetMenu
(
itemList
,
currentOption
)
itemList
=
idleConf
.
GetSectionList
(
'default'
,
'highlight'
)
itemList
.
sort
()
print
'builtin items:'
,
itemList
self
.
optMenuThemeBuiltin
.
SetMenu
(
itemList
,
itemList
[
0
])
self
.
SetThemeType
()
##load theme element option menu
...
...
@@ -1112,4 +1122,5 @@ if __name__ == '__main__':
root
=
Tk
()
Button
(
root
,
text
=
'Dialog'
,
command
=
lambda
:
ConfigDialog
(
root
,
'Settings'
))
.
pack
()
root
.
instanceDict
=
{}
root
.
mainloop
()
Lib/idlelib/keybindingDialog.py
Dosyayı görüntüle @
f31eec0e
...
...
@@ -142,7 +142,8 @@ class GetKeysDialog(Toplevel):
if
modifiers
:
modifiers
[
0
]
=
'<'
+
modifiers
[
0
]
keyList
=
keyList
+
modifiers
if
finalKey
:
if
(
not
modifiers
)
and
(
finalKey
in
self
.
functionKeys
):
if
(
not
modifiers
)
and
(
finalKey
not
in
self
.
alphanumKeys
+
self
.
punctuationKeys
):
finalKey
=
'<'
+
self
.
TranslateKey
(
finalKey
)
else
:
finalKey
=
self
.
TranslateKey
(
finalKey
)
...
...
@@ -225,16 +226,18 @@ class GetKeysDialog(Toplevel):
tkMessageBox
.
showerror
(
title
=
'Key Sequence Error'
,
message
=
'No final key specified.'
)
keysOk
=
0
elif
(
not
modifiers
)
and
(
finalKey
not
in
self
.
functionKeys
):
#modifier required if not a function key
elif
(
not
modifiers
)
and
(
finalKey
in
self
.
alphanumKeys
+
self
.
punctuationKeys
):
#modifier required
tkMessageBox
.
showerror
(
title
=
'Key Sequence Error'
,
message
=
'No modifier key(s) specified.'
)
keysOk
=
0
elif
(
modifiers
==
[
'Shift'
])
and
(
finalKey
not
in
self
.
functionKeys
):
elif
(
modifiers
==
[
'Shift'
])
and
(
finalKey
not
in
self
.
functionKeys
+
(
'Tab'
,)):
#shift alone is only a useful modifier with a function key
tkMessageBox
.
showerror
(
title
=
'Key Sequence Error'
,
message
=
'Shift alone is
only
a useful modifier '
+
'when used with
a function
key.'
)
message
=
'Shift alone is
not
a useful modifier '
+
'when used with
this final key
key.'
)
keysOk
=
0
elif
keySequence
in
self
.
currentKeySequences
:
#keys combo already in use
tkMessageBox
.
showerror
(
title
=
'Key Sequence Error'
,
...
...
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