%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__/ChooseNetworkPrinter.cpython-312.pyc

�

Hf8��P�ddlmZddlZddlmZddlmZddl�Gd�de�Zy)	�)�GtkN)�GObject)�TimedOperation�)�*c�6�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	y)	�ChooseNetworkPrinterc�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 network printerzChoose Network Printerz�Please select the network 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        �E/usr/share/system-config-printer/troubleshoot/ChooseNetworkPrinter.pyrzChooseNetworkPrinter.__init__s������4��1I�J��!�!�1�%=�#>�#$�&<�$=�>��
�\�\�_���!�!�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�!�,���
������-�c�6�|jj}|dry|jdd�sy|d}tjt
t
t
tj�}||_|jj|�|jd�}|j|dtd�ddd	dd
d�	|jj�}	tt j"d|i|��|_|j$j'�}t|j(|�
�|_|j$j'�}d}g}	|j+�D]�\\}
}}|
��|�|
�d|��}
n|
}
|�4t|j,�|_|j$j'�}|
|vrtd�}td�}n;||
}|jdtd��}|jdtd��}|	j|
|||f���|	j/d���|	D]1\}
}}}|jd�}|j|d|
d|d	|d
|�	�3	y#t j0$rYyt j2$rYyt4$rYywxYw)N�cups_queue_listedF�remote_server_cups�remote_server_try_connectrz
Not listedr�r��host)�kwargs�parent)r8�/�Unknownzprinter-infozprinter-locationc��|dS)Nr�)�xs r.�<lambda>z.ChooseNetworkPrinter.display.<locals>.<lambda>os
��1�Q�4�r/)�keyT)r'�answers�getr�	ListStore�strr�
TYPE_PYOBJECT�modelr$�	set_model�append�setr�
get_windowr�cups�
Connection�op�run�getDests�items�getPrinters�sort�	HTTPError�IPPError�RuntimeError)r&r@�serverrE�iterr8�c�dests�printers�
dests_listr*�instance�dest�queuer,r+�printers                 r.�displayzChooseNetworkPrinter.display:sx���%�%�-�-���&�'���{�{�0�%�8���4�5���
�
�s�"�"�&�4�4�6����
��
�
����'��|�|�T�"��
�	�	�4��A�l�O�Q��A�r�1�a�@��$�$�/�/�2��*	�$�d�o�o�.4�f�-=�-3�5�D�G�������A�$�a�j�j��@�D�G��G�G�K�K�N�E��H��J�*/�+�+�.�
B�&� ��x�$��<���'�'+�X�6�E� �E��#�,�a�m�m�<�D�G�#�w�w�{�{�~�H��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�FI$�$J�9J�
J�Jc�F�|jjd|�|_y)Nzcursor-changed)r$�connect�	signal_id)r&�handlers  r.�connect_signalsz$ChooseNetworkPrinter.connect_signals}s�����.�.�0@�'�J��r/c�N�|jj|j�y�N)r$�
disconnectrb�r&s r.�disconnect_signalsz'ChooseNetworkPrinter.disconnect_signals�s���
�
� � �$�.�.�1r/c�`�|jj�j�\}}|�yy)NFT)r$�
get_selection�get_selected)r&rErVs   r.�can_click_forwardz&ChooseNetworkPrinter.can_click_forward�s,���m�m�1�1�4�A�A�D���t��<��r/c�R�|jjjdd�siS|jj	�j�\}}|siS|j
|d�}|dk(rGd�d�}d||�jd�Sd||j|jd	�S)
Nr2Fr5rc��eZdZd�Zd�Zy)�7ChooseNetworkPrinter.collect_answer.<locals>.enum_destsc�J�g|_|j|jd�yrf)rX�foreach�each)r&rEs  r.rz@ChooseNetworkPrinter.collect_answer.<locals>.enum_dests.__init__�s��!#�D�J��M�M�4�9�9�d�3r/c��|j|d�}|r2|jj|j|jf�yy)Nr5)�	get_valuerXrGr*r[)r&rE�pathrV�	user_datar\s      r.rsz<ChooseNetworkPrinter.collect_answer.<locals>.enum_dests.each�s9�� �?�?�D�!�4�D���
�
�)�)�D�I�I�t�}�}�+E�F�r/N)�__name__�
__module__�__qualname__rrsr<r/r.�
enum_destsrp�s
��4�Gr/r{)�remote_cups_queue_listed�remote_cups_dests_availableT)r|�remote_cups_dest�remote_cups_queue�remote_cups_instance)
r'r@rAr$rkrlrurXr*r[)r&rErVr\r{s     r.�collect_answerz#ChooseNetworkPrinter.collect_answer�s����"�"�*�*�.�.�0D�e�L��I��m�m�1�1�4�A�A�D���t���I�����a�(���1�9�
G�
G�27�4>��4F�4L�4L�O�
O�26�)-�*.�)�)�-1�]�]�=�
=r/c�8�|jj�yrf)rL�cancelrhs r.�cancel_operationz%ChooseNetworkPrinter.cancel_operation�s�������r/N)
rxryrzrr_rdrirmr�r�r<r/r.r	r	s(��.�:A�FK�2��=�8r/r	)	�
gi.repositoryrrJr�timedopsr�baserr	r<r/r.�<module>r�s$��,��!�#��J�8�Jr/

Zerion Mini Shell 1.0