403Webshell
Server IP : 209.205.66.10  /  Your IP : 216.73.216.173
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux ammon 5.15.0-186-generic #196-Ubuntu SMP Sat Jun 20 16:09:34 UTC 2026 x86_64
User :  ( 1006)
PHP Version : 8.5.8
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/hplip/ui5/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/share/hplip/ui5/__pycache__/plugindialog.cpython-310.pyc
o

�K0j�0�@s�ddlTddlmZmZddlmZddlTddlTddlm	Z	ddl
mZddlTddl
TddlTddlmZddlZdZdZGd	d
�d
ee�ZdS)�)�*)�device�utils)�cups�)�
pluginhandler)�
to_unicode)�	Ui_DialogNc@s�eZdZeefdd�Zdd�Zdd�Zdd�Zd	d
�Z	dd�Z
d
d�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd �Zd!d"�Zd&d$d%�Zd#S)'�PluginDialogcCsnt�||�||_||_d|_d|_t��|_|�	|�t
�|_|j��|j�
�|��t�d|j�dS)N�Fr)�QDialog�__init__�install_mode�
plugin_reason�plugin_path�resultr�PluginHandle�	pluginObj�setupUi�UserSettings�
user_settings�load�debug�initUi�QTimer�
singleShot�showSourcePage)�self�parentrr�r�$/usr/share/hplip/ui5/plugindialog.pyr
0s



