| 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/__pycache__/ |
Upload File : |
o
3�b�+ � @ s� d dl Z d dlmZ d dlmZ d dlZd dlZe�d� d dlZd dlm Z d dl
Z
d dlZeje
j
e
jd� G dd� dej�Zed kr_G d
d� d�Zd dlmZ ed
� e� e�� dS dS )� N)�GObject)�Gtkz1.9.52��
debugprint)�domain� localedirc @ s� e Zd ZdZdejjddfiZ d+dd�Zdd� Z d d
� Z
dd� Zd
d� Zdd� Z
dd� Zdd� Zdd� Zdd� Zdd� Zdd� Zdd� Zdd � Zd!d"� Zd#d$� Zd%d&� Zd'd(� Zd)d*� ZdS ),�
PPDsLoadera
1. If PackageKit support is available, and this is a local server,
try to use PackageKit to install relevant drivers. We do this
because we can only make the right choice about the "best" driver
when the full complement of drivers is there to choose from.
2. Fetch the list of available drivers from CUPS.
3. If Jockey is available, and there is no appropriate driver
available, try to use Jockey to install one.
4. If Jockey was able to install one, fetch the list of available
drivers again.
�finishedN� c C s t j �| � td| � || _|| _|| _|| _|| _|| _|| _ g | _
d | _d | _d | _
d | _d| _d| _| jd u pF| jdkpF| jd dk| _zt�� | _W n td� d | _Y td�}tj|ddtjjtjj|d �| _| j�td
�� | j�d| j� d S )Nz+%sF� localhostr �/zFailed to get session bus� SearchingT)�parent�modal�destroy_with_parent�message_type�buttons�textzSearching for drivers�response) r �__init__r �
_device_id�_device_uri�_device_make_and_model�_parent�_host�_encryption� _language�_installed_files�_conn�_ppds�_exc�_ppdsmatch_result�_jockey_queried�_jockey_has_answered�_local_cups�dbus�
SessionBus�_bus�_r �
MessageDialog�MessageType�INFO�ButtonsType�CANCEL�_dialog�format_secondary_text�connect�_dialog_response) �self� device_idr �
device_uri�host�
encryption�language�device_make_and_model�fmtr
r
�./usr/share/system-config-printer/ppdsloader.pyr 8 sF
���zPPDsLoader.__init__c C sv | j �� | jrt�| j�| _| jr5| jr5| jd r5| jd r5| jr5d| jd | jd f | _| � � d S | �
� d S )N�MFG�MDLzMFG:%s;MDL:%s;)r. �show_allr �cupshelpers�
parseDeviceID�_devid_dictr$ r'