+
    Ki  c                   sd    ^ RI H t ^ RIHt ^ RIHt ^ RIHtHt  ! R R]P                  4      t
R# )i    )gettext)Gtk)InstallerLabel)gtk_safegtk_safe_urlsc                   st   a a ] tR t^	t oRtRV 3R lltR tR tR tR t	R t
R tR	 tRR
 ltR tRtVtV ;t# )InstallerScriptBoxzFBox displaying the details of a script, with associated action buttonsc                s  < \         SV `  4        Wn        W n        R V n        V P                  ^4       V P                  ^4       \        P                  ! ^^^R7      pVP                  V P                  4       RR^ 4       VP                  V P                  4       4       V P                  V4       V P                  V P                  V4      4       R # )N)spacingZ
margin_topZmargin_bottomT)Zsuper__init__scriptparentrevealerset_margin_leftset_margin_rightr   ZBox
pack_startget_infoboxaddget_install_buttonget_revealer)selfr   r	   revealedbox	__class__s   &&&& D/usr/lib/python3.14/site-packages/lutris/gui/installer/script_box.pyr   ZInstallerScriptBox.__init__   s    R b!ggbQa@t'')4q9'')*""8,-    c                s    R# )z0Return a string representation of the API rating  )r   s   &r   
get_ratingZInstallerScriptBox.get_rating   s    r   c           	     s   \         P                  ! ^R7      p\         P                  ! ^R7      p\        RV P                  R,          ,          4      pVP                  4       P                  R4       VP                  VRR^ 4       VP                  \        R\        V P                  R,          4      ,          RR	7      4       VP                  \        R
4      RR^ 4       \        V P                  4       RR	7      pVP                  ^R4       VP                  VRR^ 4       VP                  V4       VP                  V P                  4       4       VP                  \        \        V P                  R,          4      RR	7      4       V# )z"Return the central information box)r   z%sZrunnerz	info-pillFz	<b>%s</b>versionTZ
selectabler   g      ?Zdescription)r   VBoxZHBoxr   r   get_style_context	add_classr   r   r   r   Zset_alignmentZpack_endget_creditsr   )r   Zinfo_boxZ	title_boxZrunner_labelZrating_labels   &    r   r   ZInstallerScriptBox.get_infobox   s    88A&HHQ'	%dT[[-B&BC&&(22;?\5%;n[8DKK	<R3S%S`def^B/tQ?%doo&7DI""1c*<q9YT%%'(^M$++m2L$MZ^_`r   c                s&   \         P                  ! 4       V n        \         P                  ! RR7      pVP	                  V P                  4       4       V P                  P	                  V4       V P                  P                  V4       V P                  # )zReturn the revelaer widgetT)Zvisible)r   ZRevealerr
   r   r   	get_notesset_reveal_child)r   r   r      && r   r   ZInstallerScriptBox.get_revealer/   s^    hht$ !#&&x0}}r   c                s2   \         P                  ! 4       pVP                  ^ ^ ^ ^ 4       \         P                  ! \	        R4      4      pVP                  RV P                  4       VP                  4       pVP                  R4       VP                  V4       V# )z Return the install button widgetZInstallZclickedzsuggested-action)
r   	AlignmentZsetZButton_Zconnecton_install_clickedr   r   r   )r   ZalignZinstall_buttonZstyle_contexts   &   r   r   Z%InstallerScriptBox.get_install_button9   su    		!Q1AiL1y$*A*AB&88: 23		.!r   c                s    V P                   R,          P                  4       pV'       g   \        P                  ! 4       # V P	                  V4      # )zReturn the notes widgetnotes)r   stripr   r$   _get_installer_label)r   r'      & r   r!   ZInstallerScriptBox.get_notesE   s9    G$**,==?"((//r   c                s    V P                   P                  R R4      P                  4       pV'       g   \        P                  ! 4       # V P                  \        V4      4      # )Zcreditsr   )r   Zgetr(   r   r$   r)   r   )r   Zcredits_textr*   r   r    ZInstallerScriptBox.get_creditsL   sD    {{y"5;;===?"((|)DEEr   c                s    \        VR R7      pVP                  ^4       VP                  ^4       VP                  ^4       VP	                  ^4       V# )Tr   )r   Zset_margin_topZset_margin_bottomr   r   )r   ZtextZ_labelr#   r   r)   Z'InstallerScriptBox._get_installer_labelR   sK    6b!  $#r"r   c                sd    V P                   '       d   V P                   P                  V4       R# R# )z,Show or hide the information in the revealerN)r
   r"   )r   reveal   &&r   r+   ZInstallerScriptBox.revealZ   s"    ===MM**62 r   c                s`    V P                   P                  RV P                  R,          4       R# )z6Handler to notify the parent of the selected installerzinstaller-selectedr   N)r	   Zemitr   )r   Z_widgetr,   r   r&   Z%InstallerScriptBox.on_install_clicked_   s     -t{{9/EFr   )r	   r
   r   )NF)T)Z__name__Z
__module__Z__qualname__Z__firstlineno__Z__doc__r   r   r   r   r   r!   r    r)   r+   r&   Z__static_attributes__Z__classdictcell__Z__classcell__)r   Z__classdict__s   @@r   r   r   	   sB     P.$
0F3
G Gr   r   N)r    r%   Zgi.repositoryr   Zlutris.gui.installer.widgetsr   Zlutris.util.stringsr   r   r   r   r   r   r   <module>r-      s%       7 7XG XGr   