Hacked By AnonymousFox

Current Path : /opt/alt/python37/lib64/python3.7/idlelib/__pycache__/
Upload File :
Current File : //opt/alt/python37/lib64/python3.7/idlelib/__pycache__/macosx.cpython-37.opt-2.pyc

B

YI~d�%�@s�ddlmZddlZddlmZddlZdadd�Zdd�Zdd	�Z	d
d�Z
dd
�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd�Zdd�Zedkr�ddlmZed d!d"�dS)#�)�
expanduserN)�platformcCsjtdkrbt��}|j�dd�}d|kr,dan,d|kr:dand|j�d	d
d�krTdand
a|��ndadS)N�darwin�tkZwindowingsystemZx11�xquartzZaqua�otherZAppKitZwinfoZserver�.�cocoa�carbon)r�tkinterZTkr�call�_tk_typeZdestroy)�rootZws�r�3/opt/alt/python37/lib64/python3.7/idlelib/macosx.py�
_init_tk_types
rcCsts
t�tdkptdkS)Nr	r
)r
rrrrr�isAquaTk%srcCsts
t�tdkS)Nr
)r
rrrrr�
isCarbonTk-srcCsts
t�tdkS)Nr	)r
rrrrr�	isCocoaTk6srcCsts
t�tdkS)Nr)r
rrrrr�	isXQuartz>srcCs2t�r*|j�dd�}|dkr dSd�|�SdSdS)N�info�
patchlevel)z8.5.7z8.5.9Fz�WARNING: The version of Tcl/Tk ({0}) in use may be unstable.
Visit http://www.python.org/download/mac/tcltk/ for current information.)rrr�format)rrrrr�tkVersionWarningGs	rc	CsNtdkrdStd�}y t|d��}t�|�SQRXWntk
rHdSXdS)Nrz.~/Library/Preferences/.GlobalPreferences.plist�rb)rr�open�plistlib�load�OSError)Z
plist_pathZ
plist_filerrr�readSystemPreferences\srcCs,tdkrdSt�}|r(|�d�dkr(dSdS)NrZAppleWindowTabbingMode�alwaysz�WARNING: The system preference "Prefer tabs when opening documents" is set to "Always". This will cause various problems with IDLE. For the best experience, change this setting when running IDLE (via System Preferences -> Dock).)rr�get)Zprefsrrr�preferTabsPreferenceWarningksr"cs�fdd�}|�d|�dS)Ncsx|D]}��|�qWdS)N)r)�args�fn)�flistrr�
doOpenFile�s
z'addOpenEventSupport.<locals>.doOpenFilez::tk::mac::OpenDocument)�
createcommand)rr%r&r)r%r�addOpenEventSupportsr(cCs.y|j�dd�Wntjk
r(YnXdS)NZconsoleZhide)rrrZTclError)rrrr�
hideTkConsole�sr)cs�ddlm}ddlm}ddlm�|jddd}|jdddd�=|jdd�d|�|jd	ddd
�=|jdddd
�=|��}�j|d�i}||ddd
�|d<}|jd|dd�|f�fdd�	}��	|�d$�fdd�	}	d%��fdd�	}
d&�fdd�	}��
d|	���
d|
���d|
���rR��
d�j���d�j�t
��r�||ddd
�|d<}|jd|d �|j�ddd!dgf�t��rĈ�d"|	���d#|�|jd	dd=dS)'Nr)�Menu)�mainmenu)�window������������)�menur,)�nameZtearoffZWindow)�labelr3Z	underlinecs8|�d�}|dkrd}|dkr*|�d|���|�dS)N�endr1r)�index�deleteZadd_windows_to_menu)r3r6)r,rr�postwindowsmenu�s
z)overrideRootMenu.<locals>.postwindowsmenucsddlm}|���dS)Nr)�
help_about)�idlelibr:ZAboutDialog)�eventr:)rrr�about_dialog�sz&overrideRootMenu.<locals>.about_dialogcs$ddlm}�j�_|��d�dS)Nr)�configdialogZSettings)r;r>ZinversedictZ
instance_dictZConfigDialog)r<r>)r%rrr�
config_dialog�sz'overrideRootMenu.<locals>.config_dialogcsddlm}|���dS)Nr)�help)r;r@Z
show_idlehelp)r<r@)rrr�help_dialog�sz%overrideRootMenu.<locals>.help_dialogz<<about-idle>>z<<open-config-dialog>>z::tk::mac::ShowPreferencesz<<close-all-windows>>�exitZappleZapplicationZIDLE)r5r3)z
About IDLEz<<about-idle>>Z
tkAboutDialogz::tk::mac::ShowHelp)N)N)N)rr*r;r+r,Zmenudefs�insertZ	configureZadd_cascadeZregister_callbackZbindr'Zclose_all_callbackrr)rr%r*r+Z	closeItemZmenubarZmenudictr3r9r=r?rAr)r%rr,r�overrideRootMenu�sH

rDcCs(|�dd�|�dd�|�dd�dS)NZTextz<B2>z<B2-Motion>z<<PasteSelection>>)Zunbind_class)rrrr�fixb2context�srEcCs.t�r*t|�t||�t||�t|�dS)N)rr)rDr(rE)rr%rrr�setupApps


rF�__main__)�mainzidlelib.idle_test.test_macosxr2)�	verbosity)Zos.pathrr�sysrrr
rrrrrrrr"r(r)rDrErF�__name__ZunittestrHrrrr�<module>s(		h


Hacked By AnonymousFox1.0, Coded By AnonymousFox