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
a0082788
Kaydet (Commit)
a0082788
authored
May 16, 2012
tarafından
Ned Deily
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Issue #14777: merge
üst
c8e106ba
4d377d98
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
2 deletions
+32
-2
__init__.py
Lib/tkinter/__init__.py
+26
-2
NEWS
Misc/NEWS
+6
-0
No files found.
Lib/tkinter/__init__.py
Dosyayı görüntüle @
a0082788
...
@@ -540,12 +540,19 @@ class Misc:
...
@@ -540,12 +540,19 @@ class Misc:
The type keyword specifies the form in which the data is
The type keyword specifies the form in which the data is
to be returned and should be an atom name such as STRING
to be returned and should be an atom name such as STRING
or FILE_NAME. Type defaults to STRING.
or FILE_NAME. Type defaults to STRING, except on X11, where the default
is to try UTF8_STRING and fall back to STRING.
This command is equivalent to:
This command is equivalent to:
selection_get(CLIPBOARD)
selection_get(CLIPBOARD)
"""
"""
if
'type'
not
in
kw
and
self
.
_windowingsystem
==
'x11'
:
try
:
kw
[
'type'
]
=
'UTF8_STRING'
return
self
.
tk
.
call
((
'clipboard'
,
'get'
)
+
self
.
_options
(
kw
))
except
TclError
:
del
kw
[
'type'
]
return
self
.
tk
.
call
((
'clipboard'
,
'get'
)
+
self
.
_options
(
kw
))
return
self
.
tk
.
call
((
'clipboard'
,
'get'
)
+
self
.
_options
(
kw
))
def
clipboard_clear
(
self
,
**
kw
):
def
clipboard_clear
(
self
,
**
kw
):
...
@@ -627,8 +634,16 @@ class Misc:
...
@@ -627,8 +634,16 @@ class Misc:
A keyword parameter selection specifies the name of
A keyword parameter selection specifies the name of
the selection and defaults to PRIMARY. A keyword
the selection and defaults to PRIMARY. A keyword
parameter displayof specifies a widget on the display
parameter displayof specifies a widget on the display
to use."""
to use. A keyword parameter type specifies the form of data to be
fetched, defaulting to STRING except on X11, where UTF8_STRING is tried
before STRING."""
if
'displayof'
not
in
kw
:
kw
[
'displayof'
]
=
self
.
_w
if
'displayof'
not
in
kw
:
kw
[
'displayof'
]
=
self
.
_w
if
'type'
not
in
kw
and
self
.
_windowingsystem
==
'x11'
:
try
:
kw
[
'type'
]
=
'UTF8_STRING'
return
self
.
tk
.
call
((
'selection'
,
'get'
)
+
self
.
_options
(
kw
))
except
TclError
:
del
kw
[
'type'
]
return
self
.
tk
.
call
((
'selection'
,
'get'
)
+
self
.
_options
(
kw
))
return
self
.
tk
.
call
((
'selection'
,
'get'
)
+
self
.
_options
(
kw
))
def
selection_handle
(
self
,
command
,
**
kw
):
def
selection_handle
(
self
,
command
,
**
kw
):
"""Specify a function COMMAND to call if the X
"""Specify a function COMMAND to call if the X
...
@@ -1043,6 +1058,15 @@ class Misc:
...
@@ -1043,6 +1058,15 @@ class Misc:
if
displayof
is
None
:
if
displayof
is
None
:
return
(
'-displayof'
,
self
.
_w
)
return
(
'-displayof'
,
self
.
_w
)
return
()
return
()
@property
def
_windowingsystem
(
self
):
"""Internal function."""
try
:
return
self
.
_root
()
.
_windowingsystem_cached
except
AttributeError
:
ws
=
self
.
_root
()
.
_windowingsystem_cached
=
\
self
.
tk
.
call
(
'tk'
,
'windowingsystem'
)
return
ws
def
_options
(
self
,
cnf
,
kw
=
None
):
def
_options
(
self
,
cnf
,
kw
=
None
):
"""Internal function."""
"""Internal function."""
if
kw
:
if
kw
:
...
...
Misc/NEWS
Dosyayı görüntüle @
a0082788
...
@@ -34,6 +34,12 @@ Core and Builtins
...
@@ -34,6 +34,12 @@ Core and Builtins
Library
Library
-------
-------
- Issue #14777: tkinter may return undecoded UTF-8 bytes as a string when
accessing the Tk clipboard. Modify clipboad_get() to first request type
UTF8_STRING when no specific type is requested in an X11 windowing
environment, falling back to the current default type STRING if that fails.
Original patch by Thomas Kluyver.
- Issue #14773: Fix os.fwalk() failing on dangling symlinks.
- Issue #14773: Fix os.fwalk() failing on dangling symlinks.
- Issue #12541: Be lenient with quotes around Realm field of HTTP Basic
- Issue #12541: Be lenient with quotes around Realm field of HTTP Basic
...
...
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