
    .hh?#                     V   S r SSKrSSKrSSKrSSKJrJr  SSKJrJ	r	J
r
JrJr  SSKJrJrJrJrJrJrJrJrJrJr  SSKJr  \" 5       r\R                  S:X  a  \R4                  S:  a  S	OS
rO\" 5       S   SS r " S S\5      r\S:X  a  SSKJr  \" SSSS9  SSK J!r!  \!" \5        gg)zAbout Dialog for IDLE

    N)python_versionarchitecture)ToplevelFrameLabelButton
PhotoImage)
SUNKENTOPBOTTOMLEFTXBOTHWEWNSEWE)textviewdarwinl        6432   c                   p    \ rS rSrSrSSSS.S jjrS rS rS	 rS
 r	S r
S rS rS rSS jrSS jrSrg)AboutDialog   z!Modal about dialog for idle

    NF)_htest_utestc                   [         R                  " X5        U R                  SS9  U R                  SUR	                  5       S-   UR                  5       U(       d  SOS-   4-  5        SU l        SU l        U R                  5         U R                  SSS	9  U R                  U=(       d    S
[         S[         S35        U R                  U5        U R                  5         U R                  SU R                   5        Xl        U R$                  R'                  5         U R)                  SU R                   5        U R)                  SU R                   5        SU l        X@l        U(       d!  U R/                  5         U R1                  5         gg)zCreate popup, do not return until tk widget destroyed.

parent - parent of this dialog
title - string which is title of popup dialog
_htest - bool, change box location when running htest
_utest - bool, don't wait_window when running unittest
   )borderwidthz+%d+%d   d   z#bbbbbbz#000000F)heightwidthzAbout IDLE z (z bit)WM_DELETE_WINDOWz<Return>z<Escape>N)r   __init__	configuregeometrywinfo_rootxwinfo_rootybgfgcreate_widgets	resizabletitlepyverbits	transientgrab_setprotocolokparent	button_ok	focus_setbind_current_textviewr   	deiconifywait_window)selfr6   r/   r   r   s        ;/opt/python-3.13.8/usr/lib/python3.13/idlelib/help_about.pyr&   AboutDialog.__init__   s>    	$'1%h**,R/**,bCH"J J 	K e51

5 6 r$u5	7v($''2  "		*dgg&		*dgg&!%NN     c           	      
  ^^ [        U S[        S9n[        U 5      nUR                  [        [        S9  UR                  [
        S[        S9  [        USU R                  S9U l	        U R                  R                  SSS	9  [        XR                  S
9nUR                  S[        S9  [        USU R                  U R                  SS9nUR                  SS[        SSS9  U R                  5       R!                  S5      nUS:  a  SOSn["        R$                  R'                  ["        R$                  R)                  ["        R$                  R+                  [,        5      5      SSU 35      n[/        U R                  5       US9U l        [        X0R0                  U R                  S9nUR                  SS[2        SSSS9  Sn	[        X9[4        U R                  U R                  S9n
U
R                  SS[2        SSSS9  Sm[        US S!U R                  U4S" jS#9nUR                  S$S[2        SSS9  S%[6        R8                  S S -  m[        US&S!U R                  U4S' jS#9nUR                  S(SS[2        SSS)9  [        US*[        SU R                  S+9R                  S,S[:        SSSS9  [=        U R?                  5       5      nX]:w  a  S-U-   OS.nS/[@         S0U U 3n[        X?U R                  U R                  S19nUR                  S2S[2        SSS9  [        X0R                  S
9nUR                  SSS[B        S39  [        US4S,U R                  U RD                  S#9U l#        U RF                  R                  [4        SSS59  [        US6S,U R                  U RH                  S#9U l%        U RJ                  R                  [4        SSS59  [        US7S,U R                  U RL                  S#9U l'        U RN                  R                  [4        SSS59  [        US*[        SU R                  S+9R                  S8S[:        SSSS9  [        USU R                  U R                  S19nUR                  S9S[2        SSS9  [        X0R                  S
9nUR                  S:SS[B        S39  [        US;S,U R                  U RP                  S#9U l)        U RR                  R                  [4        SSS59  [        US<S,U R                  U RT                  S#9U l+        U RV                  R                  [4        SSS59  [        US7S,U R                  U RX                  S#9U l-        U RZ                  R                  [4        SSS59  g )=Nr   )r    relief)sidefillT)rC   expandrD   Close)textcommandr   )padxpady)r+   )rE   rD   IDLE)courier   bold)rG   r,   r+   fontr   
   )rowcolumnstickyrI   rJ   tk_patchLevelz8.6z.pngz.gifIconsidle_48)masterfile)imager+   )rQ   rR   rS   rowspanrI   rJ   z=Python's Integrated Development
and Learning Environment




)rG   justifyr,   r+      )rQ   rR   rS   
columnspanrI   rJ   zhttps://discuss.python.orgzPython (and IDLE) Discussion#   c                  0   > [         R                  " T 5      $ N
webbrowseropen)
forums_urls   r>   <lambda>,AboutDialog.create_widgets.<locals>.<lambda>\   s    1Lr@   )rG   r$   highlightbackgroundrH      z/https://docs.python.org/%d.%d/library/idle.htmlzIDLE Documentationc                  0   > [         R                  " T 5      $ r`   ra   )docs_urls   r>   re   rf   d   s    1Jr@      )rQ   rR   r]   rS   rI   rJ      )r    rB   r#   r+      z and  zPython z with tcl/tk )rG   r,   r+   	   )rQ   rR   r]   rS   License)rC   rI   rJ   	CopyrightCredits         ReadmeNews).r   r
   packr   r   r   r   r   r5   r7   r+   r   r,   gridr   _rootgetvarospathjoinabspathdirname__file__r	   
icon_imager   r   sysversion_infor   strinfo_patchlevelr0   r   show_py_license
py_licenseshow_py_copyrightpy_copyrightshow_py_credits
py_creditsshow_readmereadmeshow_idle_news	idle_newsshow_idle_creditsidle_credits)r=   frameframe_buttonsframe_backgroundheadertkpatchexticonlogobyline_textbylineforumsdocstclvertkverversionsvers
py_buttonsidleidle_buttonsrj   rd   s                       @@r>   r-   AboutDialog.create_widgets<   s   d&9dQ/

Dt
4G(,1+ 773T5'f''(?A!ABR@**,%%o65(ffww||BGGOOBGGOOH,EF#wse_6$DJJLtD%__I		a!QRb	IZ'4''dgg/!A!"1M1
(/MUW59WW)LN 	!ABR@ F$$Ra()&-A59WW)JL 			aa	L 	Af477	$$(DQq45AA %) %G T))+,%,%6'!BUG=@%TWWM		a!"1	=+8
BqQtD )159WW)-)=)=? 	$Rb9":Kq7;ww+/+A+AC 	Dr; )159WW)-)=)=? 	$Rb9Af477	$$(DR"45AA %) %G %Ftww477K		b12A	>-'':bqF\15%)%5%57 	d"5648GG(,(;(;= 	BR8"<iq7;ww+/+A+AC 	Dr;r@   c                 0    U R                  S[        5        g)zHandle License button event.zAbout - LicenseN)display_printer_textlicenser=   s    r>   r   AboutDialog.show_py_license   s    !!"3W=r@   c                 0    U R                  S[        5        g)zHandle Copyright button event.zAbout - CopyrightN)r   	copyrightr   s    r>   r   AboutDialog.show_py_copyright   s    !!"5yAr@   c                 0    U R                  S[        5        g)z#Handle Python Credits button event.zAbout - Python CreditsN)r   creditsr   s    r>   r   AboutDialog.show_py_credits   s    !!":GDr@   c                 *    U R                  SSS5        g)z!Handle Idle Credits button event.zAbout - CreditszCREDITS.txtutf-8Ndisplay_file_textr   s    r>   r   AboutDialog.show_idle_credits   s    0-Ir@   c                 *    U R                  SSS5        g)zHandle Readme button event.zAbout - Readmez
README.txtasciiNr   r   s    r>   r   AboutDialog.show_readme   s    /wGr@   c                 *    U R                  SSS5        g)zHandle News button event.zAbout - Newsz	News3.txtr   Nr   r   s    r>   r   AboutDialog.show_idle_news   s    ~{GDr@   c                     UR                  5         SR                  UR                  5      n[        R                  " XX0R
                  S9U l        g)zCreate textview for built-in constants.

Built-in constants have type _sitebuiltins._Printer.  The
text is extracted from the built-in and then sent to a text
viewer with self as the parent and title as the title of
the popup.

r   N)_Printer__setupr~   _Printer__linesr   	view_textr   r:   )r=   r/   printerrG   s       r>   r    AboutDialog.display_printer_text   s@     	!yy001!)!3!3kk"3r@   c                 
   [         R                  R                  [         R                  R                  [         R                  R	                  [
        5      5      U5      n[        R                  " XXCU R                  S9U l	        g)zCreate textview for filename.

The filename needs to be in the current directory.  The path
is sent to a text viewer with self as the parent, title as
the title of the popup, and the file encoding.
r   N)
r|   r}   r~   r   r   r   r   	view_filer   r:   )r=   r/   filenameencodingfns        r>   r   AboutDialog.display_file_text   sP     WW\\"''//"''//(*CDhO!)!3!3dkk";r@   c                 D    U R                  5         U R                  5         g)zDismiss help_about dialog.N)grab_releasedestroy)r=   events     r>   r5   AboutDialog.ok   s    r@   )r:   r   r+   r7   r,   r   r   r   r6   r   r   r   r   r`   )__name__
__module____qualname____firstlineno____doc__r&   r-   r   r   r   r   r   r   r   r   r5   __static_attributes__ r@   r>   r   r      sO     U5  DW<t>BEJHE3	;r@   r   __main__)mainz!idlelib.idle_test.test_help_aboutF)	verbosityexit)run)"r   r|   r   rb   platformr   r   tkinterr   r   r   r   r	   r
   r   r   r   r   r   r   r   r   r   idlelibr   r0   maxsizer1   r   r   unittestr   idlelib.idle_test.htestr   r   r@   r>   <module>r      s    
 
  1 > > F F F <<8;;&4DD>!Ra Du( up z	,F+ r@   