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
2240533b
Kaydet (Commit)
2240533b
authored
Tem 30, 2014
tarafından
Terry Jan Reedy
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #22068: Don't create self reference cycles in idlelib.ConfigDialog.
üst
74596a88
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
29 deletions
+38
-29
configDialog.py
Lib/idlelib/configDialog.py
+38
-29
No files found.
Lib/idlelib/configDialog.py
Dosyayı görüntüle @
2240533b
...
@@ -30,6 +30,7 @@ class ConfigDialog(Toplevel):
...
@@ -30,6 +30,7 @@ class ConfigDialog(Toplevel):
_utest - bool, don't wait_window when running unittest
_utest - bool, don't wait_window when running unittest
"""
"""
Toplevel
.
__init__
(
self
,
parent
)
Toplevel
.
__init__
(
self
,
parent
)
self
.
parent
=
parent
self
.
wm_withdraw
()
self
.
wm_withdraw
()
self
.
configure
(
borderwidth
=
5
)
self
.
configure
(
borderwidth
=
5
)
...
@@ -61,7 +62,6 @@ class ConfigDialog(Toplevel):
...
@@ -61,7 +62,6 @@ class ConfigDialog(Toplevel):
self
.
transient
(
parent
)
self
.
transient
(
parent
)
self
.
grab_set
()
self
.
grab_set
()
self
.
protocol
(
"WM_DELETE_WINDOW"
,
self
.
Cancel
)
self
.
protocol
(
"WM_DELETE_WINDOW"
,
self
.
Cancel
)
self
.
parent
=
parent
self
.
tabPages
.
focus_set
()
self
.
tabPages
.
focus_set
()
#key bindings for this dialog
#key bindings for this dialog
#self.bind('<Escape>',self.Cancel) #dismiss dialog, no save
#self.bind('<Escape>',self.Cancel) #dismiss dialog, no save
...
@@ -112,12 +112,13 @@ class ConfigDialog(Toplevel):
...
@@ -112,12 +112,13 @@ class ConfigDialog(Toplevel):
self
.
tabPages
.
pack
(
side
=
TOP
,
expand
=
TRUE
,
fill
=
BOTH
)
self
.
tabPages
.
pack
(
side
=
TOP
,
expand
=
TRUE
,
fill
=
BOTH
)
def
CreatePageFontTab
(
self
):
def
CreatePageFontTab
(
self
):
#tkVars
parent
=
self
.
parent
self
.
fontSize
=
StringVar
(
self
)
self
.
fontSize
=
StringVar
(
parent
)
self
.
fontBold
=
BooleanVar
(
self
)
self
.
fontBold
=
BooleanVar
(
parent
)
self
.
fontName
=
StringVar
(
self
)
self
.
fontName
=
StringVar
(
parent
)
self
.
spaceNum
=
IntVar
(
self
)
self
.
spaceNum
=
IntVar
(
parent
)
self
.
editFont
=
tkFont
.
Font
(
self
,(
'courier'
,
10
,
'normal'
))
self
.
editFont
=
tkFont
.
Font
(
parent
,(
'courier'
,
10
,
'normal'
))
##widget creation
##widget creation
#body frame
#body frame
frame
=
self
.
tabPages
.
pages
[
'Fonts/Tabs'
]
.
frame
frame
=
self
.
tabPages
.
pages
[
'Fonts/Tabs'
]
.
frame
...
@@ -153,6 +154,7 @@ class ConfigDialog(Toplevel):
...
@@ -153,6 +154,7 @@ class ConfigDialog(Toplevel):
self
.
scaleSpaceNum
=
Scale
(
frameIndentSize
,
variable
=
self
.
spaceNum
,
self
.
scaleSpaceNum
=
Scale
(
frameIndentSize
,
variable
=
self
.
spaceNum
,
orient
=
'horizontal'
,
orient
=
'horizontal'
,
tickinterval
=
2
,
from_
=
2
,
to
=
16
)
tickinterval
=
2
,
from_
=
2
,
to
=
16
)
#widget packing
#widget packing
#body
#body
frameFont
.
pack
(
side
=
LEFT
,
padx
=
5
,
pady
=
5
,
expand
=
TRUE
,
fill
=
BOTH
)
frameFont
.
pack
(
side
=
LEFT
,
padx
=
5
,
pady
=
5
,
expand
=
TRUE
,
fill
=
BOTH
)
...
@@ -175,13 +177,15 @@ class ConfigDialog(Toplevel):
...
@@ -175,13 +177,15 @@ class ConfigDialog(Toplevel):
return
frame
return
frame
def
CreatePageHighlight
(
self
):
def
CreatePageHighlight
(
self
):
self
.
builtinTheme
=
StringVar
(
self
)
parent
=
self
.
parent
self
.
customTheme
=
StringVar
(
self
)
self
.
builtinTheme
=
StringVar
(
parent
)
self
.
fgHilite
=
BooleanVar
(
self
)
self
.
customTheme
=
StringVar
(
parent
)
self
.
colour
=
StringVar
(
self
)
self
.
fgHilite
=
BooleanVar
(
parent
)
self
.
fontName
=
StringVar
(
self
)
self
.
colour
=
StringVar
(
parent
)
self
.
themeIsBuiltin
=
BooleanVar
(
self
)
self
.
fontName
=
StringVar
(
parent
)
self
.
highlightTarget
=
StringVar
(
self
)
self
.
themeIsBuiltin
=
BooleanVar
(
parent
)
self
.
highlightTarget
=
StringVar
(
parent
)
##widget creation
##widget creation
#body frame
#body frame
frame
=
self
.
tabPages
.
pages
[
'Highlighting'
]
.
frame
frame
=
self
.
tabPages
.
pages
[
'Highlighting'
]
.
frame
...
@@ -240,6 +244,7 @@ class ConfigDialog(Toplevel):
...
@@ -240,6 +244,7 @@ class ConfigDialog(Toplevel):
self
.
customTheme
,
None
,
command
=
None
)
self
.
customTheme
,
None
,
command
=
None
)
self
.
buttonDeleteCustomTheme
=
Button
(
frameTheme
,
text
=
'Delete Custom Theme'
,
self
.
buttonDeleteCustomTheme
=
Button
(
frameTheme
,
text
=
'Delete Custom Theme'
,
command
=
self
.
DeleteCustomTheme
)
command
=
self
.
DeleteCustomTheme
)
##widget packing
##widget packing
#body
#body
frameCustom
.
pack
(
side
=
LEFT
,
padx
=
5
,
pady
=
5
,
expand
=
TRUE
,
fill
=
BOTH
)
frameCustom
.
pack
(
side
=
LEFT
,
padx
=
5
,
pady
=
5
,
expand
=
TRUE
,
fill
=
BOTH
)
...
@@ -264,12 +269,13 @@ class ConfigDialog(Toplevel):
...
@@ -264,12 +269,13 @@ class ConfigDialog(Toplevel):
return
frame
return
frame
def
CreatePageKeys
(
self
):
def
CreatePageKeys
(
self
):
#tkVars
parent
=
self
.
parent
self
.
bindingTarget
=
StringVar
(
self
)
self
.
bindingTarget
=
StringVar
(
parent
)
self
.
builtinKeys
=
StringVar
(
self
)
self
.
builtinKeys
=
StringVar
(
parent
)
self
.
customKeys
=
StringVar
(
self
)
self
.
customKeys
=
StringVar
(
parent
)
self
.
keysAreBuiltin
=
BooleanVar
(
self
)
self
.
keysAreBuiltin
=
BooleanVar
(
parent
)
self
.
keyBinding
=
StringVar
(
self
)
self
.
keyBinding
=
StringVar
(
parent
)
##widget creation
##widget creation
#body frame
#body frame
frame
=
self
.
tabPages
.
pages
[
'Keys'
]
.
frame
frame
=
self
.
tabPages
.
pages
[
'Keys'
]
.
frame
...
@@ -307,6 +313,7 @@ class ConfigDialog(Toplevel):
...
@@ -307,6 +313,7 @@ class ConfigDialog(Toplevel):
command
=
self
.
DeleteCustomKeys
)
command
=
self
.
DeleteCustomKeys
)
buttonSaveCustomKeys
=
Button
(
frames
[
1
],
buttonSaveCustomKeys
=
Button
(
frames
[
1
],
text
=
'Save as New Custom Key Set'
,
command
=
self
.
SaveAsNewKeySet
)
text
=
'Save as New Custom Key Set'
,
command
=
self
.
SaveAsNewKeySet
)
##widget packing
##widget packing
#body
#body
frameCustom
.
pack
(
side
=
BOTTOM
,
padx
=
5
,
pady
=
5
,
expand
=
TRUE
,
fill
=
BOTH
)
frameCustom
.
pack
(
side
=
BOTTOM
,
padx
=
5
,
pady
=
5
,
expand
=
TRUE
,
fill
=
BOTH
)
...
@@ -333,15 +340,16 @@ class ConfigDialog(Toplevel):
...
@@ -333,15 +340,16 @@ class ConfigDialog(Toplevel):
return
frame
return
frame
def
CreatePageGeneral
(
self
):
def
CreatePageGeneral
(
self
):
#tkVars
parent
=
self
.
parent
self
.
winWidth
=
StringVar
(
self
)
self
.
winWidth
=
StringVar
(
parent
)
self
.
winHeight
=
StringVar
(
self
)
self
.
winHeight
=
StringVar
(
parent
)
self
.
paraWidth
=
StringVar
(
self
)
self
.
paraWidth
=
StringVar
(
parent
)
self
.
startupEdit
=
IntVar
(
self
)
self
.
startupEdit
=
IntVar
(
parent
)
self
.
autoSave
=
IntVar
(
self
)
self
.
autoSave
=
IntVar
(
parent
)
self
.
encoding
=
StringVar
(
self
)
self
.
encoding
=
StringVar
(
parent
)
self
.
userHelpBrowser
=
BooleanVar
(
self
)
self
.
userHelpBrowser
=
BooleanVar
(
parent
)
self
.
helpBrowser
=
StringVar
(
self
)
self
.
helpBrowser
=
StringVar
(
parent
)
#widget creation
#widget creation
#body
#body
frame
=
self
.
tabPages
.
pages
[
'General'
]
.
frame
frame
=
self
.
tabPages
.
pages
[
'General'
]
.
frame
...
@@ -395,6 +403,7 @@ class ConfigDialog(Toplevel):
...
@@ -395,6 +403,7 @@ class ConfigDialog(Toplevel):
width
=
8
,
command
=
self
.
HelpListItemAdd
)
width
=
8
,
command
=
self
.
HelpListItemAdd
)
self
.
buttonHelpListRemove
=
Button
(
frameHelpListButtons
,
text
=
'Remove'
,
self
.
buttonHelpListRemove
=
Button
(
frameHelpListButtons
,
text
=
'Remove'
,
state
=
DISABLED
,
width
=
8
,
command
=
self
.
HelpListItemRemove
)
state
=
DISABLED
,
width
=
8
,
command
=
self
.
HelpListItemRemove
)
#widget packing
#widget packing
#body
#body
frameRun
.
pack
(
side
=
TOP
,
padx
=
5
,
pady
=
5
,
fill
=
X
)
frameRun
.
pack
(
side
=
TOP
,
padx
=
5
,
pady
=
5
,
fill
=
X
)
...
...
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