Plan 9 from Bell Labs’s /usr/web/sources/contrib/jas/root/sys/lib/python2.7/idlelib/configSectionNameDialog.pyc

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


��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_rootytwinfo_heighttwinfo_reqheightt	deiconifytwait_window(tselfRRRR((s5/sys/lib/python2.7/idlelib/configSectionNameDialog.pyR	s,


				


	
cCs�t|�|_t|�|_t|dddt�|_|jjdtdtdt	�t
|jdtdtd	d
dd
d|j
�|_t|jd
|jdd�}|j�|jjd	d
dd
�|jd	d
dd
�t|�}|jdtdt�t|ddddd|j�|_|jjddddd	d
dd
�t|ddddd|j�|_|jjddddd	d
dd
�dS(NRitrelieftsidetexpandtfilltanchortjustifytpadxitpadyttextttextvariableRitOkitcommandtrowitcolumnRi(t	StringVartnametfontSizetFrametSUNKENRtpacktTOPtTRUEtBOTHtMessagetWtLEFTRRtEntryt	focus_settBOTTOMtXtButtonR/tbuttonOktgridRtbuttonCancel(R$t	entryNametframeButtons((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(NiRs
Name ErrorRsNo name specified.Riis)Name too long. It should be no more than s30 characters.sThis name is already in use.(R4tgettstripttkMessageBoxt	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/OscCsd|_|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		

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.