Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
71e75cfa
Commit
71e75cfa
authored
Jun 01, 2014
by
Serhiy Storchaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added missed calls of splitlist().
parent
50051c79
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
9 deletions
+7
-9
Lib/lib-tk/test/test_ttk/test_functions.py
Lib/lib-tk/test/test_ttk/test_functions.py
+0
-2
Lib/lib-tk/tkFont.py
Lib/lib-tk/tkFont.py
+2
-1
Lib/lib-tk/ttk.py
Lib/lib-tk/ttk.py
+5
-6
No files found.
Lib/lib-tk/test/test_ttk/test_functions.py
View file @
71e75cfa
...
...
@@ -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/lib-tk/tkFont.py
View file @
71e75cfa
...
...
@@ -78,7 +78,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
if
font
:
...
...
Lib/lib-tk/ttk.py
View file @
71e75cfa
...
...
@@ -277,6 +277,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
...
...
@@ -295,8 +296,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
...
...
@@ -410,8 +409,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
):
...
...
@@ -465,8 +464,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