
    cez                     j    d Z ddlmZmZmZ ddlmZ ddlmZm	Z	m
Z
mZ ddlmZ  G d de          ZdS )	zUpdate application dialog.    )QHBoxLayoutQLabelQVBoxLayout)CONF)ButtonPrimary	QCheckBoxSpacerHorizontalSpacerVertical)
DialogBasec                        e Zd ZdZdZdZdZdZdZdZ	eez   ez   Z
eez   ez   e	z   Zeez   ez   ez   Zdef fd		Zd
 Zd Z xZS )DialogOfflineModeOffline mode dialog.i  zSome of the functionality of Anaconda Navigator will be limited. Conda environment creation will be subject to the packages currently available on your package cache.<br><br>z<b>Offline mode</b> is indicated to the left of the login/logout button on the top right corner of the main application window.<br><br>z[Offline mode will be disabled automatically when internet connectivity is restored.<br><br>zkYou can also manually force <b>Offline mode</b> by enabling the setting on the application preferences.<br>z?By checking this option you will force <b>Offline mode</b>.<br>Nc                 Z   t                                          |           t          | j                  | _        t          d          | _        t          d          | _        || _	        | j        
                    d           |                     | j                   |                     | j                   |                     d           t                      }|                                 |                    | j                   |                    t%                                 |                    | j                   t'                      }|                    | j                   |                    t)                                 |                    t)                                 |                    |           |                     |           | j        j                            | j                   | j                                         |                                  dS )r   )parentOkzDon't show againTzOffline ModeN)super__init__r   MESSAGE_DIALOGlabelr   	button_okr   checkbox_hideconfigsetWordWrapsetMinimumWidthWIDTHsetMaximumWidthsetWindowTitler   
addStretch	addWidgetr	   r   r
   	addLayout	setLayoutclickedconnecthandle_acceptsetFocussetup)selfr   r   layout_buttonslayout	__class__s        Jlib/python3.11/site-packages/anaconda_navigator/widgets/dialogs/offline.pyr   zDialogOfflineMode.__init__+   s    	'''D/00
&t,,&'9:: 	
t$$$TZ(((TZ(((N+++ %!!###  !3444  !1!3!3444  000$$$  !1!1222  !1!1222(((v 	&&t'9::: 	!!!

    c                     | j                             dd          }| j                            t	          |                     dS )zSetup widget content.mainhide_offline_dialogN)r   getr   
setCheckedbool)r'   hide_dialogs     r+   r&   zDialogOfflineMode.setupS   s=    koof.CDD%%d;&7&788888r,   c                     t          | j                                                  }| j                            dd|           |                                  dS )z&Handle not showing updates on startup.r.   r/   N)r2   r   
checkStater   setaccept)r'   values     r+   r$   zDialogOfflineMode.handle_acceptX   sH    T'224455 5u===r,   )__name__
__module____qualname____doc__r   _MESSAGE_BASE_MESSAGE_LOC_MESSAGE_ENABLE_MESSAGE_FORCE_MESSAGE_EXTRA_PREFMESSAGE_TOOLMESSAGE_PREFERENCESr   r   r   r&   r$   __classcell__)r*   s   @r+   r   r      s        E	 	Q  tOu  \ ?2^CL',6HK^^"\1OCnTN & & & & & &P9 9 9
      r,   r   N)r<   qtpy.QtWidgetsr   r   r   anaconda_navigator.configr   anaconda_navigator.widgetsr   r   r	   r
   "anaconda_navigator.widgets.dialogsr   r    r,   r+   <module>rJ      s    !   ; ; ; ; ; ; ; ; ; ; * * * * * * a a a a a a a a a a a a 9 9 9 9 9 9H H H H H
 H H H H Hr,   