+
    Ki  c                   s
   ^ RI t ^ RIHt ^ RIHtHt ^ RIHtHt ^ RI	H
t
 ^ RIHt ^ RIHt ^ RIHt ^ R	IHt ^ R
IHt ^ RIHt ] P.                  P1                  R4      R8H  t ! R R]
4      t ! R R]P6                  4      tR# )i    N)gettext)CallableOptional)GioGtk)BaseConfigBox)NoticeDialog)RuntimeUpdater)
sync_media)	AsyncCall)logger)gtk_safe$LUTRIS_EXPERIMENTAL_FEATURES_ENABLEDZ1c                   sf   a  ] tR t^t o R tRV 3R lR lltR tR tR tR t	V 3R lR	 lt
R
tV tR# )
UpdatesBoxc                s   V P                  V P                  \        R 4      4      4       V P                  V P                  \        R4      4      4       \	        R\        R4      V P
                  R7      V n        V P                  R\        R4      RV P                  R7      pV P                  V P                  V.4      R	R	^ 4       V P                  V P                  \        R
4      4      4       \	        R\        R4      V P                  R7      V n        V P                  V P                  V P                  .4      R	R	^ 4       R# )zRuntime updatesz6Runtime components include DXVK, VKD3D and Winetricks. zCheck for Updates)clickedZauto_update_runtimez'Automatically Update the Lutris runtimeT)ZdefaultZextra_widgetFzMedia updateszDownload Missing MediaN)ZaddZget_section_label_Zget_description_labelUpdateButtonBoxon_runtime_update_clickedupdate_runtime_boxZget_setting_box
pack_startZ_get_framed_options_list_boxon_download_media_clickedupdate_media_box)selfr      & B/usr/lib/python3.14/site-packages/lutris/gui/config/updates_box.pypopulateZUpdatesBox.populate   s   ''*;(<=>++A.f,ghi"1"a8K6LVZVtVt"u!11!7800	 2 
 	99;M:NOQVX]_`a''/(:;< /A6N4OY]YwYw x994;P;P:QRTY[`bcd    c          
      s`   < V ^8  d   QhRS[ RS[RS[P                  RS[RS[P                  /# )   label_markupactivegroupmarginreturn)strZboolr   RadioButtonZintZformat__classdict__   "r   __annotate__UpdatesBox.__annotate__#   s=      )-69ooOR	r   c                s   \         P                  P                  V4      pVP                  V4       VP	                  V4       VP                  V4       VP                  V4       VP                  V4       VP                  R 4       VP                  R4       VP                  4       pV'       d4   VP                  V4       VP	                  ^4       R VP                  n        V# )Tr   )r   r#   Znew_from_widgetZ
set_activeZset_margin_leftZset_margin_rightZset_margin_topZset_margin_bottomZset_visibleZ	set_labelZ	get_child
set_markupZpropswrap)r   r   r   r   r    Zradio_buttonlabels   &&&&&  r   _get_radio_buttonZUpdatesBox._get_radio_button#   s     66u='$$V,%%f-##F+&&v.  &r"%1%;%;%=\*!!!$#EKKr   c                s    V P                   P                  \        R 4      4       \        \        V P
                  4       R# )z$<i>Checking for missing media...</i>N)r   show_running_markupr   r	   r   on_media_updated)r   _widget   &&r   r   Z$UpdatesBox.on_download_media_clicked7   s,    11!4Z2[\*d334r   c                s   V'       d   V P                   P                  V4       R# V'       g(   V P                   P                  R \        R4      4       R# \	        VP                  4       4      '       d   \        R4      pR\        R4      R\        R4      R\        R4      R\        R4      R\        R4      R\        R4      /pVP                  4        FG  w  rVV'       g   K  VP                  R	4      '       g
   VR
,          pW6 RWEV^8  3,           2,          pKI  	  V P                   P                  R V4       R# V P                   P                  R \        R4      4       R# )r   zNothing to updatez	Updated: bannersZbannericonsZiconcoversZcoverz: , Z zNo new media found.N)r1   F)r2   F)r3   F)r1   T)r2   T)r3   T)r   
show_errorshow_completion_markupr   ZanyZvaluesZitemsZendswith)r   ZresulterrorZupdate_textZnamesZkeyZvalues   &&&    r   r.   ZUpdatesBox.on_media_updated;   s   !!,,U3!!88Q?R=ST!!K.K"AhK !F)!1W:!1Y<7 !H+E %lln
5&//55#t+WAe%!)4D.E-F#GGK	 -
 !!88[I!!88Q?T=UVr   c                s    \         P                  P                  4       pV'       d   VP                  '       g   \        P
                  ! R 4       R# VP                  # )z5No application or window found, how does this happen?N)r   ZApplicationZget_defaultwindowr
   r7   )r   Zapplicationr   r   _get_main_windowZUpdatesBox._get_main_windowS   s>    oo113+"4"4"4LLPQ!!!r   c                sB    R  pV P                  W P                  4       R# )c                  s,    \        R R7      p RV n        V # )T)ZforceF)r   Zupdate_runners)updaters    r   get_updaterZ9UpdatesBox.on_runtime_update_clicked.<locals>.get_updater[   s    $40G%*G"Nr   N)_trigger_updatesr   )r   r/   r;   s   && r   r   Z$UpdatesBox.on_runtime_update_clickedZ   s    	
 	k+B+BCr   c                s(   < V ^8  d   QhRS[ RRRR/# )r   updater_factory
update_boxr   r!   N)r   r$   r&   r   r'   r(   b   s)     ^ ^ ^FW ^\` ^r   c                s  aa V P                  4       pV'       g   R # V! 4       pVP                  4       oS'       dp   VV3R lpVP                  SWESP                  R7      pV'       d   SP	                  \        R4      4       R # \        \        R4      V P                  4       R7       R # SP                  R\        R4      4       R # )Nc                 s  < S Uu. uF  qP                   NK  	  pp\        V4      ^8X  d,   SP                  R\        R4      V^ ,          ,          4       R# SP                  R\        R4      RP	                  V4      ,          4       R# u upi )i   r   z%s has been updated.z%s have been updated.r4   N)ZnameZlenr6   r   Zjoin)Z_resultr:   Zcomponent_namescomponent_updatersr>   s   &  r   on_completeZ0UpdatesBox._trigger_updates.<locals>.on_completek   sx    ?Q"R?QG<<?Q"R'1,55b!<R:SVefgVh:hi55b!<S:TW[W`W`apWq:qr	 #Ss   B
)Zcompletion_functionZerror_functionz<i>Checking for updates...</i>z3Updates are already being downloaded and installed.)Zparentr   z%No updates are required at this time.)	r9   Zcreate_component_updatersZ!install_runtime_component_updatesr5   r-   r   r   Zget_toplevelr6   )r   r=   r>   r8   r:   r@   Zstartedr?   s   &&f    @r   r<   ZUpdatesBox._trigger_updatesb   s    &&(!#$>>@s >>"G]g]r]r ? G ..q1Q/RSQTU^b^o^o^qr--b!4[2\]r   )r   r   N)   )__name__
__module____qualname____firstlineno__r   r,   r   r.   r9   r   r<   __static_attributes____classdictcell__)r%   s   @r   r   r      s7     e  (5W0"D^ ^r   r   c                   sx   a a ] tR t^~t oRtV3R lV 3R lltV3R lR ltV3R lR ltV3R lR	 ltR
t	Vt
V ;t# )r   z_A box containing a button to start updating something, with methods to show a result
when done.c                sV   < V ^8  d   QhRS[ RS[ RS[S[P                  .R3,          /# )r   r+   button_labelr   N)r"   r   r   ZWidgetr$   r&   r   r'   UpdateButtonBox.__annotate__   s3     : :c : :xVZHZ?[ :r   c                s  < \         SV `  \        P                  P                  ^^RR7       \        P
                  ! R^ R7      V n        V P                  P                  V4       V P                  V P                  RR^ 4       \        P                  ! VRR7      V n
        V P                  P                  RV4       V P                  V P                  RR^ 4       \        P                  ! 4       V n        V P                  V P                  RR^ 4       \        P
                  ! RR7      V n        V P                  V P                  RR^ 4       R# )	rA   T)Zorientationr    Zspacingvisible)rJ   Zxalign)r+   rJ   r   F)r*   N)Zsuper__init__r   ZOrientationZ
