+
    KiK!  c                   s    ^ 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HtHtHt ^ RIHtHt ^ RIHt  ! R R]
4      t R# )i    )gettext)Gtk)settings)
disconnectread_user_info)BaseConfigBox)UpdateButtonBox)ClientLoginDialogQuestionDialog)EMPTY_NOTIFICATION_REGISTRATION)
sync_media)	AsyncCall)LOCAL_LIBRARY_SYNCEDLOCAL_LIBRARY_SYNCINGLibrarySynceris_local_library_syncing)STEAM_ACCOUNT_SETTINGget_steam_users)time_agoc                   s   a a ] tR t^t oV 3R ltR tV3R lR ltR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VtV ;t# )AccountsBoxc                s  < \         SV `  4        V P                  V P                  \	        R 4      4      4       \
        P                  ! R\
        P                  P                  R7      pVP                  4       P                  R4       \
        P                  ! \
        P                  P                  RR7      V n        V P                  VRR^ 4       V P!                  4       V n        V P                  P                  V P"                  4       VP                  V P                  4       \$        V n        \$        V n        \+        V P-                  4       \	        R4      V P.                  R7      V n        V P3                  RV P4                  4       V P3                  R	V P6                  4       V P9                  V P0                  .4      V n        V P:                  P=                  \>        P@                  ! R
R4      4       V P                  V P:                  RR^ 4       V P                  V P                  \	        R4      4      4       V P                  V PC                  \	        R4      4      4       \
        P                  ! R\
        P                  P                  R7      V n"        V PD                  P                  4       P                  R4       V P                  V PD                  RR^ 4       \
        P                  ! \
        P                  P                  ^RR7      V n#        V PD                  P                  V PF                  4       R# )ZLutrisT)visibleZshadow_typez
info-frame)orientationr   Fz
Sync Again)clickedZrealizeZ	unrealizelibrary_sync_enabledzSteam accountszWSelect which Steam account is used for Lutris integration and creating Steam shortcuts.r   Zspacingr   N)$Zsuper__init__addZget_section_label_r   ZFrameZ
ShadowTypeZ	ETCHED_INZget_style_contextZ	add_classBoxOrientationVERTICALbullshit_box
pack_startget_lutris_optionslutris_optionsr	   library_syncing_registrationlibrary_synced_registrationr   get_sync_box_labelon_sync_again_clickedsync_boxconnect
on_realizeon_unrealizeZ_get_framed_options_list_box
sync_frameset_visibler   read_bool_settingZget_description_labelframeaccounts_box)selfr.   	__class__s   & C/usr/lib/python3.14/site-packages/lutris/gui/config/accounts_box.pyr   ZAccountsBox.__init__   s6   ''(45		$CNN4L4LM!++L9GG0H0HRVWueQ/"557d112		$##$,K)+J('(?(?(A1\?\`\v\vwY0[$"3"34;;T]]OL##H$>$>?UW[$\]q9''*:(;<=&&kl	

 YYt9Q9QR


$$&00>

E5!4GG0H0HRS]ab

