+
    Ki`T  c                   s   R t ^ RIt^ RIHt ^ RIHt ^ RIHt ^ RIH	t	H
t
 ^ RIHt ^ RI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 ^ 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I0H1t1 ^ RI2H3t4 ^ RI5H6t6H7t7 ^ RI8H9t9  ! R R4      t: ! R R]:4      t; ! R  R!]:4      t< ! R" R#]:4      t=R&R$ R% llt>R# )'zHandle game specific actionsN)gettext)Path)List)GioGtk)duplicate_game_configgames)add_gameget_game_by_field)Game)dialogs)AddGameDialog)EditGameConfigDialog)EditGameCategoriesDialog)InputDialog)LaunchUIDelegate)	LogWindow)UninstallDialog)open_uri)MonitoredCommand)download_lutris_media)xdgshortcuts)	AsyncCall)logger)generate_script)shortcut)gtk_safeslugify)path_existsc                   s   a  ] tR t^$t o RtRV 3R lR lltR tR tR t]	R 4       t
R	 t]	R
 4       tR tR t]	R 4       tR tR tR tR tR tR tR t]	R 4       tR tR tRtV tR# )GameActionsaU  These classes provide a set of action to apply to a game or list of games, and can be used
to populate menus. The base class handles the no-games case, for which there are no actions. But
it also includes the code for actions that are shared between the subclasses. It also has methods for
actions that are invokes externally by the GameBar.Nc                s4   < V ^8  d   QhRS[ P                  /# )   window)r   Windowformat__classdict__   "8/usr/lib/python3.14/site-packages/lutris/game_actions.py__annotate__ZGameActions.__annotate__*   s      szz     c                sl    T;'       g    \         P                  P                  4       V n        Wn        R # N)r   Applicationget_defaultapplicationr    )selfr    r,   s   &&&r&   __init__ZGameActions.__init__*   s$    &GG#//*E*E*Gr(   c                    . # )z3Return the list of games that the actions apply to. r-      &r&   	get_gamesZGameActions.get_games.   s    	r(   c                r/   )zReturn a list of game actions and their callbacks, Each item is a tuple
of two strs and a callable, the action ID, it's human-readable name, and
a callback to invoke to perform it. Menu separators are represented hre
as (None, "-", None).
r0   r1   r2   r&   get_game_actionsZGameActions.get_game_actions2   s	     	r(   c                s    / # )zReturn a dictionary of flags indicating which actions are visible; the keys
are the action ids from get_game_actions(), and the values are booleans indicating
the action's visibility.r0   r1   r2   r&   get_displayed_entriesZ!GameActions.get_displayed_entries:   s	     	r(   c                s    V P                  4        F,  pVP                  '       g   K  V P                  '       d   K+   R # 	  R# TF)r3   is_installedis_game_runningr-   game   & r&   is_game_launchableZGameActions.is_game_launchable@   s2    NN$D   )=)=)= % r(   c                s    R# )Launch a gameNr0   r-   _args   &*r&   on_game_launchZGameActions.on_game_launchH   s    r(   c                s    V P                  4        FE  pVP                  '       g   K  V P                  P                  VP                  4      '       g   KD   R # 	  R# r6   )r3   is_db_storedr,   is_game_running_by_ididr9   r;   r&   r8   ZGameActions.is_game_runningK   sA    NN$D   T%5%5%K%KDGG%T%T % r(   c                sX    V P                  4       pV F  pVP                  4        K  	  R# )zStops the gameN)get_running_gamesZ
force_stop)r-   r?   r   r:      &*  r&   on_game_stopZGameActions.on_game_stopR   s$    &&(DOO r(   c                s   . pV P                  4        Fq  pV'       g   K  VP                  '       g   K!  V P                  P                  4       pV F0  p\	        V4      VP
                  8X  g   K  VP                  V4       K2  	  Ks  	  V# r)   )r3   rB   r,   Zget_running_game_idsZstrrD   Zappend)r-   Zrunning_gamesr:   Zidsgame_id   &    r&   rE   ZGameActions.get_running_gamesX   sl    NN$Dt)))&&;;="G7|tww.%,,T2  # % r(   c                s^    V P                  4        F  pVP                  '       d   K   R # 	  R# r6   )r3   r7   r9   r;   r&   is_installableZGameActions.is_installableb   s'    NN$D$$$ % r(   c                s   V P                  4        Fm  pVP                  '       g=   VP                  '       d   VP                  MVP                  p\        RV,          4      hVP                  V P                  R7       Ko  	  R# )zInstall a gamezNo game to install: %sZlaunch_ui_delegateN)r3   slugrB   rD   nameZRuntimeErrorinstallr    )r-   r?   r:   rH   rF   r&   on_install_clickedZGameActions.on_install_clickedj   s[     NN$D999%)%6%6%6$''DII"#;g#EFFLLDKKL8	 %r(   c                V    V P                  4        F  pVP                  R4       K  	  R# )zAdd to favorite Games listTNr3   Zmark_as_favoriter-   _widgetr:      && r&   on_add_favorite_gameZ GameActions.on_add_favorite_games   s!    NN$D!!$' %r(   c                rP   )zdelete from favoritesFNrQ   rR   rT   r&   on_delete_favorite_gameZ#GameActions.on_delete_favorite_gamex   s!    NN$D!!%( %r(   c                rP   )z&Add a game to the list of hidden gamesTNr3   Zmark_as_hiddenrR   rT   r&   on_hide_gameZGameActions.on_hide_game}   s!    NN$D% %r(   c                rP   )z,Removes a game from the list of hidden gamesFNrW   rR   rT   r&   on_unhide_gameZGameActions.on_unhide_game   s!    NN$D& %r(   c                sv    V P                  4        F$  p\        V P                  W"P                  R7       K&  	  R# )zShow the user a dialog to import an existing install to a DRM free service

Params:
    games ([Game]): List of Game instances without a database ID, populated with fields the service can provides
)r:   runnerN)r3   r   r    runner_namer-   r?   r:      &* r&   on_locate_installed_gameZ$GameActions.on_locate_installed_game   s)     NN$D$++D9I9IJ %r(   c                s    V P                  4        F/  p\        RVP                  P                  RR4      ,          4       K1  	  R# )z%Callback to open a game on lutris.netzhttps://lutris.net/games/%s_-N)r3   r   rL   ZreplacerR   rT   r&   on_view_gameZGameActions.on_view_game   s2    NN$D2TYY5F5FsC5PPQ %r(   c                s    V P                  4        F*  pVP                  '       g   VP                  '       g   K)   R # 	  R# r6   )r3   r7   rB   r9   r;   r&   is_game_removableZGameActions.is_game_removable   s2    NN$D   D$5$5$5 % r(   c                sL   V P                  4        Uu. uF4  q"P                  '       g   VP                  '       g   K(  VP                  NK6  	  pp\        P
                  P                  4       pVP                  \        V P                  R7      pVP                  V4       R# u upi )z6Callback that present the uninstall dialog to the user)parentN)r3   r7   rB   rD   r   r*   r+   show_windowr   r    	add_games)r-   r?   gZgame_idsr,   dlg   &*    r&   on_remove_gameZGameActions.on_remove_game   sn    "&.."2W"2QnnnDADD"2Woo113%%odkk%Jh Xs
   %B!B!c                s  a  S P                  4       p\        V4      ^8X  d6   S P                  P                  \        V^ ,          S P
                  R7       R# V 3R lpS P                  P                  \        VS P
                  R7       R# )zEdit game categoriesr:   rc   c                 sF   < V P                  SP                  4       4       R # r)   )re   r3   )r    r-   s   &r&   re   Z6GameActions.on_edit_game_categories.<locals>.add_games   s      !12r(   )Zupdate_functionrc   N)r3   lenr,   rd   r   r    )r-   rS   r   re   s   f&  r&   on_edit_game_categoriesZ#GameActions.on_edit_game_categories   sl     u:?(()AaY]YdYd(e3
 (()AS\eiepep(qr(   )r,   r    r)   )__name__
__module____qualname____firstlineno____doc__r.   r3   r4   r5   Zpropertyr<   rA   r8   rG   rE   rJ   rO   rU   rV   rX   rY   r^   ra   rb   ri   rl   __static_attributes____classdictcell__)r$   s   @r&   r   r   $   s     ;
       9(
)
&
'
KR
   r rr(   r   c                   sX   a a ] tR t^t oRtRV3R lV 3R llltR tR tR tRt	Vt
V ;t# )	MultiGameActionszThis actions class handles actions on multiple games together, and only iof they
are 'db stored' games, not service games. This supports a subset of the actions
of SingleGameActions.c                sJ   < V ^8  d   QhRS[ S[,          RS[P                  /# )r   r   r    )r   r
   r   r!   r"   r%   r&   r'   ZMultiGameActions.__annotate__   s#      d4j #** r(   c                2   < \         SV `  W#4       Wn        R # r)   )superr.   r   )r-   r   r    r,   	__class__   &&&&r&   r.   ZMultiGameActions.__init__   s    -
