+
    Ki  c                   s    ^ RI t ^ RIHt ^ RIHt ^ RIHtHtH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 ^ RIHt  ! R R]4      t ! R R]4      tR# )i    N)gettext)Gtk)get_custom_cache_pathsave_custom_cache_pathvalidate_custom_cache_path)LutrisConfig)BaseConfigBox)WidgetWarningMessageBox)FileChooserEntryLabel)Runner)	AsyncCall)scan_firmware_directory)
human_sizec                   sJ   a  ] tR t^t o R tR tR tR tR tR t	R t
RtV tR	# )

StorageBoxc                s   R \        4       R\        4       /V n        V P                  V P                  \	        R4      4      4       V P                  4       pV P                  V P                  V4      RR^ 4       V P                  4        R# )	bios_pathpga_cache_pathZPathsFN)	StoragePathMessageBoxerror_boxesaddZget_section_label_get_path_widgets
pack_startZ_get_framed_options_list_boxupdate_pga_cache_path_warning)selfZpath_widgetss   & B/usr/lib/python3.14/site-packages/lutris/gui/config/storage_box.pypopulateZStorageBox.populate   st    .035

 	'''
34,,.99,GPUWXY**,    c                s   . p\        4       pVP                  P                  P                  R 4      pR\	        R4      RRR\
        P                  P                  R4      RVP                  R\	        R	4      /R\	        R
4      RRRRR\        4       ;'       g    RR\	        R4      /R\	        R4      RR RRRV'       d   TMRR\	        R4      /.pV F#  pVP                  V P                  V4      4       K%  	  V# )r   namezGame librarysetting	game_pathdefaultz~/Gamesvaluehelpz0The default folder where you install your games.zInstaller cacher    zuIf provided, files downloaded during game installs will be kept there

Otherwise, all downloaded files are discarded.zEmulator BIOS files locationzBThe folder Lutris will search in for emulator BIOS files if needed)r
   ZconfigZsystem_configZgetr   ospathZ
expanduserdefault_pathr   Zappendget_directory_chooser)r   ZwidgetsZbase_runnerr   Zpath_settingspath_settings   &     r   r   ZStorageBox.get_path_widgets   s   h&&4488E	 .);277--i811LM +,+2.066BG	 89;2iR^_%
4 *LNN455lCD *r   c                s   \        4       pVP                  R VR,          ,          4       \        P                  ! \        P                  P
                  ^RR7      pVP                  ^4       VR,          p\        \        R4      \        P                  P                  RVR,          VR7      pVP                  RV P                  V4       VP                  VR	R	^ 4       VP                  VRR^ 4       VR
,          '       d   \        P                  ! \        P                  P                  ^RR7      pVP                  V4       \        4       pVP                  RVR
,          ,          4       VP                  V4       TpVR,          V P                   9   d,   V P                   VR,          ,          pVP                  V4       VP#                  ^4       VP%                  ^4       VP'                  ^4       V# )z	<b>%s</b>r   T)ZorientationZspacingZvisibler   zSelect folderr    )ZtitleZactionZwarn_if_non_writable_parentZtextr%   ZchangedFr!   z	<i>%s</i>r   )r	   Z
set_markupr   ZBoxZOrientationZ
HORIZONTALZset_margin_topr   r   ZFileChooserActionZSELECT_FOLDERZconnecton_file_chooser_changedr   ZVERTICALr   r   Zset_margin_endZset_margin_leftZset_margin_bottom)	r   r'   ZlabelZwrapperr%   Zdirectory_chooserZhelp_wrapperZ
help_labelZwarnings	   &&       r   r&   Z StorageBox.get_directory_chooser@   s   |F';;<''coo&@&@!UYZr"#I.,O$((66(,g&%
 	!!)T-I-I<X5%2,dD!<77s/G/GQR\`aLW%J!!+V0D"DEZ("G	"d&6&66&&|I'>?GKK r"#!!"%r   c                s:   V'       g   VR 3# RpRp^p^ p^ p^ p\         P                  ! V4       F  w  rp
V
 F  pV RV 2p\         P                  ! V\         P                  4      '       g   K7  V\         P                  P                  V4      ,          pV^,          pV\        V4      R P                  \         P                  4      pK  	  K  	  WR8  d   V\        R4      \        V4      ,          3# Wc8  d   V\        R4      3# Wt8  d   V\        R4      3# VR 3# )r"   g    _Ai  Z/NzFolder is too large (%s)zToo many files in folderzFolder is too deep)r#   ZwalkZaccessZR_OKr$   ZgetsizeZlenZcountZsepr   r   )r   r   ZMAX_BIOS_FOLDER_SIZEZMAX_BIOS_FILES_IN_FOLDERZMAX_BIOS_FOLDER_DEPTHZbios_path_sizeZbios_path_file_countZbios_path_depthr$   Z
_dir_namesZ
file_namesZ	file_nameZ	file_paths   &&           r   is_bios_path_invalidZStorageBox.is_bios_path_invalidc   s   b= "#'  ! ,.GGI,>(Dj'	#fAi[1	99Y00"bggooi&@@N(A-(&*3y>+;&<&B&B266&JO ( -? 0a :;j>XXXX:a :;;;2a 4555"}r   c                s   V P                   R ,          pV'       d   VP                  R4       R# Vw  rEVP                  V4       V'       g<   \        4       pWFP                  R &   VP	                  4        \        \        RV4       R# R# )r   N)r   show_markupr   raw_system_configsaver   r   )r   ZresultZerror	error_boxr   Zerror_messagelutris_configs   &&&    r   bios_path_validated_cbZ!StorageBox.bios_path_validated_cb~   sr    $$[1	!!$'#) 	m,(NM;D++K8 -tY?	 r   c                sN   VP                  4       pVR ,          R8X  d   \        V4       V P                  4        R# VR ,          R8X  d+   \        4       pW4P                  R&   VP                  4        R# VR ,          R8X  d$   \        V P                  V P                  V4       R# R# )r   r   r   r   N)	Zget_textr   r   r   r+   r,   r   r)   r/   )r   Zentryr   Zfolder_pathr.   s   &&&  r   r(   Z"StorageBox.on_file_chooser_changed   s    nn&9!11";/..0Y;.(NM;F++K8 Y;.d//1L1LkZ /r   c                s    \        4       pV'       d   \        V4      w  r#MR Rr2V P                  R,          pTP                  V'       d   V'       g	   V4       R# R4       R# )TNr   )r   r   r   r*   )r   Z
cache_pathZvalidZmarkupr-   s   &    r   r   Z(StorageBox.update_pga_cache_path_warning   sJ    *,
6zBME6 $6$$%56	ufG$Gr   )r   N)__name__
__module____qualname____firstlineno__r   r   r&   r)   r/   r(   r   __static_attributes____classdictcell__)__classdict__s   @r   r   r      s3     	-!F!F6@"
[H Hr   r   c                   s6   a a ] tR t^t oRV 3R lltRtVtV ;t# )r   c                s(   < \         SV `  VR 7       R# ))	icon_nameN)Zsuper__init__)r   r7   	__class__s   &&r   r8   ZStoragePathMessageBox.__init__   s    9-r    )zdialog-error)r0   r1   r2   r3   r8   r4   r5   Z__classcell__)r9   r6   s   @@r   r   r      s     . .r   r   )r#   r    r   Zgi.repositoryr   Zlutris.cacher   r   r   Zlutris.configr   Z!lutris.gui.config.base_config_boxr   Z"lutris.gui.config.widget_generatorr   Zlutris.gui.widgets.commonr   r	   Zlutris.runners.runnerr
   Zlutris.util.jobsr   Zlutris.util.retroarch.firmwarer   Zlutris.util.stringsr   r   r   r:   r   r   <module>r;      sJ    	    b b & ; F = ( & B *RH RHj.3 .r   