+
    Ki  c                   s   R t ^ RIt^ RIt^ RIHt ^ RIHt ^ RIHtH	t	H
t
Ht ^ RIHt ^ RIHt ^ RIHt ^ RIHtHtHt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% ^ RI&H't' ^ RI(H)t) ^ RI*H+t+H,t, ^ RI-H.t.H/t/ ^ RI0H1t1 ^ RI2H3t3 ^ RI4H5t5 ^ RI6H7t7 ^ RI8H9t9H:t: ^ RI;H<t= ^ RI>H?t?H@t@ ^ RIAHBtB ]!! 4       tC]!! 4       tD ! R R]P                  4      tF ! R R]]]1P                  4      tHR# ) zWindow used for game installersN)gettext)List)GdkGioGLibGtk)settings)LutrisConfig)Game)DirectoryDialogInstallerSourceDialogModelessDialogQuestionDialogdisplay_errorCacheConfigurationDialog)DialogInstallUIDelegate)InstallerFilesBox)InstallerPicker)NotificationSource)FileChooserEntry)LogTextView)NavigationStack)get_main_window)InstallationKindinterpreter)MissingGameDependencyErrorScriptingError)ScriptInterpreter)xdgshortcuts)	AsyncCall)LINUX_SYSTEM)get_log_contentslogger)shortcut)gtk_safe
human_size)is_removeablec                   s:   a a ] tR t^-t oRtRV 3R lltRtVtV ;t# )MarkupLabelzLabel for installer windowc                s   < \         SV `  ! RR VRRRRR\        P                  P                  /VB  V P                  R^ 4       R# )labelZ
use_markupTwrapZjustifyg      ?N )super__init__r   ZJustificationCENTERZset_alignment)selfmarkupkwargs	__class__s   &&,?/usr/lib/python3.14/site-packages/lutris/gui/installerwindow.pyr+   ZMarkupLabel.__init__0   sD    nvn$nTn3K\K\KcKcngmn3"    r)   N)	__name__
__module____qualname____firstlineno____doc__r+   __static_attributes____classdictcell____classcell__r0   __classdict__   @@r1   r&   r&   -   s     $# #r2   r&   c                   s  a a ] tR t^5t oRtRR]P                  3R ltRXR ltRXR lt	RXR lt
R tV3R	 lV 3R
 lltR tR tRYR ltR tR tR tR tR tR tR tV3R lR ltR tR tR tR tR tR tR tR tR t R  t!R! t"R" t#R# t$R$ t%RYR% lt&R& t'RYR' lt(R( t)R) t*R* t+RYR+ lt,R, t-R- t.R. t/R/ t0R0 t1R1 t2R2 t3R3 t4R4 t5R5 t6R6 t7R7 t8R8 t9R9 t:R: t;R; t<RZV3R< lR= llt=R> t>R? t?R@ t@RA tARB tBRC tCRD tDRE tERYRF ltFV3RG lRH ltGV3RI lRJ ltHV3RK lRL ltIRM tJRN tKRO tLRP tMR[RQ ltN]O! RR4      RRR3RS ltPR\RT ltQRYRU ltRR\RV ltSRWtTVtUV ;tV# )]InstallerWindowaT  GUI for the install process.

This window is divided into pages; as you go through the install each page
is created and displayed to you. You can also go back and visit previous pages
again. Going *forward* triggers installation work- it does not all way until the
very end.

Most pages are defined by a load_X_page() function that initializes the page
when arriving at it, and which presents it. But this uses a present_X_page() page
that shows the page (and is used alone for the 'Back' button), and this in turn
uses a create_X_page() function to create the page the first time it is visited.
Nc                s:   \         P                  ! V 3R R/VB  \        P                  P                  WV4       V P	                  RR4       Wn        / V n        . V n        RV n        RV n	        RV n
        W@n        RV n        \        P                  ! 4       V n        V P!                  V P                  4       V P#                  4       pVP%                  ^4       VP'                  ^4       VP)                  ^4       VP+                  ^4       VP-                  ^4       \/        RR7      V n        VP3                  V P0                  RR^ 4       V P5                  \7        R4      V P8                  4      V n        V P:                  P=                  R4       \        P>                  ! R4      w  rxV P:                  PA                  R	V P                  Wx\        PB                  PD                  4       \        P>                  ! R