r(   c                s    V P                   # r)   r   r1   r2   r&   r3   ZMultiGameActions.get_games   s    zzr(   c                sL   R \        R4      V P                  3RR\        R4      V P                  3R\        R4      V P                  3R\        R4      V P                  3R\        R	4      V P
                  3R
\        R4      V P                  3RR\        R4      V P                  3.	# )stopStopcategory
CategoriesfavoriteAdd to favoritesdeletefavoriteRemove from favoriteshideHide game from libraryunhideUnhide game from libraryremoveRemoveNr`   N)r_   rG   rl   rU   rV   rX   rY   ri   r1   r2   r&   r4   Z!MultiGameActions.get_game_actions   s    QvY 1 12<$*F*FG-.0I0IJq!894;W;WXQ/0$2C2CDq34d6I6IJq{D$7$78

 
	
r(   c                sz   R V P                   RRR\        ;QJ d&    R V P                   4       F  '       g   K   RM	  RM! R V P                   4       4      R\        ;QJ d&    R V P                   4       F  '       g   K   RM	  RM! R V P                   4       4      R\        ;QJ d&    R	 V P                   4       F  '       g   K   RM	  RM! R	 V P                   4       4      R
\        ;QJ d&    R V P                   4       F  '       g   K   RM	  RM! R V P                   4       4      RV P                  /# )ry   r{   Tr}   c              3   sL   "   T F  qP                   '       d   K  Vx  K  	  R # 5ir)   is_favoriteZ.0rf   r;   r&   	<genexpr>9MultiGameActions.get_displayed_entries.<locals>.<genexpr>   s     Gz!AAz   $
$Fr   c              3   L   "   T F  qP                   '       g   K  Vx  K  	  R # 5ir)   r   r   r;   r&   r   r      s     !IZ==!!Zr   r   c              3   st   "   T F.  qP                   '       g   K  VP                  '       d   K*  Vx  K0  	  R # 5ir)   )r7   	is_hiddenr   r;   r&   r   r      s     T:a:s   88
8r   c              3   r   r)   )r   r   r;   r&   r   r      s     ?Z;;!!Zr   r   )r8   Zanyr   rb   r1   r2   r&   r5   Z&MultiGameActions.get_displayed_entries   s    D((GtzzGGtzzGGcc!ITZZ!Iccc!ITZZ!IICCT4::TCCCT4::TTcc?TZZ?ccc?TZZ??d,,
 	
r(   r   r)   rm   rn   ro   rp   rq   r.   r3   r4   r5   rr   rs   __classcell__rw   r$      @@r&   rt   rt      s(      
	
 	
r(   rt   c                   s   a a ] tR t^t oRtRV3R lV 3R ll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R tR tR tR tR tRtVtV ;t# )SingleGameActionszThis actions class handles actions on a single game, which is a 'db stored' game,
not a service game. This provides the largest selection of actions, including many
that are unique to it.c                :   < V ^8  d   QhRS[ RS[P                  /# r   r:   r    r
   r   r!   r"   r%   r&   r'   ZSingleGameActions.__annotate__         T 3:: r(   c                ru   r)   rv   r.   r:   r-   r:   r    r,   rw   rx   r&   r.   ZSingleGameActions.__init__       -	r(   c                    V P                   .# r)   r:   r1   r2   r&   r3   ZSingleGameActions.get_games       		{r(   c                 s   R \        R4      V P                  3R\        R4      V P                  3R\        R4      V P                  3R\        R4      V P                  3R4R\        R	4      V P
                  3R
\        R4      V P                  3R\        R4      V P                  3R\        R4      V P                  3R\        R4      V P                  3R\        R4      V P                  3R\        R4      V P                  3R4R\        R4      V P                  3R\        R4      V P                  3R\        R4      V P                  3R\        R4      V P                  3R\        R4      V P                  3R \        R!4      V P                   3R"\        R#4      V P"                  3R$\        R%4      V P$                  3R&\        R'4      V P&                  3R(\        R)4      V P(                  3R*\        R+4      V P*                  3R,\        R-4      V P,                  3R.\        R/4      V P.                  3R0\        R14      V P0                  3R4R2\        R34      V P2                  3.# )5playZPlayry   rz   execute-scriptzExecute script	show_logsz	Show logs	configureZ	Configurer{   r|   browsezBrowse filesr}   r~   r   r   r   r   r   r   rN   Installinstall_morezInstall another versioninstall_dlcszInstall DLCsupdatezInstall updatesaddLocate installed gamedesktop-shortcutzCreate desktop shortcutrm-desktop-shortcutzDelete desktop shortcutmenu-shortcutz Create application menu shortcutrm-menu-shortcutz Delete application menu shortcutsteam-shortcutzCreate Steam shortcutzsteam-bigpicture-shortcutz!Create Steam Big-Picture shortcutrm-steam-shortcutzDelete Steam shortcutviewView on Lutris.net	duplicateZ	Duplicater   r   r   )r_   rA   rG   on_execute_script_clickedon_show_logson_edit_game_configurationrl   on_browse_filesrU   rV   rX   rY   rO   on_install_dlc_clickedon_update_clickedr^   on_create_desktop_shortcuton_remove_desktop_shortcuton_create_menu_shortcuton_remove_menu_shortcuton_create_steam_shortcut#on_create_steam_bigpicture_shortcuton_remove_steam_shortcutra   on_game_duplicateri   r1   r2   r&   r4   Z"SingleGameActions.get_game_actions   sF   QvY 3 34QvY 1 12q!12D4R4RS!K.$*;*;<!K.$*I*IJ<$*F*FGq($*>*>?-.0I0IJq!894;W;WXQ/0$2C2CDq34d6I6IJ)d&=&=>Q894;R;RSQ~.0K0KLq*+T-C-CDA-.0M0MN#<!=t?^?^_"A&?$@$BaBaba BCTEaEab#E!FHdHdeq!894;X;XY+5688
 !!$;"<d>[>[\Q+,d.?.?@!K.$*@*@Aq{D$7$78C"
 "	
r(   c                s   V P                   p\        P                  ! 4       pV'       d.   \        P                  ! V4      p\        P                  ! V4      pMRpRp/ RVP
                  bRV P                  bRVP
                  '       * bRV P                  bRVP                  bRVP                  bRV P                  bR	\        VP
                  4      bR
VP
                  ;'       d    VP                  R8g  bRVP
                  bRRbRVP                  '       * bRVP                  bRVP                  '       * ;'       d    VP
                  bR\        VP
                  ;'       d:    VP                  ;'       d&    VP                  P                   P#                  R4      4      bR\        VP
                  ;'       d1    \$        P&                  ! VP(                  VP*                  4      '       * 4      bR\        VP
                  ;'       d1    \$        P,                  ! VP(                  VP*                  4      '       * 4      bR\        T;'       d+    VP
                  ;'       d    V'       * ;'       d    V'       * 4      R\        VP
                  ;'       d,    \$        P&                  ! VP(                  VP*                  4      4      R\        VP
                  ;'       d,    \$        P,                  ! VP(                  VP*                  4      4      R\        VP
                  ;'       d    T;'       d    V'       * 4      RV P.                  RRRVP
                  ;'       d    VP0                  '       * RVP0                  /C# )>Return a dictionary of actions that should be shown for a gameFr   rN   r   r   r   r   ry   r   r   Zbrowserr   r{   Tr}   r   r   r   manual_commandr   r   r   r   r   r   r   r   r   r   )r:   steam_shortcutZvdf_file_existsZshortcut_existsis_steam_gamer7   rJ   r<   Zis_updatabler8   Zboolr[   r   serviceZ
has_runnerrZ   system_configgetr   Zdesktop_launcher_existsrL   rD   Zmenu_launcher_existsrb   r   )r-   r:   Z	has_steamZhas_steam_shortcutr   rI   r&   r5   Z'SingleGameActions.get_displayed_entries
  s&    yy"224	!/!?!?!E*88>M!&!M
**
t**
 t(((
 D++	

 d''
 D--
 D((
 d//0
 d''IID,<,<	,I
 **
 
 D,,,
 d..
 ,BB1B1B
 d!!iidooii$++:S:S:W:WXh:i
$ !!bb,*N*NtyyZ^ZaZa*b&b!%
* T$"3"3"q"qL<]<]^b^g^gimipip<q8qr+
, d9#s#s1B1B#s#sK]G]#s#sfsbst!4(9(9(v(vl>b>bcgclclnrnunu>v#wT%6%6%p%p<;\;\]a]f]fhlhoho;p qd&7&7&d&d<N&d&dWdSd!ed,,DD%%<<dnn*<dnn;
 	
r(   c                s    V P                   pVP                  '       d`   VP                  '       dL   V P                  P	                  VP
                  4      '       g   VP                  V P                  R7       R# R# R# R# )r=   rK   N)r:   r7   rB   r,   rC   rD   Zlaunchr    r\   r]   r&   rA   Z SingleGameActions.on_game_launch6  s]    yy!2!2!2##99$''BBt{{; C "3r(   c                s   V P                   pVP                  P                  P                  R4      p\	        V4      '       d|   VP                  pVP                  4       p\        V.\        P                  P                  V4      .VP                  VR7      P                  4        \        P                  ! RV4       R# R# )z$Execute the game's associated scriptr   )Zinclude_processesZcwdenvzRunning %s in the backgroundN)r:   rZ   r   r   r   Zget_envr   ospathZbasenameZ	directoryZstartr   info)r-   rS   r:   r   rZ   r      &&    r&   r   Z+SingleGameActions.on_execute_script_clicked=  s    yy22667GH~&&[[F.."C RWW5E5En5U4V\`\j\jpsegKK6G 'r(   c                s    V P                   pVP                  pV'       g   \        P                  ! RV4       \	        W#V P
                  R7      # )zDisplay game logzNo log for game %s)r:   Zbufferr,   )r:   Z
log_bufferr   r   r   r,   )r-   rS   r:   Z_buffers   &&  r&   r   ZSingleGameActions.on_show_logsI  s9    yy//KK,d3d@P@PQQr(   c                sr    V P                   P                  \        V P                  V P                  R7       R# )zEdit game preferencesrj   N)r,   rd   r   r:   r    r-   rS      &&r&   r   Z,SingleGameActions.on_edit_game_configurationQ  s)    $$%9		RVR]R]$^r(   c                s"   V P                   P                  4       pV'       g"   \        P                  ! \	        R4      4       R# \        V4      '       d   \        RV,          4       R# \        P                  ! \	        R4      V,          4       R# )z2Callback to open a game folder in the file browserz'This game has no installation directoryz	file://%sz(Can't open %s 
The folder doesn't exist.N)r:   Zget_browse_dirr   ZNoticeDialogr_   r   r   )r-   rS   r   rT   r&   r   Z!SingleGameActions.on_browse_filesU  s]    yy'')  #L!MN[4'(  #N!ORV!VWr(   c                R    V P                   P                  V P                  R 7       R# )Zinstall_ui_delegateN)r:   Zinstall_dlcr    r   r   r&   r   Z(SingleGameActions.on_install_dlc_clicked_  s    		$++>r(   c                r   r   )r:   Zinstall_updatesr    r   r   r&   r   Z#SingleGameActions.on_update_clickedb  s    		!!dkk!Br(   c                    V P                   pV P                  V4      pVe<   \        P                  ! VP                  VP
                  VP                  VRR7       R# R# )z1Add the selected game to the system's Games menu.NTZmenur:   _select_game_launch_config_namer   Zcreate_launcherrL   rD   rM   r-   r?   r:   launch_config_namerF   r&   r   Z)SingleGameActions.on_create_menu_shortcute  sK    yy!AA$G)((DGGTYYHZaef *r(   c                sx    V P                   pV P                  V4      pVe   \        P                  ! W#4       R# R# )2Add the selected game to steam as a nonsteam-game.N)r:   r   r   create_shortcutr   rF   r&   r   Z*SingleGameActions.on_create_steam_shortcutl  s5    yy!AA$G)**4D *r(   c                s:   V P                   pV P                  V4      pVez   \        P                  ! W#R4       \        P
                  ! VP                  R4      p\        P                  ! 4       : RVP                   R2p\        \        \        4       WE4       R# R# )r   NTrD   z"/.local/share/applications/lutris-z.sh)r:   r   r   r   r   r	   rD   r   ZhomerL   r   r   r   )r-   r?   r:   r   ZgameDictZgamepathrh   r&   r   Z5SingleGameActions.on_create_steam_bigpicture_shortcuts  s{    yy!AA$G)**4TJ..tww=H))+(J499+UXYHF$4$6K	 *r(   c                r   )z0Create a desktop launcher for the selected game.NTZdesktopr   r   rF   r&   r   Z,SingleGameActions.on_create_desktop_shortcut~  sK    yy!AA$G)((DGGTYYHZdhi *r(   c                x    V P                   p\        P                  ! VP                  VP                  RR7       R# )zRemove an XDG menu shortcutTr   Nr:   r   Zremove_launcherrL   rD   r\   r]   r&   r   Z)SingleGameActions.on_remove_menu_shortcut  s%    yy$$TYYdCr(   c                sF    \         P                  ! V P                  4       R# )z5Remove the selected game from list of non-steam apps.N)r   Zremove_shortcutr:   r>   r@   r&   r   Z*SingleGameActions.on_remove_steam_shortcut  s    &&tyy1r(   c                r   )zRemove a .desktop shortcutTr   Nr   r\   r]   r&   r   Z,SingleGameActions.on_remove_desktop_shortcut  s%    yy$$TYYFr(   c           
     s   V P                   p\        R V P                  R\        R4      \	        VP
                  4      ,          R\        R4      RVP
                  /4      pVP                  4       pV\        P                  P                  8w  d   VP                  4        R# VP                  pVP                  pV'       d   \        \        V4      V4      pMRpVP                  4       pVP                  4        \!        VP"                  R4      p	WYR&   WRP
                  8w  d   \        V4      MVP$                  V	R	&   RV	R
&   RV	R&   WyR&   V	P'                  R4       V	P'                  RR4       V	P'                  RR4       \)        R/ V	B p
\+        V
4      pV F  pVP-                  VRR7       K  	  VP/                  4        \1        \2        RV	R	,          4       R# )rc   ZquestionzDo you wish to duplicate %s?
The configuration will be duplicated, but the games files will <b>not be duplicated</b>.
Please enter the new name for the copy:titlezDuplicate game?Zinitial_valueNrD   rM   rL   Z
lastplayedg        ZplaytimeZ
configpathr   Z
service_idT)Z	no_signalr0   )r:   r   r    r_   r   rM   Zrunr   ZResponseTypeZOKZdestroyZ
user_valueZgame_config_idr   r   Zget_categoriesr	   rD   rL   Zpopr   r
   Zadd_categoryZsaver   r   )r-   rS   r:   Zduplicate_game_dialogZresultZnew_nameZold_config_idZnew_config_idZ
