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
58103d3b
Commit
58103d3b
authored
Nov 20, 1996
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Turn leading minus sign into underscore for image widget name -- the
hyphen confused Tk into thinking the name was an option.
parent
27cb8a48
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
6 deletions
+10
-6
Lib/lib-tk/Tkinter.py
Lib/lib-tk/Tkinter.py
+5
-3
Lib/tkinter/Tkinter.py
Lib/tkinter/Tkinter.py
+5
-3
No files found.
Lib/lib-tk/Tkinter.py
View file @
58103d3b
...
...
@@ -54,7 +54,6 @@ def _cnfmerge(cnfs):
if
type
(
cnfs
)
is
DictionaryType
:
return
cnfs
elif
type
(
cnfs
)
in
(
NoneType
,
StringType
):
return
cnfs
else
:
cnf
=
{}
...
...
@@ -1531,7 +1530,6 @@ class _setit:
def
__init__
(
self
,
var
,
value
):
self
.
__value
=
value
self
.
__var
=
var
def
__call__
(
self
,
*
args
):
self
.
__var
.
set
(
self
.
__value
)
...
...
@@ -1564,7 +1562,11 @@ class Image:
master
=
_default_root
if
not
master
:
raise
RuntimeError
,
'Too early to create image'
self
.
tk
=
master
.
tk
if
not
name
:
name
=
`id(self)`
if
not
name
:
name
=
`id(self)`
# The following is needed for systems where id(x)
# can return a negative number, such as Linux/m68k:
if
name
[
0
]
==
'-'
:
name
=
'_'
+
name
[
1
:]
if
kw
and
cnf
:
cnf
=
_cnfmerge
((
cnf
,
kw
))
elif
kw
:
cnf
=
kw
options
=
()
...
...
Lib/tkinter/Tkinter.py
View file @
58103d3b
...
...
@@ -54,7 +54,6 @@ def _cnfmerge(cnfs):
if
type
(
cnfs
)
is
DictionaryType
:
return
cnfs
elif
type
(
cnfs
)
in
(
NoneType
,
StringType
):
return
cnfs
else
:
cnf
=
{}
...
...
@@ -1531,7 +1530,6 @@ class _setit:
def
__init__
(
self
,
var
,
value
):
self
.
__value
=
value
self
.
__var
=
var
def
__call__
(
self
,
*
args
):
self
.
__var
.
set
(
self
.
__value
)
...
...
@@ -1564,7 +1562,11 @@ class Image:
master
=
_default_root
if
not
master
:
raise
RuntimeError
,
'Too early to create image'
self
.
tk
=
master
.
tk
if
not
name
:
name
=
`id(self)`
if
not
name
:
name
=
`id(self)`
# The following is needed for systems where id(x)
# can return a negative number, such as Linux/m68k:
if
name
[
0
]
==
'-'
:
name
=
'_'
+
name
[
1
:]
if
kw
and
cnf
:
cnf
=
_cnfmerge
((
cnf
,
kw
))
elif
kw
:
cnf
=
kw
options
=
()
...
...
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