4      w  rxV P                  PG                  Wx\        PB                  PD                  V PH                  4       V P5                  \7        R4      V PJ                  4      V n&        V PO                  4       PQ                  R4       V PS                  \7        R4      4      V n*        \        P>                  ! R4      w  rxV PL                  PA                  R	V P                  Wx\        PB                  PD                  4       \W        V P:                  V PL                  R7      V n,        V P[                  4        VP3                  V PX                  RR^ 4       \        P\                  P_                  R\        P`                  Pb                  4      p	\        Pd                  ! V	R7      V n3        \        Ph                  ! \        Pj                  Pl                  R\        Pn                  Pp                  R7      V n9        V Pr                  Pu                  ^	4       V Pr                  P-                  ^4       V Pr                  Pw                  R4       V Pf                  Py                  \        Pz                  ! V Pr                  RV Pf                  R7      4       V PO                  4       P}                  V Pf                  4       V P                  \7        R4      V P                  \7        R4      R7      V nA        V P                  \7        R4      V P                  4      V nC        \        P                  ! \        \        \        \        4      V nH        \        R\        P                  P                  RRRR7      V nL        V P                  PG                  RV P                  4       \        4       V nO        V P                  PG                  RV P                  4       V P                  PG                  RV P                  4       \        P                  ! 4       V nS        \        Ph                  ! \        Pj                  Pl                  ^RR7      V nT        \        P                  ! 4       V nU        V P                  V nW        V P                  4        V P                  4        V P                  4        R# )Zuse_header_barTi  i  FN)no_show_allZBackz	<Alt>Leftclickedz	<Alt>HomeCancel	_ContinueZEscape)cancel_buttonzopen-menu-symbolic)child)orientationvisiblehalign)rE   Z	can_focusZrelative_tozConfigure download cachez3Change where Lutris downloads game installer files.)tooltipzView installer sourcezSelect folder)Zwarn_if_non_emptyZwarn_if_non_writable_parentZwarn_if_ntfschangedzfiles-availablezfiles-ready)rF   spacingr@   )[r   r+   r   InterpreterUIDelegateZset_default_size
installersconfigselected_extrasinstall_in_progressinstall_completer   installation_kindcontinue_handlerr   Z
AccelGroupacceleratorsZadd_accel_groupZget_content_areaset_margin_topset_margin_bottomZset_margin_rightZset_margin_leftZset_spacingr&   status_label
pack_startadd_start_button_on_back_clickedback_buttonset_no_show_allZaccelerator_parseZadd_acceleratorZ
AccelFlagsZVISIBLEconnecton_navigate_homeon_cancel_clickedrD   get_header_barZset_show_close_buttonadd_end_buttoncontinue_buttonr   stackregister_page_creatorsZImageZnew_from_icon_nameZIconSizeZMENUZ
MenuButtonmenu_buttonBoxOrientationVERTICALAlignENDmenu_boxZset_border_widthZset_can_focusZset_popoverZPopoverpack_endadd_menu_buttonon_cache_clickedcache_buttonon_source_clickedsource_buttonZ	TreeStoreboolZobjectstrextras_tree_storer   ZFileChooserActionZSELECT_FOLDERlocation_entryon_location_entry_changedr   installer_files_boxon_files_availableon_files_readyZ
TextBuffer
log_buffererror_details_boxerror_details_bufferload_error_pageerror_reporterload_first_pageshow_allZpresent)
r-   rM   ZserviceZappidrR   r/   Zcontent_areakeyZmodZ	menu_icons
   &&&&&,    r1   r+   ZInstallerWindow.__init__C   s   DTDVD//88Nc3'$!#(  %!2 $NN,T../,,.##B'&&r*%%b)$$R(  $ (D9 1 15%C  006D<P<PQ((.((5((D4E4EsQTQ_Q_QgQgh((5!!#CNN,B,BDDYDYZ!221X;@V@VW33E:#221[>B ((2**9d6G6GSVSaSaSiSij %T%5%5TEWEWX
##%

D$: II001Es||GXGXY	>>	:COO,D,Dd[^[d[d[h[hi&&q)!!!$##E*$$S[[t}}PUcgcscs%tu&&t'7'78 00()!!KL 1 
 "11!4K2LdNdNde
 "%	"
 /!!//"(,
 	##It/M/MN#4#6   (():D<S<ST  ((8K8KL..*!$S__5M5MWXfj!k$'NN$4!"22 	r2   Tc                s0   \         P                  P                  V4      pVP                  V4       VP	                  R 4       V'       d   VP                  V4       V'       d   VP                  RV4       V P                  4       pVP                  V4       V# )TrA   )	r   Buttonnew_with_mnemonicset_sensitiver]   set_tooltip_textr^   ra   rX   r-   r'   handlerrI   	sensitivebuttonZ
header_bar   &&&&&  r1   rY   Z InstallerWindow.add_start_button   su    --e4Y't$##G,NN9g.((*
f%r2   c                s0   \         P                  P                  V4      pVP                  V4       VP	                  R4       V'       d   VP                  V4       V'       d   VP                  RV4       V P                  4       pVP                  V4       V# )z&Add a button to the action buttons boxTrA   )	r   r   r   r   r]   r   r^   ra   rm   r   r   r1   rb   ZInstallerWindow.add_end_button   su    --e4Y't$##G,NN9g.((*
F#r2   c                s   \         P                  ! VRRR7      pVP                  V4       VP                  R4       V'       d   VP	                  V4       V'       d   VP                  RV4       V P                  P                  VRR^ 4       V# )z*Add a button to the menu in the header barT        )rG   xalignrA   F)r   ZModelButtonr   r]   r   r^   rl   rX   )r-   r'   r   rI   r   r   s   &&&&& r1   rn   ZInstallerWindow.add_menu_button   so    SAY't$##G,NN9g.  q9r2   c                s    \        V R7       R# )z#Open the cache configuration dialogparentNr   r-   _button   &&r1   ro   Z InstallerWindow.on_cache_clicked   s
     -r2   c                s8   < V ^8  d   QhRS[ P                  RR/# )   responsereturnN)r   ResponseTypeformatr=      "r1   __annotate__InstallerWindow.__annotate__   s!     2 2C,<,< 2 2r2   c                s   < V\         P                  P                  \         P                  P                  \         P                  P                  39   d   V P                  4        R # \        SV `  W4       R # r3   )r   r   ZCLOSEZCANCELZDELETE_EVENTr`   r*   on_response)r-   dialogr   r0   s   &&&r1   r   ZInstallerWindow.on_response   sO    ((..0@0@0G0GIYIYIfIfgg""$G1r2   c                :    V P                   P                  4        R # r3   )rd   Znavigate_backr   r   r1   r[   ZInstallerWindow.on_back_clicked       

  "r2   c                r   r3   )rd   Znavigate_home)r-   Z_accel_groupZ_windowZ_keyvalZ	_modifier   &&&&&r1   r_   Z InstallerWindow.on_navigate_home   r   r2   c           
     sD  a  V 3R lpS P                   '       Ed   . p\        P                  P                  \	        R4      4      pS P
                  '       d   S P
                  P                  '       d   S P
                  P                  '       d   S P                  \        P                  8X  d   \        S P
                  P                  \        4       P                  4      '       dG   VP                  S P
                  P                  4       VP                  4        VP!                  V4       \#        RS R\	        R4      R\	        R4      RV/4      pVP$                  \        P&                  P(                  8w  d   \*        P,                  ! R	4       R
# S P.                  P1                  4        S P
                  '       d9   S P
                  P3                  VP5                  4       VS P6                  R7       R
# V! 4        R
# S P.                  P1                  4        V! 4        R
# )zIAsk a confirmation before cancelling the installation, if it has started.c                  s  < S P                   '       d   S P                   P                  4        S P                   '       d(   S P                  '       g   \        P	                  4        M\
        P	                  4        S P                  4        R # r3   )r   ZcleanuprP   INSTALLATION_COMPLETEDZfireINSTALLATION_FAILEDZdestroyr-      r1   on_cancelledZ7InstallerWindow.on_cancel_clicked.<locals>.on_cancelled   sY      ((*(@(@(@&++-#((*LLNr2   zRemove game filesr   questionz1Are you sure you want to cancel the installation?titlezCancel installation?widgetsz&User aborted installation cancellationN)Zremove_game_dirZcompletion_functionZerror_function)rP   r   CheckButtonZnew_with_labelrZ   r   target_pathZgame_dir_createdrR   r   INSTALLr%   r   Zsystem_config
set_activeZshowappendr   resultr   YESr!   debugrx   stop_allZrevert
get_activeon_signal_error)r-   r   r   r   Zremove_checkboxZconfirm_cancel_dialogs   f&    r1   r`   Z!InstallerWindow.on_cancel_clicked   s   		 ###G!oo<<Q?R=STO   $$000$$555**.>.F.FF!$"2"2">">@\@\]]**4+;+;+L+LM$$&/$2d"U VQ56w	%! %++s/?/?/C/CCEF$$--/  ''$3$>$>$@(4#'#7#7 (  $$--/Nr2   c                s    \        V P                  P                  P                  V P                  P                  P                  V 4       R # r3   )r
   r   	installerZscript_pretty	game_namer   r   r1   rq   Z!InstallerWindow.on_source_clicked  s3    d..88FFHXHXHbHbHlHlnrsr2   c                (    V P                  V4       R # r3   _handle_callback_errorr-   errorr   r1   r   ZInstallerWindow.on_signal_error      ##E*r2   c                r   r3   r   r   r   r1   on_idle_errorZInstallerWindow.on_idle_error  r   r2   c                s    V P                   '       d   V P                  V4       R# \        WR 7       V P                  P	                  4        R# )r   N)rP   r~   r   rd   navigation_resetr   r   r1   r   Z&InstallerWindow._handle_callback_error  s4    ###  '%-JJ'')r2   c                s    V P                   P                  V4       V P                   P                  \        V4      4       R# )zDisplay a short status text.N)rW   
set_markupset_visiblers   )r-   r.   r   r1   
set_statusZInstallerWindow.set_status&  s.    $$V,%%d6l3r2   c                sz    V P                   P                  4       '       d   V P                   P                  4       # R # ) )rW   get_visibleget_textr      &r1   
get_statusZInstallerWindow.get_status+  s1    /3/@/@/L/L/N/Nt  ))+VTVVr2   c                sT   V P                   P                  R V P                  4       V P                   P                  RV P                  4       V P                   P                  RV P                  4       V P                   P                  RV P
                  4       V P                   P                  RV P                  4       V P                   P                  RV P                  4       V P                   P                  RV P                  4       V P                   P                  RR 4       R	# )
choose_installerdestinationinstaller_filesextrasspinnerlogr   nothingc                  s,    \         P                  ! 4       # r3   )r   rg   )xs   *r1   <lambda>Z8InstallerWindow.register_page_creators.<locals>.<lambda>6  s
    3779r2   N)	rd   Zadd_named_factorycreate_choose_installer_pagecreate_destination_pagecreate_installer_files_pagecreate_extras_pagecreate_spinner_pagecreate_log_pagecreate_error_pager   r   r1   re   Z&InstallerWindow.register_page_creators.  s    

$$%79Z9Z[

$$]D4P4PQ

$$%68X8XY

$$Xt/F/FG

$$Y0H0HI

$$UD,@,@A

$$Wd.D.DE

$$Y0DEr2   c                s   < V ^8  d   QhRR/# )r   r   Nr)   r   r   r1   r   r   8  s     . . .r2   c                s>  a aaa \        4       pV'       dw   VP                  P                  '       g[   VP                  oVVV 3R  loVV3R lpSP                  RV4      oS P	                  \        R4      4       S P                  S4       R# S P                  4        R# )c                  sJ   < SP                  4        SP                  S4       R # r3   )load_choose_installer_page
disconnect)args
dc_handlerdownload_queuer-      *r1   on_start_installationZ>InstallerWindow.load_first_page.<locals>.on_start_installationA  s    //1))*5r2   c                  s>   < SP                   '       d
   S! 4        R # R # r3   )is_empty)r   r   r      *r1   on_download_completeZ=InstallerWindow.load_first_page.<locals>.on_download_completeE  s    !***)+ +r2   zdownload-completedz}Waiting for Lutris component installation
<small>Installations can fail if Lutris components are not installed first.</small>N)r   r   r   r^   load_spinner_pagerZ   display_continue_buttonr   )r-   Zwindowr   r   r   r   s   f  @@@r1   r   ZInstallerWindow.load_first_page8  s    
 !"&//888#22N6, (//0DFZ[J""j (()>?++-r2   c                sH    \         P                  ! V P                  V4       R # r3   )r   idle_addr   r   r   r1   report_errorZInstallerWindow.report_errorY  s    d))51r2   c                sZ    \         P                  ! V P                  \        V4      4       R # r3   )r   r   r   r#   )r-   statusr   r1   report_statusZInstallerWindow.report_status\  s    doox'78r2   c                s|    VP                  V P                  4       \        P                  ! V P                  4       R # r3   )Zset_log_bufferr{   r   r   load_log_page)r-   Zcommandr   r1   
attach_logZInstallerWindow.attach_log_  s&    t/d(()r2   c                sN    \         P                  ! V P                  VVVV4       R # r3   )r   r   load_ask_for_disc_page)r-   message_markuprequiresr   callbackr   r1   begin_disc_promptZ!InstallerWindow.begin_disc_promptd  s#    ''	
r2   c                sJ    \         P                  ! V P                  WW44       R # r3   )r   r   load_input_menu_page)r-   aliasoptions	preselectr   r   r1   begin_input_menuZ InstallerWindow.begin_input_menum  s    d//Ur2   c                s\    \         P                  ! V P                  V\        V4      4       R # r3   )r   r   load_finish_install_pager#   r-   game_idr      &&&r1   report_finishedZInstallerWindow.report_finishedp  s    d33Whv>NOr2   c                s    V P                  V P                  4       V P                  P                  V P                  4       R # r3   )validate_scriptsrM   rd   navigate_to_pagepresent_choose_installer_pager   r   r1   r   Z*InstallerWindow.load_choose_installer_pagew  s,    doo.

##D$F$FGr2   c                s    \        V P                  4      pVP                  R V P                  4       \        P
                  ! RRV\        P                  P                  R7      # )zinstaller-selectedThexpandvexpandrE   shadow_type)r   rM   r^   on_installer_selectedr   ScrolledWindow
ShadowType	ETCHED_IN)r-   Zinstaller_picker   & r1   r   Z,InstallerWindow.create_choose_installer_page{  sO    *4??;  !5t7Q7QR!!$.>CNNLdLd
 	
r2   c                s
   V P                  R4       V P                  \        R4      V P                  ^ ,          R,          ,          4       V P                  P                  R4       V P                  V P                  .R7       R# )z(Stage where we choose an install script.r   z
Install %snamer   extra_buttonsN)r   	set_titlerZ   rM   rd   present_pagedisplay_cancel_buttonrp   r   r   r1   r   Z-InstallerWindow.present_choose_installer_page  s^    q);F)CCD

 23""$2C2C1D"Er2   c                s    RpV P                    F  pVR,          V8X  g   K  TpK  	  \        P                  ! W04      V n        V P                  P                  RV P                  4       T P#                  \        R
4      P%                  T P                  P&                  P(                  4      4       T P+                  4        R#   \
         d   p\        RT R\        R4      TP                  ,          R\        R4      /4      pTP                  \        P                  P                  8X  d;   \        P                  P                  4       pTP!                  TP                  R	7        Rp?R# Rp?ii ; i)zSets the script interpreter to the correct script then proceed to
install folder selection.

If the installed game depends on another one and it's not installed,
prompt the user to install it and quit this installer.
Nversionzrunners-installedr   r   z1This game requires %s. Do you want to install it?r   zMissing dependency)	game_slugzInstalling {})rM   r   r   r^   on_runners_readyr   r   rZ   Zslugr   r   r   r   r   Applicationget_defaultZshow_lutris_installer_windowr  r   r   r   load_destination_page)r-   _widgetZinstaller_versionscriptZ_scriptexZdlgapplications   &&&     r1   r   Z%InstallerWindow.on_installer_selected  s'   	F??9%)::$F +  +<<VJD$$%8$:O:OP 	q)001A1A1K1K1U1UVW""$ * 	 d"U VY[Y`Y` `Q34C zzS--111!oo99;882778K	s   C AC E0BE++E0c                s   V'       g   \        \        R4      4      hV F  pR F   pVP                  V4      ;'       g    RW#&   K"  	  R	 F$  pW29  g   K  \        \        R4      V,          4      h	  VR,          P                  R/ 4       F.  p\        V4      ^8  g   K  \        \        R4      V,          4      h	  K  	  R# )
z>Auto-fixes some script aspects and checks for mandatory fieldszNo installer availabler   z$Missing field "%s" in install scriptr  fileszImproperly formatted file "%s"N)ZdescriptionZnotes)r  runnerr	  )r   rZ   getZlen)r-   rM   r  ZitemZ	file_desc   &&   r1   r   Z InstallerWindow.validate_scripts  s     #;!<== F0%zz$/552 15%(+Q)RUY)YZZ 6 $H-11'2>	y>A%(+K)Ly)XYY ? !r2   c                s^   V P                   P                  P                  '       g   V P                  4        R# V P                   P	                  4       pV P
                  P                  V4       V P                  P                  V P                  4       V P                  P                  4        R# )z,Stage where we select the install directory.N)r   r   Zcreates_game_folderon_destination_confirmedZget_default_targetrv   set_textrd   r   present_destination_pagerc   
