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
9b0bcc1f
Kaydet (Commit)
9b0bcc1f
authored
Tem 09, 2007
tarafından
Ronald Oussoren
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Patch 1693258: Fix for duplicate "preferences" menu-OS X
üst
e3b185f9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
18 deletions
+31
-18
macosxSupport.py
Lib/idlelib/macosxSupport.py
+31
-18
No files found.
Lib/idlelib/macosxSupport.py
Dosyayı görüntüle @
9b0bcc1f
...
@@ -3,6 +3,7 @@ A number of function that enhance IDLE on MacOSX when it used as a normal
...
@@ -3,6 +3,7 @@ A number of function that enhance IDLE on MacOSX when it used as a normal
GUI application (as opposed to an X11 application).
GUI application (as opposed to an X11 application).
"""
"""
import
sys
import
sys
import
Tkinter
def
runningAsOSXApp
():
def
runningAsOSXApp
():
""" Returns True iff running from the IDLE.app bundle on OSX """
""" Returns True iff running from the IDLE.app bundle on OSX """
...
@@ -23,7 +24,11 @@ def addOpenEventSupport(root, flist):
...
@@ -23,7 +24,11 @@ def addOpenEventSupport(root, flist):
root
.
createcommand
(
"::tk::mac::OpenDocument"
,
doOpenFile
)
root
.
createcommand
(
"::tk::mac::OpenDocument"
,
doOpenFile
)
def
hideTkConsole
(
root
):
def
hideTkConsole
(
root
):
root
.
tk
.
call
(
'console'
,
'hide'
)
try
:
root
.
tk
.
call
(
'console'
,
'hide'
)
except
Tkinter
.
TclError
:
# Some versions of the Tk framework don't have a console object
pass
def
overrideRootMenu
(
root
,
flist
):
def
overrideRootMenu
(
root
,
flist
):
"""
"""
...
@@ -75,32 +80,40 @@ def overrideRootMenu(root, flist):
...
@@ -75,32 +80,40 @@ def overrideRootMenu(root, flist):
import
configDialog
import
configDialog
configDialog
.
ConfigDialog
(
root
,
'Settings'
)
configDialog
.
ConfigDialog
(
root
,
'Settings'
)
root
.
bind
(
'<<about-idle>>'
,
about_dialog
)
root
.
bind
(
'<<about-idle>>'
,
about_dialog
)
root
.
bind
(
'<<open-config-dialog>>'
,
config_dialog
)
root
.
bind
(
'<<open-config-dialog>>'
,
config_dialog
)
if
flist
:
if
flist
:
root
.
bind
(
'<<close-all-windows>>'
,
flist
.
close_all_callback
)
root
.
bind
(
'<<close-all-windows>>'
,
flist
.
close_all_callback
)
for
mname
,
entrylist
in
Bindings
.
menudefs
:
menu
=
menudict
.
get
(
mname
)
###check if Tk version >= 8.4.14; if so, use hard-coded showprefs binding
if
not
menu
:
tkversion
=
root
.
tk
.
eval
(
'info patchlevel'
)
continue
if
tkversion
>=
'8.4.14'
:
for
entry
in
entrylist
:
Bindings
.
menudefs
[
0
]
=
(
'application'
,
[
if
not
entry
:
(
'About IDLE'
,
'<<about-idle>>'
),
menu
.
add_separator
()
None
,
])
root
.
createcommand
(
'::tk::mac::ShowPreferences'
,
config_dialog
)
else
:
for
mname
,
entrylist
in
Bindings
.
menudefs
:
menu
=
menudict
.
get
(
mname
)
if
not
menu
:
continue
else
:
else
:
label
,
eventname
=
entry
for
entry
in
entrylist
:
underline
,
label
=
prepstr
(
label
)
if
not
entry
:
accelerator
=
get_accelerator
(
Bindings
.
default_keydefs
,
menu
.
add_separator
()
else
:
label
,
eventname
=
entry
underline
,
label
=
prepstr
(
label
)
accelerator
=
get_accelerator
(
Bindings
.
default_keydefs
,
eventname
)
eventname
)
def
command
(
text
=
root
,
eventname
=
eventname
):
def
command
(
text
=
root
,
eventname
=
eventname
):
text
.
event_generate
(
eventname
)
text
.
event_generate
(
eventname
)
menu
.
add_command
(
label
=
label
,
underline
=
underline
,
menu
.
add_command
(
label
=
label
,
underline
=
underline
,
command
=
command
,
accelerator
=
accelerator
)
command
=
command
,
accelerator
=
accelerator
)
def
setupApp
(
root
,
flist
):
def
setupApp
(
root
,
flist
):
"""
"""
Perform setup for the OSX application bundle.
Perform setup for the OSX application bundle.
...
...
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