Edit File: configHelpSourceEdit.pyc
� ��7ec�����������@���s����d��Z��d�d�l�Z�d�d�l�Z�d�d�l�Td�d�l�Z�d�d�l�Z�d�e�f�d�������YZ�e�d�k�r�d�d�l �m �Z �e �e���n��d�S(���sK���Dialog to specify or edit the parameters for a user configured help source.i����N(���t���*t���GetHelpSourceDialogc�����������B���sV���e��Z�d��d��e�d���Z�d����Z�d����Z�d����Z�d����Z�d�d���Z �d�d���Z �RS( ���t����c���������C���sO��t��j�|��|���|��j�d�d���|��j�d�t�d�t���|��j�|���|��j�|���|��j����|��j�d�|��j ���|�|��_ �d �|��_�|��j ����|��j�j�|���|��j�j�|���|��j����|��j����|��j�d�|�j����|�j����d�|��j����d�|�j����|�s|�j����d�|��j����d�n�d�f���|��j����|��j�d �|��j���|��j����d �S(���s2��Get menu entry and url/ local file location for Additional Help User selects a name for the Help resource and provides a web url or a local file as its source. The user can enter a url or browse for the file. _htest - bool, change box location when running htest t���borderwidthi���t���heightt���widtht���WM_DELETE_WINDOWs���+%d+%di���i����s���<Return>N(���t���Toplevelt���__init__t ���configuret ���resizablet���FALSEt���titlet ���transientt���grab_sett���protocolt���Cancelt���parentt���Nonet���resultt ���CreateWidgetst���menut���sett���patht���withdrawt���update_idletaskst���geometryt���winfo_rootxt���winfo_widtht���winfo_reqwidtht���winfo_rootyt���winfo_heightt���winfo_reqheightt ���deiconifyt���bindt���Okt���wait_window(���t���selfR���R���t���menuItemt���filePatht���_htest(����(����s4���/usr/lib64/python2.7/idlelib/configHelpSourceEdit.pyR������s.���� 0 c������ ���C���sm��t��|����|��_�t��|����|��_�t��|����|��_�t�|��d�d�d�t��|��_�|��j�j�d�t�d�t �d�t ���t�|��j�d�t�d�t �d �d ��}�t�|��j�d�|��j�d�d ��|��_�|��j�j����t�|��j�d�t�d�t �d �d��}�t�|��j�d�|��j�d�d��|��_�|��j�j����|�j�d�t�d�d�d�d���|��j�j�d�t�d�d�d�d���|�j�d�t�d�d�d�d���|��j�j�d�t�d�d�d�d���t�|��j�d �d�d�d�d�|��j��}�|�j�d�d���t�|����}�|�j�d�t�d�t���t�|�d �d�d�d�d�t�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���d��S(���NR���i���t���relieft���sidet���expandt���fillt���anchort���justifyt���texts ���Menu Item:t���textvariableR���i���s,���Help File Path: Enter URL or browse for filei(���t���padxi���t���padyi���t���Browsei���t���commandt���OKt���defaultt���rowi����t���columnR���i���(���t ���StringVarR���R���t���fontSizet���Framet���GROOVEt ���frameMaint���packt���TOPt���TRUEt���BOTHt���Labelt���Wt���LEFTt���Entryt ���entryMenut ���focus_sett ���entryPatht���Buttont ���browseFilet���BOTTOMt���Xt���ACTIVER#���t���buttonOkt���gridR���t���buttonCancel(���R%���t ���labelMenut ���labelPatht���browseButtont���frameButtons(����(����s4���/usr/lib64/python2.7/idlelib/configHelpSourceEdit.pyR���/���s<���� %c���������C���s����d�d�d�d�d�g�}�|��j��j����}�|�rE�t�j��j�|���\�}�}�nm�d��}�t�j�d� d �k�r��t�j��j�t�j��j�t�j ���d���}�t�j��j �|���s��t�j����}�q��n�t�j����}�t�j �d�|��d�|���}�|�j�d�|�d�|���}�|�r��|��j��j�|���n��d��S(���Ns ���HTML Filess���*.htm *.htmlt���TEXTs ���PDF Filess���*.pdfs���Windows Help Filess���*.chms ���Text Filess���*.txts ���All FilesR����i���t���wint���DocR���t ���filetypest ���initialdirt���initialfile(���s ���HTML Filess���*.htm *.htmlRU���(���s ���PDF Filess���*.pdfRU���(���s���Windows Help Filess���*.chm(���s ���Text Filess���*.txtRU���(���s ���All FilesR����(���R���t���gett���ost���splitR���t���syst���platformt���joint���dirnamet ���executablet���isdirt���getcwdt���tkFileDialogt���Opent���showR���(���R%���RX���R���t���dirt���baset ���opendialogt���file(����(����s4���/usr/lib64/python2.7/idlelib/configHelpSourceEdit.pyRJ���O���s$���� $c���������C���s����t��}�|��j�j����}�|�j����|�sW�t�j�d�d�d�d�d�|����|��j�j����t�}�nD�t �|���d�k�r��t�j�d�d�d�d�d�|����|��j�j����t�}�n��|�S(���s3���Simple validity check for a sensible menu item nameR���s���Menu Item Errort���messages���No menu item specifiedR���i���s(���Menu item too long: Limit 30 characters.( ���t���TrueR���R[���t���stript���tkMessageBoxt ���showerrorRF���RG���t���Falset���len(���R%���t���menuOkR���(����(����s4���/usr/lib64/python2.7/idlelib/configHelpSourceEdit.pyt���MenuOkf���s ���� c���������C���s����t��}�|��j�j����}�|�j����|�sW�t�j�d�d�d�d�d�|����|��j�j����t�}�ns�|�j �d���ri�na�|�d� d �k�r��|�d�}�n��t �j�j�|���s��t�j�d�d�d�d �d�|����|��j�j����t�}�n��|�S(���s(���Simple validity check for menu file pathR���s���File Path ErrorRl���s���No help file path specified.R���s���www.t���httpi���s���file:s���Help file path does not exist.(���s���www.Ru���(���Rm���R���R[���Rn���Ro���Rp���RH���RG���Rq���t ���startswithR\���t���exists(���R%���t���pathOkR���(����(����s4���/usr/lib64/python2.7/idlelib/configHelpSourceEdit.pyt���PathOkz���s(���� c���������C���s����|��j�����r��|��j����r��|��j�j����j����|��j�j����j����f�|��_�t�j�d�k�r��|��j�d�}�|�j �d���rs�q��t �|��j���|��_�d�|�|��j�d�<n��|��j����|��j����n��d��S(���Nt���darwini���t���wwws���file:s���http:s���file://(���R{���s���file:s���http:( ���Rt���Ry���R���R[���Rn���R���R���R^���R_���Rv���t���listt���grab_releaset���destroy(���R%���t���eventR���(����(����s4���/usr/lib64/python2.7/idlelib/configHelpSourceEdit.pyR#�������s���� c���������C���s!���d��|��_�|��j����|��j����d��S(���N(���R���R���R}���R~���(���R%���R���(����(����s4���/usr/lib64/python2.7/idlelib/configHelpSourceEdit.pyR�������s���� N(���t���__name__t ���__module__Rq���R���R���RJ���Rt���Ry���R���R#���R���(����(����(����s4���/usr/lib64/python2.7/idlelib/configHelpSourceEdit.pyR��� ���s���$ t���__main__(���t���run(���t���__doc__R\���R^���t���TkinterRo���Re���R���R���R����t���idlelib.idle_test.htestR����(����(����(����s4���/usr/lib64/python2.7/idlelib/configHelpSourceEdit.pyt���<module>���s��� �