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
8381f90e
Kaydet (Commit)
8381f90e
authored
Haz 01, 2014
tarafından
Serhiy Storchaka
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Added missed calls of splitlist().
üst
078b8a81
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
9 deletions
+7
-9
font.py
Lib/tkinter/font.py
+2
-1
test_functions.py
Lib/tkinter/test/test_ttk/test_functions.py
+0
-2
ttk.py
Lib/tkinter/ttk.py
+5
-6
No files found.
Lib/tkinter/font.py
Dosyayı görüntüle @
8381f90e
...
...
@@ -81,7 +81,8 @@ class Font:
if
exists
:
self
.
delete_font
=
False
# confirm font exists
if
self
.
name
not
in
root
.
tk
.
call
(
"font"
,
"names"
):
if
self
.
name
not
in
root
.
tk
.
splitlist
(
root
.
tk
.
call
(
"font"
,
"names"
)):
raise
tkinter
.
_tkinter
.
TclError
(
"named font
%
s does not already exist"
%
(
self
.
name
,))
# if font config info supplied, apply it
...
...
Lib/tkinter/test/test_ttk/test_functions.py
Dosyayı görüntüle @
8381f90e
...
...
@@ -407,8 +407,6 @@ class InternalFunctionsTest(unittest.TestCase):
(
'name'
,
'no_minus'
,
'value'
))
self
.
assertRaises
(
ValueError
,
ttk
.
_list_from_layouttuple
,
tk
,
(
'something'
,
'-children'
))
# no children
self
.
assertRaises
(
ValueError
,
ttk
.
_list_from_layouttuple
,
tk
,
(
'something'
,
'-children'
,
'value'
))
# invalid children
def
test_val_or_dict
(
self
):
...
...
Lib/tkinter/ttk.py
Dosyayı görüntüle @
8381f90e
...
...
@@ -275,6 +275,7 @@ def _list_from_statespec(stuple):
def
_list_from_layouttuple
(
tk
,
ltuple
):
"""Construct a list from the tuple returned by ttk::layout, this is
somewhat the reverse of _format_layoutlist."""
ltuple
=
tk
.
splitlist
(
ltuple
)
res
=
[]
indx
=
0
...
...
@@ -293,8 +294,6 @@ def _list_from_layouttuple(tk, ltuple):
indx
+=
2
if
opt
==
'children'
:
if
not
tk
.
wantobjects
():
val
=
tk
.
splitlist
(
val
)
val
=
_list_from_layouttuple
(
tk
,
val
)
opts
[
opt
]
=
val
...
...
@@ -408,8 +407,8 @@ class Style(object):
return
_list_from_statespec
(
self
.
tk
.
splitlist
(
self
.
tk
.
call
(
self
.
_name
,
"map"
,
style
,
'-
%
s'
%
query_opt
)))
return
_dict_from_tcltuple
(
self
.
tk
.
call
(
self
.
_name
,
"map"
,
style
,
*
(
_format_mapdict
(
kw
))))
return
_dict_from_tcltuple
(
self
.
tk
.
splitlist
(
self
.
tk
.
call
(
self
.
_name
,
"map"
,
style
,
*
(
_format_mapdict
(
kw
))))
)
def
lookup
(
self
,
style
,
option
,
state
=
None
,
default
=
None
):
...
...
@@ -463,8 +462,8 @@ class Style(object):
lspec
=
"null"
# could be any other word, but this may make sense
# when calling layout(style) later
return
_list_from_layouttuple
(
self
.
tk
,
self
.
tk
.
splitlist
(
self
.
tk
.
call
(
self
.
_name
,
"layout"
,
style
,
lspec
))
)
return
_list_from_layouttuple
(
self
.
tk
,
self
.
tk
.
call
(
self
.
_name
,
"layout"
,
style
,
lspec
))
def
element_create
(
self
,
elementname
,
etype
,
*
args
,
**
kw
):
...
...
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