grab_focus)r-   Zdefault_pathr  r1   r  Z%InstallerWindow.load_destination_page  s{    ))===))+''::<$$\2

##D$A$AB'')r2   c                s   \         P                  ! R R4      p\         P                  ! RR4      p\        P                  ! \        P                  P
                  ^R7      pVP                  V P                  RR^ 4       \        P                  ! \        R4      RR7      pVP                  V4       VP                  RV P                  4       WP                  R&   VP                  VRR^ 4       \        P                  ! \        R	4      RR7      pVP                  V4       VP                  RV P                  4       W P                  R
&   VP                  VRR^ 4       \        P                   ! 4       '       dx   \        P                  ! \        R4      RR7      pVP                  \         P                  ! RR4      4       VP                  RV P"                  4       VP                  VRR^ 4       V# )!installer_create_desktop_shortcutFinstaller_create_menu_shortcutrF   rK   zCreate desktop shortcutT)rG   rA   create_desktop_shortcutz Create application menu shortcutcreate_menu_shortcutzCreate Steam shortcutinstaller_create_steam_shortcut)r   Zread_bool_settingr   rg   rh   ri   rX   rv   r   rZ   r   r^   "on_create_desktop_shortcut_clickedrN   on_create_menu_shortcut_clickedsteam_shortcutZvdf_file_exists on_create_steam_shortcut_clicked)r-   r  r  vboxZdesktop_shortcut_buttonZmenu_shortcut_buttonZsteam_shortcut_buttons   &      r1   r   Z'InstallerWindow.create_destination_page  s   ,4,F,FGjlq,r))1)C)CDdfk)l&ww3??#;#;QG++UE1="%//!4M2NX\"]**+LM''	43Z3Z[1R-./qA"q1S/T^bc''(FG$$Y0T0TU.L*+,eUA>))++$'OOA6M4NX\$]!!,,X-G-GHikp-qr!)))T5Z5Z[OO15%Cr2   c                s    V P                  \        R4      4       V P                  P                  R4       V P	                  V P
                  V P                  V P                  .R7       R# )z Display the destination chooser.zSelect installation directoryr   r  N)r   rZ   rd   r  r   r  rp   rr   r   r   r1   r  Z(InstallerWindow.present_destination_page  sW     	9:;

