File "configSectionNameDialog.cpython-34.pyc"

Full Path: /home/attunedd/public_html/byp/izo/con7ext_sym404/rintoar.txt/opt/alt/python34/lib64/python3.4/idlelib/__pycache__/configSectionNameDialog.cpython-34.pyc
File size: 3.85 KB
MIME-type: text/x-bytecode.python
Charset: 8 bit


e f@sdZddlTddljZGdddeZedkrddlZej	ddd	d
dddl
mZeendS)
a
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.
)*Nc@sUeZdZdddZddZddZdd	d
ZdddZdS)
GetCfgSectionNameDialogFcCsAtj|||jdd|jdtdt|j||j||j|jd|j	||_
||_||_|j
|j|j|jjd|jj|jd|j|jd|jd|j|s|jd|jdndf|j|jd	S)
z
        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
        borderwidthZheightwidthZWM_DELETE_WINDOWz+%d+%ddN)Toplevel__init__Z	configureZ	resizableZFALSEtitleZ	transientZgrab_setZprotocolCancelparentmessage
used_namescreate_widgetsZwithdrawZupdate_idletasksmessageInfoconfig	frameMainZwinfo_reqwidthZgeometryZwinfo_rootxZwinfo_widthZwinfo_rootyZwinfo_heightZwinfo_reqheightZ	deiconifyZwait_window)selfr
rrrZ_htestrD/opt/alt/python34/lib64/python3.4/idlelib/configSectionNameDialog.pyr
s,


			


		0
z GetCfgSectionNameDialog.__init__cCst|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}|jdtt|ddddd|j|_|jjdt
d	d
t|ddddd|j|_|jjdtd	d
dS)NrrZreliefZsideexpandZfillZanchorZjustifyZpadxrZpadytextZtextvariablerOkZcommandr)Z	StringVarr
nameZfontSizeZFrameZSUNKENrZpackZTOPZTRUEZBOTHZMessageWZLEFTrrZEntryZ	focus_setZBOTTOMZButtonrZbuttonOkrZbuttonCancelZRIGHT)rZ	entryNameZframeButtonsrrrr+s$
z&GetCfgSectionNameDialog.create_widgetscCs|jjj}|s:tjddddd|not|dkrutjdddddd|d	}n4||jkrtjdddd
d|d	}n|S)z After stripping entered name, check that it is a  sensible
        ConfigParser file section name. Return it if it is, '' if not.
        rz
Name ErrorrzNo name specified.r
rz)Name too long. It should be no more than z30 characters.zThis name is already in use.)rgetstriptkMessageBoxZ	showerrorlenr)rrrrrname_ok@s	
	zGetCfgSectionNameDialog.name_okNcCs,|j}|r(||_|jndS)N)r#resultdestroy)reventrrrrrSs	zGetCfgSectionNameDialog.OkcCsd|_|jdS)Nr)r$r%)rr&rrrrYs	zGetCfgSectionNameDialog.Cancel)__name__
__module____qualname__r
rr#rrrrrrr
s
 r__main__z"idlelib.idle_test.test_config_name	verbosityrexitF)run)__doc__ZtkinterZtkinter.messageboxZ
messageboxr!r	rr'ZunittestmainZidlelib.idle_test.htestr-rrrr<module>s
S