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
41a27e02
Kaydet (Commit)
41a27e02
authored
Agu 27, 2015
tarafından
Terry Jan Reedy
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #24782: In Idle extension config dialog, replace tabs with sorted list.
Patch by Mark Roseman.
üst
78d50333
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
31 deletions
+46
-31
configDialog.py
Lib/idlelib/configDialog.py
+46
-31
No files found.
Lib/idlelib/configDialog.py
Dosyayı görüntüle @
41a27e02
...
@@ -1201,9 +1201,6 @@ class VerticalScrolledFrame(Frame):
...
@@ -1201,9 +1201,6 @@ class VerticalScrolledFrame(Frame):
# update the scrollbars to match the size of the inner frame
# update the scrollbars to match the size of the inner frame
size
=
(
interior
.
winfo_reqwidth
(),
interior
.
winfo_reqheight
())
size
=
(
interior
.
winfo_reqwidth
(),
interior
.
winfo_reqheight
())
canvas
.
config
(
scrollregion
=
"0 0
%
s
%
s"
%
size
)
canvas
.
config
(
scrollregion
=
"0 0
%
s
%
s"
%
size
)
if
interior
.
winfo_reqwidth
()
!=
canvas
.
winfo_width
():
# update the canvas's width to fit the inner frame
canvas
.
config
(
width
=
interior
.
winfo_reqwidth
())
interior
.
bind
(
'<Configure>'
,
_configure_interior
)
interior
.
bind
(
'<Configure>'
,
_configure_interior
)
def
_configure_canvas
(
event
):
def
_configure_canvas
(
event
):
...
@@ -1323,38 +1320,56 @@ class ConfigExtensionsDialog(Toplevel):
...
@@ -1323,38 +1320,56 @@ class ConfigExtensionsDialog(Toplevel):
def
create_widgets
(
self
):
def
create_widgets
(
self
):
"""Create the dialog's widgets."""
"""Create the dialog's widgets."""
self
.
extension_names
=
StringVar
(
self
)
self
.
rowconfigure
(
0
,
weight
=
1
)
self
.
rowconfigure
(
0
,
weight
=
1
)
self
.
rowconfigure
(
1
,
weight
=
0
)
self
.
columnconfigure
(
2
,
weight
=
1
)
self
.
columnconfigure
(
0
,
weight
=
1
)
self
.
extension_list
=
Listbox
(
self
,
listvariable
=
self
.
extension_names
,
selectmode
=
'browse'
)
# create the tabbed pages
self
.
extension_list
.
bind
(
'<<ListboxSelect>>'
,
self
.
extension_selected
)
self
.
tabbed_page_set
=
TabbedPageSet
(
scroll
=
Scrollbar
(
self
,
command
=
self
.
extension_list
.
yview
)
self
,
page_names
=
self
.
extensions
.
keys
(),
self
.
extension_list
.
yscrollcommand
=
scroll
.
set
n_rows
=
None
,
max_tabs_per_row
=
5
,
self
.
details_frame
=
LabelFrame
(
self
,
width
=
250
,
height
=
250
)
page_class
=
TabbedPageSet
.
PageRemove
)
self
.
extension_list
.
grid
(
column
=
0
,
row
=
0
,
sticky
=
'nws'
)
self
.
tabbed_page_set
.
grid
(
row
=
0
,
column
=
0
,
sticky
=
NSEW
)
scroll
.
grid
(
column
=
1
,
row
=
0
,
sticky
=
'ns'
)
for
ext_name
in
self
.
extensions
:
self
.
details_frame
.
grid
(
column
=
2
,
row
=
0
,
sticky
=
'nsew'
,
padx
=
[
10
,
0
])
self
.
create_tab_page
(
ext_name
)
self
.
configure
(
padx
=
10
,
pady
=
10
)
self
.
config_frame
=
{}
self
.
create_action_buttons
()
.
grid
(
row
=
1
)
self
.
current_extension
=
None
self
.
outerframe
=
self
# TEMPORARY
self
.
tabbed_page_set
=
self
.
extension_list
# TEMPORARY
# create the individual pages
ext_names
=
''
for
ext_name
in
sorted
(
self
.
extensions
):
self
.
create_extension_frame
(
ext_name
)
ext_names
=
ext_names
+
'{'
+
ext_name
+
'} '
self
.
extension_names
.
set
(
ext_names
)
self
.
extension_list
.
selection_set
(
0
)
self
.
extension_selected
(
None
)
self
.
create_action_buttons
()
.
grid
(
row
=
1
,
columnspan
=
3
)
def
extension_selected
(
self
,
event
):
newsel
=
self
.
extension_list
.
curselection
()
if
newsel
:
newsel
=
self
.
extension_list
.
get
(
newsel
)
if
newsel
is
None
or
newsel
!=
self
.
current_extension
:
if
self
.
current_extension
:
self
.
details_frame
.
config
(
text
=
''
)
self
.
config_frame
[
self
.
current_extension
]
.
grid_forget
()
self
.
current_extension
=
None
if
newsel
:
self
.
details_frame
.
config
(
text
=
newsel
)
self
.
config_frame
[
newsel
]
.
grid
(
column
=
0
,
row
=
0
,
sticky
=
'nsew'
)
self
.
current_extension
=
newsel
create_action_buttons
=
ConfigDialog
.
create_action_buttons
create_action_buttons
=
ConfigDialog
.
create_action_buttons
def
create_tab_page
(
self
,
ext_name
):
def
create_extension_frame
(
self
,
ext_name
):
"""Create the page for an extension."""
"""Create a frame holding the widgets to configure one extension"""
f
=
VerticalScrolledFrame
(
self
.
details_frame
,
height
=
250
,
width
=
250
)
page
=
LabelFrame
(
self
.
tabbed_page_set
.
pages
[
ext_name
]
.
frame
,
self
.
config_frame
[
ext_name
]
=
f
border
=
2
,
padx
=
2
,
relief
=
GROOVE
,
entry_area
=
f
.
interior
text
=
'
%
s '
%
ext_name
)
page
.
pack
(
fill
=
BOTH
,
expand
=
True
,
padx
=
12
,
pady
=
2
)
# create the scrollable frame which will contain the entries
scrolled_frame
=
VerticalScrolledFrame
(
page
,
pady
=
2
,
height
=
250
)
scrolled_frame
.
pack
(
side
=
BOTTOM
,
fill
=
BOTH
,
expand
=
TRUE
)
entry_area
=
scrolled_frame
.
interior
entry_area
.
columnconfigure
(
0
,
weight
=
0
)
entry_area
.
columnconfigure
(
1
,
weight
=
1
)
# create an entry for each configuration option
# create an entry for each configuration option
for
row
,
opt
in
enumerate
(
self
.
extensions
[
ext_name
]):
for
row
,
opt
in
enumerate
(
self
.
extensions
[
ext_name
]):
# create a row with a label and entry/checkbutton
# create a row with a label and entry/checkbutton
...
...
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