.$$))$:K:KTM_M_9` 	% 	
r2   c                s    V P                  \        R4      RV P                  V P                  .R7       \        P
                  ! V P                  4       R# )z3Let the interpreter take charge of the next stages.z!Preparing Lutris for installationF)cancellabler  N)r   rZ   rp   rr   r   r   launch_installr   r   r1   r  Z(InstallerWindow.on_destination_confirmed  sK     	12,,d.@.@A 	 	

 	d))*r2   c                s    V P                   P                  V 4      '       g   V P                  P                  4        R # R # r3   )r   r'  rd   r   r   r   r1   r'  ZInstallerWindow.launch_install  s.    ..t44JJ'') 5r2   c                s~    \         P                  P                  VP                  4       4      V P                  n        R# )z)Set the installation target for the game.N)ospathZ
expanduserr   r   r   )r-   ZentryZ_datar   r1   rw   Z)InstallerWindow.on_location_entry_changed  s&    ')ww'9'9%..:J'K$r2   c                    \         P                  ! R VP                  4       4       VP                  4       V P                  R&   R# )r  r  Nr   Zwrite_settingr   rN   r-   Zcheckbuttonr   r1   r!  Z2InstallerWindow.on_create_desktop_shortcut_clicked  s4    BKDZDZD\]1<1G1G1I-.r2   c                r*  )r  r  Nr+  r,  r   r1   r"  Z/InstallerWindow.on_create_menu_shortcut_clicked  s4    ?AWAWAYZ.9.D.D.F*+r2   c                r*  )r   create_steam_shortcutNr+  r,  r   r1   r$  Z0InstallerWindow.on_create_steam_shortcut_clicked  s4    @+BXBXBZ[/:/E/E/G+,r2   c                sZ    \        V P                  P                  V P                  4       R # r3   )r   r   Z
get_extrason_extras_loaded)r-   r  r   r1   r  Z InstallerWindow.on_runners_ready	  s    $""--t/D/DEr2   c                s8   VR,          p. pVP                  R4      '       d"   VP                  \        VR,          4      4       VP                  R4      '       d   VP                  VR,          4       V'       d    VRRP                  V4      ,          ,          pV# )z$Return a label for the extras pickerr  Z
total_sizetypez (%s)z, )r  r   r$   join)r-   extrar'   Z_infos   &&  r1   get_extra_labelZInstallerWindow.get_extra_label  st    f99\""MM*U<%89:99VMM%-(Wtyy000Er2   c                s   V'       d   V P                  V4       R # V'       d   V P                  P                  4        VP                  4        F\  w  r4V P                  P	                  R R R R V34      pV F1  pV P                  P	                  VRRW`P                  V4      34       K3  	  K^  	  V P                  P                  V P                  4       R # V P                  4        R # )NF)
r   ru   ZclearZitemsr   r3  rd   r   present_extras_pageon_extras_ready)r-   Z
all_extrasr   Zextra_sourcer   r   r1     &&&    r1   r.  Z InstallerWindow.on_extras_loaded   s    ''.""((*(2(8(8(:$//66tdD$P\=]^#E**11&5%PdPdejPk:lm $ );
 JJ''(@(@A  "r2   c                s|   \         P                  ! V P                  4      pVP                  R 4       VP	                  4        \         P
                  ! 4       pVP                  RV P                  V P                  4       \         P                  ! 4       p\         P                  ! RV^ ^R7      pVP                  V4       \         P                  ! RV4      pVP                  VR^4       VP                  R^P4       VP                  V4       \         P                  ! RRVR\         P                  P                  R7      # )FZtoggledN)ZactiveZinconsistenttextz	min-widthTr   r   rE   rG   r   )r   ZTreeViewru   Zset_headers_visibleZ
expand_allZCellRendererToggler^   on_extra_toggledCellRendererTextZTreeViewColumnZappend_columnadd_attributeZset_propertyr   r   r  )r-   ZtreeviewZrenderer_togglerenderer_textZinstalled_columnZlabel_columns   &     r1   r   Z"InstallerWindow.create_extras_page0  s    << 6 67$$U+002	4+@+@$BXBXY,,.--dOA\]^/0))$>""=&!<!!+r2|,!!$hRUR`R`RjRj
 	
r2   c                s   a  \         P                  ! R4       V 3R lpS P                  \        R4      4       S P                  P                  R4       S P                  VS P                  S P                  .R7       R# )z,Show installer screen with the extras pickerzShowing extras pagec                 s>   < SP                  SP                  4       R # r3   )on_extras_confirmedru   )r   r-      &r1   on_continueZ8InstallerWindow.present_extras_page.<locals>.on_continueH  s    $$T%;%;<r2   zThis game has extra content
<small>Select which one you want and they will be available in the 'extras' folder where the game is installed.</small>r   r  N)	r!   r   r   rZ   rd   r  r   rp   rr   )r-   r?     f r1   r4  Z#InstallerWindow.present_extras_pageD  sj    *+	= 	e	
 	

)$$[ARARTXTfTf@g$hr2   c                s   W2,          pVP                  V4      pV^ ,          '       * V^ &   RV^&   VP                  V4      '       dC   VP                  V4      pV'       d(   W6,          pV^ ,          V^ &   VP                  V4      pK/  R# V Fa  pRp	Rp
VP                  VP                  4      pV'       d0   W6,          pV^ ,          '       d   Rp
MRp	VP                  V4      pK7  W^ &   W^&   Kc  	  R# )i    FTN)Zget_iterZiter_has_childZiter_childrenZ	iter_nextZiter)r-   r  r)  modelZtoggled_rowZtoggled_row_iterZ
extra_iterZ	extra_rowZheading_rowZall_extras_activeZany_extras_actives   &&&&       r1   r9  Z InstallerWindow.on_extra_toggledU  s    k >>$/(^+AA 011,,-=>J!-	*1~	!"__Z8
 
  %$(!$)!"001A1AB
  % 1I ||,0),1)!&!<J!2A!2A  %r2   c                s   a . oV3R lpVP                  V4       SV n        \        P                  ! V P                  4       R# )z8Resume install when user has selected extras to downloadc                 sh   < W,          w  r4rVV'       d   V'       d   SP                  V4       R # R # R # r3   )r   )rA  r)  Ziter_ZselectedZ_inconsistentr1  Z_labelrO   s   &&&    r1   
save_extraZ7InstallerWindow.on_extras_confirmed.<locals>.save_extrav  s)    5:\2HUE&&u- "xr2   N)ZforeachrO   r   r   r5  )r-   Zextra_storerB  rO   s   && @r1   r=  Z#InstallerWindow.on_extras_confirmedr  s7    	.
 	J'.d**+r2   c                s&    V P                  4        R # r3   )load_installer_files_page)r-   r   s   &*r1   r5  ZInstallerWindow.on_extras_ready  s    &&(r2   c                sB   V P                   \        P                  8X  d"   V P                  P                  P
                  pMR pV P                  \        R4      RR7       \        V P                  P                  P                  V P                  V P                  V4       R # )NzPreparing game files...F)r&  )rR   r   ZUPDATEr   r   r	  r   rZ   r   Zprepare_game_fileson_files_preparedrO   )r-   Zpatch_versionr  r1   rC  Z)InstallerWindow.load_installer_files_page  s}    !!%5%<%<< ,,66>>M Mq!:;O&&994;Q;QSWSgSgiv	
r2   c                s   V'       d   V P                  V4       R # V P                  P                  P                  '       g)   \        P
                  ! R4       V P                  4        R # \        P
                  ! R4       V P                  P                  V P                  P                  4       V P                  P                  V P                  4       R # )NzInstaller doesn't require fileszGame files prepared.)r   r   r   r  r!   r   launch_installer_commandsrx   Zload_installerrd   r   present_installer_files_page)r-   Z_resultr   r   r1   rD  Z!InstallerWindow.on_files_prepared  s    ''.))///LL:;**,+,  //0@0@0J0JK

##D$E$EFr2   c                s|    \         P                  ! R R V P                  R \         P                  P                  R7      # )Tr8  )r   r   rx   r   r  r   r   r1   r   Z+InstallerWindow.create_installer_files_page  s4    !!**00
 	
r2   c                s    \         P                  ! R4       V P                  \        R4      4       V P                  P                  R4       V P                  V P                  V P                  P                  R7       R# )z7Show installer screen with the file picker / downloaderzPresenting installer files pagezHPlease review the files needed for the installation then click 'Install'r   r   N)
r!   r   r   rZ   rd   r  display_install_buttonon_files_confirmedrx   Zis_readyr   r   r1   rF  Z,InstallerWindow.present_installer_files_page  sY    67def

 12##D$;$;tG_G_GhGh#ir2   c                s   a  V 3R  lpS P                  \        R4      4       S P                  P                  R4       S P	                  RRR7       V# )c                  s<   < S P                   P                  4        R # r3   )rx   r   r   r   r1   on_exit_pageZDInstallerWindow.present_downloading_files_page.<locals>.on_exit_page  s    $$--/r2   zDownloading game datar   NFrG  )r   rZ   rd   r  rH  )r-   rJ  r@  r1   present_downloading_files_pageZ.InstallerWindow.present_downloading_files_page  sH    	0 	123

 12##DE#:r2   c                s@    V P                  V P                  VR7       R# )z4Toggle state of continue button based on ready staterG  N)rH  rI  )r-   r  Zfiles_readyr   r1   rz   ZInstallerWindow.on_files_ready  s    ##D$;$;{#Sr2   c                s     V P                   P                  4        V P                  P                  V P                  4       R#   \
         d"   p\        \        R4      T,          4      ThRp?ii ; i)zRCall this when the user confirms the install files
This will start the downloads.
zUnable to get files: %sN)rx   Z	start_allrd   jump_to_pagerK  ZPermissionErrorr   rZ   )r-   r   r  s   && r1   rI  Z"InstallerWindow.on_files_confirmed  s\    	L$$..0JJ##D$G$GH 	L #<!=!BCK	Ls   ?A A/A**A/c                s    \         P                  ! R4       VP                  4       V P                  n        \
        P                  ! V P                  4       R# )z-All files are available, continue the installz+All files are available, continuing installN)r!   infoZget_game_filesr   Z