t(()    c                s    \         P                  ! V P                  4      V n        \        P                  ! V P
                  4      V n        \        4       '       d   V P                  4        R # R # N)r   Zregisteron_local_library_syncingr#   r   on_local_library_syncedr$   r   r0   _widget   &&r2   r)   ZAccountsBox.on_realize>   sN    ,A,J,J4KhKh,i)+?+H+HIeIe+f(#%%))+ &r3   c                s   < V ^8  d   QhRR/# )i   ZreturnN )Zformat__classdict__s   "r2   Z__annotate__ZAccountsBox.__annotate__D   s     6 6t 6r3   c                sn    V P                   P                  4        V P                  P                  4        R # r4   )r#   Z
unregisterr$   r7   r9   r2   r*   ZAccountsBox.on_unrealizeD   s(     	))446((335r3   c                s    VP                  V4       VP                  ^4       VP                  ^4       VP                  V4       V# )   )Zset_margin_topZset_margin_startZset_margin_endZset_margin_bottom)r0   Zwidgettopbottoms   &&&&r2   space_widgetZAccountsBox.space_widgetJ   s?    c"#b!  (r3   c                s   \        4       p\        P                  ! \        P                  P                  ^RR7      p\        P
                  ! RR7      pVP                  ^ R4       V'       d*   VP                  \        R4      VR,          ,          4       MVP                  \        R4      4       V P                  V4       VP                  VRR^ 4       V'       d   \        R4      pV P                  pM\        R	4      pV P                  p\        P                  ! VRR7      pVP                  R
V4       V P                  V4       VP                  VRR^ 4       V# )   Tr   r         ?zConnected as <b>%s</b>ZusernamezNot connectedZLogoutZLoginr   F)r   r   r   r   
HORIZONTALLabelset_alignment
set_markupr   r?   r    on_logout_clickedon_login_clickedZButtonr(   )r0   Z	user_infoZuser_boxlabelZbutton_textZbutton_handlerZbuttons   &      r2   get_user_boxZAccountsBox.get_user_boxQ   s   "$	77s'A'A1VZ[		$'As#Q789Z;PPQQ/0% E4q1H+K!33NG*K!22NK6y.1&!FE5!4r3   c                sd   \         P                  ! \         P                  P                  ^RR7      pVP	                  V P                  4       4       \         P                  ! \         P                  P                  ^RR7      p\         P                  ! \        R4      RR7      p\         P                  ! RR7      pVP                  \        P                  ! RRR7      4       VP                  RV P                  4       VP                  VRR^ 4       VP!                  VRR^ 4       V P#                  V^ R	7       VP	                  V4       \         P                  ! RR7      pVP%                  ^ R
4       VP'                  \        R4      4       V P#                  V^ R7       VP	                  V4       V# )r@   Tr   z-Keep your game library synced with Lutris.netrA   r   )Zdefaultz	state-setF)r>   rB   z<i>This will send play time, last played, runner, platform 
and store information to the lutris website so you can 
sync this data on multiple devices</i>)r=   )r   r   r   r   r   rJ   rC   rD   r   ZSwitch
set_activer   r-   r(   on_sync_state_setr    Zpack_endr?   rE   rF   )r0   Zboxr'   Z
sync_labelZsync_switchrI   s   &     r2   r!   ZAccountsBox.get_lutris_optionsk   sM   gg#//":":AtT!!#$77s'A'A1VZ[YYq!PQ[_`
jj.x99:PZ^_`K)?)?@Jua8+ueQ7(1-		$'As#9	
 	%Q'
r3   c           	     s   R p\         P                  ! \        4      p\        4       pV F  pVR,          pVP	                  R4      ;'       g    RV 2p\
        P                  P                  W4      pV P                  V4       VP                  4        VP                  W%8H  4       VP                  RV P                  V4       V P                  P                  VRR^ 4       V'       d   K  TpK  	  V'       gO   V P                  P                  V P                  \
        P                  ! \!        R4      RR7      4      RR^ 4       R # R # )N	steamid64ZPersonaNameZ#ZtoggledTzNo Steam account foundrA   )r   read_settingr   r   Zgetr   ZRadioButtonZnew_with_label_from_widgetr?   ZshowrK   r(   on_steam_account_toggledr/   r    rD   r   )r0   Zmain_radio_buttonZactive_steam_accountZsteam_usersZaccountrM   Znameradio_buttons   &       r2   populate_steam_accountsZ#AccountsBox.populate_steam_accounts   s    '445JK%'"G,I;;}-@@1YKD??EEFW^Ll+##$8$EF  D,I,I9U((tT1E$$$0! # ((!!#))A.F,GQU"VW	 r3   c                s    V P                   P                  V P                  4       V P                  P                  4        V P	                  4       V n        V P                   P                  V P                  4       R # r4   )r   Zremover"   Zdestroyr!   r   r0      &r2   rebuild_lutris_optionsZ"AccountsBox.rebuild_lutris_options   sY      !4!45##%"557d112r3   c                s:    \        4        V P                  4        R # r4   )r   rT   r7   r9   r2   rG   ZAccountsBox.on_logout_clicked   s    ##%r3   c                sr    \        V P                  4       R 7      pVP                  RV P                  4       R# ))ZparentZ	connectedN)r   Zget_toplevelr(   on_connect_response)r0   r8   Zlogin_dialogs   && r2   rH   ZAccountsBox.on_login_clicked   s+    (0A0A0CD[$*B*BCr3   c                s&    V P                  4        R # r4   )rT   )r0   Z_dialogZbliblu   &&&r2   rU   ZAccountsBox.on_connect_response   s    ##%r3   c                sF    \        \        4       P                  R RR7       R # )NT)Zforce)r   r   sync_local_library)r0   Z_buttonr9   r2   r&   Z!AccountsBox.on_sync_again_clicked   s    -/44d$Gr3   c                sN    V P                   P                  \        R 4      4       R# )z<i>Syncing library...</i>N)r'   Zshow_running_markupr   rR   rS   r2   r5   Z$AccountsBox.on_local_library_syncing   s    ))!,G*HIr3   c                sz    V P                   P                  V P                  4       R 4       \        \        R4       R# ) N)r'   Zshow_completion_markupr%   r   r
   rR   rS   r2   r6   Z#AccountsBox.on_local_library_synced   s)    ,,T-D-D-FK*d#r3   c                s    \         P                  ! R 4      pV'       d%   \        R4      \        \	        V4      4      ,          # R# )last_library_sync_atz<i>Last synced %s.</i>rX   )r   rN   r   r   Zint)r0   Z	synced_ats   & r2   r%   ZAccountsBox.get_sync_box_label   s3    ))*@A	-.#i.1IIIr3   c                s<    \         P                  ! \        V4       R# )z/Handler for switching the active Steam account.N)r   Zwrite_settingr   )r0   rP   rM   rV   r2   rO   Z$AccountsBox.on_steam_account_toggled   s    4i@r3   c                sn   \         P                  ! R 4      '       gl   \        R\        R4      R\        R4      /4      pVP                  \
        P                  P                  8X  d    \        \        4       P                  R4       MR# V P                  WR4       V P                  P                  V4       R# )rY   ZtitlezSynchronize library?Zquestionz8Enable library sync and run a full sync with lutris.net?Nr   )r   rN   r   r   Zresultr   ZResponseTypeZYESr   r   rW   Zon_setting_changer+   r,   )r0   ZswitchZstateZsync_warn_dialogs   &&& r2   rL   ZAccountsBox.on_sync_state_set   s    $$%;<<-Q56"\ ]   &&#*:*:*>*>>-/<<dCv.DE##E*r3   )r/   r   r.   r$   r#   r"   r'   r+   )r<   r<   )Z__name__Z
__module__Z__qualname__Z__firstlineno__r   r)   r*   r?   rJ   r!   rQ   rT   rG   rH   rU   r&   r5   r6   r%   rO   rL   Z__static_attributes__Z__classdictcell__Z__classcell__)r1   r;   s   @@r2   r   r      si     $*L,6 64803&D&HJ$A+ +r3   r   N)!r    r   Zgi.repositoryr   Zlutrisr   Z
lutris.apir   r   Z!lutris.gui.config.base_config_boxr   Zlutris.gui.config.updates_boxr   Zlutris.gui.dialogsr   r   Zlutris.gui.widgetsr	   Zlutris.services.lutrisr
   Zlutris.util.jobsr   Zlutris.util.library_syncr   r   r   r   Zlutris.util.steam.configr   r   Zlutris.util.stringsr   r   r:   r3   r2   <module>rZ      sD        1 ; 9 @ > - &  L (|+- |+r3   