| 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/system-config-printer/troubleshoot/__pycache__/ |
Upload File : |
o
3�b�P � @ s� d dl Z d dlZd dlZd dlmZ d dlZd dlmZ d dlmZ d dlmZ d dl Z d dl
Z
d dlmZm
Z
ddlT d dlZd dlT d Zd
ZG dd� de�ZdS )
� N)�GLib)�Gdk)�Gtk)�Pango)�TimedOperation�OperationCanceled� )�*z/com/redhat/PrinterSpoolerzcom.redhat.PrinterSpoolerc @ s� e Zd Zejed�ejed�ejed�ejed�ej ed�ej
ed�ejed�iZdd � Z
d
d� Zdd
� Zdd� Zdd� Zdd� Zdd� Zdd� Zdd� Zdd� Zdd� Zdd� Zd S )!�
PrintTestPage�Pending�Held�
Processing�Stopped�Canceled�Aborted� Completedc C s2 t �| |d� t�� }|�d� |�d� t�� }|�dd� |�d� |� d� |�
|ddd� || _dtd� d td � | _
t�� }|�d� |�d
� |�tjj� tj�td��| _|�
| jddd� tj�td��| _|�
| jddd� |�
|ddd� t�� }t�� }tjtd
�|dd�}tjtd�t�� dd�}t�� } tjtd�| dd�}
t�� }tjtd�|d
d�}tjtd�t�� dd�}
|�d� || _|
�d� | �dtjj � | �dd� |�d� |�dtjj � |�dd� |
�d� |�!|� |�!|� |�!|
� |�!|� |�!|
� |�"d� t�#� }|�$tj%j&tj%j&� |�'tj(j)� |�*|� || _+|�
|ddd� tjtd�d�}|� d� |�dd� |�
|ddd� t�� }|�d� tj,td�d�| _-tj,�.| j-td��}|�
| j-ddd� |�
|ddd� |�
|ddd� i | _/|�0|| � d S )NzPrint test page� r TFz"<span weight="bold" size="larger">z Test Pagez </span>
z�Now print a test page. If you are having problems printing a specific document, print that document now and mark the print job below.� zPrint Test PagezCancel All Jobs�Test)�active�Jobr )�text�Printer� �Document�Status� � ellipsizezwidth-chars� z*Did the marked print jobs print correctly?)�label� �Yes�No)1�Question�__init__r �VBox�set_spacing�set_border_width�Label�
set_alignment�set_use_markup�
set_line_wrap�
pack_start�
main_label�_�main_label_text�
HButtonBox�
set_layout�ButtonBoxStyle�START�Button�new_with_label�print_button�
cancel_button�TreeView�CellRendererToggle�TreeViewColumn�CellRendererText� set_radio� test_cell�
set_resizable�set_propertyr �
EllipsizeMode�END�
append_column�set_rules_hint�ScrolledWindow�
set_policy�
PolicyType� AUTOMATIC�set_shadow_type�
ShadowType�IN�add�treeview�RadioButton�yes�new_with_label_from_widget�persistent_answers�new_page)�self�troubleshooter�pager �hbox�tvr= �test�job�printer_cell�printer� name_cell�name�status�sw�vbox�no� ra �>/usr/share/system-config-printer/troubleshoot/PrintTestPage.pyr$ 3 s�
���
�
zPrintTestPage.__init__c s� �j j}d|vr
dS �j �� }|d �_d }|�di �}|�� D ]}|�� D ]\}}|dkr2|} nq&q |d urAdtd�| }nd}�j| } �j �
| � t�t
tttt�}
�j�|
� i �_�j�d g �}�fd
d�}t||d��_z �j�� \� }
W n
ttjfy� Y dS w zd
�j jd �� �fdd�� �� D �}W n g }Y tt|��t|���}d }
|D ]C}z� | }W n ty� z|
| }W n
ty� Y Y q�w Y nw |
�d �}|�j|<