game_filesr   r   rE  )r-   widgetr   r1   ry   Z"InstallerWindow.on_files_available  s:    AB&,&;&;&=# 	d445r2   c                s$   \         P                  ! R 4       RV n        V P                  \	        R4      4       V P
                  P                  4        V P                  P                  P                  4        V P                  P                  4        R# )zLaunching installer commandsTzInstalling game dataN)r!   rM  rP   r   rZ   rd   discard_navigationr   r   Zinstall_extrasrE  r   r   r1   rE  Z)InstallerWindow.launch_installer_commands  se    23#' q!789

%%'""113224r2   c                sT   < V ^8  d   QhRS[ RS[RS[S[P                  ,          RR/# )r   r   r&  r  r   N)rt   rs   r   r   r   r   r   r1   r   r     s7     6 6 6$ 6VZ[^[e[eVf 6rv 6r2   c                sV   a aaa VVV V3R  lpS P                   P                  V4       R# )c                 s  < V3R lp SP                  S4       SP                  P                  R4       S'       d   SP                  SR7       MSP	                  S;'       g    . R4       SP                  P                  R4       V # )z(Show a spinner in the middle of the viewc                  s>   < S P                   P                  R 4       R# TN)rd   set_back_allowedr   r   r1   rJ  ZUInstallerWindow.load_spinner_page.<locals>.present_spinner_page.<locals>.on_exit_page  s    

