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
e48741a6
Kaydet (Commit)
e48741a6
authored
Ock 02, 2013
tarafından
Serhiy Storchaka
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Merge heads
üst
b83a86a2
4cf4f3a7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
48 additions
and
1 deletion
+48
-1
__init__.py
Lib/tkinter/__init__.py
+1
-1
test_misc.py
Lib/tkinter/test/test_tkinter/test_misc.py
+45
-0
NEWS
Misc/NEWS
+2
-0
No files found.
Lib/tkinter/__init__.py
Dosyayı görüntüle @
e48741a6
...
@@ -380,7 +380,7 @@ class Misc:
...
@@ -380,7 +380,7 @@ class Misc:
background, highlightColor, selectForeground,
background, highlightColor, selectForeground,
disabledForeground, insertBackground, troughColor."""
disabledForeground, insertBackground, troughColor."""
self
.
tk
.
call
((
'tk_setPalette'
,)
self
.
tk
.
call
((
'tk_setPalette'
,)
+
_flatten
(
args
)
+
_flatten
(
kw
.
items
(
)))
+
_flatten
(
args
)
+
_flatten
(
list
(
kw
.
items
()
)))
def
tk_menuBar
(
self
,
*
args
):
def
tk_menuBar
(
self
,
*
args
):
"""Do not use. Needed in Tk 3.6 and earlier."""
"""Do not use. Needed in Tk 3.6 and earlier."""
pass
# obsolete since Tk 4.0
pass
# obsolete since Tk 4.0
...
...
Lib/tkinter/test/test_tkinter/test_misc.py
0 → 100644
Dosyayı görüntüle @
e48741a6
import
unittest
import
tkinter
from
tkinter
import
ttk
from
test
import
support
support
.
requires
(
'gui'
)
class
MiscTest
(
unittest
.
TestCase
):
def
setUp
(
self
):
self
.
root
=
ttk
.
setup_master
()
def
test_tk_setPalette
(
self
):
root
=
self
.
root
root
.
tk_setPalette
(
'black'
)
self
.
assertEqual
(
root
[
'background'
],
'black'
)
root
.
tk_setPalette
(
'white'
)
self
.
assertEqual
(
root
[
'background'
],
'white'
)
self
.
assertRaisesRegex
(
tkinter
.
TclError
,
'^unknown color name "spam"$'
,
root
.
tk_setPalette
,
'spam'
)
root
.
tk_setPalette
(
background
=
'black'
)
self
.
assertEqual
(
root
[
'background'
],
'black'
)
root
.
tk_setPalette
(
background
=
'blue'
,
highlightColor
=
'yellow'
)
self
.
assertEqual
(
root
[
'background'
],
'blue'
)
self
.
assertEqual
(
root
[
'highlightcolor'
],
'yellow'
)
root
.
tk_setPalette
(
background
=
'yellow'
,
highlightColor
=
'blue'
)
self
.
assertEqual
(
root
[
'background'
],
'yellow'
)
self
.
assertEqual
(
root
[
'highlightcolor'
],
'blue'
)
self
.
assertRaisesRegex
(
tkinter
.
TclError
,
'^unknown color name "spam"$'
,
root
.
tk_setPalette
,
background
=
'spam'
)
self
.
assertRaisesRegex
(
tkinter
.
TclError
,
'^must specify a background color$'
,
root
.
tk_setPalette
,
spam
=
'white'
)
self
.
assertRaisesRegex
(
tkinter
.
TclError
,
'^must specify a background color$'
,
root
.
tk_setPalette
,
highlightColor
=
'blue'
)
tests_gui
=
(
MiscTest
,
)
if
__name__
==
"__main__"
:
support
.
run_unittest
(
*
tests_gui
)
Misc/NEWS
Dosyayı görüntüle @
e48741a6
...
@@ -189,6 +189,8 @@ Core and Builtins
...
@@ -189,6 +189,8 @@ Core and Builtins
Library
Library
-------
-------
- Issue #16541: tk_setPalette() now works with keyword arguments.
- Issue #16820: In configparser, `parser.popitem()` no longer raises ValueError.
- Issue #16820: In configparser, `parser.popitem()` no longer raises ValueError.
This makes `parser.clean()` work correctly.
This makes `parser.clean()` work correctly.
...
...
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