MINI MINI MANI MO

Path : /usr/lib64/python2.7/idlelib/
File Upload :
Current File : //usr/lib64/python2.7/idlelib/configDialog.pyo


E]c@sdZddlTddlZddlZddlZddlZddlmZddlm	Z	ddl
mZddlm
Z
ddlmZdd	lmZdd
lmZdefdYZed
kreZeeddddjie_ejndS(sIDLE Configuration Dialog: support user customization of IDLE by GUI

Customize font faces, sizes, and colorization attributes.  Set indentation
defaults.  Customize keybindings.  Colorization and keybindings can be
saved as user defined sets.  Select startup options including shell/editor
and default window size.  Define additional help sources.

Note that tab width in IDLE is currently fixed at eight due to Tk issues.
Refer to comments in EditorWindow autoindent code for details.

i(t*N(tidleConf(t
DynOptionMenu(t
TabbedPageSet(t
GetKeysDialog(tGetCfgSectionNameDialog(tGetHelpSourceDialog(t
macosxSupporttConfigDialogcBseZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dZd
ZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZ dZ!d Z"d!Z#d"Z$d#Z%d$Z&d%Z'd&Z(d'Z)d(Z*d)Z+d*Z,d+Z-d,Z.dHd-Z0d.Z1d/Z2d0Z3d1Z4d2Z5d3Z6d4Z7d5Z8d6Z9d7Z:d8Z;d9Z<d:Z=d;Z>d<Z?d=Z@d>ZAd?ZBd@ZCdAZDdBZEdCZFdDZGdEZHdFZIdGZJRS(IcCs\tj|||j|jdd|jd|jd|jd|jdfi
d1d	6d2d6d3d6d4d6d5d6d6d6d7d6d8d6d9d!6d:d$6d;d'6d<d*6d=d-6|_|j	|j
|jd.td/t|j
||j|jd0|j||_|jj|j|j|j|jdS(>NtborderwidthisIDLE Preferencess+%d+%diitnormalt00sNormal Texttkeywordt01sPython Keywordst
definitiont02sPython Definitionstbuiltint03sPython Builtinstcommentt04sPython Commentststringt05sPython Stringsthilitet06s
Selected Textthitt07s
Found Texttcursort08tCursorterrort09s
Error Texttconsolet10sShell Normal Texttstdoutt11sShell Stdout Texttstderrt12sShell Stderr TexttheighttwidthtWM_DELETE_WINDOW(R
R(RR
(RR(RR(RR(sstringR(RR(RR(scursorR(serrorR(RR (sstdoutR"(sstderrR$(tToplevelt__init__twm_withdrawt	configurettitletgeometrytwinfo_rootxtwinfo_rootyt
themeElementstResetChangedItemst
CreateWidgetst	resizabletFALSEt	transienttgrab_settprotocoltCanceltparentttabPagest	focus_settLoadConfigstAttachVarCallbackstwm_deiconifytwait_window(tselfR9R,((s,/usr/lib64/python2.7/idlelib/configDialog.pyR)s>







	



c	Cst|dddddg|_t|dd}tjrHi}nidd	6d
d6}t|ddd
|jdt||_t|ddd
|j	dt||_
t|ddd
|jdt||_t|ddd
|j
dt||_|j|j|j|j|jjdtd	d|j
jdtd	d|jjdtd	d|jjdtd	d|jdtt|ddddjdt|jjdtdtdtdS(Nt
page_namess
Fonts/TabstHighlightingtKeystGeneraltpadyiitpadxittexttHelptcommandt	takefocustOktApplyR8tsideiR%R	itexpandtfill(RR:tFrameRtrunningAsOSXApptButtonRHR4t
buttonHelpRKtbuttonOkRLtbuttonApplyR8tbuttonCanceltCreatePageFontTabtCreatePageHighlighttCreatePageKeystCreatePageGeneraltpacktRIGHTtLEFTtBOTTOMtTOPtTRUEtBOTH(R@tframeActionButtonstpaddingArgs((s,/usr/lib64/python2.7/idlelib/configDialog.pyR2Es:		



"c
Cst||_t||_t||_t||_tj|d+|_	|j
jdj}t
|dddtdd	}t
|dddtdd
}t|}t|}t|dtdd}t|d
ddtdt|_|jjd|jt|}|jd|jj|jjd|jt|dd}t||jdd|j|_t|d|jddddddd|j}	t|dt dd}
t|
dddtd|j	|_!t|}t|dtdd}t"|d|jddd dd!dd"d#|_#|j$d$td%dd&dd't%d(t&|j$d$td%dd&dd(t'|j$d$t(d%dd&dd(t)|j$d$t(d%dd&dd(t)|j$d$t(d)t*|jj$d$td't%d(t)|j$d$td(t'|j$d$td)t*|jj$d$td)t*|	j$d$td)t*d%d*|
j$d$t(d%dd&dd't%d(t&|j!j$d't%d(t&|j$d$t(d(t)|j$d$t(d)t*d%d|j#j$d$t(d%dd(t)|S(,Ntcourieri
R
s
Fonts/TabsR	itreliefRGs Base Editor Font s Indentation Width tjustifysFont Face :R%iRJtexportselections<ButtonRelease-1>RItyscrollcommandsSize :tvariabletonvalueitoffvalueitBolds,AaBbCcDdEe
FfGgHhIiJjK
1234567890
#:+=(){}[]tfontsPython Standard: 4 Spaces!torientt
horizontalttickintervaltfrom_ttoiRMRFRERNROtanchori(Rdi
snormal(+t	StringVartfontSizet
BooleanVartfontBoldtfontNametIntVartspaceNumttkFonttFontteditFontR:tpagestframet
LabelFrametGROOVERPtLabelR]tListboxR4tlistFontNametbindtOnListFontButtonReleaset	ScrollbartconfigtyviewtsetRtNonet
SetFontSampletoptMenuFontSizetCheckbuttontSOLIDtlabelFontSampletScalet
scaleSpaceNumR[R`RatYR_tXtW(
R@Rt	frameFonttframeIndentt
frameFontNametframeFontParamtlabelFontNameTitlet
scrollFonttlabelFontSizeTitlet
checkFontBoldtframeFontSampletframeIndentSizetlabelSpaceNumTitle((s,/usr/lib64/python2.7/idlelib/configDialog.pyRWisf					("""(c Cst||_t||_t||_t||_t||_t||_t||_|j	j
dj}t|dddt
dd}t|dddt
dd}t|dtddd	dWd
ddddddtdddt	|_|j}|jdd|jdddXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvf}x)|D]!}|jt|d|dqWx;|jjD]*}|j|j|dd?|d@qW|jdAtt|dtdd|_t|}t|jddBdC|jdd}	t|j|jddd|_!t"|dD|jdEdddFdC|j#|_$t"|dD|jdEdddGdC|j#|_%|jj&dt|ddHdC|j'}
t(|ddI}t"|dD|jdEddC|j)ddJ|_*t"|dD|jdEddC|j)ddK|_+t||jddCd|_,t||jddCd|_-t|ddLdC|j.|_/|j0dMt1dNdOdPdOdQt2dRt3|j0dMt1dNdOdPdOdRt4|jj0dMt5dNdOdPdOdQt2dRt6|j0dMt5dNdOdPd|jj0dMt5dNdOdPdOdQt2dRt3|	j0dMt5dQt2dRt6dNdSdPdT|j!j0dMt5dQt2dRt6dNdSdPdU|j$j0dMt1dVt7|j%j0dMt8dVt9|
j0dMt:dRt6dNdOdPdO|j0dMt5dVt9dNdOdPdO|j*j0dMt5dVt9dNdO|j+j0dMt5dVt9dNdOdPd|j,j0dMt5dRt6dNdOdPdO|j-j0dMt5dRt6dVt9dNdOdPdO|j/j0dMt5dRt6dNdOdPdO|S(wNRBR	iReRGs Custom Highlighting s Highlighting Theme iRmRditRthand2R&iR%iRJthighlightthicknessitwraps<Double-Button-1>cSsdS(Ntbreak((te((s,/usr/lib64/python2.7/idlelib/configDialog.pyt<lambda>ss<B1-Motion>cSsdS(NR((R((s,/usr/lib64/python2.7/idlelib/configDialog.pyRss#you can click hereRs
R
s#to choose itemstdefRt tfuncRs(param):s
  s"""string"""Rs

  var0 = s'string's

  var1 = s
'selected'Rs

  var2 = s'found'Rs

  var3 = tlistRt(Rs)

s error Rscursor |s
 tshellRR!R#s<ButtonPress-1>cSs|jjjj|S(N(twidgettwinfo_toplevelthighlightTargetR(teventtelem((s,/usr/lib64/python2.7/idlelib/configDialog.pyRststatesChoose Colour for :RIRitvaluet
Foregroundt
BackgroundsSave as New Custom Themes	Select : sa Built-in Themesa Custom ThemesDelete Custom ThemeRMRFiRERNROiiiRs(scourieriR(s#you can click herescomment(s
snormal(s#to choose itemsscomment(s
snormal(Rskeyword(Rsnormal(sfuncs
definition(s(param):snormal(s
  snormal(s"""string"""sstring(s

  var0 = snormal(s'string'sstring(s

  var1 = snormal(s
'selected'shilite(s

  var2 = snormal(s'found'shit(s

  var3 = snormal(slistsbuiltin(Rsnormal(sNonesbuiltin(s)

snormal(s error serror(Rsnormal(scursor |R(s
 snormal(sshellsconsole(Rsnormal(sstdoutsstdout(Rsnormal(sstderrsstderr(s
snormal(;RttbuiltinThemetcustomThemeRvtfgHilitetcolourRxtthemeIsBuiltinRR:R~RRRtTextRR4tNONEttextHighlightSampleRtinserttENDR0tkeysttag_bindRtDISABLEDRPtframeColourSetRRt	GetColourRRtoptMenuHighlightTargettRadiobuttontSetColourSampleBindingtradioFgtradioBgRtSaveAsNewThemeRtSetThemeTypetradioThemeBuiltintradioThemeCustomtoptMenuThemeBuiltintoptMenuThemeCustomtDeleteCustomThemetbuttonDeleteCustomThemeR[R]R`RaRR_RtER\RR^(R@RtframeCustomt
frameThemeRGttextAndTagsttxTatelementt	frameFgBgtbuttonSetColourtbuttonSaveCustomThemetlabelTypeTitle((s,/usr/lib64/python2.7/idlelib/configDialog.pyRXs									
		("+$(+""%%+%cCst||_t||_t||_t||_t||_|jjdj	}t
|dddtdd}t
|dddtdd}t|}t
|dd}t|}t|d	t}t|d
tdt|_|jjd|j|jd
|jj|jd
|jj|jjd|j|jjd|jt|ddd
|jdt|_gtdD]$}t|dddddd^q}	t|	dd|jddd
|jdd|_ t|	dd|jddd
|jdd|_!t"|	d|jdd
d|_$t"|	d|jdd
d|_%t|	dddd
|j&|_'t|	dddd
|j(}
|j)dt*dddddt+dt,|j)dt*dddddt,|jj)dt*dt-dddd|j)dt.dddddt+dt,|j/dd d|j0dd d|j1d!dd"dd#dd$t2|jj1d!dd"dd$t3|j1d!dd"dd$t4|j1d!dd"dd$t5|j j1d!dd"dd$t2t4|j!j1d!dd"dd$t2t4|j$j1d!dd"dd$t3|j%j1d!dd"dd$t3|j'j)dt.dt-dt6dd|
j)dt.dt-dt6dd|	dj)dt7dt,dt6|	dj)dt7dt-dt6dd|S(%NRCR	iReRGs Custom Key Bindings s	 Key Set sAction - Key(s)RnRJRgs<ButtonRelease-1>RIRhtxscrollcommandsGet New Keys for SelectionRRFREiRiRisUse a Built-in Key SetsUse a Custom Key SetsDelete Custom Key SetsSave as New Custom Key SetRMiRNROtweighttrowtcolumnt
columnspantsticky(8Rtt
bindingTargettbuiltinKeyst
customKeysRvtkeysAreBuiltint
keyBindingR:R~RRRRPRRt
HORIZONTALRR4tlistBindingsRtKeyBindingSelectedRRtxviewRRRt
GetNewKeysRt
buttonNewKeystrangeRtSetKeysTypetradioKeysBuiltintradioKeysCustomRRtoptMenuKeysBuiltintoptMenuKeysCustomtDeleteCustomKeystbuttonDeleteCustomKeystSaveAsNewKeySetR[R^R`RaRR]tcolumnconfiguretrowconfiguretgridRtNSEWtNStEWtTrueR_(R@RRtframeKeySetstframeTargettlabelTargetTitlet
scrollTargetYt
scrollTargetXtitframestbuttonSaveCustomKeys((s,/usr/lib64/python2.7/idlelib/configDialog.pyRYsp		4


("%("##%" &cCst||_t||_t||_t||_t||_t||_t||_	t||_
|jjdj
}t|dddtdd}t|dddtdd}t|dddt}t|dddt}t|dddt}t|dddtdd}t|dd	}t|d
|jddd
|jdd}	t|d
|jddd
|jdd}
t|dd}t|d
|jddd
|jdd}t|d
|jddd
|jdd}
t|ddd}t|dd}t|d|jdd}t|dd}t|d|jdd}t|ddd}t|d|jdd}t|dd}t|d
|jdddd}t|d
|jdd dd!}t|d
|jdd"dd#}t|}t|}t|}t|d$d%d&td't|_|jd
|jj|jjd(|j|jjd)|jt|dd*d+tdd,d
|j |_!t|dd-dd,d
|j"|_#t|dd.d+tdd,d
|j$|_%|j&d/t'd0d%d1d%d2t(|j&d/t'd0d%d1d%d2t(|j&d/t'd0d%d1d%d2t(|j&d/t'd0d%d1d%d2t(|j&d/t'd0d%d1d%d2t(|j&d/t'd0d%d1d%d3t)d2t*|j&d/t+d4t,d0d%d1d%|
j&d/t-d4t,d0d%d1d%|	j&d/t-d4t,d0d%d1d%|j&d/t+d4t,d0d%d1d%|
j&d/t-d4t,d0d%d1d%|j&d/t-d4t,d0d%d1d%|j&d/t+d4t,d0d%d1d%|j&d/t-d4t.d0d5d1d%|j&d/t-d4t.d1d%|j&d/t-d4t.d0d5d1d%|j&d/t-d4t.d1d%|j&d/t+d4t,d0d%d1d%|j&d/t-d4t.d0d5d1d%|j&d/t+d4t,d0d%d1d%|j&d/t-d4t.d1d%|j&d/t-d4t.d1d%|j&d/t-d4t.d1d%|j&d/t-d0d%d1d%d2t/|j&d/t'd0d%d1d%d3t)d2t*|j&d/t-d4t,d2t/|jj&d/t+d4t.d3t)d2t*|j!j&d/t'd4t,d1d%|j#j&d/t'd4t,|j%j&d/t'd4t,d1d%|S(6NRDR	iReRGs Startup Preferences s Autosave Preferences s Additional Help Sources s
At StartupRiRiRIsOpen Edit WindowisOpen Shell WindowsAt Start of Run (F5)  sPrompt to Saves	No PromptsInitial Window Sizes  (in characters)tWidthttextvariableR&itHeightsParagraph reformats width (in characters)sDefault Source EncodingtlocalesLocale-definedsutf-8sUTF-8tnoneRR%iRJRgRhs<ButtonRelease-1>tEditRitAddtRemoveRMRFRERORNRsi
(0RttwinWidtht	winHeightt	paraWidthRytstartupEdittautoSavetencodingRvtuserHelpBrowserthelpBrowserR:R~RRRRPRRRtEntryRRR4tlistHelpRRRRtHelpSourceSelectedRRRtHelpListItemEdittbuttonHelpListEdittHelpListItemAddtbuttonHelpListAddtHelpListItemRemovetbuttonHelpListRemoveR[R_RR`RaR]RR\RR(R@RtframeRunt	frameSavetframeWinSizet
frameParaSizet
frameEncodingt	frameHelptlabelRunChoiceTitletradioStartupEdittradioStartupShelltlabelRunSaveTitletradioSaveAskt
radioSaveAutotlabelWinSizeTitletlabelWinWidthTitlet
entryWinWidthtlabelWinHeightTitletentryWinHeighttlabelParaWidthTitletentryParaWidthtlabelEncodingTitletradioEncLocaletradioEncUTF8tradioEncNonet
frameHelpListtframeHelpListButtonstscrollHelpList((s,/usr/lib64/python2.7/idlelib/configDialog.pyRZFs			
		
	"""""("""""""""""""(%cCs|jjd|j|jjd|j|jjd|j|jjd|j|j	jd|j
|jjd|j|j
jd|j|jjd|j|jjd|j|jjd|j|jjd|j|jjd|j|jjd|j|jjd|j|jjd|j|jjd|j |j!jd|j"|j#jd|j$|j%jd|j&dS(Ntw('Ruttrace_variabletVarChanged_fontSizeRxtVarChanged_fontNameRwtVarChanged_fontBoldRztVarChanged_spaceNumRtVarChanged_colourRtVarChanged_builtinThemeRtVarChanged_customThemeRtVarChanged_themeIsBuiltinRtVarChanged_highlightTargetRtVarChanged_keyBindingRtVarChanged_builtinKeysRtVarChanged_customKeysRtVarChanged_keysAreBuiltinRtVarChanged_winWidthRtVarChanged_winHeightRtVarChanged_paraWidthRtVarChanged_startupEditRtVarChanged_autoSaveRtVarChanged_encoding(R@((s,/usr/lib64/python2.7/idlelib/configDialog.pyR=s&cGs)|jj}|jddd|dS(NtmaintEditorWindows	font-size(RutgettAddChangedItem(R@tparamsR((s,/usr/lib64/python2.7/idlelib/configDialog.pyR;scGs)|jj}|jddd|dS(NRNRORm(RxRPRQ(R@RRR((s,/usr/lib64/python2.7/idlelib/configDialog.pyR<scGs)|jj}|jddd|dS(NRNROs	font-bold(RwRPRQ(R@RRR((s,/usr/lib64/python2.7/idlelib/configDialog.pyR=scGs)|jj}|jddd|dS(NRNtIndents
num-spaces(RzRPRQ(R@RRR((s,/usr/lib64/python2.7/idlelib/configDialog.pyR>scGs|jdS(N(tOnNewColourSet(R@RR((s,/usr/lib64/python2.7/idlelib/configDialog.pyR?scGs3|jj}|jddd||jdS(NRNtThemetname(RRPRQtPaintThemeSample(R@RRR((s,/usr/lib64/python2.7/idlelib/configDialog.pyR@scGsB|jj}|dkr>|jddd||jndS(Ns- no custom themes -RNRURV(RRPRQRW(R@RRR((s,/usr/lib64/python2.7/idlelib/configDialog.pyRAscGsF|jj}|jddd||r8|jn
|jdS(NRNRUtdefault(RRPRQR@RA(R@RRR((s,/usr/lib64/python2.7/idlelib/configDialog.pyRBs

cGs|jdS(N(tSetHighlightTarget(R@RR((s,/usr/lib64/python2.7/idlelib/configDialog.pyRCscGs|jj}|jj}|jjtjd}tj|rb|jd|||n/tj	|}|d}|jd|||dS(NiRt_cfgBindingst
extensions(
RRPRRtANCHORtsplitRt
IsCoreBindingRQtGetExtnNameForEvent(R@RRRtkeySetRtextNametextKeybindSection((s,/usr/lib64/python2.7/idlelib/configDialog.pyRDs
cGs6|jj}|jddd||j|dS(NRNRCRV(RRPRQtLoadKeysList(R@RRR((s,/usr/lib64/python2.7/idlelib/configDialog.pyREscGsE|jj}|dkrA|jddd||j|ndS(Ns- no custom keys -RNRCRV(RRPRQRc(R@RRR((s,/usr/lib64/python2.7/idlelib/configDialog.pyRFscGsF|jj}|jddd||r8|jn
|jdS(NRNRCRX(RRPRQRERF(R@RRR((s,/usr/lib64/python2.7/idlelib/configDialog.pyRGs

cGs)|jj}|jddd|dS(NRNROR&(RRPRQ(R@RRR((s,/usr/lib64/python2.7/idlelib/configDialog.pyRHscGs)|jj}|jddd|dS(NRNROR%(RRPRQ(R@RRR((s,/usr/lib64/python2.7/idlelib/configDialog.pyRIscGs)|jj}|jddd|dS(NRNtFormatParagrapht	paragraph(RRPRQ(R@RRR((s,/usr/lib64/python2.7/idlelib/configDialog.pyRJscGs)|jj}|jddd|dS(NRNRDseditor-on-startup(RRPRQ(R@RRR((s,/usr/lib64/python2.7/idlelib/configDialog.pyRKscGs)|jj}|jddd|dS(NRNRDtautosave(RRPRQ(R@RRR((s,/usr/lib64/python2.7/idlelib/configDialog.pyRL#scGs)|jj}|jddd|dS(NRNROR(RRPRQ(R@RRR((s,/usr/lib64/python2.7/idlelib/configDialog.pyRM'scCs)iid6id6id6id6|_dS(NRNt	highlightRR[(tchangedItems(R@((s,/usr/lib64/python2.7/idlelib/configDialog.pyR1+scCsLt|}||j|kr3i|j||<n||j|||<dS(N(tstrRh(R@ttypetsectiontitemR((s,/usr/lib64/python2.7/idlelib/configDialog.pyRQ3scCsiid6id6id6id6}x|jD]}tjd|}xh|D]`}i|||<tj|j|}x3|D]+}tj|j||||||<qWqNWq/W|S(NRNRgRR[RX(RRtGetSectionListt
defaultCfgt
GetOptionListtGet(R@tdItemst
configTypetsectionsRktoptionstoption((s,/usr/lib64/python2.7/idlelib/configDialog.pytGetDefaultItems9s"

1cCs|jjrK|jjdt|jjdt|jjdtnL|jjdt|jjdt|jjdt|jjdtdS(NR(	RRPRRtNORMALRRRR(R@((s,/usr/lib64/python2.7/idlelib/configDialog.pyREscCs|jjrK|jjdt|jjdt|jjdtnL|jjdt|jjdt|jjdt|jjdtdS(NR(	RRPRRRwRRRR(R@((s,/usr/lib64/python2.7/idlelib/configDialog.pyRPscCs|jjt}|jj|}|jd}|jjrU|jj}n|jj}tj	}||j
djkr|j
d|}x+|jD]}||j||<qWn|j}t
|d||j}	|	r|jjrTdd}
|j|
}|sD|jj||jj|dS|j|n|jj||jj||d|	|jj||jj||jj|	n |jj||jj|dS(NiRsGet New Keyss4Your changes will be saved as a new Custom Key Set. s/Enter a name for your new Custom Key Set below.s - (RtindexR\RPR]RRRRtGetCurrentKeySetRhRtvaluesRtresulttGetNewKeysNamet
select_sett
select_anchortCreateNewKeySettdeleteRRR(R@t	listIndextbindingtbindNametcurrentKeySetNametcurrentBindingst
keySetChangesRtcurrentKeySequencestnewKeystmessaget	newKeySet((s,/usr/lib64/python2.7/idlelib/configDialog.pyR[s>cCs>tjddtjdd}t|d||j}|S(NtuserRRXsNew Custom Key Set(RRmRR{(R@Rt	usedNamesR((s,/usr/lib64/python2.7/idlelib/configDialog.pyR|s
	cCs)|jd}|r%|j|ndS(NsNew Key Set Name:(R|R(R@tnewKeysName((s,/usr/lib64/python2.7/idlelib/configDialog.pyRscCs|jjdtdS(NR(RRRw(R@R((s,/usr/lib64/python2.7/idlelib/configDialog.pyRsc
Cs5|jjr!|jj}n|jj}tj|}i}x>|jD]0}|dd!}tj||}|||<qRW||j	djkr|j	d|}x%|jD]}||||<qWn|j
||tjdd}	|	j|j
j|	||jjd|jdS(NiiRRi(RRPRRRtGetCoreKeysRRtjoinRht
SaveNewKeySetRmtsortRtSetMenuRR(
R@t
newKeySetNametprevKeySetNametprevKeysRRt	eventNameRRt
customKeyList((s,/usr/lib64/python2.7/idlelib/configDialog.pyRs&

c	CsHd}d}|jjr6d}|jjt}ntj|}|j}|j|jjdt	x|D]}t
j||}|dd!}||jdjkr||jd|jkr|jd||}qn|jj
t	|d|quW|rD|jj||jj||jj|ndS(NiiiiRs - (RtcurselectionRxR\Rt	GetKeySetRRRRRRRhRtseeR}R~(	R@t
keySetNametreselectRRR`t	bindNamesRtkey((s,/usr/lib64/python2.7/idlelib/configDialog.pyRcs(


cCs<|jj}tjddd|d|s3dStjdj|||jdkrk|jd|=ntjdjtj	dd}|j
|s|jjdt
|jj|dn|jj||d	|jjtjd
jdd|jjtjd
jdd
|j|jdS(NsDelete Key SetsAre you sure you wish sto delete the key set %r ?R9RRRs- no custom keys -iRNRCRXRV(RRPttkMessageBoxtaskyesnoRtuserCfgtremove_sectionRhtSaveRmRRRRRRRRRnRpRRLR(R@RtitemList((s,/usr/lib64/python2.7/idlelib/configDialog.pyRs&	
##
cCs?|jj}tjddd|fd|s6dStjdj|||jdkrn|jd|=ntjdjtj	dd}|j
|s|jjdt
|jj|dn|jj||d	|jjtjd
jdd|jjtjd
jdd
|j|jdS(NsDelete ThemesAre you sure you wish sto delete the theme %r ?R9RgRRs- no custom themes -iRNRURXRV(RRPRRRRRRhRRmRRRRRRRRRnRpRRLR(R@t	themeNameR((s,/usr/lib64/python2.7/idlelib/configDialog.pyRs&	
##
cCs|jj}|jjd}tjd|dd|d|\}}|r||kr|jjrdd}|j|}|sdS|j||j	j
|q|j	j
|ndS(NtbgR9R,sPick new colour for : tinitialcolors2Your changes will be saved as a new Custom Theme. s-Enter a name for your new Custom Theme below.(RRPRtcgetttkColorChoosertaskcolorRtGetNewThemeNametCreateNewThemeRR(R@ttargett
prevColourt	rgbTuplettcolourStringRtnewTheme((s,/usr/lib64/python2.7/idlelib/configDialog.pyRs
cCs|jj}|jjd||jjr:d}nd}|j|jjd}|jj|i||6|j	j}|d|}|j
d|||dS(NRt
foregroundt
backgroundit-Rg(RRPRRRR0RRt
tag_configRRQ(R@t	newColourtplanet
sampleElementtthemetthemeElement((s,/usr/lib64/python2.7/idlelib/configDialog.pyRT	s	cCs>tjddtjdd}t|d||j}|S(NRRgRXsNew Custom Theme(RRmRR{(R@RRR((s,/usr/lib64/python2.7/idlelib/configDialog.pyRs
	cCs)|jd}|r%|j|ndS(NsNew Theme Name:(RR(R@tnewThemeName((s,/usr/lib64/python2.7/idlelib/configDialog.pyRscCs|jjr'd}|jj}nd}|jj}tj||}||jdjkr|jd|}x%|jD]}||||<qWn|j||tj	dd}|j
|jj|||jj
d|jdS(NRXRRgi(RRPRRRtGetThemeDictRhRtSaveNewThemeRmRRRRR(R@Rt	themeTypeRRtthemeChangesRtcustomThemeList((s,/usr/lib64/python2.7/idlelib/configDialog.pyR s 
cCs6|jjt}|jj|j|jdS(N(RRPR\RxRtlowerR(R@RRm((s,/usr/lib64/python2.7/idlelib/configDialog.pyR8scCsu|jj}|jjr*tj}n	tj}||jj|f}|jjd||j	j
d|dS(NRm(RxRPRwR{tBOLDRwRuRRRR+(R@RRxt
fontWeighttnewFont((s,/usr/lib64/python2.7/idlelib/configDialog.pyR=s	cCs|jjdkrN|jjdt|jjdt|jjdn6|jjdt|jjdt|jjd|j	dS(NRRi(
RRPRRRRRRRwtSetColourSample(R@((s,/usr/lib64/python2.7/idlelib/configDialog.pyRYGscGs|jdS(N(R(R@targs((s,/usr/lib64/python2.7/idlelib/configDialog.pyRRscCsd|j|jjd}|jjr2d}nd}|jj||}|jjd|dS(NiRRR(R0RRPRRttag_cgetRR(R@ttagRR((s,/usr/lib64/python2.7/idlelib/configDialog.pyRUs	cCs0|jjr!|jj}n|jj}x|jjD]}|j|d}tj||}|dkrtj|ddd|d<n||jdjkr|jd|}|d|kr||d|d	<n|d
|kr||d
|d<qn|j	j
||q@W|jdS(NiRR
tfgBgRRRgs-foregroundRs-background(RRPRRR0RRtGetHighlightRhRRR(R@RtelementTitleRtcolourst	themeDict((s,/usr/lib64/python2.7/idlelib/configDialog.pyRW]s"	cCs|jdS(N(tSetHelpListButtonStates(R@R((s,/usr/lib64/python2.7/idlelib/configDialog.pyRrscCs|jjdkr>|jjdt|jjdtn^|jjrv|jjdt|jjdtn&|jjdt|jjdtdS(NiR(RtsizeRRRRRRw(R@((s,/usr/lib64/python2.7/idlelib/configDialog.pyRuscCsht|dj}|rZ|jj|d|df|jjt|d|jn|jdS(NsNew Help Sourceii(	RR{tuserHelpListtappendRRRtUpdateUserHelpChangedItemsR(R@t
helpSource((s,/usr/lib64/python2.7/idlelib/configDialog.pyRs
cCs|jjt}|j|}t|dd|dd|dj}|sX||kr\dS||j|<|jj||jj||d|j|j	dS(NsEdit Help SourcetmenuItemitfilePathi(
RRxR\RRR{RRRR(R@t	itemIndexRt
newHelpSource((s,/usr/lib64/python2.7/idlelib/configDialog.pyRs


cCsD|jjt}|j|=|jj||j|jdS(N(RRxR\RRRR(R@R((s,/usr/lib64/python2.7/idlelib/configDialog.pyRs


c	Cssi|jdd<x[tdt|jdD]=}|jddt|tj|j|dd dq.WdS(s<Clear and rebuild the HelpFiles section in self.changedItemsRNt	HelpFilesiit;N(RhRtlenRRQRiRR(R@tnum((s,/usr/lib64/python2.7/idlelib/configDialog.pyRs#c	
CsTttj|}|jx!|D]}|jjt|q&Wtjddddd}|j	}|j
j|g|D]}|j	^q}||kr|j|}|jj
||jj||jj|ntjddddddd	}|jjd||jjtjddddddd|jdS(NRNRORmRXRds	font-sizeRjtintR t7t8t9R"R$t13t14t16t18t20t22s	font-bolditbool(RRRs10s11s12RRRRRR(RR{tfamiliesRRRRRt	GetOptionRRxRRxRR}R~RRRwR(	R@tfontsRmtconfiguredFonttlc_configuredFonttstlc_fontstcurrentFontIndexRu((s,/usr/lib64/python2.7/idlelib/configDialog.pytLoadFontCfgs*

		
cCs5tjddddddd}|jj|dS(NRNRSs
num-spacesRXiRjR(RRRzR(R@Rz((s,/usr/lib64/python2.7/idlelib/configDialog.pyt
LoadTabCfgsc	sjjtjdddddddtj}jjrtjdd}|jjj	||tjdd}|j|sj
jd	tj
jd
q9jj	||dnbtjdd}|jjj	||tjdd}|jjj	||djjj}|jdfd
jj	||djjdS(NRNRURXRjRiRgRRs- no custom themes -iRcsj|dS(Ni(R0(tx(R@(s,/usr/lib64/python2.7/idlelib/configDialog.pyRs(RRRRtCurrentThemeRPRmRRRRRRRRRR0RRRWRY(R@t
currentOptionRt
themeNames((R@s,/usr/lib64/python2.7/idlelib/configDialog.pytLoadThemeCfgs2





c	Cs`|jjtjdddddddtj}|jjrtjdd}|j|jj	||tjdd}|j|s|j
jd	t|j
jd
q9|jj	||dnbtjdd}|j|jj	||tjdd}|j|jj	||d|jtj}|j|dS(NRNRCRXRjRiRRRs- no custom keys -i(RRRRtCurrentKeysRPRmRRRRRRRRRRc(R@RRR((s,/usr/lib64/python2.7/idlelib/configDialog.pyt
LoadKeyCfgs,




c	Cs2|jjtjddddddd|jjtjddddd	dd|jjtjdd
ddd|jjtjdd
d
dd|jjtjddddd|jjtjdd
dddtj	|_
x(|j
D]}|jjt
|d	qW|jdS(NRNRDseditor-on-startupRXiRjRRfiROR&RR%RdReRR
(RRRRRRRRRtGetAllExtraHelpSourcesListRRRRR(R@thelpItem((s,/usr/lib64/python2.7/idlelib/configDialog.pytLoadGeneralCfgs 


cCs6|j|j|j|j|jdS(s
        load configuration from default and user config files and populate
        the widgets on the config dialog pages.
        N(RRRRR(R@((s,/usr/lib64/python2.7/idlelib/configDialog.pyR<s




cCsltjdj|s-tjdj|nx8|jD]*}||}tjdj|||q:WdS(s
        save a newly created core key set.
        keySetName - string, the name of the new key set
        keySet - dictionary containing the new key set
        RN(RRthas_sectiontadd_sectionRt	SetOption(R@RR`RR((s,/usr/lib64/python2.7/idlelib/configDialog.pyR+s

cCsltjdj|s-tjdj|nx8|jD]*}||}tjdj|||q:WdS(s
        save a newly created theme.
        themeName - string, the name of the new theme
        theme - dictionary containing the new theme
        RgN(RRRRRR(R@RRRR((s,/usr/lib64/python2.7/idlelib/configDialog.pyR7s

cCsltj|j||rRtj|j|||krRtj|j||Sntj|j|||S(N(RRnt
has_optionRpRtRemoveOptionR(R@RrRkRlR((s,/usr/lib64/python2.7/idlelib/configDialog.pytSetUserValueCscCs tjdjx|jjD]}t}x|j|jD]}|dkrptjdjdt}nxU|j||jD]<}|j|||}|j||||rt}qqWqAW|r!tj|jq!q!Wx%ddgD]}tj|jqW|j	dS(s3Save configuration changes to the user config file.RNRRRgN(
RRRRhRtFalseRRRR1(R@RrtcfgTypeHasChangesRkRlR((s,/usr/lib64/python2.7/idlelib/configDialog.pytSaveAllChangedConfigsKs 	cCs1|jjj}x|D]}|jqWdS(N(R9t
instance_dictRtRemoveKeybindings(R@twinInstancestinstance((s,/usr/lib64/python2.7/idlelib/configDialog.pytDeactivateCurrentConfig`s
cCsY|jjj}x@|D]8}|j|j|j|j|jqWdS(s'Dynamically apply configuration changesN(R9RRtResetColorizert	ResetFonttset_notabs_indentwidthtApplyKeybindingstreset_help_menu_entries(R@RR((s,/usr/lib64/python2.7/idlelib/configDialog.pytActivateConfigChangesgs




cCs|jdS(N(tdestroy(R@((s,/usr/lib64/python2.7/idlelib/configDialog.pyR8qscCs|j|jdS(N(RLR(R@((s,/usr/lib64/python2.7/idlelib/configDialog.pyRKts
cCs"|j|j|jdS(N(RRR(R@((s,/usr/lib64/python2.7/idlelib/configDialog.pyRLxs

cCsdS(N((R@((s,/usr/lib64/python2.7/idlelib/configDialog.pyRH}sN(Kt__name__t
__module__R)R2RWRXRYRZR=R;R<R=R>R?R@RARBRCRDRERFRGRHRIRJRKRLRMR1RQRvRRRR|RRRRcRRRRTRRRRRRRYRRRWRRRRRRRRRRRR<RRRRRRR8RKRLRH(((s,/usr/lib64/python2.7/idlelib/configDialog.pyRs	+	$	?	Y	E	p																										$													
								
					!									
			t__main__RGtDialogRIcCs
ttdS(NtSettings(Rtroot(((s,/usr/lib64/python2.7/idlelib/configDialog.pyRs(t__doc__tTkinterRRR{Rtidlelib.configHandlerRtidlelib.dynOptionMenuWidgetRtidlelib.tabbedpagesRtidlelib.keybindingDialogRtidlelib.configSectionNameDialogRtidlelib.configHelpSourceEditRtidlelibRR(RRtTkRRRR[Rtmainloop(((s,/usr/lib64/python2.7/idlelib/configDialog.pyt<module>s*
$l		

OHA YOOOO