categoriesZdb_gamerH   Znew_gameZcats   &&           r&   r   Z#SingleGameActions.on_game_duplicate  s   yy +$++A>
 499%& ,-
!
 '**,S%%(((!))+(33++1'(2C]SM M((*
%%'#DGGT2"/799/D'(+$)) $!
 -DIt$L$'%W%= C!!#!6  	 	'wv?r(   c                sZ   VP                   P                  P                  R / 4      pVP                  R4      pV'       g   R# \        P                  ! W\        R4      V P                  R7      pVP                  '       g   R# VP                  pV^ 8  d   W5^,
          ,          R,          # R# )r:   Zlaunch_configsZ zSelect shortcut target)r   rc   NrM   )	ZconfigZ
game_levelr   r   ZLaunchConfigSelectDialogr_   r    Z	confirmedconfig_index)r-   r:   Zgame_configZconfigsrg   r   r   r&   r   Z1SingleGameActions._select_game_launch_config_name  s    kk,,00<//"23..tAF^D_hlhshst}}}''4@14Dwa'(0L"Lr(   r   r)   )rm   rn   ro   rp   rq   r.   r3   r4   r5   rA   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   rr   rs   r   r   r   r&   r   r      s      #
J*
X<
HR_X?CgE	LjD
2G
6@pM Mr(   r   c                   sX   a a ] tR tRt oRtR	V3R lV 3R llltR tR tR tRt	Vt
V ;t# )
ServiceGameActionsi  z]This actions class supports a single service game, which has an idiosyncratic set of
actions.c                r   r   r   r"   r%   r&   r'   ZServiceGameActions.__annotate__  r   r(   c                ru   r)   r   r   rx   r&   r.   ZServiceGameActions.__init__  r   r(   c                r   r)   r   r1   r2   r&   r3   ZServiceGameActions.get_games  r   r(   c                s    R \        R4      V P                  3R\        R4      V P                  3R\        R4      V P                  3.# )rN   r   r   r   r   r   )r_   rO   r^   ra   r1   r2   r&   r4   Z#ServiceGameActions.get_game_actions  sL    )d&=&=>A-.0M0MNQ+,d.?.?@
 	