++D1r2   r   r  F)r   rd   r  r  display_buttonsrQ  )rJ  r&  r  r-   r   s    r1   present_spinner_pageZ?InstallerWindow.load_spinner_page.<locals>.present_spinner_page  sl    2 OOF#JJ##I.***G$$]%8%8b%@JJ''.r2   N)rd   rL  )r-   r   r&  r  rS  s   ffff r1   r   Z!InstallerWindow.load_spinner_page  s"    	  	 " 	

 45r2   c                s    \         P                  ! \         P                  P                  \         P                  P                  R 7      pVP	                  4        V# ))rH   Zvalign)r   ZSpinnerrj   r,   Zstart)r-   r   r  r1   r   Z#InstallerWindow.create_spinner_page  s4    ++SYY%5%5cii>N>NOr2   c                sP    V P                   P                  V P                  4       R # r3   )rd   rL  present_log_pager   r   r1   r   ZInstallerWindow.load_log_page  s    

 5 56r2   c                s    \        V P                  4      p\        P                  ! R R V\        P                  P
                  R7      # )Tr   )r   r{   r   r   r   r  )r-   Zlog_textviewr  r1   r   ZInstallerWindow.create_log_page  s4    "4??3!!$L^a^l^l^v^vwwr2   c                s   a a VV 3R lpV 3R lpS P                   oVS n         S P                  P                  R4       S P                  4        V# )z/Creates a TextBuffer and attach it to a commandc                  s   < S Sn         R # r3   )r   )saved_reporterr-   s   r1   rJ  Z6InstallerWindow.present_log_page.<locals>.on_exit_page  s    "0Dr2   c                 s<   < SP                  \        V 4      4       R # r3   )r   r#   )r   r-   r>  r1   on_errorZ2InstallerWindow.present_log_page.<locals>.on_error	  s    OOHUO,r2   r   )r   rd   r  r  )r-   rJ  rV  rU  s   f  @r1   rT  Z InstallerWindow.present_log_page  sF    	1	- ,,&

&""$r2   c                s   a aaaaa VVVVVV 3R  lpS P                   P                  4       oS P                   P                  V4       R# )c                 s8  <a VVVVV3R lp \         P                  ! \        \        4      pS	 F'  pVP                  4       w  r4VP	                  W4.4       K)  	  \         P
                  P                  V4      o\         P                  ! 4       pSP                  VR4       SP                  VR^4       SP                  ^ 4       SP                  \         P                  P                  4       SP                  \         P                  P                  4       SP!                  S
4       SP#                  RSP$                  4       SP&                  P)                  RS4       SP+                  V 4       SP,                  P/                  4        SP%                  S4       R# )z9Display an input request as a dropdown menu with options.c                 s   <  S! SS4       SP                   P                  S4       R #   \         d   pSP                  T4        R p?R # R p?ii ; ir3   rd   Zrestore_current_pageZ	Exceptionr~   )r   errr   r   comboboxprevious_pager-   s   & r1   r?  ZZInstallerWindow.load_input_menu_page.<locals>.present_input_menu_page.<locals>.on_continue  sG    .UH-JJ33MB  . ((--.s   $) AAATr7  rJ   Z
input_menuN)r   Z	ListStorert   Zpopitemr   ZComboBoxZnew_with_modelr:  rX   r;  Zset_id_columnZ
set_halignrj   r,   Z
set_valignSTARTZset_active_idr^   on_input_menu_changedrd   present_replacement_pager   rc   r  )r?  rA  Zoptionr   r'   r<  rY  r   r   r   r   rZ  r-   s         @r1   present_input_menu_pageZEInstallerWindow.load_input_menu_page.<locals>.present_input_menu_page  s-   . . MM#s+E!#^^-
c\* " ||2259H002Mt4""=&!<""1%		 0 01		0""9-Y(B(BCJJ//hG((5  ++-&&x0r2   Nrd   Zsave_current_pagerL  )r-   r   r   r   r   r^  rZ     fffff @r1   r   Z$InstallerWindow.load_input_menu_page  s5    	1 	1F 

446

 78r2   c                sj    V P                   P                  \        VP                  4       4      4       R# )z8Enable continue button if a non-empty choice is selectedN)rc   r   rs   Zget_active_id)r-   rY  r   r1   r\  Z%InstallerWindow.on_input_menu_changed?  s$    **40F0F0H+IJr2   c                s   a aaaaa VVVVVV 3R  lpS P                   P                  4       oS P                   P                  V4       R# )c                 s  < VVV3R lp \         P                  ! \         P                  P                  ^R7      p\	        S
