Hacked By AnonymousFox

Current Path : /proc/thread-self/root/lib64/python2.7/idlelib/
Upload File :
Current File : //proc/thread-self/root/lib64/python2.7/idlelib/configSectionNameDialog.pyo

�
{fc@s�dZddlTddlZdefd��YZedkr�ddlZejddd	d
e�ddl	m
Z
e
e�ndS(s
Dialog that allows user to specify a new config file section name.
Used to get new highlight theme and keybinding set names.
The 'return value' for the dialog, used two placed in configDialog.py,
is the .result attribute set in the Ok and Cancel methods.
i����(t*NtGetCfgSectionNameDialogcBs>eZed�Zd�Zd�Zdd�Zdd�ZRS(cCsAtj||�|jdd�|jdtdt�|j|�|j|�|j�|jd|j	�||_
||_||_|j
�|j�|j�|jjd|jj��|jd|j�|j�d|j�d|j�|s|j�d|j�dndf�|j�|j�d	S(
s�
        message - string, informational message to display
        used_names - string collection, names already in use for validity check
        _htest - bool, change box location when running htest
        tborderwidthitheighttwidthtWM_DELETE_WINDOWs+%d+%diidN(tToplevelt__init__t	configuret	resizabletFALSEttitlet	transienttgrab_settprotocoltCanceltparenttmessaget
used_namestcreate_widgetstwithdrawtupdate_idletaskstmessageInfotconfigt	frameMaintwinfo_reqwidthtgeometrytwinfo_rootxtwinfo_widthtwinfo_rootytwinfo_heighttwinfo_reqheightt	deiconifytwait_window(tselfRRRRt_htest((s7/usr/lib64/python2.7/idlelib/configSectionNameDialog.pyR
s,


			


		0
cCs�t|j�|_t|j�|_t|dddt�|_|jjdtdt	dt
�t|jdtdt
d	d
dd
d|j�|_t|jd
|jdd�}|j�|jjd	d
dd
�|jd	d
dd
�t|dd�}|jdt�t|ddddd|j�|_|jjdt
d	d
�t|ddddd|j�|_|jjdtd	d
�dS(NRitrelieftsidetexpandtfilltanchortjustifytpadxitpadyttextttextvariableRitOkitcommandR(t	StringVarRtnametfontSizetFrametSUNKENRtpacktTOPtTRUEtBOTHtMessagetWtLEFTRRtEntryt	focus_settBOTTOMtButtonR.tbuttonOkRtbuttonCanceltRIGHT(R"t	entryNametframeButtons((s7/usr/lib64/python2.7/idlelib/configSectionNameDialog.pyR)s$
cCs�|jj�j�}|s:tjddddd|�not|�dkrutjdddddd|�d	}n4||jkr�tjdddd
d|�d	}n|S(s� After stripping entered name, check that it is a  sensible
        ConfigParser file section name. Return it if it is, '' if not.
        Rs
Name ErrorRsNo name specified.Ris)Name too long. It should be no more than s30 characters.tsThis name is already in use.(R1tgettstripttkMessageBoxt	showerrortlenR(R"R1((s7/usr/lib64/python2.7/idlelib/configSectionNameDialog.pytname_ok=s	
	cCs6|j�}|r2||_|j�|j�ndS(N(RKtresulttgrab_releasetdestroy(R"teventR1((s7/usr/lib64/python2.7/idlelib/configSectionNameDialog.pyR.Os
	
cCs!d|_|j�|j�dS(NRE(RLRMRN(R"RO((s7/usr/lib64/python2.7/idlelib/configSectionNameDialog.pyRUs	
N(	t__name__t
__module__tFalseRRRKtNoneR.R(((s7/usr/lib64/python2.7/idlelib/configSectionNameDialog.pyR	s
		t__main__s"idlelib.idle_test.test_config_namet	verbosityitexit(trun(t__doc__tTkinterRHRRRPtunittesttmainRRtidlelib.idle_test.htestRW(((s7/usr/lib64/python2.7/idlelib/configSectionNameDialog.pyt<module>s
Q

Hacked By AnonymousFox1.0, Coded By AnonymousFox