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__/configHelpSourceEdit.cpython-33.pyc

�
��fEc@s�dZddlZddlZddlTddljZddljZ	Gdd�de
�Zedkr�e
�Zdd�Zeed	d
de�j�ej�ndS(uKDialog to specify or edit the parameters for a user configured help source.iN(u*cBst|EeZdZdddd�Zdd�Zdd�Zdd	�Zd
d�Zddd
�Z	ddd�Z
dS(uGetHelpSourceDialogucCsCtj||�|jdd�|jdtdt�|j|�|j|�|j�|jd|j	�||_
d	|_|j
�|jj|�|jj|�|j�|j�|jd|j�|j�d|j�d|j�|j�d|j�df�|j�|jd|j�|j�d	S(
u�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.

        uborderwidthiuheightuwidthuWM_DELETE_WINDOWu+%d+%diu<Return>N(uToplevelu__init__u	configureu	resizableuFALSEutitleu	transientugrab_setuprotocoluCanceluparentuNoneuresultu
CreateWidgetsumenuusetupathuwithdrawuupdate_idletasksugeometryuwinfo_rootxuwinfo_widthuwinfo_reqwidthuwinfo_rootyuwinfo_heightuwinfo_reqheightu	deiconifyubinduOkuwait_window(uselfuparentutitleumenuItemufilePath((uA/opt/alt/python33/lib64/python3.3/idlelib/configHelpSourceEdit.pyu__init__s,


		


	
uGetHelpSourceDialog.__init__c
Csmt|�|_t|�|_t|�|_t|dddt�|_|jjdtdt	dt
�t|jdtdt
d	d
�}t|jd|jdd
�|_|jj�t|jdtdt
d	d�}t|jd|jdd�|_|jj�|jdtdddd�|jjdtdddd�|jdtdddd�|jjdtdddd�t|jd	dddd|j�}|jdd�t|�}|jdtdt�t|d	ddddtd|j�|_|jjdddddddd�t|d	dddd|j�|_|jjdddddddd�dS(Nuborderwidthiureliefusideuexpandufilluanchorujustifyutextu
Menu Item:utextvariableuwidthiu,Help File Path: Enter URL or browse for filei(upadxiupadyiuBrowseiucommanduOKudefaulturowiucolumnuCanceli(u	StringVarumenuupathufontSizeuFrameuGROOVEu	frameMainupackuTOPuTRUEuBOTHuLabeluWuLEFTuEntryu	entryMenuu	focus_setu	entryPathuButtonu
browseFileuBOTTOMuXuACTIVEuOkubuttonOkugriduCancelubuttonCancel(uselfu	labelMenuu	labelPathubrowseButtonuframeButtons((uA/opt/alt/python33/lib64/python3.3/idlelib/configHelpSourceEdit.pyu
CreateWidgets,s<	
	
%u!GetHelpSourceDialog.CreateWidgetscCsdddddg}|jj�}|rEtjj|�\}}nsd}tjdd�d
kr�tjjtjjtj	�d�}tjj
|�s�tj�}q�ntj�}tj
d|d|�}|jd|d|�}|r|jj|�ndS(Nu
HTML Filesu*.htm *.htmluTEXTu	PDF Filesu*.pdfuWindows Help Filesu*.chmu
Text Filesu*.txtu	All Filesu*iuwinuDocuparentu	filetypesu
initialdiruinitialfile(u
HTML Filesu*.htm *.htmluTEXT(u	PDF Filesu*.pdfuTEXT(uWindows Help Filesu*.chm(u
Text Filesu*.txtuTEXT(u	All Filesu*(upathugetuosusplituNoneusysuplatformujoinudirnameu
executableuisdirugetcwdutkFileDialoguOpenushowuset(uselfu	filetypesupathudirubaseu
opendialogufile((uA/opt/alt/python33/lib64/python3.3/idlelib/configHelpSourceEdit.pyu
browseFileLs$	$uGetHelpSourceDialog.browseFilecCs�d}|jj�}|j�|sWtjddddd|�|jj�d	}nDt	|�dkr�tjddddd|�|jj�d	}n|S(
u3Simple validity check for a sensible menu item nameutitleuMenu Item ErrorumessageuNo menu item specifieduparentiu(Menu item too long:
Limit 30 characters.TF(
uTrueumenuugetustriputkMessageBoxu	showerroru	entryMenuu	focus_setuFalseulen(uselfumenuOkumenu((uA/opt/alt/python33/lib64/python3.3/idlelib/configHelpSourceEdit.pyuMenuOkcs 

	
	uGetHelpSourceDialog.MenuOkcCs�d}|jj�}|j�|sWtjddddd|�|jj�d
}n|j	d�rinm|dd	�d
kr�|d	d�}nt
jj|�s�tjddddd|�|jj�d
}n|S(u(Simple validity check for menu file pathutitleuFile Path ErrorumessageuNo help file path specified.uparentuwww.uhttpNiufile:uHelp file path does not exist.TF(uwww.uhttp(uTrueupathugetustriputkMessageBoxu	showerroru	entryPathu	focus_setuFalseu
startswithuosuexists(uselfupathOkupath((uA/opt/alt/python33/lib64/python3.3/idlelib/configHelpSourceEdit.pyuPathOkws(

	
	uGetHelpSourceDialog.PathOkcCs�|j�r�|j�r�|jj�j�|jj�j�f|_tjdkr�|jd}|j	d�rsq�t
|j�|_d||jd<n|j�ndS(Nudarwiniuwwwufile:uhttp:ufile://(uwwwufile:uhttp:(uMenuOkuPathOkumenuugetustripupathuresultusysuplatformu
startswithulistudestroy(uselfueventupath((uA/opt/alt/python33/lib64/python3.3/idlelib/configHelpSourceEdit.pyuOk�s
uGetHelpSourceDialog.OkcCsd|_|j�dS(N(uNoneuresultudestroy(uselfuevent((uA/opt/alt/python33/lib64/python3.3/idlelib/configHelpSourceEdit.pyuCancel�s	uGetHelpSourceDialog.CancelN(u__name__u
__module__u__qualname__u__init__u
CreateWidgetsu
browseFileuMenuOkuPathOkuNoneuOkuCancel(u
__locals__((uA/opt/alt/python33/lib64/python3.3/idlelib/configHelpSourceEdit.pyuGetHelpSourceDialog
s! uGetHelpSourceDialogu__main__cCs&d}ttd�}t|j�dS(NuuGet Help Source(uGetHelpSourceDialogurootuprinturesult(ukeySequdlg((uA/opt/alt/python33/lib64/python3.3/idlelib/configHelpSourceEdit.pyurun�surunutextuDialogucommand(u__doc__uosusysutkinterutkinter.messageboxu
messageboxutkMessageBoxutkinter.filedialogu
filedialogutkFileDialoguTopleveluGetHelpSourceDialogu__name__uTkurooturunuButtonupackumainloop(((uA/opt/alt/python33/lib64/python3.3/idlelib/configHelpSourceEdit.pyu<module>s
�	

Hacked By AnonymousFox1.0, Coded By AnonymousFox