+
    Kip  c                   s    R 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Ht ^ RIHt  ! R R]P$                  ]4      tR	# )
zGrid view for the main window)Gtk)settings)COL_IDCOL_INSTALLEDCOL_MEDIA_PATHSCOL_NAMECOL_PLATFORM)GameView)GridViewCellRendererImageGridViewCellRendererText)loggerc                   s   a a ] tR t^t o]P
                  t^FtRR ltV 3R lt]	R 4       t
]
P                  R 4       t
R tR tRR ltR tR	 tR
 tR tR tR tRtVtV ;t# )GameGridViewc                s   \         P                  P                  V 4       \        P                  ! V 4       \         P                  P	                  V \         P
                  P                  4       V P                  ^4       RV n        \        P                  '       d=   \        4       V n        V P                  V P                  R4       V P                  4        MRV n        V P                  ^4       V'       d	   RV n        ML\#        4       V n        V P%                  V P                   R4       V P'                  V P                   R\(        4       V P+                  V4       V P-                  4        V P/                  RV P0                  4       V P/                  RV P2                  4       V P/                  RV P4                  4       R# )i   TFNZmarkupzitem-activatedzselection-changedzstyle-updated)r    IconView__init__r   Zset_selection_modeZSelectionModeZMULTIPLEZset_column_spacing_show_badgesr   Z
SHOW_MEDIAr   image_rendererZ
pack_start%_initialize_image_renderer_attributesZset_item_paddingtext_rendererr	   Zpack_endadd_attributer   set_game_storeZconnect_signalsZconnecton_item_activatedon_selection_changedon_style_updated)selfstoreZ	hide_text   &&&:/usr/lib/python3.14/site-packages/lutris/gui/views/grid.pyr   ZGameGridView.__init__   s?   d#$''c.?.?.H.HI" ";"=DOOD//7668"&Da !%D!9!;DMM$,,e4t118XFE"%t'='=>($*C*CD_d&;&;<    c                s  < \         SV `  V4       VP                  V n        V P	                  V P                  4       VP
                  P                  pV P                  '       d+   V P                  P                  V^ ,          V^,          4       V P                  '       d;   \        V^ ,          V P                  4      pV P                  P                  V4       R# R# )    N)Zsuperr   r   modelZ	set_modelZservice_mediasizer   Zset_expected_sizer   Zmax	min_widthZ	set_width)r   Z
game_storer   Z
cell_width	__class__s   &&  r   r   ZGameGridView.set_game_store0   s    z*%%
tzz"'',,11$q'47CT!Wdnn5J((4 r   c                s    V P                   # N)r   r      &r   show_badgesGameGridView.show_badges<   s       r   c                sx    V P                   V8w  d)   Wn         V P                  4        V P                  4        R # R # r!   )r   r   Z
queue_draw)r   Zvalue   &&r   r$   r%   @   s1    % %668OO &r   c                s   V P                   '       d   V P                  V P                   n        V P                  V P                   4       V P                  V P                   R \        4       V P                  V P                   R\
        4       V P                  V P                   R\        4       V P                  V P                   R\        4       R# R# )game_idZmedia_pathsZplatformZis_installedN)r   r$   Zclear_attributesr   r   r   r   r   r"   r#   r   r   Z2GameGridView._initialize_image_renderer_attributesG   s    .2.>.>D+!!$"5"56t22IvFt22M?St22JMt22NMR r   c                s$    V P                  W4      # r!   )Zget_path_at_pos)r   ZxZyr   r   get_path_atZGameGridView.get_path_atP   s    ##A))r   c                s    V P                  4        \        V4       F=  w  r4V P                  V4       V'       g   K   V^ 8X  g   K)  V P                  VRRR4       K?  	  R# )r   Fg        N)Zunselect_allZ	enumerateZselect_pathZscroll_to_path)r   ZpathsZscroll_into_viewZidxpaths   &&&  r   set_selectedZGameGridView.set_selectedS   sM    "5)ICT"C1H##D%c: *r   c                s"    V P                  4       # )z!Return list of all selected items)Zget_selected_itemsr"   r#   r   get_selectedZGameGridView.get_selected[   s    &&((r   c                s    V P                  4       P                  V4      pV P                  4       P                  V\        4      # r!   )	get_modelZget_iter	get_valuer   )r   r)   iterator   && r   get_game_id_for_pathZ!GameGridView.get_game_id_for_path_   s3    >>#,,T2~~))(F;;r   c                sZ   aa R oVV3R lpV P                  4       P                  V4       S# )Nc                 sJ   < V P                  V\        4      pSV8X  d   VoR # R# )TN)r-   r   )r   r)   r.   Zrow_idr'   
path_founds   &&& r   
check_pathZ5GameGridView.get_path_for_game_id.<locals>.check_pathf   s(    __Xv6F& !
 !r   )r,   Zforeach)r   r'   r2   r1   s   &f @r   get_path_for_game_idZ!GameGridView.get_path_for_game_idc   s*    
	 	  ,r   c                s    V P                  4       pV'       d,   \        P                  ! RV4       V P                  RV4       R# R# )zHandles double clickszItem activated: %szgame-activatedN)Zget_selected_game_idr
   Zdebugemit)r   _viewZ_pathZselected_ids   &&& r   r   ZGameGridView.on_item_activatedp   s6    //1LL-{;II&4 r   c                sJ    V P                  4       pV P                  RV4       R# )zHandles selection changeszgame-selectedN)r+   r4   )r   r5   Zselected_itemsr/   r   r   Z!GameGridView.on_selection_changedw   s    **,		/>2r   c                sb    V P                   '       d   V P                   P                  4        R # R # r!   )r   Zclear_caches)r   Zwidgetr&   r   r   ZGameGridView.on_style_updated|   s%    ++- r   )r   r   r   r   )F)Z__name__Z
__module__Z__qualname__Z__firstlineno__r   Z__gsignals__r   r   r   Zpropertyr$   Zsetterr   r(   r*   r+   r0   r3   r   r   r   Z__static_attributes__Z__classdictcell__Z__classcell__)r    Z__classdict__s   @@r   r   r      s     ((LI=<
5 ! !  S*;)<53
. .r   r   N)Z__doc__Zgi.repositoryr    Zlutrisr   Zlutris.gui.viewsr   r   r   r   r   Zlutris.gui.views.baser   Z lutris.gui.widgets.cellrenderersr   r	   Zlutris.util.logr
   r   r   ) r   r   <module>r6      s3    #   [ [ * ` "q.3<< q.r   