Your IP : 18.119.255.170


Current Path : /opt/alt/python35/lib64/python3.5/idlelib/__pycache__/
Upload File :
Current File : //opt/alt/python35/lib64/python3.5/idlelib/__pycache__/macosxSupport.cpython-35.opt-2.pyc



���]�!�@s�ddlZddlZddlmZddlZdd�Zdd�Zdadd�Zd	d
�Z	dd�Z
d
d�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�ZdS)�N)�pathcCstjdtdd�t�S)Nz/runningAsOSXApp() is deprecated, use isAquaTk()�
stacklevel�)�warnings�warn�DeprecationWarning�isAquaTk�r	r	�2/opt/alt/python35/lib64/python3.5/macosxSupport.py�runningAsOSXApp	s	
rcCstjdtdd�t�S)Nz4isCarbonAquaTk(root) is deprecated, use isCarbonTk()rr)rrr�
isCarbonTk)�rootr	r	r
�isCarbonAquaTks	
rcCs�tjdkr~|jjdd�}d|kr9daq�d|krNdaq�d|jjd	d
d�krudaq�d
andadS)N�darwin�tkZwindowingsystemZx11�xquartzZaqua�otherZAppKitZwinfoZserver�.�cocoa�carbon)�sys�platformr�call�_tk_type)r
Zwsr	r	r
�_initializeTkVariantTestss				rcCstdkptdkS)Nrr)rr	r	r	r
r(srcCs
tdkS)Nr)rr	r	r	r
r/srcCs
tdkS)Nr)rr	r	r	r
�	isCocoaTk7srcCs
tdkS)Nr)rr	r	r	r
�	isXQuartz>srcCsCt�r;|jjdd�}|dkr.dSdj|�SdSdS)N�info�
patchlevel�8.5.7�8.5.9Fz�WARNING: The version of Tcl/Tk ({0}) in use may be unstable.\nVisit http://www.python.org/download/mac/tcltk/ for current information.)rr )rrr�format)r
rr	r	r
�tkVersionWarningEs		r"cs&�fdd�}|jd|�dS)Ncs"x|D]}�j|�qWdS)N)�open)�args�fn)�flistr	r
�
doOpenFile^s
z'addOpenEventSupport.<locals>.doOpenFilez::tk::mac::OpenDocument)�
createcommand)r
r&r'r	)r&r
�addOpenEventSupportYsr)cCs3y|jjdd�Wntjk
r.YnXdS)NZconsoleZhide)rr�tkinterZTclError)r
r	r	r
�
hideTkConsolegsr+c
s�ddlm}ddlm}ddlm�|jddd)}|jddd*d�=|jddjd|�|jd+ddd�=|jd,dd=|��}�jd	|�i}||d
ddd�|d<}|jd
dd	|dd�|�fdd�}�j	|�d�fdd�}	d��fdd�}
d�fdd�}�j
d|	��j
d|
��jd|
��r��j
d�j��jd�j�t
�rl||d
ddd�|d<}|jd
dd	|�|jjddd-dgf��jjd!�}ttt|jd"���d.krl|jddjd/�t�r��jd'|	��jd(|�|jd0dd=dS)1Nr)�Menu)�Bindings)�
WindowList�r���menu�nameZwindowsZtearoffZlabelZWindowZ	underlinecsN|jd�}|dkr!d}|dkr=|jd|��j|�dS)N�endr/r���)�index�deleteZadd_windows_to_menu)r2r4)r.r	r
�postwindowsmenu�sz)overrideRootMenu.<locals>.postwindowsmenucs$ddlm}|j�d�dS)Nr)�aboutDialogz
About IDLE)�idlelibr9ZAboutDialog)�eventr9)r
r	r
�about_dialog�sz&overrideRootMenu.<locals>.about_dialogcs0ddlm}�j�_|j�d�dS)Nr)�configDialogZSettings)r:r=ZinversedictZ
instance_dictZConfigDialog)r;r=)r&r
r	r
�
config_dialog�sz'overrideRootMenu.<locals>.config_dialogcs!ddlm}|j��dS)Nr)�help)r:r?Z
show_idlehelp)r;r?)r
r	r
�help_dialog�sz%overrideRootMenu.<locals>.help_dialog�<<about-idle>>�<<open-config-dialog>>z::tk::mac::ShowPreferencesz<<close-all-windows>>�exitZappleZapplicationZIDLE�
About IDLEzinfo patchlevelr����_Preferences....Z
tkAboutDialogz::tk::mac::ShowHelp������r5rI)rDrA)rErFrG)rHrBr5)r*r,r:r-r.Zmenudefs�insertZ	configureZadd_cascadeZregister_callback�bindr(Zclose_all_callbackrr�eval�tuple�map�int�split�appendr)
r
r&r,r-Z	closeItemZmenubarZmenudictr2r8r<r>r@Z	tkversionr	)r.r&r
r
�overrideRootMenunsP 
	
$	rScCs;t|�t�r7t|�t||�t||�dS)N)rrr+rSr))r
r&r	r	r
�setupApp�s

	

rT)rr*�osrrrrrrrrrrr"r)r+rSrTr	r	r	r
�<module>s n

?>