zPluginDialog.__init__cCs
|j��S�N)r�	getStatus�rrrr �isPluginInstalledBs
zPluginDialog.isPluginInstalledcCs�|jj�|j�|jj�|j�|�ttdd���it	d�t
|�d��t|�d��t
|�d��t|�d��td�td�t|�d��t|�d��t|�d	��td�td�t|�d
��t|�d��td�td�|_dS)N�hp_logo�128x128z)This plugin will enable printing support.z%This plugin will enhance print speed.z'This plugin will enhance print quality.z'This plugin will add printing features.z)This plugin will enable scanning support.z(This plugin will enhance scanning speed.z0This plugin will enhance scanning image quality.z'This plugin will enable faxing support.z)This plugin will enhnace faxing features.)�CancelButton�clicked�connect�CancelButton_clicked�
NextButton�NextButton_clicked�
setWindowIcon�QIcon�load_pixmap�PLUGIN_REASON_NONE�PLUGIN_REASON_PRINTING_SUPPORT�_PluginDialog__tr�PLUGIN_REASON_FASTER_PRINTING� PLUGIN_REASON_BETTER_PRINTING_PQ�PLUGIN_REASON_PRINTING_FEATURES�PLUGIN_REASON_RESERVED_10�PLUGIN_REASON_RESERVED_20�PLUGIN_REASON_SCANNING_SUPPORT�PLUGIN_REASON_FASTER_SCANNING� PLUGIN_REASON_BETTER_SCANNING_IQ�PLUGIN_REASON_RESERVED_200�PLUGIN_REASON_RESERVED_400�PLUGIN_REASON_FAXING_SUPPORT�PLUGIN_REASON_FAX_FEATURES�PLUGIN_REASON_RESERVED_20000�PLUGIN_REASON_RESERVED_40000�PLUGIN_REASON_TEXTr#rrr rFsH�
�
�
�
���
�
	�

���

�
��
�zPluginDialog.initUicCs|��}|jtkr%|j�d�d}|dur|d|7}|j�|�|��n|jtkr?d}|dur6|d|7}|j�|�|��|j	j
t�|j
�|jj
t�|j�|jj
t�|j�|jjd�|j�|jj�|j�t�tjtj�|j�ttdd���|�t�dS)NFz�An additional driver plug-in is required to operate this printer. You may download the plug-in directly from an HP authorized server (recommended), or, if you already have a copy of the file, you can specify a path to the file (advanced).z
<br><br>%sa(An optional driver plug-in is available to enhance the operation of this printer. You may download the plug-in directly from an HP authorized server (recommended), skip this installation (not recommended), or, if you already have a copy of the file, you can specify a path to the file (advanced).zconst QString &�folder_open�16x16)�plugin_reason_textr�PLUGIN_REQUIRED�SkipRadioButton�
setEnabled�
TitleLabel�setTextr2�PLUGIN_OPTIONAL�DownloadRadioButton�toggled�boolr)�DownloadRadioButton_toggled�CopyRadioButton�CopyRadioButton_toggled�SkipRadioButton_toggled�PathLineEdit�textChanged�PathLineEdit_textChanged�BrowseToolButtonr(�BrowseToolButton_clicked�signal�SIGINT�SIG_DFL�setIconr.r/�displayPage�PAGE_SOURCE)r�reason_text�msgrrr rfs(

zPluginDialog.showSourcePagecC�Z|r+|j�d�|j�d�|j�d�z|j�d�Wn	ty%Ynwd|_dSdS�NFTr�rRrGrUr+�
setStyleSheet�AttributeErrorr�r�brrr rN���
�z(PluginDialog.DownloadRadioButton_toggledcCs<|r|j�d�|j�d�t|j���|_|��dSdS)NT)rRrGrUr�textr�setPathIndicatorsrdrrr rP�s�z$PluginDialog.CopyRadioButton_toggledcCr_r`rardrrr rQ�rfz$PluginDialog.SkipRadioButton_toggledcCst|�|_|��dSr!)rrrh)r�trrr rT�s
z%PluginDialog.PathLineEdit_textChangedcCs�d}|jr|jr tj�|j�r |j�|�d|j����d}ntj�	|j�|j��kr<|j�|�d|j����d}|sXz|j�
d�Wn	tyOYnw|j�
d�dSz|j�
d�Wn	tyiYnw|j�
d�|j�d�dS)NTz)You must specify a path to the '%s' file.Fz!The plugin filename must be '%s'.zbackground-color: yellow; r)r�os�path�isdirrR�
setToolTipr2r�getFileName�basenamerbrcr+rG)r�okrrr rh�s*��zPluginDialog.setPathIndicatorscCszt|j���}d}tj�|�st�||�d�|j	j
|�d��}|r7|d|_|j�|j�|j|j	_
|j	�
�|��dS)NrzSelect Plug-in FilezPlugin Files (*.run)r)rrRrgrjrk�exists�QFileDialog�getOpenFileNamer2r�working_dirrrI�saverh)rrirkrrr rV�s�


z%PluginDialog.BrowseToolButton_clickedcCs|�|�|j�|�dSr!)�updateStepText�
StackedWidget�setCurrentIndex)r�pagerrr r[�s
zPluginDialog.displayPagecCs|��dSr!)�closer#rrr r*��z!PluginDialog.CancelButton_clickedc	
Cs�|j��rt�d�|��dSt��z<|jr%|j�d�s$d|j|_n%t�d�t	�
�}|sJt�d�t�t
||�d��|��Wt�dSt�d|j�|j�|j|j�\}}}|ttfvr�t�t�|d|�d|�tjtjBtj�tjkr�|j�|�|��Wt�dSn|tkr�|j�|�t�t
||�|��Wt�dS|j�|t�s�|j�|�t�t
||�d	��|��Wt�dSt�d
g�}|D]w}t�|�}|�dd��rKt�t� d
|��zSd}zt�!|�}Wn&t"�yt�d�t�t
||�d|��YW|du�r|��q�w|�#��r(t�d�n
t�t
||�d|��W|du�r?|��q�|du�rJ|��wwq�Wt�nt�w|j�|�t$||�d��d|_%|��dS)NzSkipping plug-in installation.zhttp://zfile://z"Checking for network connection...z Network connection not detected.zDownloading plug-in from: %s� z�<b>%s</b><p>Without this, it is not possible to authenticate and validate the plug-in prior to installation.</p>Do you still want to install the plug-in?zPlug-in install failed.�hpzfw-downloadFz%
Downloading firmware to device %s...zError opening device.z3<b>Firmware download to device failed.</b><p>%s</p>zFirmware download successful.
z&<b>Plug-in installation successful</b>T)&rF�	isChecked�logrrz�beginWaitCursorr�
startswith�infor�check_network_connection�error�
endWaitCursor�	FailureUIr2r�download�plugin_download_callback�ERROR_UNABLE_TO_RECV_KEYS�ERROR_DIGITAL_SIGN_NOT_FOUND�QMessageBox�question�Yes�No�deleteInstallationFiles�
ERROR_SUCCESS�
run_plugin�GUI_MODEr�getSupportedCUPSDevices�queryModelByURI�get�bold�Device�Error�downloadFirmware�	SuccessUIr)	rrp�status�download_plugin_file�	error_str�cups_devices�dev�mq�drrr r,�s�

�


:���
+�

$�
�


	��
�
�
�
���zPluginDialog.NextButton_clickedcCsdSr!r)r�c�srirrr r�6sz%PluginDialog.plugin_download_callbackcCst|�dSr!)�print)rr�rrr �plugin_install_callback:r{z$PluginDialog.plugin_install_callbackcCs&|j�|�d|dtdf��dS)Nz
Step %s of %sr)�StepTextrIr2�PAGE_MAX)r�prrr rv>s&zPluginDialog.updateStepTextcCs$z|j|jWStyYdSwr!)rAr�KeyErrorr#rrr rDBs
�zPluginDialog.plugin_reason_textNcCst�d||�S)Nr
)�qApp�	translate)rr�r�rrr �__trIszPluginDialog.__trr!)�__name__�
__module__�__qualname__�PLUGIN_NONEr0r
r$rrrNrPrQrTrhrVr[r*r,r�r�rvrDr2rrrr r
/s& Xr
)�base.g�baserr�prntr�
base.codes�ui_utils�	installerr�base.sixextr�PyQt5.QtCore�PyQt5.QtGui�PyQt5.QtWidgets�plugindialog_baser	rWr\r�rr
rrrr �<module>s

Youez - 2016 - github.com/yon3zu
LinuXploit