ó {fc@sNdZddlTddlZddlZddlZddlmZddlmZddl m Z ddl m Z ddl mZdd lmZdd lmZdd lmZd efd „ƒYZdZidd6Zd„Zdefd„ƒYZedkrJddlZejddddeƒddl m!Z!e!eƒndS(sèIDLE 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 GetKeysDialog(tGetCfgSectionNameDialog(tGetHelpSourceDialog(t TabbedPageSet(t view_text(t macosxSupportt ConfigDialogcBsÉeZdeed„Zd„Zd„Zd„Zd„Zd„Zd„Z d„Z d „Z d „Z d „Z d „Zd „Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„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,d+„Z-d,„Z.dNd-„Z0d.„Z1d/„Z2d0„Z3d1„Z4d2„Z5d3„Z6d4„Z7d5„Z8d6„Z9d7„Z:d8„Z;d9„Z<d:„Z=d;„Z>d<„Z?d=„Z@d>„ZAd?„ZBd@„ZCdA„ZDdB„ZEdC„ZFdD„ZGdE„ZHdF„ZIdG„ZJdH„ZKdI„ZLdJ„ZMdK„ZNdL„ZOdM„ZPRS(OtcCs�tj||ƒ||_|r+i|_n|jƒ|jddƒ|j|pTdƒ|jd|jƒd|j ƒ|sƒdndfƒid6d 6d7d 6d8d6d9d6d:d6d;d6d<d6d=d6d>d"6d?d%6d@d(6dAd+6dBd.6dCd16|_ |j ƒ|j ƒ|j d2td3tƒ|j|ƒ|jƒ|jd4|jƒ|jjƒ|jƒ|jƒ|sŒ|jƒ|jƒnd5S(Ds† _htest - bool, change box location when running htest _utest - bool, don't wait_window when running unittest t borderwidthisIDLE Preferencess+%d+%diii–tnormalt00s Normal Texttkeywordt01sPython Keywordst definitiont02sPython Definitionstbuiltint03sPython Builtinstcommentt04sPython Commentststringt05sPython Stringsthilitet06s Selected Textthitt07s Found Texttcursort08tCursortbreakt09sEditor Breakpointtconsolet10sShell Normal Textterrort11sShell Error Texttstdoutt12sShell Stdout Texttstderrt13sShell Stderr TexttheighttwidthtWM_DELETE_WINDOWN(R R (RR(RR(RR(RR(RR(RR(RR(RR(RR (R!R"(R#R$(R%R&(R'R((tToplevelt__init__tparentt instance_dictt wm_withdrawt configurettitletgeometryt winfo_rootxt winfo_rootyt themeElementstResetChangedItemst CreateWidgetst resizabletFALSEt transienttgrab_settprotocoltCancelttabPagest focus_sett LoadConfigstAttachVarCallbackst wm_deiconifyt wait_window(tselfR.R2t_htestt_utest((s,/usr/lib64/python2.7/idlelib/configDialog.pyR-sJ   !         cCs�t|ddddddgƒ|_|jjdtdtd tƒ|jƒ|jƒ|jƒ|j ƒ|j ƒ|j ƒjdt ƒdS( Nt page_namess Fonts/Tabst HighlightingtKeystGeneralt Extensionstsidetexpandtfill( RR?tpacktTOPtTRUEtBOTHtCreatePageFontTabtCreatePageHighlighttCreatePageKeystCreatePageGeneraltCreatePageExtensionstcreate_action_buttonstBOTTOM(RE((s,/usr/lib64/python2.7/idlelib/configDialog.pyR8Os       c Csûtjƒri}nidd6dd6}t|ddƒ}t|ddƒ}xud|jfd|jfd|jfd |jffD]=\}}t|d |d |d t|�j d t ddƒq„Wt|ddddƒj d t ƒ|j d t ƒ|S(NitpadxitpadyitOktApplyR>tHelpttexttcommandt takefocusRMiR)R i( RtisAquaTktFrameR]R^R>R_tButtonR:RPtLEFTRQRZ(REt paddingArgstoutertbuttonsttxttcmd((s,/usr/lib64/python2.7/idlelib/configDialog.pyRY[s     "c Csõ|j}t|ƒ|_t|ƒ|_t|ƒ|_t|ƒ|_tj |d+ƒ|_ |j j dj }t|dddtdd ƒ}t|dddtdd ƒ}t|ƒ}t|ƒ}t|d tdd ƒ}t|d ddtdtƒ|_|jjd|jƒt|ƒ}|jd|jjƒ|jjd|jƒt|ddƒ} t||jdd|jƒ|_t |d|jddddddd|jƒ} t|dt!ddƒ} t| d td|j ddƒ|_"t|ƒ} t| d tddƒ} 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 itreliefR`s Base Editor Font s Indentation Width tjustifys Font Face :R)iRbtexportselectionsRatyscrollcommandsSize :tvariabletonvalueitoffvalueitBoldtfonts,AaBbCcDdEe FfGgHhIiJjK 1234567890 #:+=(){}[]sPython Standard: 4 Spaces!torientt horizontalt tickintervaltfrom_ttoiRMR[R\RNROtanchori(Rli R (,R.t StringVartfontSizet BooleanVartfontBoldtfontNametIntVartspaceNumttkFonttFontteditFontR?tpagestframet LabelFrametGROOVERdtLabelRftListboxR:t listFontNametbindtOnListFontButtonReleaset ScrollbartconfigtyviewtsetRtNonet SetFontSampletoptMenuFontSizet CheckbuttontSOLIDtlabelFontSampletScalet scaleSpaceNumRPRRRStYRQtXtW(RER.R‡t frameFontt frameIndentt frameFontNametframeFontParamtlabelFontNameTitlet scrollFonttlabelFontSizeTitlet checkFontBoldtframeFontSampletframeIndentSizetlabelSpaceNumTitle((s,/usr/lib64/python2.7/idlelib/configDialog.pyRTpsn          ("""(c!CsB|j}t|ƒ|_t|ƒ|_t|ƒ|_t|ƒ|_t|ƒ|_t|ƒ|_t|ƒ|_ |j j dj }t |dddtddƒ}t |dddtddƒ}t|dtddd dZd ddddddtdddtƒ |_|j}|jdd„ƒ|jdd„ƒd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzf }x)|D]!}|jt|d|dƒq¢Wx;|jD]0}|dA„} |j|j|ddB| ƒqÑW|jdCtƒt|dtddƒ|_t|ƒ} t|jddDdE|jddƒ} t|j|j dddƒ|_!t"| dF|jdGdddHdE|j#ƒ|_$t"| dF|jdGdddIdE|j#ƒ|_%|jj&dƒt|ddJdE|j'ƒ} t(|ddKƒ} t"|dF|jdGddE|j)ddLƒ|_*t"|dF|jdGddE|j)ddMƒ|_+t||jddEdƒ|_,t||jddEdƒ|_-t|ddNdE|j.ƒ|_/t(|dOdƒ|_0|j1dPt2dQdRdSdRdTt3dUt4ƒ|j1dPt2dQdRdSdRdUt5ƒ|jj1dPt6dQdRdSdRdTt3dUt7ƒ| j1dPt6dQdRdSdƒ|jj1dPt6dQdRdSdRdTt3dUt4ƒ| j1dPt6dTt3dUt7dQdVdSdWƒ|j!j1dPt6dTt3dUt7dQdVdSdXƒ|j$j1dPt2dYt8ƒ|j%j1dPt9dYt:ƒ| j1dPt;dUt7dQdRdSdRƒ| j1dPt6dYt:dQdRdSdRƒ|j*j1dPt6dYt:dQdRƒ|j+j1dPt6dYt:dQdRdSdƒ|j,j1dPt6dUt7dQdRdSdRƒ|j-j1dPt6dUt7dYt:dQdRdSdRƒ|j/j1dPt6dUt7dQdRdSdRƒ|j0j1dPt6dUt7dSdRƒ|S({NRIR iRmR`s Custom Highlighting s Highlighting Theme iRuRli R Rthand2R*iR)i RbthighlightthicknessitwrapscSsdS(NR((te((s,/usr/lib64/python2.7/idlelib/configDialog.pytÌR s cSsdS(NR((R¬((s,/usr/lib64/python2.7/idlelib/configDialog.pyR­ÍR s#you can click hereRs R s#to choose itemstdefRt tfuncRs (param): s """string"""Rs var0 = s'string's var1 = s 'selected'Rs var2 = s'found'Rs var3 = tlistRt(R“s) s breakpoint("line")Rs s error R#scursor |s tshellR!R%R'cSs|jjƒjj|ƒdS(N(twidgettwinfo_toplevelthighlightTargetR’(teventtelem((s,/usr/lib64/python2.7/idlelib/configDialog.pyttemâsststatesChoose Colour for :RaRqtvaluet Foregroundt BackgroundsSave as New Custom Themes Select : sa Built-in Themesa Custom ThemesDelete Custom ThemetbdRMR[iR\RNROiiiR{(Rli R (s#you can click hereR(s R (s#to choose itemsR(s R (R®R(R¯R (R°R(s (param): R (s """string"""R(s var0 = R (s'string'R(s var1 = R (s 'selected'R(s var2 = R (s'found'R(s var3 = R (R±R(R²R (R“R(s) R (s breakpoint("line")R(s R (s error R#(R¯R (scursor |R(s R (R³R!(R¯R (R%R%(R¯R (R'R'(s R (<R.R|t builtinThemet customThemeR~tfgHilitetcolourR€tthemeIsBuiltinR¶R?R†R‡RˆR‰tTextR—R:tNONEttextHighlightSampleR�tinserttENDR6ttag_bindR�tDISABLEDRdtframeColourSetRet GetColourRR“toptMenuHighlightTargett RadiobuttontSetColourSampleBindingtradioFgtradioBgR’tSaveAsNewThemeRŠt SetThemeTypetradioThemeBuiltintradioThemeCustomtoptMenuThemeBuiltintoptMenuThemeCustomtDeleteCustomThemetbuttonDeleteCustomThemetnew_custom_themeRPRfRRRSR›RQRœtEtRIGHTR�RZ(RER.R‡t frameCustomt frameThemeR`t textAndTagsttxTatelementR¹t frameFgBgtbuttonSetColourtbuttonSaveCustomThemetlabelTypeTitle((s,/usr/lib64/python2.7/idlelib/configDialog.pyRU´sÀ            ("+ ( ""%%+%c Csõ|j}t|ƒ|_t|ƒ|_t|ƒ|_t|ƒ|_t|ƒ|_|jj dj }t |dddt ddƒ}t |dddt ddƒ}t |ƒ}t|ddƒ}t|ƒ}t|d tƒ}t|d td tƒ|_|jjd |jƒ|jd |jjƒ|jd |jjƒ|jjd|jƒ|jjd|jƒt|ddd |jdtƒ|_gtdƒD]$} t |ddddddƒ^q™} t| dd|jddd |j ddƒ|_!t| dd|jddd |j ddƒ|_"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-ƒ|j0dd dƒ|j1dd dƒ|j2d!dd"dd#dd$t3ƒ|jj2d!dd"dd$t4ƒ|j2d!dd"dd$t5ƒ|j2d!dd"dd$t6ƒ|j!j2d!dd"dd$t3t5ƒ|j"j2d!dd"dd$t3t5ƒ|j%j2d!dd"dd$t4ƒ|j&j2d!dd"dd$t4ƒ|j(j*dt/dt.dt7ddƒ| j*dt/dt.dt7ddƒ| dj*dt8dt-dt7ƒ| dj*dt8dt.dt7ddƒ|S(%NRJR iRmR`s Custom Key Bindings s Key Set sAction - Key(s)RvRbRosRaRptxscrollcommandsGet New Keys for SelectionRºR[R\iRqR»isUse a Built-in Key SetsUse a Custom Key SetsDelete Custom Key SetsSave as New Custom Key SetRMiRNROtweighttrowtcolumnt columnspantsticky(9R.R|t bindingTargett builtinKeyst customKeysR~tkeysAreBuiltint keyBindingR?R†R‡RˆR‰RdRŠR�t HORIZONTALR‹R:t listBindingsR�tKeyBindingSelectedR�R‘txviewR’Ret GetNewKeysRÊt buttonNewKeystrangeRÎt SetKeysTypetradioKeysBuiltintradioKeysCustomRR“toptMenuKeysBuiltintoptMenuKeysCustomtDeleteCustomKeystbuttonDeleteCustomKeystSaveAsNewKeySetRPRZRRRSRœRftcolumnconfiguret rowconfiguretgridR�tNSEWtNStEWtTrueRQ( RER.R‡RÝt frameKeySetst frameTargettlabelTargetTitlet scrollTargetYt scrollTargetXtitframestbuttonSaveCustomKeys((s,/usr/lib64/python2.7/idlelib/configDialog.pyRV#s~     4 ("%("##%" &c Cs1|j}t|ƒ|_t|ƒ|_t|ƒ|_t|ƒ|_t|ƒ|_t|ƒ|_ t|ƒ|_ |j j dj }t|dddtddƒ}t|dddtddƒ}t|dddtƒ}t|dddtƒ}t|dddtddƒ}t|dd ƒ}t|d |jd d d |jddƒ} t|d |jd dd |jddƒ} t|ddƒ} t|d |jd dd |jddƒ} t|d |jd d d |jddƒ} t|ddƒ}t|ddƒ}t|d|jddƒ}t|ddƒ}t|d|jddƒ}t|ddƒ}t|d |jd dddƒ}t|d |jd dddƒ}t|d |jd ddd ƒ}t|ƒ}t|ƒ}t|ƒ}t|d!d"d#td$tƒ|_|jd |jjƒ|jjd%|jƒ|jjd&|jƒt|dd'd(tdd)d |j ƒ|_!t|dd*dd)d |j"ƒ|_#t|dd+d(tdd)d |j$ƒ|_%|j&d,t'd-d"d.d"d/t(ƒ|j&d,t'd-d"d.d"d/t(ƒ|j&d,t'd-d"d.d"d/t(ƒ|j&d,t'd-d"d.d"d/t(ƒ|j&d,t'd-d"d.d"d0t)d/t*ƒ|j&d,t+d1t,d-d"d.d"ƒ| j&d,t-d1t,d-d"d.d"ƒ| j&d,t-d1t,d-d"d.d"ƒ| j&d,t+d1t,d-d"d.d"ƒ| j&d,t-d1t,d-d"d.d"ƒ| j&d,t-d1t,d-d"d.d"ƒ|j&d,t+d1t,d-d"d.d"ƒ|j&d,t-d1t.d-d2d.d"ƒ|j&d,t-d1t.d.d"ƒ|j&d,t-d1t.d-d2d.d"ƒ|j&d,t-d1t.d.d"ƒ|j&d,t+d1t,d-d"d.d"ƒ|j&d,t-d1t.d.d"ƒ|j&d,t-d1t.d.d"ƒ|j&d,t-d1t.d.d"ƒ|j&d,t-d-d"d.d"d/t/ƒ|j&d,t'd-d"d.d"d0t)d/t*ƒ|j&d,t-d1t,d/t/ƒ|jj&d,t+d1t.d0t)d/t*ƒ|j!j&d,t'd1t,d.d"ƒ|j#j&d,t'd1t,ƒ|j%j&d,t'd1t,d.d"ƒ|S(3NRKR iRmR`s Startup Preferences s Autosave Preferences s Additional Help Sources s At StartupRqR»iRasOpen Edit WindowisOpen Shell WindowsAt Start of Run (F5) sPrompt to Saves No Prompts$Initial Window Size (in characters)tWidtht textvariableR*itHeightsDefault Source EncodingtlocalesLocale-definedsutf-8sUTF-8tnoneR“R)iRbRoRpstEditRºitAddtRemoveRMR[R\RORNR{i (0R.R|twinWidtht winHeightR�t startupEdittautoSavetencodingR~tuserHelpBrowsert helpBrowserR?R†R‡RˆR‰RdRŠRÎRøtEntryR�R‹R:tlistHelpR�R‘R’R�tHelpSourceSelectedReRÊtHelpListItemEdittbuttonHelpListEdittHelpListItemAddtbuttonHelpListAddtHelpListItemRemovetbuttonHelpListRemoveRPRQRœRRRSRfR�RÜRÛR›(RER.R‡tframeRunt frameSavet frameWinSizet frameEncodingt frameHelptlabelRunChoiceTitletradioStartupEdittradioStartupShelltlabelRunSaveTitlet radioSaveAskt radioSaveAutotlabelWinSizeTitletlabelWinWidthTitlet entryWinWidthtlabelWinHeightTitletentryWinHeighttlabelEncodingTitletradioEncLocalet radioEncUTF8t radioEncNonet frameHelpListtframeHelpListButtonstscrollHelpList((s,/usr/lib64/python2.7/idlelib/configDialog.pyRWpsÀ         """"("""""""""""(%cCs�|jjd|jƒ|jjd|jƒ|jjd|jƒ|jjd|jƒ|jjd|jƒ|j jd|j ƒ|j jd|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"ƒdS(Ntw(#R}ttrace_variabletVarChanged_fontR€RR‚tVarChanged_spaceNumRÂtVarChanged_colourR¿tVarChanged_builtinThemeRÀtVarChanged_customThemeRÃtVarChanged_themeIsBuiltinR¶tVarChanged_highlightTargetRðtVarChanged_keyBindingRítVarChanged_builtinKeysRîtVarChanged_customKeysRïtVarChanged_keysAreBuiltinRtVarChanged_winWidthRtVarChanged_winHeightRtVarChanged_startupEditRtVarChanged_autoSaveRtVarChanged_encoding(RE((s,/usr/lib64/python2.7/idlelib/configDialog.pyRBãs$cCsŸx˜|j|j|j|j|j|j|j|j|j|j |j |j |j |j |j|j|j|jfD]$}|jd|jƒddƒqsWdS(NR>ii(R}R€RR‚RÂR¿RÀRÃR¶RðRíRîRïRRRRRt trace_vdeletet trace_vinfo(REtvar((s,/usr/lib64/python2.7/idlelib/configDialog.pytremove_var_callbacks÷scGss|jjƒ}|jddd|ƒ|jjƒ}|jddd|ƒ|jjƒ}|jddd|ƒdS(sÎWhen one font attribute changes, save them all, as they are not independent from each other. In particular, when we are overriding the default font, we need to write out everything. tmaint EditorWindowRus font-sizes font-boldN(R€tgettAddChangedItemR}R(REtparamsR»((s,/usr/lib64/python2.7/idlelib/configDialog.pyR@s cGs)|jjƒ}|jddd|ƒdS(NRTtIndents num-spaces(R‚RVRW(RERXR»((s,/usr/lib64/python2.7/idlelib/configDialog.pyRA scGs|jƒdS(N(tOnNewColourSet(RERX((s,/usr/lib64/python2.7/idlelib/configDialog.pyRBscGsÔ|jjƒ}|dkr�tjdddƒdkrO|jddddƒn|jddd|ƒ|jjdd d d ƒnE|jddd|ƒ|jdddd ƒ|jjdd d d ƒ|jƒdS(Ns IDLE DarkRTtThemetnamesIDLE News IDLE Classictname2R`sNew theme, see Helptfgs#500000R tblack(R¿RVRt GetOptionRWRÚR�tPaintThemeSample(RERXR»((s,/usr/lib64/python2.7/idlelib/configDialog.pyRCs  cGsB|jjƒ}|dkr>|jddd|ƒ|jƒndS(Ns- no custom themes -RTR[R\(RÀRVRWRa(RERXR»((s,/usr/lib64/python2.7/idlelib/configDialog.pyRD"s cGsF|jjƒ}|jddd|ƒ|r8|jƒn |jƒdS(NRTR[tdefault(RÃRVRWRCRD(RERXR»((s,/usr/lib64/python2.7/idlelib/configDialog.pyRE(s  cGs|jƒdS(N(tSetHighlightTarget(RERX((s,/usr/lib64/python2.7/idlelib/configDialog.pyRF0scGs•|jjƒ}|jjƒ}|jjtƒjƒd}tj|ƒrb|jd|||ƒn/tj |ƒ}|d}|jd|||ƒdS(Nitkeyst _cfgBindingst extensions( RðRVRîRòtANCHORtsplitRt IsCoreBindingRWtGetExtnNameForEvent(RERXR»tkeySetR·textNametextKeybindSection((s,/usr/lib64/python2.7/idlelib/configDialog.pyRG3s cGs6|jjƒ}|jddd|ƒ|j|ƒdS(NRTRJR\(RíRVRWt LoadKeysList(RERXR»((s,/usr/lib64/python2.7/idlelib/configDialog.pyRH?scGsE|jjƒ}|dkrA|jddd|ƒ|j|ƒndS(Ns- no custom keys -RTRJR\(RîRVRWRn(RERXR»((s,/usr/lib64/python2.7/idlelib/configDialog.pyRIDs cGsF|jjƒ}|jddd|ƒ|r8|jƒn |jƒdS(NRTRJRb(RïRVRWRHRI(RERXR»((s,/usr/lib64/python2.7/idlelib/configDialog.pyRJJs  cGs)|jjƒ}|jddd|ƒdS(NRTRUR*(RRVRW(RERXR»((s,/usr/lib64/python2.7/idlelib/configDialog.pyRKRscGs)|jjƒ}|jddd|ƒdS(NRTRUR)(RRVRW(RERXR»((s,/usr/lib64/python2.7/idlelib/configDialog.pyRLVscGs)|jjƒ}|jddd|ƒdS(NRTRKseditor-on-startup(RRVRW(RERXR»((s,/usr/lib64/python2.7/idlelib/configDialog.pyRMZscGs)|jjƒ}|jddd|ƒdS(NRTRKtautosave(RRVRW(RERXR»((s,/usr/lib64/python2.7/idlelib/configDialog.pyRN^scGs)|jjƒ}|jddd|ƒdS(NRTRUR(RRVRW(RERXR»((s,/usr/lib64/python2.7/idlelib/configDialog.pyRObscCs)iid6id6id6id6|_dS(NRTt highlightRdRf(t changedItems(RE((s,/usr/lib64/python2.7/idlelib/configDialog.pyR7fscCsLt|ƒ}||j|kr3i|j||tjddƒtjddƒ}t|d||ƒj}|S(NtuserRdRbsNew Custom Key Set(RRvRR„(RER’t usedNamesR“((s,/usr/lib64/python2.7/idlelib/configDialog.pyR…»s cCs)|jdƒ}|r%|j|ƒndS(NsNew Key Set Name:(R…Rˆ(REt newKeysName((s,/usr/lib64/python2.7/idlelib/configDialog.pyRÿÂscCs|jjdtƒdS(NRº(RöR�R€(RER·((s,/usr/lib64/python2.7/idlelib/configDialog.pyRóÇsc Cs#|jjƒr!|jjƒ}n|jjƒ}tj|ƒ}i}x8|D]0}|dd!}dj||ƒ}|||tjddƒtjddƒ}t|d||ƒj}|S(NR”RpRbsNew Custom Theme(RRvRR„(RER’R•R¾((s,/usr/lib64/python2.7/idlelib/configDialog.pyR¸Ts cCs)|jdƒ}|r%|j|ƒndS(NsNew Theme Name:(R¸R¹(REt newThemeName((s,/usr/lib64/python2.7/idlelib/configDialog.pyRÒ[scCsñ|jjƒr'd}|jjƒ}nd}|jjƒ}tj||ƒ}||jdkr”|jd|}x|D]}|||||jjdtƒ|jjdtƒn^|jjƒrv|jjdtƒ|jjdtƒn&|jjdtƒ|jjdtƒdS(NiRº(RtsizeR"R�RÊR&R¡R€(RE((s,/usr/lib64/python2.7/idlelib/configDialog.pyRÛ±scCsht|dƒj}|rZ|jj|d|dfƒ|jjt|dƒ|jƒn|jƒdS(NsNew Help Sourceii( RR„t userHelpListtappendRRÇRÈtUpdateUserHelpChangedItemsRÛ(REt helpSource((s,/usr/lib64/python2.7/idlelib/configDialog.pyR#½s  cCs¨|jjtƒ}|j|}t|dd|dd|dƒj}| sX||kr\dS||j|<|jj|ƒ|jj||dƒ|jƒ|j ƒdS(NsEdit Help SourcetmenuItemitfilePathi( RR�RgRÝRR„R‰RÇRßRÛ(REt itemIndexRàt newHelpSource((s,/usr/lib64/python2.7/idlelib/configDialog.pyR!Ås   cCsD|jjtƒ}|j|=|jj|ƒ|jƒ|jƒdS(N(RR�RgRÝR‰RßRÛ(RERã((s,/usr/lib64/python2.7/idlelib/configDialog.pyR%Ós   c Cspi|jdd¯s cCs"|jƒ|jƒ|jƒdS(N(R^RR(RE((s,/usr/lib64/python2.7/idlelib/configDialog.pyR]³s  cCs"|jƒ|jƒ|jƒdS(N(RªR®R¯(RE((s,/usr/lib64/python2.7/idlelib/configDialog.pyR^¸s  c Cs6|jj}t|dddttj|dƒƒdS(NR2sHelp for IDLE preferencesR`R (R?t _current_pageRt help_commont help_pagesRV(REtpage((s,/usr/lib64/python2.7/idlelib/configDialog.pyR_½s c Cs|j}|jjdj}tjd|_tjd|_|j t ƒ|_ |j ƒt |ƒ|_ |jdddƒ|jdddƒt|d|j dd ƒ|_|jjd |jƒt|d |jjƒ}|j|j_t|d d dd ƒ|_|jjddddddƒ|jddddddƒ|jjdddddddddgƒ|jddddƒi|_d|_||_|j|_ d}x6t!|j"ƒD]%}|j#|ƒ|d|d}q¼W|j j|ƒ|jj$dƒ|jdƒdS(sPart of the config dialog used for configuring IDLE extensions. This code is generic - it works for any and all IDLE extensions. IDLE extensions save their configuration options using idleConf. This code reads the current configuration using idleConf, supplies a GUI interface to change the configuration values, and saves the changes using idleConf. Not all changes take effect immediately - some may require restarting IDLE. This depends on each extension's implementation. All values are treated as text, and it is up to the user to supply reasonable values. The only exception to this are the 'enable*' options, which are boolean, and can be toggled with a True/False button. RLRfiRçiit listvariablet selectmodetbrowses<>RaR*iúR)RéRèRëtnwstnstnsewR[i R\R t{s} N(%R.R?R†R‡RRwtext_defaultCfgR«t ext_userCfgtregistertis_inttload_extensionsR|textension_namesRRR‹textension_listR�textension_selectedR�R‘R’RpRˆt details_frameRR1t config_frameR“tcurrent_extensiont outerframettabbed_page_settsortedRftcreate_extension_framet selection_set(RER.R‡tscrollt ext_namestext_name((s,/usr/lib64/python2.7/idlelib/configDialog.pyRXÂs<   +     c Csæi|_x'tjdtƒD]}g|j|yt |ƒ}d}Wq?t k r:|}d }q?XnXy+|jj ||d|dt d |ƒ}Wnt k rƒ|}nXt|ƒ} | jt|ƒƒ|j|ji|d 6|d6|d 6|d 6| d 6ƒq²Wq=Wd S(sAFill self.extensions with data from the default and user configs.t active_onlytenabletrawRRRRRÿRbR\R»RRN(RfRt GetExtensionsRR8R+Rxt startswithtremoveRyRtKeyErrorRRøR“R,R|R’RrRÞ( RER=topt_listtopt_nametenablestdef_strtdef_objtopt_typeR»RR((s,/usr/lib64/python2.7/idlelib/configDialog.pyR/÷sH                cCsÐ|jjƒ}|r*|jj|ƒ}n|dksE||jkr„|jr„|jjddƒ|j|jjƒd|_q„n|rÌ|jjd|ƒ|j|j ddddddƒ||_ndS(NR`R RéiRèRëR)( R1R¡RVR“R5R3R�R4t grid_forgetR(RER·tnewsel((s,/usr/lib64/python2.7/idlelib/configDialog.pyR2$s #cCs~t|jddddƒ}||j|<|j}xFt|j|ƒD]1\}}t|d|dƒ}|jd|ddd tƒ|d }|d d kròt |d |d|dddddt ddddƒjd|ddd t ddƒqE|d dkrHt |d |ddd|j dfƒjd|ddd tddƒqEt |d |ƒjd|ddd tddƒqEWdS( s=Create a frame holding the widgets to configure one extensionR)iúR*R`R\RèRéiRëRRRÿRRRqRrRRsRt indicatoront selectcolorR iiR[iRtvalidateR§tvalidatecommands%PN(tVerticalScrolledFrameR3R4tinteriort enumerateRfRŠRtNWR–R:R�RR.R(RER=tft entry_areaRètopttlabelRR((s,/usr/lib64/python2.7/idlelib/configDialog.pyR92s&     cCsv|d}|d}|djƒjƒp-|}|dj|ƒ||kr`|jj||ƒS|jj|||ƒS(NR\RbRR(RVtstripR’R,RR(RERtRWR\RbR»((s,/usr/lib64/python2.7/idlelib/configDialog.pytset_extension_valueLs   cCsmt}xJ|jD]?}|j|}x)|D]!}|j||ƒr*t}q*q*WqW|ri|jjƒndS(s3Save configuration changes to the user config file.N(RRfRZRR,R­(REt has_changesR=R}RW((s,/usr/lib64/python2.7/idlelib/configDialog.pyRXs  N(Qt__name__t __module__RR-R8RYRTRURVRWRBRSR@RARBRCRDRERFRGRHRIRJRKRLRMRNROR7RWRRÓRøRõR…RÿRóRˆRnRýRØRÌRZR¸RÒR¹RŽR“R”RcRÏRÒRaR RÛR#R!R%RßRþRRR R RAR™RÊRR®RªR¯R>R]R^R_RXR/R2R9RZR(((s,/usr/lib64/python2.7/idlelib/configDialog.pyR sš5  D o M s                 $                        !           5 -   shWhen you click either the Apply or Ok buttons, settings in this dialog that are different from IDLE's default are saved in a .idlerc directory in your home directory. Except as noted, these changes apply to all versions of IDLE installed on this machine. Some do not take affect until IDLE is restarted. [Cancel] only cancels changes made since the last save. s¨ Highlighting: The IDLE Dark color theme is new in October 2015. It can only be used with older IDLE releases if it is saved as a custom theme, with a different name. RIcCs5|s tSyt|ƒtSWntk r0tSXdS(s(Return 's is blank or represents an int'N(RRRøR(Rû((s,/usr/lib64/python2.7/idlelib/configDialog.pyR.vs  RQcBseZdZd„ZRS(sÞA pure Tkinter vertically scrollable frame. * Use the 'interior' attribute to place widgets inside the scrollable frame * Construct and pack/place/grid normally * This frame only allows vertical scrolling c s0tj||||Žt|dtƒ}|jdtdtdtƒt|ddddd|j d d ƒ‰ˆjdt dt dt ƒ|j d ˆjƒˆjdƒˆjdƒtˆƒ|_‰ˆjddd ˆd tƒ‰‡‡fd†}ˆjd|ƒ‡‡‡fd†}ˆjd|ƒdS(NRvRORMRNR¾iRªRpR*iðRatwindowR{cs0ˆjƒˆjƒf}ˆjdd|ƒdS(Nt scrollregions 0 0 %s %s(twinfo_reqwidthtwinfo_reqheightR�(R·RÜ(tcanvasRR(s,/usr/lib64/python2.7/idlelib/configDialog.pyt_configure_interior�ss cs8ˆjƒˆjƒkr4ˆjˆdˆjƒƒndS(NR*(R`t winfo_widtht itemconfigure(R·(RbRRt interior_id(s,/usr/lib64/python2.7/idlelib/configDialog.pyt_configure_canvas£s(RdR-R�tVERTICALRPR›RÜR:tCanvasR’RfRSRRR�R‘t xview_movetot yview_movetoRRt create_windowRTR�(RER.RÓtkwt vscrollbarRcRg((RbRRRfs,/usr/lib64/python2.7/idlelib/configDialog.pyR-ˆs   (R\R]t__doc__R-(((s,/usr/lib64/python2.7/idlelib/configDialog.pyRQ�st__main__s#idlelib.idle_test.test_configdialogt verbosityitexit(trun("RotTkinterR¨R¶Rƒtidlelib.configHandlerRtidlelib.dynOptionMenuWidgetRtidlelib.keybindingDialogRtidlelib.configSectionNameDialogRtidlelib.configHelpSourceEditRtidlelib.tabbedpagesRtidlelib.textViewRtidlelibRR,R R!R"R.RdRQR\tunittestRTRtidlelib.idle_test.htestRs(((s,/usr/lib64/python2.7/idlelib/configDialog.pyt s6 $ÿÿÿÿÿX  +