| 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 : |
o
�K0j�� � @ s� d dl Z d dlZd dlmZ d dlmZ d dlZd dlT d dlm Z m
Z
mZ d dlm
Z
d dlT ddlT d dlT d dlT d dlT ddlmZ dd lmZmZ dd
lmZmZ ddlmZ ddlmZ d ZdZ d
Z!dZ"dZ#dZ$d Z%dZ&d
Z'dZ(e)j*Z+e+r�zd dl,m,Z, W n e-y� dZ+Y nw e+s�e.�/d� dZ0e+r�zd dl1Z1e2e1j3�Z4e4dkr�dZ0ne.�/d� W n e-y� e.�/d� Y nw e0s�e.�/d� e+r�ddl5m6Z6 e0r�d dl,m7Z7 G dd� de8e�Z9dS )� N)�queue)�
to_unicode)�*)�device�utils�pml)�cups� )� Ui_Dialog)� FileTable�FILETABLE_TYPE_FAX)�PrinterNameComboBox�!PRINTERNAMECOMBOBOX_TYPE_FAX_ONLY)�PrintSettingsDialog)�FaxSetupDialog� � � zapplication/hplip-fax-coverpage)�faxFz
Fax disabled.z2.0Tz@Pre-2.0 version of Reportlab installed. Fax coverpages disabled.z1Reportlab not installed. Fax coverpages disabled.z?Please install version 2.0+ of Reportlab for coverpage support.)� FABWindow)�
coverpagesc @ s0 e Zd Zd�dd�Zdd� Zdd� Zdd � Zd
d� Zdd
� Zdd� Z dd� Z
dd� Zdd� Zdd� Z
dd� Zdd� Zdd� Zdd� Zd d!� Zd"d#� Zd$d%� Zd&d'� Zd(d)� Zd*d+� Zd,d-� Zd.d/� Zd0d1� Zd2d3� Zd4d5� Zd6d7� Zd8d9� Zd�d;d<�Zd=d>� Z d?d@� Z!dAdB� Z"dCdD� Z#d�dFdG�Z$dHdI� Z%dJdK� Z&d�dLdM�Z'dNdO� Z(dPdQ� Z)dRdS� Z*dTdU� Z+dVdW� Z,dXdY� Z-dZd[� Z.d�d]d^�Z/d_d`� Z0dadb� Z1dcdd� Z2dedf� Z3dgdh� Z4didj� Z5dkdl� Z6dmdn� Z7dodp� Z8dqdr� Z9dsdt� Z:dudv� Z;dwdx� Z<dydz� Z=d{d|� Z>d}d~� Z?dd�� Z@d�d�� ZAd�d�� ZBd�d�� ZCd�d�� ZDd�d�d��ZEdS )��
SendFaxDialogNc C s� t �| |� | �| � || _|d ur|| _nt�| j�| _|| _d | _t� � \| _
| _}d | _d | _
g | _g | _| �� | jrWtrJt�d| j� d S | �� t�d| j� d S t�d| j� d S �Nr )�QDialog�__init__�setupUi�printer_name�
device_urir �getDeviceURIByPrinterName�args�dev� init_dbus�
dbus_avail�service�
CheckTimer� lock_file� file_list�recipient_list�initUi�coverpages_enabled�QTimer�
singleShot�displayCoverpagePage�lockAndLoad�displayFilesPage�displaySelectFaxPage)�self�parentr r r �session_bus� r3 �%/usr/share/hplip/ui5/sendfaxdialog.pyr d s(
zSendFaxDialog.__init__c C s� | j j�| j� | jj�| j� | jj�| j� t�tj tj
� | �� | �� | �
� | �� | �� | �ttdd��� d S )N�hp_logo�128x128)�CancelButton�clicked�connect�CancelButton_clicked�
BackButton�BackButton_clicked�
NextButton�NextButton_clicked�signal�SIGINT�SIG_DFL�initSelectFaxPage�initCoverpagePage�
initFilesPage�initRecipientsPage�initSendFaxPage�
setWindowIcon�QIcon�load_pixmap�r0 r3 r3 r4 r( � s zSendFaxDialog.initUic C s| | j d u rt| �| _ | j j�| j� | j �d� | jr8| jd u r:t� d| j d�\}| _|s<t
�d| j � d S d S d S d S )Ni� z
hp-sendfax-%sTz(hp-sendfax is already running for fax %s)r$ r* �timeoutr9 �CheckTimer_timeout�startr r% r �lock_app�log�error)r0 �okr3 r3 r4 r- � s
�zSendFaxDialog.lockAndLoadc C sl | j �t� | j j�| j� | j j�| j� | jj �| j
� | jj �| j� | j
d ur4| j �| j
� d S d S �N)�FaxComboBox�setTyper �"PrinterNameComboBox_currentChangedr9 �FaxComboBox_currentChanged�PrinterNameComboBox_noPrinters�FaxComboBox_noPrinters�FaxOptionsButtonr8 �FaxOptionsButton_clicked�FaxSetupButton�FaxSetupButton_clickedr �setInitialPrinterrJ r3 r3 r4 rB � s
�zSendFaxDialog.initSelectFaxPagec C sp | j �d� | �t� tst| | �d�� | �� d S | js,t| | �d�� | �� d S | j �
� | �t� d S )NFz�<b>PC send fax support is not enabled.</b><p>Re-install HPLIP with fax support or use the device front panel to send a fax.</p><p>Click <i>OK</i> to exit.</p>z�<b>PC send fax support requires DBus and hp-systray.</b><p>Please check the HPLIP installation for proper installation of DBus and hp-systray support.</p><p>Click <i>OK</i> to exit.</p>)r; �
setEnabled�updateStepText�PAGE_SELECT_FAX�fax_enabled� FailureUI�_SendFaxDialog__tr�closer"