��Qc@s}dZddlTddlZdefd��YZedkrye�Zd�Ze edd d
e�j
�ej�ndS(s~
Dialog that allows user to specify a new config file section name.
Used to get new highlight theme and keybinding set names.
i�(t*NtGetCfgSectionNameDialogcBs;eZd�Zd�Zd�Zdd�Zdd�ZRS(cCs>tj||�|jdd�|jdtdt�|j|�|j|�|j�|jd|j �||_
||_||_d|_
|j�|j�|j�|jjd|jj��|jd|j�|j�d|j�d|j�|j�d|j�df�|j�|j�d S(
s�
message - string, informational message to display
usedNames - list, list of names already in use for validity check
tborderwidthitheighttwidthtWM_DELETE_WINDOWts+%d+%diN(tToplevelt__init__t configuret resizabletFALSEttitlet transienttgrab_settprotocoltCanceltparenttmessaget usedNamestresultt
CreateWidgetstwithdrawtupdate_idletaskstmessageInfotconfigt frameMaintwinfo_reqwidthtgeometrytwinfo_rootxtwinfo_widthtwinfo_rootytwinfo_heighttwinfo_reqheightt deiconifytwait_window(tselfRRRR((s5/sys/lib/python2.7/idlelib/configSectionNameDialog.pyR s,
cCs�t|�|_t|�|_t|dddt�|_|jjdtdtdt �t
|jdtdtd d
dd
d|j
�|_t|jd
|jdd�}|j�|jjd d
dd
�|jd d
dd
�t|�}|jdtdt�t|ddddd|j�|_|jjddddd d
dd
�t|ddddd|j�|_|jjddddd d
dd
�dS(NRitrelieftsidetexpandtfilltanchortjustifytpadxitpadyttextttextvariableRitOkitcommandtrowitcolumnRi(t StringVartnametfontSizetFrametSUNKENRtpacktTOPtTRUEtBOTHtMessagetWtLEFTRRtEntryt focus_settBOTTOMtXtButtonR/tbuttonOktgridRtbuttonCancel(R$t entryNametframeButtons((s5/sys/lib/python2.7/idlelib/configSectionNameDialog.pyR&s$$
%cCs�d}|jj�}|j�|sJtjddddd|�d}not|�dkr�tjdddd d
d|�d}n4||jkr�tjddddd|�d}n|S(NiRs
Name ErrorRsNo name specified.Riis)Name too long. It should be no more than s30 characters.sThis name is already in use.(R4tgettstripttkMessageBoxt showerrortlenR(R$tnameOkR4((s5/sys/lib/python2.7/idlelib/configSectionNameDialog.pytNameOk:s"
cCs5|j�r1|jj�j�|_|j�ndS(N(ROR4RIRJRtdestroy(R$tevent((s5/sys/lib/python2.7/idlelib/configSectionNameDialog.pyR/OscCsd|_|j�dS(NR(RRP(R$RQ((s5/sys/lib/python2.7/idlelib/configSectionNameDialog.pyRTs N(t__name__t
__module__RRROtNoneR/R(((s5/sys/lib/python2.7/idlelib/configSectionNameDialog.pyRs
t__main__cCs$d}ttdd�}|jGHdS(NRsGet Names:The information here should need to be word wrapped. Test.(RtrootR(tkeySeqtdlg((s5/sys/lib/python2.7/idlelib/configSectionNameDialog.pytrun[s R-tDialogR0(t__doc__tTkinterRKRRRRtTkRVRYRCR8tmainloop(((s5/sys/lib/python2.7/idlelib/configSectionNameDialog.pyt<module>s
P
|