r(   c                s:    RV P                   RV P                   RR/# )r   rN   r   r   T)rJ   r1   r2   r&   r5   Z(ServiceGameActions.get_displayed_entries  s"    4..t7J7JFTXYYr(   r   r)   r   r   r   r&   r   r     s*      
Z Zr(   r   c                sf    V ^8  d   QhR\         \        ,          R\        P                  R\        /# )r   r   r    Zreturn)r   r
   r   r!   r   )r#   s   "r&   r'   r'     s*     , ,DJ ,

 ,Q\ ,r(   c                s^   V '       d   \        V 4      ^8X  dG   V ^ ,          pVP                  '       d   \        W1V4      # VP                  '       d   \	        W1V4      # ME\
        ;QJ d    R V  4       F  '       d   K   RM	  RM! R V  4       4      '       d   \        W4      # \        W4      # )zCreates a GameActions instance (which may be a subclass) for the list of games given. If
it can't figure out a suitable class, it falls back to the base GameActions class, which
provides no actions.c              3   s8   "   T F  qP                   x  K  	  R # 5ir)   )rB   r   r;   r&   r   Z#get_game_actions.<locals>.<genexpr>  s     /As   FT)rk   rB   r   r   r   Zallrt   r   )r   r    r,   r:   s   &&& r&   r4   r4     s     u:?8D   ({CC|||)$DD S//SSS////#E22 v++r(   r)   )?rq   r   r    r_   Zpathlibr   Ztypingr   Zgi.repositoryr   r   Zlutris.configr   Zlutris.databaser   Zlutris.database.gamesr   r	   Zlutris.gamer
   Z
lutris.guir   Z!lutris.gui.config.add_game_dialogr   Zlutris.gui.config.edit_gamer   Z&lutris.gui.config.edit_game_categoriesr   Zlutris.gui.dialogsr   Zlutris.gui.dialogs.delegatesr   Zlutris.gui.dialogs.logr   Z#lutris.gui.dialogs.uninstall_dialogr   Zlutris.gui.widgets.utilsr   Zlutris.monitored_commandr   Zlutris.services.lutrisr   Zlutris.utilr   Zlutris.util.jobsr   Zlutris.util.logr   Zlutris.util.standalone_scriptsr   Zlutris.util.steamr   r   Zlutris.util.stringsr   r   Zlutris.util.systemr   r   rt   r   r   r4   r0   r(   r&   <module>r      s    " 
     " / ! =   ; < K * 9 , ? - 5 8 $ & " : 8 1 *Mr Mr`"
{ "
J~M ~MBZ Z., ,r(   