HORIZONTALZLabelr+   r)   r   ZButtonbuttonZconnectZpack_endZSpinnerspinnerresult_label)r   r+   rH   r   	__class__s   &&&&r   rK   ZUpdateButtonBox.__init__   s    S__%?%?TU_cdYYtA6


e$

D$2jj|TBIw/dkk5%3{{}dllE5!4II40d''q9r   c                $   < V ^8  d   QhRS[ RR/# )r   markupr!   Nr"   r$   r&   r   r'   rI      s      # $ r   c                s   V P                   P                  4        V P                  P                  V4       V P                  P	                  4        V P
                  P	                  4        V P
                  P                  4        R # N)rL   hiderN   r)   showrM   Zstart)r   rQ   r0   r   r-   Z#UpdateButtonBox.show_running_markup   sX    $$V, r   c                s*   < V ^8  d   QhRS[ RS[ RR/# )r   r   completion_markupr!   NrR   r$   r&   r   r'   rI      s#     8 83 83 8SW 8r   c                sB   V P                   P                  4        V P                  P                  4        V P                  P                  4        V P                  P                  4        V P                  P                  V4       V P                  P                  V4       R # rS   )rL   rT   rN   rU   rM   stopr+   r)   )r   r   rV   s   &&&r   r6   Z&UpdateButtonBox.show_completion_markup   sk     

l+$$%67r   c                rP   )r   r7   r!   N)Z	Exceptionr$   r&   r   r'   rI      s     O O	 Od Or   c                s>   V P                   P                  4        V P                  P                  4        V P                  P                  4        V P                  P                  4        V P                  P                  R \        \        V4      4      ,          4       R# )z<b>Error:</b>%sN)	rL   rT   rN   rU   rM   rW   r)   r   r"   )r   r7   r0   r   r5   ZUpdateButtonBox.show_error   sg     $$%6#e*9M%MNr   )rL   r+   rN   rM   )rB   rC   rD   rE   Z__doc__rK   r-   r6   r5   rF   rG   Z__classcell__)rO   r%   s   @@r   r   r   ~   s:     : :  8 8O O Or   r   )Zosr    r   Ztypingr   r   Zgi.repositoryr   r   Z!lutris.gui.config.base_config_boxr   Zlutris.gui.dialogsr   Zlutris.runtimer   Zlutris.services.lutrisr   Zlutris.util.jobsr	   Zlutris.util.logr
   Zlutris.util.stringsr   ZenvironZgetr   r   ZBoxr   ) r   r   <module>rX      sc    	   % " ; + ) - & " (')zz~~6\']ad'd $i^ i^X(Ocgg (Or   