4      pVP                  VRR^ 4       \         P                  ! 4       pVP                  ^(4       VP                  ^(4       VP                  VRR^ 4       \        P                  ! 4       '       gX   \         P                  ! \        R4      R7      pVP                  RV S4       VP                  4        VP                  VRR^(4       \         P                  ! \        R4      R7      pR	V R
S/pVP                  RSP                  V4       VP                  VRR^(4       SP                  P!                  RV4       S	P"                  R8X  d   \         P                  ! \        R4      \         P$                  P&                  R7      pVP                  RSP(                  4       VP+                  VRR^ 4       VP+                  \         P,                  ! 4       RR^ 4       VP/                  4        SP1                  4        R# )z#Ask the user to do insert a CD-ROM.c                  s   <  S! V / VB  SP                   P                  S4       R #   \         d   pSP                  T4        R p?R # R p?ii ; ir3   rW  )r   r/   rX  r   rZ  r-   s   *, r1   wrapped_callbackZcInstallerWindow.load_ask_for_disc_page.<locals>.present_ask_for_disc_page.<locals>.wrapped_callbackL  sJ    .d-f-JJ33MB  . ((--.s   #( AA

Ar  FZ
Autodetect)r'   rA   Tu	   Browse…r   r   Zask_for_discZwineZEject)rH   N)r   rg   rh   ri   r&   rX   rU   rV   r   Z
is_flatpakr   rZ   r^   r  on_browse_clickedrd   r]  r  rj   rk   on_eject_clickedrm   Z	Separatorr   r  )ra  r%  r'   Zbuttons_boxZautodetect_buttonZbrowse_buttoncallback_dataZeject_buttonr   r   r   rZ  r   r-   s           r1   present_ask_for_disc_pageZIInstallerWindow.load_ask_for_disc_page.<locals>.present_ask_for_disc_pageI  s   . 77s'?'?KD/EOOE5%3'')K&&r*))"-OOKq9**,, %(JJQ|_$E!!)))5ExP!,,.&&'8$bIJJQ{^<M')9:xPM!!)T-C-C]S""=$bAJJ//E6)"zz!G*SYY]]K$$Y0E0EFlE5!<cmmoueQ?MMO&&(r2   Nr_  )r-   r   r   r   r   re  rZ  r`  r1   r   Z&InstallerWindow.load_ask_for_disc_pageH  s5    +	) +	)Z 

446

 9:r2   c                s    \        \        R 4      V R7      pVP                  pVR,          pVR,          pV! WV4       R# )z+Select the folder where the disc is mountedr   r   r   N)r	   rZ   folder)r-   rN  rd  r   rf  r   r   r6  r1   rb  Z!InstallerWindow.on_browse_clickedy  s<     #P!QZ^_ , ,6*r2   c                r   r3   )r   Zeject_wine_disc)r-   r  Zdatar   r1   rc  Z InstallerWindow.on_eject_clicked  s    ((*r2   c                $   < V ^8  d   QhRS[ RR/# r   r   r   NZBaseExceptionr   r   r1   r   r     s     ( (] (t (r2   c                s   a a S P                   P                  VV 3R  l4       S P                   P                  R4       S P                  P	                  4        R# )c                  s&   < SP                  S4      # r3   )present_error_page)r   r   r-   r   r1   r   Z1InstallerWindow.load_error_page.<locals>.<lambda>  s    t/F/Fu/Mr2   FN)rd   r   rQ  rD   r  r   s   ffr1   r~   ZInstallerWindow.load_error_page  s:    

##$MN

##E*%%'r2   c                rg  rh  ri  r   r   r1   r   r     s     % % %$ %r2   c                sH   V P                  \        \        V4      4      4       \        VR 4      ;'       d    VP                  pV'       d   \
        P                  ! \        V4      WP                  4      pRP                  V4      P                  4       p\        4       pV'       d   V RV 2P                  4       pV P                  P                  V4       V P                  P                  V'       * 4       V P                   P#                  R4       V P%                  4        R# )is_expectedZ
z

Lutris log:
r   N)r   r#   rt   Zhasattrrk  	tracebackZformat_exceptionr/  Z__traceback__r0  Zstripr    r}   r  r|   r   rd   r  r  )r-   r   rk  Z	formattedr   r  r1   rj  Z"InstallerWindow.present_error_page  s    U,-e]3II8I8I!224;GZGZ[I		),224I"$C(k):3%@FFH	%%..y9**{?;

(""$r2   c                s4   < V ^8  d   QhRS[ P                  /# )r   r   )r   ZWidgetr   r   r1   r   r     s     % %3:: %r2   c                sZ  a  V 3R  lp\         P                  ! \         P                  P                  ^R7      p\         P                  ! RRR7      pVP                  \        R4      4       S P                  P                  VRR^ 4       \         P                  ! \         P                  P                  R7      p\         P                  ! RS P                  R7      p\         P                  ! 4       pVP                  V4       VP                  V4       S P                  P                  VRR^ 4       VP                  S P                  RR^ 4       \         P                   ! \        R	4      \         P"                  P$                  R
7      pVP'                  VRR^ 4       VP)                  RV4       V# )c                 sN  < SP                  4       pSP                  P                  SP                  P                  4       SP                  P	                  4       R 4      pV RV 2p\
        P                  P                  \        P                  4      pVP                  VR4       R# )Tz

Ni)r   r}   r   Zget_start_iterZget_end_iterr   Z	Clipboardr  r   ZSELECTION_CLIPBOARDr  )r   r   Zdetailsr7  Z	clipboardr-   s   &    r1   on_copy_clickedZ:InstallerWindow.create_error_page.<locals>.on_copy_clicked  s    __&F//88))88:D<U<U<b<b<dfjG XT'+D))#*A*ABItR(r2   r  r   T)r   r(   zAn unexpected error has occurred while installing this game. Please share the details below with the Lutris team on <a href='https://github.com/lutris/lutris'>GitHub</a> or <a href='https://discordapp.com/invite/Pnt5CuY'>Discord</a>.F)r   )ZeditableZbufferzCopy Details to Clipboard)r'   rH   rA   )r   rg   rh   ri   Labelr   rZ   r|   rX   ZFramer   r  ZTextViewr}   r   Zaddr   rj   r[  rm   r^   )r-   rm  Z	error_boxr'   ZframeZdetails_textviewZscrolledwindowZcopy_buttons   f       r1   r   Z!InstallerWindow.create_error_page  s@   	) GG(@(@!L			40O	
 	))%qA		cnn&>&>?<<t?X?XY++-+,		.!))%tQ?T33T4Cjjq)D'Eciioo^;tQ7I7r2   c                s  a aa S P                   P                  R 4      '       d   \        S P                  RR4       S P                   P                  R4      '       d   \        S P                  R4       S'       dX   \	        S4      pS P                   P                  R4      '       d   \        \
        P                  RV4       VP                  4        RS n        RS n        S P                  P                  VV V3R l4       S P                  P                  4        S P                  P                  4        S P                  4       '       g0   S P                  R4       S P!                  RS P"                  4       R# R# )r  NTr  r-  Fc                  s(   < SP                  SS4      # r3   )present_finished_page)r   r   r-   r   r   r1   r   Z:InstallerWindow.load_finish_install_page.<locals>.<lambda>  s    4+E+Egv+Vr2   zfocus-in-event)rN   r  r   create_shortcutr   r#  ZsaverP   rQ   rd   rL  rO  rD   r  Z	is_activeset_urgency_hintr^   on_window_focus)r-   r   r   games   fff r1   r   Z(InstallerWindow.load_finish_install_page  s   ;;??455d**D$7;;??122d**D1 =D{{677.88$EIIK#(  $

 VW

