Sindbad~EG File Manager

Current Path : /usr/share/hplip/ui5/__pycache__/
Upload File :
Current File : //usr/share/hplip/ui5/__pycache__/upgradedialog.cpython-310.pyc

o

�/�a]�@svddlZddlZddlZddlTddlmZmZmZmZddl	Tddl
TddlTddlm
Z
dZGdd�dee
�ZdS)	�N)�*)�device�utils�pkit�os_utils�)�	Ui_Dialogz>http://hplipopensource.com/hplip-web/install/manual/index.htmlc@sNeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	ddd�Z
dS)�
UpgradeDialogcCs8t�||�||_||_d|_|�|||�|��dS)NF)�QDialog�__init__�distro_tier�msg�result�setupUi�initUi)�self�parentrr
�r�%/usr/share/hplip/ui5/upgradedialog.pyr+szUpgradeDialog.__init__cCs�|jj�|j�|jj�|j�|jjt�|j	�|j
jt�|j�|jjt�|j
�t�tjtj�|�ttdd���dS)N�hp_logo�128x128)�
NextButton�clicked�connect�NextButton_clicked�CancelButton�CancelButton_clicked�installRadioBtton�toggled�bool�installRadioBtton_toggled�remindRadioBtton�remindRadioBtton_toggled�dontRemindRadioBtton�dontRemindRadioBtton_toggled�signal�SIGINT�SIG_DFL�
setWindowIcon�QIcon�load_pixmap�rrrrr4szUpgradeDialog.initUicC�(|dur|j�d�dS|j�d�dS�NTF)r�
setChecked�r�
radio_enabledrrrr B�z'UpgradeDialog.installRadioBtton_toggledcCs@|dur|j�d�|j�d�dS|j�d�|j�d�dSr-)r!r.�daysSpinBox�
setEnabledr/rrrr"Is
z&UpgradeDialog.remindRadioBtton_toggledcCr,r-)r#r.r/rrrr$Rr1z*UpgradeDialog.dontRemindRadioBtton_toggledcCs0|j��rt�d�t�ddd�d}t||�|��nv|j��rKt	|j
���}t�dt|��t
�
�t|�ddd}t�dd	t	t|���nGt�d
|j�|j�d�|jdkrit�d
�t�t�n)t��}|dur�t�d�r�|d}t�|�d|_nt�d|�t||�d��|��dS)Nz6HPLIP Upgrade, selected Don't remind again radiobutton�upgrade�notify_upgrade�falsez^Check for HPLIP updates is disabled. To enable it again, change 'Settings' in 'HP systemtray' z:HPLIP Upgrade, selected remind later radiobutton  days= %d��<�pending_upgrade_timez;HPLIP Upgrade, selected Install radiobutton  distro_type=%dFrz$OK pressed for tier 2 distro pressedz
hp-upgradez 'hp-upgrade -w'Tz3Failed to run hp-upgrade command from terminal =%s zFailed to run hp-upgrade)r#�	isChecked�log�debug�	user_conf�set�	SuccessUI�_UpgradeDialog__trr!�strr2�value�int�timerrr3r�openURL�MANUAL_INSTALL_LINK�get_terminal�whichr�executer�error�	FailureUI�close)rr
�
schedule_days�	next_time�terminal_cmd�cmdrrrrYs.





z UpgradeDialog.NextButton_clickedcCst�d�|��dS)Nz	User exit)r;r<rLr+rrrrzs
z"UpgradeDialog.CancelButton_clickedNcCst�d||�S)Nr	)�qApp�	translate)r�s�crrr�__tr~szUpgradeDialog.__tr)N)�__name__�
__module__�__qualname__rrr r"r$rrr@rrrrr	*s		!r	)�osrDr%�base.g�baserrrr�ui_utils�PyQt5.QtCore�PyQt5.QtGui�upgradedialog_baserrFr
r	rrrr�<module>s

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists