OwlCyberSecurity - MANAGER
Edit File: keybindingDialog.cpython-33.pyc
� ��f�0��c���������������@���s����d��Z��d�d�l�Td�d�l�j�Z�d�d�l�Z�d�d�l�m�Z�Gd�d����d�e���Z �e �d�k�r��e����Z�d�d ����Z �e�e�d �d�d�e ��j����e�j����n��d�S( ���u6��� Dialog for building Tkinter accelerator key bindings i����(���u���*N(���u ���macosxSupportc�������������B���s����|��Ee��Z�d��Z�d�d����Z�d�d����Z�d�d����Z�d�d����Z�d �d ����Z�d�d����Z�d �d����Z �d�d����Z �d�d����Z�d�d����Z�d�d�d���Z�d�d�d���Z�d�d����Z�d�S(���u ���GetKeysDialogc�������������C���s���t��j�|��|���|��j�d�d���|��j�d�t�d�t���|��j�|���|��j�|���|��j����|��j�d�|��j ���|�|��_ �|�|��_�|�|��_�d�|��_ �t�|����|��_�|��j�j�d���|��j����g��|��_�x:�|��j�D]/�}�t�|����}�|�j�d���|��j�j�|���q��Wd �|��_�|��j����|��j����|��j����|��j����|��j�d�|�j����|�j����d�|��j����d�|�j����|�j ����d�|��j!����d�f���|��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 u���borderwidthi���u���heightu���widthu���WM_DELETE_WINDOWu����u���+%d+%di���NF($���u���Toplevelu���__init__u ���configureu ���resizableu���FALSEu���titleu ���transientu���grab_setu���protocolu���Cancelu���parentu���actionu���currentKeySequencesu���resultu ���StringVaru ���keyStringu���setu���SetModifiersForPlatformu ���modifier_varsu ���modifiersu���appendu���Falseu���advancedu ���CreateWidgetsu���LoadFinalKeyListu���withdrawu���update_idletasksu���geometryu���winfo_rootxu���winfo_widthu���winfo_reqwidthu���winfo_rootyu���winfo_heightu���winfo_reqheightu ���deiconifyu���wait_window(���u���selfu���parentu���titleu���actionu���currentKeySequencesu���modifieru���variable(����(����u=���/opt/alt/python33/lib64/python3.3/idlelib/keybindingDialog.pyu���__init__ ���s>���� u���GetKeysDialog.__init__c���������� ���C���sZ��t��|��d�d�d�t��}�|�j�d�t�d�t�d�t���t��|����}�|�j�d�t�d�t���t�|�d�d�d �d �d�|��j ��|��_ �|��j �j�d�d �d�d �d�d�d�d���t�|�d�d�d �d �d�|��j��|��_ �|��j �j�d�d �d�d�d�d�d�d���t��|���|��_�t��|���|��_�t��|���|��_�t��|���|��_�|��j�j�d�d �d�d �d�t�d�d�d�d���|��j�j�d�d �d�d �d�t�d�d�d�d���|��j�j����|��j�j�d�d�d�d �d�t�d�d���|��j�j�d�d�d�d �d�t�d�d���|��j�j����t�|�d�|��j�d�d��|��_�|��j�j�d�d�d�d �d�t�d�d�d�d���t�|��j�d�d�|��j�d��}�|�j�d�t���t�|��j�d�t�d�|��j�d�t�d�d��}�|�j�d�d�d�d�d�t���i��|��_�d �}�x��t�|��j�|��j ���D]��\�}�}�|��j!�j"�|�|���}�t#�|��j�d�|��j$�d�|�d�|�d�|�d �d!��} �| �j�d�d �d�|�d�d�d�t���| �|��j�|�<|�d�7}�q�Wt�|��j�d�t�d�d"�d#�d$�d%�d&�d'��} �| �j�d�d�d�d �d(�d)�d�d�d�t���t%�|��j�d �d*�d+�d,�d-�t&��|��_'�|��j'�j(�d.�|��j)���|��j'�j�d�d �d�d)�d/�d)�d�t*���t+�|��j�d0�t,�d�|��j'�j-��}�|��j'�j.�d1�|�j/���|�j�d�d �d�d�d/�d)�d�t*���t�|��j�d�d2�d�|��j0��|��_1�|��j1�j�d�d�d�d �d(�d)���t�|��j�d�t�d�d3�|��j�d4�d5��}�|�j�d�t���t2�|��j�d�|��j��|��_3�|��j3�j�d�t���t�|��j�d�t�d�d6�d7�d8�d9�d:�d;�d<��} �| �j�d�d �d�d �d�t���d��S(=���Nu���borderwidthi���u���reliefu���sideu���expandu���fillu���textu���OKu���widthi���u���commandu���rowi����u���columnu���padxi���u���padyu���Canceli���u���stickyu���Advanced Key Binding Entry >>u���sticku���New keys for 'u���' :u���anchoru���justifyu���textvariableu���ipadxu���ipadyu���variableu���onvalueu���offvalueu����u!���Select the desired modifier keys u"���above, and the final key from the u���list on the right. u"���Use upper case Symbols when using u&���the Shift modifier. (Letters will be u���converted automatically.)u ���columnspani���i���u���heighti ���u ���selectmodeu���<ButtonRelease-1>u���rowspanu���orientu���yscrollcommandu ���Clear Keysu���Enter new binding(s) for 'u���' : u2���(These bindings will not be checked for validity!)u4���Key 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 u5���follows: <Control-x><Control-y>, where the first key u!���is the 'do-nothing' keybinding. u4���Multiple separate bindings for one action should be u,���separated by a space, eg., <Alt-v> <Meta-v>.(4���u���Frameu���SUNKENu���packu���TOPu���TRUEu���BOTHu���BOTTOMu���Xu���Buttonu���OKu���buttonOKu���gridu���Cancelu���buttonCancelu���frameKeySeqBasicu���frameKeySeqAdvancedu���frameControlsBasicu���frameHelpAdvancedu���NSEWu���liftu���ToggleLevelu���buttonLevelu���EWu���Labelu���actionu���Wu���LEFTu ���keyStringu���GROOVEu���modifier_checkbuttonsu���zipu ���modifiersu ���modifier_varsu���modifier_labelu���getu���Checkbuttonu���BuildKeyStringu���Listboxu���SINGLEu ���listKeysFinalu���bindu���FinalKeySelectedu���NSu ���Scrollbaru���VERTICALu���yviewu���configu���setu���ClearKeySequ���buttonClearu���Entryu���entryKeysAdvanced(���u���selfu ���frameMainu���frameButtonsu���labelTitleBasicu���labelKeysBasicu���columnu���modifieru���variableu���labelu���checku ���labelFnAdviceu���scrollKeysFinalu���labelTitleAdvancedu���labelHelpAdvanced(����(����u=���/opt/alt/python33/lib64/python3.3/idlelib/keybindingDialog.pyu ���CreateWidgets1���s�����%%++ %% + " " (%" u���GetKeysDialog.CreateWidgetsc�������������C���sV���d�d�l��}�t�j����r0�d�d�d�d�g�|��_�n�d�d�d�g�|��_�i�d�d�6|��_�d�S( ���uU��Determine 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. i����Nu���Shiftu���Controlu���Optionu���Commandu���Altu���Ctrl(���u���sysu ���macosxSupportu���runningAsOSXAppu ���modifiersu���modifier_label(���u���selfu���sys(����(����u=���/opt/alt/python33/lib64/python3.3/idlelib/keybindingDialog.pyu���SetModifiersForPlatform����s ����u%���GetKeysDialog.SetModifiersForPlatformc�������������C���s����|��j��j�d���d��d���d�k�rr�|��j����|��j��j�d�d���|��j�j����|��j�j����|��j�j����d�|��_ �n@�|��j����|��j��j�d�d���|��j�j����|��j�j����d�|��_ �d��S(���Nu���texti���u���Advancedu���<< Basic Key Binding Entryu���Advanced Key Binding Entry >>TF(���u���buttonLevelu���cgetu���ClearKeySequ���configu���frameKeySeqAdvancedu���liftu���frameHelpAdvancedu���entryKeysAdvancedu ���focus_setu���Trueu���advancedu���frameKeySeqBasicu���frameControlsBasicu���False(���u���self(����(����u=���/opt/alt/python33/lib64/python3.3/idlelib/keybindingDialog.pyu���ToggleLevel����s����" u���GetKeysDialog.ToggleLevelc�������������C���s���|��j�����d��S(���N(���u���BuildKeyString(���u���selfu���event(����(����u=���/opt/alt/python33/lib64/python3.3/idlelib/keybindingDialog.pyu���FinalKeySelected����s����u���GetKeysDialog.FinalKeySelectedc�������������C���so���|��j�����}�}�|��j�j�t���}�|�rJ�|��j�|�|���}�|�j�|���n��|��j�j�d�d�j�|���d���d��S(���Nu���<u���-u���>( ���u���GetModifiersu ���listKeysFinalu���getu���ANCHORu���TranslateKeyu���appendu ���keyStringu���setu���join(���u���selfu���keyListu ���modifiersu���finalKey(����(����u=���/opt/alt/python33/lib64/python3.3/idlelib/keybindingDialog.pyu���BuildKeyString����s����u���GetKeysDialog.BuildKeyStringc�������������C���s'���d�d����|��j��D��}�d�d����|�D��S(���Nc�������������S���s���g��|��]�}�|�j�������q�S(����(���u���get(���u���.0u���variable(����(����u=���/opt/alt/python33/lib64/python3.3/idlelib/keybindingDialog.pyu ���<listcomp>����s��� �u.���GetKeysDialog.GetModifiers.<locals>.<listcomp>c�������������S���s���g��|��]�}�|�r�|���q�S(����(����(���u���.0u���mod(����(����u=���/opt/alt/python33/lib64/python3.3/idlelib/keybindingDialog.pyu ���<listcomp>����s��� �(���u ���modifier_vars(���u���selfu���modList(����(����u=���/opt/alt/python33/lib64/python3.3/idlelib/keybindingDialog.pyu���GetModifiers����s����u���GetKeysDialog.GetModifiersc�������������C���s[���|��j��j�d�t���|��j��j�t�d���x�|��j�D]�}�|�j�d���q0�W|��j�j�d���d��S(���Ni����u���0.0u����(���u ���listKeysFinalu���select_clearu���ENDu���yviewu���MOVETOu ���modifier_varsu���setu ���keyString(���u���selfu���variable(����(����u=���/opt/alt/python33/lib64/python3.3/idlelib/keybindingDialog.pyu���ClearKeySeq����s ����u���GetKeysDialog.ClearKeySeqc�������������C���s����d�|��_��t�t�j�t�j���|��_�t�d���|��_�d�|��_�d�|��_�d�|��_ �|��j�|��j�|��j��|��j�|��j�|��j �}�|��j �j�t�|���d��S(���Nu���F1u���F2u���F4u���F5u���F6u���F7u���F8u���F9u���F10u���F11u���F12u���~!@#%^&*()_-+={}[]|;:,.<>/?u���Tabu���Spaceu���Returnu ���BackSpaceu���Deleteu���Insertu���Homeu���Endu���Page Upu ���Page Downu ���Left Arrowu���Right Arrowu���Up Arrowu ���Down Arrow(���u���F1u���F2u���F2u���F4u���F5u���F6u���F7u���F8u���F9u���F10u���F11u���F12(���u���Tabu���Spaceu���Return(���u ���BackSpaceu���Deleteu���Insert(���u���Homeu���Endu���Page Upu ���Page Downu ���Left Arrowu���Right Arrowu���Up Arrowu ���Down Arrow( ���u���functionKeysu���tupleu���stringu���ascii_lowercaseu���digitsu���alphanumKeysu���punctuationKeysu���whitespaceKeysu���editKeysu���moveKeysu ���listKeysFinalu���insertu���END(���u���selfu���keys(����(����u=���/opt/alt/python33/lib64/python3.3/idlelib/keybindingDialog.pyu���LoadFinalKeyList����s����� � ,u���GetKeysDialog.LoadFinalKeyListc�������������C���sL��i#�d�d�6d�d�6d�d�6d�d�6d �d �6d�d�6d �d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d �6d!�d"�6d#�d$�6d%�d&�6d'�d(�6d)�d*�6d+�d,�6d-�d.�6d/�d0�6d1�d2�6d3�d4�6d5�d6�6d7�d8�6d9�d:�6d;�d<�6d=�d>�6d?�d@�6dA�dB�6dC�dD�6dE�dE�6}�|�|�k�r|�|�}�n��dF�|�k�r>|�t��j�k�r>|�j����}�n��dG�|�}�|�S(H���u2���Translate from keycap symbol to the Tkinter keysymu���spaceu���Spaceu ���asciitildeu���~u���exclamu���!u���atu���@u ���numbersignu���#u���percentu���%u���asciicircumu���^u ���ampersandu���&u���asterisku���*u ���parenleftu���(u ���parenrightu���)u ���underscoreu���_u���minusu���-u���plusu���+u���equalu���=u ���braceleftu���{u ���bracerightu���}u���bracketleftu���[u���bracketrightu���]u���baru���|u ���semicolonu���;u���colonu���:u���commau���,u���periodu���.u���lessu���<u���greateru���>u���slashu���/u���questionu���?u���Prioru���Page Upu���Nextu ���Page Downu���Leftu ���Left Arrowu���Rightu���Right Arrowu���Upu���Up Arrowu���Downu ���Down Arrowu���Tabu���Shiftu���Key-(���u���stringu���ascii_lowercaseu���upper(���u���selfu���keyu ���modifiersu ���translateDict(����(����u=���/opt/alt/python33/lib64/python3.3/idlelib/keybindingDialog.pyu���TranslateKey����s ���� # u���GetKeysDialog.TranslateKeyc�������������C���s8���|��j��s�|��j����r4�|��j�j����|��_�|��j����n��d��S(���N(���u���advancedu���KeysOKu ���keyStringu���getu���resultu���destroy(���u���selfu���event(����(����u=���/opt/alt/python33/lib64/python3.3/idlelib/keybindingDialog.pyu���OK����s����u���GetKeysDialog.OKc�������������C���s���d�|��_��|��j����d��S(���Nu����(���u���resultu���destroy(���u���selfu���event(����(����u=���/opt/alt/python33/lib64/python3.3/idlelib/keybindingDialog.pyu���Cancel����s���� u���GetKeysDialog.Cancelc���������� ���C���sj��|��j��j����}�|�j����|��j�j�t���}�|��j����}�|�j����}�d�}�d�}�|�st�t�j �d�|�d�|��d�d���n��|�j �d���s��t�j �d�|�d�|��d�d���n��|�r��|�|��j�|��j�k�r��t�j �d�|�d�|��d�d���n��|�d �g�k�r,|�|��j�|��j�d�k�r,d�}�t�j �d�|�d�|��d�|���n:�|�|��j �k�r`d �}�t�j �d�|�d�|��d�|���n�d�}�|�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. u���Key Sequence Erroru���titleu���parentu���messageu���No keys specified.u���>u���Missing the final Keyu���No modifier key(s) specified.u���Shiftu���Tabu���SpaceuB���The shift modifier by itself may not be used with this key symbol.u'���This key combination is already in use.F(���u���Tabu���SpaceT(���u ���keyStringu���getu���stripu ���listKeysFinalu���ANCHORu���GetModifiersu���splitu���Falseu���tkMessageBoxu ���showerroru���endswithu���functionKeysu���moveKeysu���currentKeySequencesu���True(���u���selfu���keysu���finalKeyu ���modifiersu���keySequenceu���keysOKu���titleu���msg(����(����u=���/opt/alt/python33/lib64/python3.3/idlelib/keybindingDialog.pyu���KeysOK����s6���� u���GetKeysDialog.KeysOKN(���u���__name__u ���__module__u���__qualname__u���__init__u ���CreateWidgetsu���SetModifiersForPlatformu���ToggleLevelu���FinalKeySelectedu���BuildKeyStringu���GetModifiersu���ClearKeySequ���LoadFinalKeyListu���TranslateKeyu���Noneu���OKu���Cancelu���KeysOK(���u ���__locals__(����(����u=���/opt/alt/python33/lib64/python3.3/idlelib/keybindingDialog.pyu ���GetKeysDialog ���s���'Ou ���GetKeysDialogu���__main__c��������������C���s,���d�}��t��t�d�d�g����}�t�|�j���d��S(���Nu����u���Get Keysu ���find-again(���u ���GetKeysDialogu���rootu���printu���result(���u���keySequ���dlg(����(����u=���/opt/alt/python33/lib64/python3.3/idlelib/keybindingDialog.pyu���run��s����u���runu���textu���Dialogu���command(���u���__doc__u���tkinteru���tkinter.messageboxu ���messageboxu���tkMessageBoxu���stringu���idlelibu ���macosxSupportu���Toplevelu ���GetKeysDialogu���__name__u���Tku���rootu���runu���Buttonu���packu���mainloop(����(����(����u=���/opt/alt/python33/lib64/python3.3/idlelib/keybindingDialog.pyu���<module>���s��� �