Hacked By AnonymousFox

Current Path : /opt/alt/python33/lib64/python3.3/idlelib/__pycache__/
Upload File :
Current File : //opt/alt/python33/lib64/python3.3/idlelib/__pycache__/keybindingDialog.cpython-33.pyo

�
��f�0c@s�dZddlTddljZddlZddlmZGdd�de�Z	e
dkr�e�Zdd	�Z
eed
dde
�j�ej�ndS(
u6
Dialog for building Tkinter accelerator key bindings
i(u*N(u
macosxSupportcBs�|EeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zddd�Zddd�Zdd�ZdS(u
GetKeysDialogcCs�tj||�|jdd�|jdtdt�|j|�|j|�|j�|jd|j	�||_
||_||_d|_
t|�|_|jjd�|j�g|_x:|jD]/}t|�}|jd�|jj|�q�Wd
|_|j�|j�|j�|j�|jd|j�|j�d|j�d|j�|j �d|j!�df�|j"�|j#�d	S(u�
        action - string, the name of the virtual event these keys will be
                 mapped to
        currentKeys - list, a list of all key sequence lists currently mapped
                 to virtual events, for overlap checking
        uborderwidthiuheightuwidthuWM_DELETE_WINDOWuu+%d+%diNF($uToplevelu__init__u	configureu	resizableuFALSEutitleu	transientugrab_setuprotocoluCanceluparentuactionucurrentKeySequencesuresultu	StringVaru	keyStringusetuSetModifiersForPlatformu
modifier_varsu	modifiersuappenduFalseuadvancedu
CreateWidgetsuLoadFinalKeyListuwithdrawuupdate_idletasksugeometryuwinfo_rootxuwinfo_widthuwinfo_reqwidthuwinfo_rootyuwinfo_heightuwinfo_reqheightu	deiconifyuwait_window(uselfuparentutitleuactionucurrentKeySequencesumodifieruvariable((u=/opt/alt/python33/lib64/python3.3/idlelib/keybindingDialog.pyu__init__
s>


				
	
	



	
uGetKeysDialog.__init__c
CsZt|dddt�}|jdtdtdt�t|�}|jdtdt�t|ddd	d
d|j	�|_
|j
jdd
dd
dddd�t|ddd	d
d|j�|_
|j
jdd
dddddd�t|�|_t|�|_t|�|_t|�|_|jjdd
dd
dtdddd�|jjdd
dd
dtdddd�|jj�|jjdddd
dtdd�|jjdddd
dtdd�|jj�t|d|jdd�|_|jjdddd
dtdddd�t|jdd|jd�}|jdt�t|jdtd|jdtdd�}|jdddddt�i|_d
}x�t|j|j �D]�\}}|j!j"||�}t#|jd|j$d|d|d|d d!�}	|	jdd
d|dddt�|	|j|<|d7}q�Wt|jdtdd"d#d$d%d&d'�}
|
jdddd
d(d)dddt�t%|jd	d*d+d,d-t&�|_'|j'j(d.|j)�|j'jdd
dd)d/d)dt*�t+|jd0t,d|j'j-�}|j'j.d1|j/�|jdd
ddd/d)dt*�t|jdd2d|j0�|_1|j1jdddd
d(d)�t|jdtdd3|jd4d5�}|jdt�t2|jd|j�|_3|j3jdt�t|jdtdd6d7d8d9d:d;d<�}
|
jdd
dd
dt�dS(=NuborderwidthiureliefusideuexpandufillutextuOKuwidthiucommandurowiucolumnupadxiupadyuCanceliustickyuAdvanced Key Binding Entry >>ustickuNew keys for  'u' :uanchorujustifyutextvariableuipadxuipadyuvariableuonvalueuoffvalueuu!Select the desired modifier keys
u"above, and the final key from the
ulist on the right.

u"Use upper case Symbols when using
u&the Shift modifier.  (Letters will be
uconverted automatically.)u
columnspaniiuheighti
u
selectmodeu<ButtonRelease-1>urowspanuorientuyscrollcommandu
Clear KeysuEnter new binding(s) for  'u' :
u2(These bindings will not be checked for validity!)u4Key bindings are specified using Tkinter keysyms as
u�in these samples: <Control-f>, <Shift-F2>, <F12>,
<Control-space>, <Meta-less>, <Control-Alt-Shift-X>.
Upper case is used when the Shift modifier is present!

u8'Emacs style' multi-keystroke bindings are specified as
u5follows: <Control-x><Control-y>, where the first key
u!is the 'do-nothing' keybinding.

u4Multiple separate bindings for one action should be
u,separated by a space, eg., <Alt-v> <Meta-v>.(4uFrameuSUNKENupackuTOPuTRUEuBOTHuBOTTOMuXuButtonuOKubuttonOKugriduCancelubuttonCanceluframeKeySeqBasicuframeKeySeqAdvanceduframeControlsBasicuframeHelpAdvanceduNSEWuliftuToggleLevelubuttonLeveluEWuLabeluactionuWuLEFTu	keyStringuGROOVEumodifier_checkbuttonsuzipu	modifiersu
modifier_varsumodifier_labelugetuCheckbuttonuBuildKeyStringuListboxuSINGLEu
listKeysFinalubinduFinalKeySelecteduNSu	ScrollbaruVERTICALuyviewuconfigusetuClearKeySequbuttonClearuEntryuentryKeysAdvanced(uselfu	frameMainuframeButtonsulabelTitleBasiculabelKeysBasicucolumnumodifieruvariableulabeluchecku
labelFnAdviceuscrollKeysFinalulabelTitleAdvancedulabelHelpAdvanced((u=/opt/alt/python33/lib64/python3.3/idlelib/keybindingDialog.pyu
CreateWidgets1s�%%++
%%
+	"	"

(%"

uGetKeysDialog.CreateWidgetscCsVddl}tj�r0ddddg|_ndddg|_idd6|_dS(	uUDetermine list of names of key modifiers for this platform.

        The names are used to build Tk bindings -- it doesn't matter if the
        keyboard has these keys, it matters if Tk understands them. The
        order is also important: key binding equality depends on it, so
        config-keys.def must use the same ordering.
        iNuShiftuControluOptionuCommanduAltuCtrl(usysu
macosxSupporturunningAsOSXAppu	modifiersumodifier_label(uselfusys((u=/opt/alt/python33/lib64/python3.3/idlelib/keybindingDialog.pyuSetModifiersForPlatform�s
u%GetKeysDialog.SetModifiersForPlatformcCs�|jjd�dd�dkrr|j�|jjdd�|jj�|jj�|jj�d|_
n@|j�|jjdd�|jj�|jj�d|_
dS(NutextiuAdvancedu<< Basic Key Binding EntryuAdvanced Key Binding Entry >>TF(ubuttonLevelucgetuClearKeySequconfiguframeKeySeqAdvanceduliftuframeHelpAdvanceduentryKeysAdvancedu	focus_setuTrueuadvanceduframeKeySeqBasicuframeControlsBasicuFalse(uself((u=/opt/alt/python33/lib64/python3.3/idlelib/keybindingDialog.pyuToggleLevel�s"






uGetKeysDialog.ToggleLevelcCs|j�dS(N(uBuildKeyString(uselfuevent((u=/opt/alt/python33/lib64/python3.3/idlelib/keybindingDialog.pyuFinalKeySelected�suGetKeysDialog.FinalKeySelectedcCso|j�}}|jjt�}|rJ|j||�}|j|�n|jjddj|�d�dS(Nu<u-u>(	uGetModifiersu
listKeysFinalugetuANCHORuTranslateKeyuappendu	keyStringusetujoin(uselfukeyListu	modifiersufinalKey((u=/opt/alt/python33/lib64/python3.3/idlelib/keybindingDialog.pyuBuildKeyString�suGetKeysDialog.BuildKeyStringcCs'dd�|jD�}dd�|D�S(NcSsg|]}|j��qS((uget(u.0uvariable((u=/opt/alt/python33/lib64/python3.3/idlelib/keybindingDialog.pyu
<listcomp>�s	u.GetKeysDialog.GetModifiers.<locals>.<listcomp>cSsg|]}|r|�qS(((u.0umod((u=/opt/alt/python33/lib64/python3.3/idlelib/keybindingDialog.pyu
<listcomp>�s	(u
modifier_vars(uselfumodList((u=/opt/alt/python33/lib64/python3.3/idlelib/keybindingDialog.pyuGetModifiers�suGetKeysDialog.GetModifierscCs[|jjdt�|jjtd�x|jD]}|jd�q0W|jjd�dS(Niu0.0u(u
listKeysFinaluselect_clearuENDuyviewuMOVETOu
modifier_varsusetu	keyString(uselfuvariable((u=/opt/alt/python33/lib64/python3.3/idlelib/keybindingDialog.pyuClearKeySeq�s
uGetKeysDialog.ClearKeySeqcCs�d|_ttjtj�|_td�|_d|_d|_d|_	|j|j|j|j|j|j	}|j
jt|�dS(NuF1uF2uF4uF5uF6uF7uF8uF9uF10uF11uF12u~!@#%^&*()_-+={}[]|;:,.<>/?uTabuSpaceuReturnu	BackSpaceuDeleteuInsertuHomeuEnduPage Upu	Page Downu
Left ArrowuRight ArrowuUp Arrowu
Down Arrow(uF1uF2uF2uF4uF5uF6uF7uF8uF9uF10uF11uF12(uTabuSpaceuReturn(u	BackSpaceuDeleteuInsert(uHomeuEnduPage Upu	Page Downu
Left ArrowuRight ArrowuUp Arrowu
Down Arrow(
ufunctionKeysutupleustringuascii_lowercaseudigitsualphanumKeysupunctuationKeysuwhitespaceKeysueditKeysumoveKeysu
listKeysFinaluinsertuEND(uselfukeys((u=/opt/alt/python33/lib64/python3.3/idlelib/keybindingDialog.pyuLoadFinalKeyList�s				,uGetKeysDialog.LoadFinalKeyListcCsLi#dd6dd6dd6dd6d	d
6dd6d
d6dd6dd6dd6dd6dd6dd6dd6dd6dd 6d!d"6d#d$6d%d&6d'd(6d)d*6d+d,6d-d.6d/d06d1d26d3d46d5d66d7d86d9d:6d;d<6d=d>6d?d@6dAdB6dCdD6dEdE6}||kr||}ndF|kr>|tjkr>|j�}ndG|}|S(Hu2Translate from keycap symbol to the Tkinter keysymuspaceuSpaceu
asciitildeu~uexclamu!uatu@u
numbersignu#upercentu%uasciicircumu^u	ampersandu&uasterisku*u	parenleftu(u
parenrightu)u
underscoreu_uminusu-uplusu+uequalu=u	braceleftu{u
bracerightu}ubracketleftu[ubracketrightu]ubaru|u	semicolonu;ucolonu:ucommau,uperiodu.ulessu<ugreateru>uslashu/uquestionu?uPrioruPage UpuNextu	Page DownuLeftu
Left ArrowuRightuRight ArrowuUpuUp ArrowuDownu
Down ArrowuTabuShiftuKey-(ustringuascii_lowercaseuupper(uselfukeyu	modifiersu
translateDict((u=/opt/alt/python33/lib64/python3.3/idlelib/keybindingDialog.pyuTranslateKey�s 
#

uGetKeysDialog.TranslateKeycCs8|js|j�r4|jj�|_|j�ndS(N(uadvanceduKeysOKu	keyStringugeturesultudestroy(uselfuevent((u=/opt/alt/python33/lib64/python3.3/idlelib/keybindingDialog.pyuOK�suGetKeysDialog.OKcCsd|_|j�dS(Nu(uresultudestroy(uselfuevent((u=/opt/alt/python33/lib64/python3.3/idlelib/keybindingDialog.pyuCancel�s	uGetKeysDialog.Cancelc	Csj|jj�}|j�|jjt�}|j�}|j�}d}d}|sttj	d|d|dd�n�|j
d�s�tj	d|d|dd�n�|r�||j|jkr�tj	d|d|dd�n�|d	gkr,||j|jdkr,d}tj	d|d|d|�n:||j
kr`d
}tj	d|d|d|�nd}|S(u�Validity check on user's 'basic' keybinding selection.

        Doesn't check the string produced by the advanced dialog because
        'modifiers' isn't set.

        uKey Sequence ErrorutitleuparentumessageuNo keys specified.u>uMissing the final KeyuNo modifier key(s) specified.uShiftuTabuSpaceuBThe shift modifier by itself may not be used with this key symbol.u'This key combination is already in use.F(uTabuSpaceT(u	keyStringugetustripu
listKeysFinaluANCHORuGetModifiersusplituFalseutkMessageBoxu	showerroruendswithufunctionKeysumoveKeysucurrentKeySequencesuTrue(uselfukeysufinalKeyu	modifiersukeySequenceukeysOKutitleumsg((u=/opt/alt/python33/lib64/python3.3/idlelib/keybindingDialog.pyuKeysOK�s6



uGetKeysDialog.KeysOKN(u__name__u
__module__u__qualname__u__init__u
CreateWidgetsuSetModifiersForPlatformuToggleLeveluFinalKeySelecteduBuildKeyStringuGetModifiersuClearKeySequLoadFinalKeyListuTranslateKeyuNoneuOKuCanceluKeysOK(u
__locals__((u=/opt/alt/python33/lib64/python3.3/idlelib/keybindingDialog.pyu
GetKeysDialog	s'Ou
GetKeysDialogu__main__cCs,d}ttddg�}t|j�dS(NuuGet Keysu
find-again(u
GetKeysDialogurootuprinturesult(ukeySequdlg((u=/opt/alt/python33/lib64/python3.3/idlelib/keybindingDialog.pyurunsurunutextuDialogucommand(u__doc__utkinterutkinter.messageboxu
messageboxutkMessageBoxustringuidlelibu
macosxSupportuToplevelu
GetKeysDialogu__name__uTkurooturunuButtonupackumainloop(((u=/opt/alt/python33/lib64/python3.3/idlelib/keybindingDialog.pyu<module>s
�	

Hacked By AnonymousFox1.0, Coded By AnonymousFox