%%'%%'~~!!$'LL)4+?+?@  r2   c                s    V P                  V4       V P                  P                  R 4       V P                  V P                  \        R4      RR7       R# )r   Z_LaunchF)continue_button_labelsuggested_actionN)r   rd   r  r   on_launch_clickedrZ   r   r   r1   ro  Z%InstallerWindow.present_finished_page  sC    

	*$$T%;%;STU^S_rw$xr2   c                s`   VP                  R4       \        V P                  P                  P                  4      pVP
                  '       d;   \        P                  P                  4       pVP                  VP                  4       M\        P                  ! R4       V P                  V4       R# )z(Launch a game after it's been installed.Fz1Game has no ID, launch button should not be drawnN)r   r   r   r   r   Zis_db_storedr   r  r  ZlaunchZlaunch_ui_delegater!   r   r`   )r-   r   rs  r  r2  r1   rv  Z!InstallerWindow.on_launch_clicked  sy    U#D$$..667 //557KKK667LLLMv&r2   c                s(    V P                  R4       R# )zCRemove urgency hint (flashing indicator) when window receives focusFN)rq  )r-   r  Z_argss   &&*r1   rr  ZInstallerWindow.on_window_focus  s    e$r2   c                s>   V P                   P                  P                  pV P                   P                  P                  pV P                   P                  P                  pV'       d   \
        P                  ! W#VRR7       R# \
        P                  ! W#VRR7       R# )z(Create desktop or global menu shortcuts.T)desktop)ZmenuN)r   r   r
  r   r   r   Zcreate_launcher)r-   rw  r
  r   r   r  r1   rp  ZInstallerWindow.create_shortcut  so    $$..88	"",,44$$..88	((YPTU((YTRr2   rC   c                s*   V P                   P                  V4       V P                   P                  V4       V P                   P                  4       pV'       d   VP	                  R4       MVP                  R4       V P                  '       d&   V P                   P                  V P                  4       V'       d#   V P                   P                  RV4      V n        MRV n        V P                   .T;'       g    . ,           pV P                  V4       R# )a  This shows the continue button, the close button, and any extra buttons you
indicate. This will also set the label and sensitivity of the continue button.

Finally, you cna provide the clicked handler for the continue button,
though that can be None to leave it disconnected.

We call this repeatedly, as we arrive at each page. Each call disconnects
the previous clicked handler and connects the new one.
zsuggested-actionrA   N)
rc   	set_labelr   get_style_context	add_classremove_classrS   r   r^   rR  )r-   r   rt  r   ru  r  style_contextbuttonss   &&&&&&  r1   r   Z'InstallerWindow.display_continue_button
  s     	&&'<=**95,,>>@##$67&&'9:     ++D,A,AB$($8$8$@$@G$TD!$(D!''(M,?,?R@W%r2   c                sV    V P                  V\        R4      W P                  .R7       R# )z6Displays the continue button, but labels it 'Install'.Z_Install)rt  r   r  N)r   rZ   rr   )r-   r   r   r   r1   rH  Z&InstallerWindow.display_install_button+  s)    $$1Z=I^p^p]q 	% 	
r2   c                s>    T P                  T;'       g    . R 4       R# rP  )rR  )r-   r  r   r1   r  Z%InstallerWindow.display_cancel_button1  s    ]00b$7r2   c                sP   V P                   P                  4       pV P                  '       d[   V P                   P                  \	        R4      4       V P                   P                  \	        R4      4       VP                  R4       MmV P                   P                  V P                  '       d   \	        R4      M
\	        R4      4       V P                   P                  R4       VP                  R4       V P                   P                  V4       V P                  V P                  V P                  .pV F  pVP                  WQ9   4       K  	  RpV P                  P                  4        F  pVP!                  4       '       g   K  Rp M	  V P"                  P                  V4       R	# )
z}Shows exactly the buttons given, and hides the others. Updates the close button
according to whether the install has started.Z_Abortz!Abort and revert the installationzdestructive-actionZ_CloserB   r   FTN)rD   ry  rP   rx  rZ   r   rz  rQ   r{  r   rp   rr   rc   r   rl   Zget_childrenr   rf   )r-   r}  Zcancel_sensitiver|  Zall_buttonsZbZany_visibler6  r1   rR  ZInstallerWindow.display_buttons4  sF    **<<>###((85//2U0VW##$89((8M8M8M8STU]S^_//3&&';<(()9:(($*<*<d>R>RSAMM!,'  ++-A}}" . 	$$[1r2   )rT   r\   rp   rD   rN   rc   rS   r|   r}   r   ru   rQ   rP   rR   rx   rM   r   rv   r{   rl   rf   rO   rr   rd   rW   )NNTr3   rP  )F)T)Wr4   r5   r6   r7   r8   r   r   r+   rY   rb   rn   ro   r   r[   r_   r`   rq   r   r   r   r   r   re   r   r   r   r   r   r   r   r   r   r   r   r   r  r   r  r  r'  rw   r!  r"  r$  r  r3  r.  r   r4  r9  r=  r5  rC  rD  r   rF  rK  rz   rI  ry   rE  r   r   r   r   rT  r   r\  r   rb  rc  r~   rj  r   r   ro  rv  rr  rp  rZ   r   rH  r  rR  r9   r:   r;   r<   r>   r1   r?   r?   5   s     ,0tO_OgOg cJ.2 2##4lt++*4
WF. .B29*

VPH
F%<Z&
*8
+*LJGHF
# 
(i"3:,)
G
jTL656 6(7x*%9NK/;b++( (
% %(% %\A2y
'%	S ./{^t^brv&B
82 2r2   r?   )Ir8   r(  rl  r    rZ   Ztypingr   Zgi.repositoryr   r   r   r   Zlutrisr   Zlutris.configr   Zlutris.gamer   Zlutris.gui.dialogsr	   r
   r   r   r   Zlutris.gui.dialogs.cacher   Zlutris.gui.dialogs.delegatesr   Zlutris.gui.installer.files_boxr   Z"lutris.gui.installer.script_pickerr   Zlutris.gui.widgetsr   Zlutris.gui.widgets.commonr   Z lutris.gui.widgets.log_text_viewr   Z#lutris.gui.widgets.navigation_stackr   Zlutris.gui.widgets.utilsr   Zlutris.installerr   r   Zlutris.installer.errorsr   r   Zlutris.installer.interpreterr   Zlutris.utilr   Zlutris.util.jobsr   Zlutris.util.linuxr   Zlutris.util.logr    r!   Zlutris.util.steamr"   r#  Zlutris.util.stringsr#   r$   Zlutris.util.systemr%   r   r   rn  r&   rL   r?   r)   r2   r1   <module>r~     s    % 
     - -  &   > @ < > 1 6 8 ? 4 : N : $ & * 4 8 4 ,(* +- ##)) #Z2n&=?P?f?f Z2r2   