tzh
2024-08-22 c7d0944258c7d0943aa7b2211498fd612971ce27
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
[\¬Qc@s¡dZddlZddlZddlTddlZddlZdefd„ƒYZedkre    ƒZ
d„Z e e
dd    d
e ƒj ƒe
jƒndS( sKDialog to specify or edit the parameters for a user configured help source.iÿÿÿÿN(t*tGetHelpSourceDialogcBsSeZddd„Zd„Zd„Zd„Zd„Zdd„Zdd„Z    RS(    tcCsCtj||ƒ|jddƒ|jdtdtƒ|j|ƒ|j|ƒ|jƒ|jd|j    ƒ||_
d    |_ |j ƒ|jj|ƒ|jj|ƒ|jƒ|jƒ|jd|jƒ|jƒd|jƒd|jƒ|jƒd|jƒdfƒ|jƒ|jd|jƒ|jƒd    S(
sôGet menu entry and url/ local file location for Additional Help
 
        User selects a name for the Help resource and provides a web url
        or a local file as its source.  The user can enter a url or browse
        for the file.
 
        t borderwidthitheighttwidthtWM_DELETE_WINDOWs+%d+%dis<Return>N(tToplevelt__init__t    configuret    resizabletFALSEttitlet    transienttgrab_settprotocoltCanceltparenttNonetresultt CreateWidgetstmenutsettpathtwithdrawtupdate_idletaskstgeometryt winfo_rootxt winfo_widthtwinfo_reqwidtht winfo_rootyt winfo_heighttwinfo_reqheightt    deiconifytbindtOkt wait_window(tselfRR tmenuItemtfilePath((sd/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/configHelpSourceEdit.pyR s,  
        
 
 
    
c
Csmt|ƒ|_t|ƒ|_t|ƒ|_t|dddtƒ|_|jjdtdt    dt
ƒt |jdt dt d    d
ƒ}t|jd |jd d ƒ|_|jjƒt |jdt dt d    dƒ}t|jd |jd dƒ|_|jjƒ|jdt ddddƒ|jjdt ddddƒ|jdt ddddƒ|jjdt ddddƒt|jd    dd dd|jƒ}|jddƒt|ƒ}|jdtdtƒt|d    dd ddtd|jƒ|_|jjddddddddƒt|d    dd dd|jƒ|_|jjddddddddƒdS(NRitrelieftsidetexpandtfilltanchortjustifyttexts
Menu Item:t textvariableRis,Help File Path: Enter URL or browse for filei(tpadxitpadyitBrowseitcommandtOKtdefaulttrowitcolumnRi(t    StringVarRRtfontSizetFrametGROOVEt    frameMaintpacktTOPtTRUEtBOTHtLabeltWtLEFTtEntryt    entryMenut    focus_sett    entryPathtButtont
browseFiletBOTTOMtXtACTIVER#tbuttonOktgridRt buttonCancel(R%t    labelMenut    labelPatht browseButtont frameButtons((sd/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/configHelpSourceEdit.pyR,s<              %cCsÿdddddg}|jjƒ}|rEtjj|ƒ\}}nmd}tjd  d kr¦tjjtjjtj    ƒdƒ}tjj
|ƒs²tj ƒ}q²n tj ƒ}t j d|d|ƒ}|jd|d|ƒ}|rû|jj|ƒndS(Ns
HTML Filess *.htm *.htmltTEXTs    PDF Filess*.pdfsWindows Help Filess*.chms
Text Filess*.txts    All FilesRitwintDocRt    filetypest
initialdirt initialfile(s
HTML Filess *.htm *.htmlRT(s    PDF Filess*.pdfRT(sWindows Help Filess*.chm(s
Text Filess*.txtRT(s    All FilesR(RtgettostsplitRtsystplatformtjointdirnamet
executabletisdirtgetcwdt tkFileDialogtOpentshowR(R%RWRtdirtbaset
opendialogtfile((sd/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/configHelpSourceEdit.pyRILs$    $ cCsŸt}|jjƒ}|jƒ|sWtjddddd|ƒ|jjƒt}nDt    |ƒdkr›tjddddd|ƒ|jjƒt}n|S(s3Simple validity check for a sensible menu item nameR sMenu Item ErrortmessagesNo menu item specifiedRis(Menu item too long:
Limit 30 characters.(
tTrueRRZtstript tkMessageBoxt    showerrorRERFtFalsetlen(R%tmenuOkR((sd/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/configHelpSourceEdit.pytMenuOkcs 
          cCsÎt}|jjƒ}|jƒ|sWtjddddd|ƒ|jjƒt}ns|j    d ƒrina|d d    kr†|d}nt
jj |ƒsÊtjdddd
d|ƒ|jjƒt}n|S( s(Simple validity check for menu file pathR sFile Path ErrorRksNo help file path specified.Rswww.thttpisfile:sHelp file path does not exist.(swww.Rt( RlRRZRmRnRoRGRFRpt
startswithR[texists(R%tpathOkR((sd/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/configHelpSourceEdit.pytPathOkws(
           cCsª|jƒr¦|jƒr¦|jjƒjƒ|jjƒjƒf|_tjdkr™|jd}|j    dƒrsq™t
|jƒ|_d||jd<n|j ƒndS(Ntdarwinitwwwsfile:shttp:sfile://(Rzsfile:shttp:( RsRxRRZRmRRR]R^Rutlisttdestroy(R%teventR((sd/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/configHelpSourceEdit.pyR#s cCsd|_|jƒdS(N(RRR|(R%R}((sd/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/configHelpSourceEdit.pyRs    N(
t__name__t
__module__RRRIRsRxRR#R(((sd/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/configHelpSourceEdit.pyR
s!                  t__main__cCs!d}ttdƒ}|jGHdS(NRsGet Help Source(RtrootR(tkeySeqtdlg((sd/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/configHelpSourceEdit.pytrun¤sR.tDialogR3(t__doc__R[R]tTkinterRnRdRRR~tTkRR„RHR=tmainloop(((sd/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/configHelpSourceEdit.pyt<module>s  
  —