%PDF- %PDF-
Mini Shell

Mini Shell

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

�

Hf@����ddlZddlZddl�ddlmZGd�dej�Zedk(r�ddlmZej�Z	e
d�eje�e�Z
gZd	�Zd
�Zd�Zej%e
j'de��ej%e
j'd
e��ej(e
j*d�e	j-�[
yy)�N)�*)�GObjectc���eZdZejj
dejejffejj
deejffd�Zd�Z	d�Z
d�Zdd�Zd�Z
d�Zd	�Zd
�Zy)�OpenPrintingRequestN)�finished�errorc���tjj|�td�tjj
di|��|_d|_td|z�y)N�Startingz+%s�)r�__init__�
debugprint�cupshelpers�openprinting�OpenPrinting�_handle)�self�argss  �7/usr/share/system-config-printer/OpenPrintingRequest.pyrzOpenPrintingRequest.__init__5sK����� � �$�'��J��'�4�4�A�A�J�T�J�������E�D�L�!�c� �td|z�y)Nz-%s)r
�rs r�__del__zOpenPrintingRequest.__del__<s���E�D�L�!rc���td|z�|j�,|jj|j�d|_td|z�|j	ddd�y)Nz%s: cancel()�
%s -> 'error'rr�canceled)r
rr�cancelOperation�emitrs r�cancelzOpenPrintingRequest.cancel?sU���N�T�)�*��<�<�#����-�-�t�|�|�<��D�L��O�d�*�+��	�	�7�A�z�*rc�x�td|z�|jj||j|�|_y)Nz%s: searchPrinters())r
r�searchPrinters�
_printers_gotr)r�
searchterm�	user_datas   rr z"OpenPrintingRequest.searchPrintersHs7���*�T�1�2��(�(�7�7��9=�9K�9K�9B�D��rc��d|_|dk7r"td|z�|jd||�y|D�cgc]	}|||f��c}|_g|_t�|_|j�s|j�yycc}w)Nrrr)	rr
r�downloadable_printers_unchecked�downloadable_printers�dict�downloadable_drivers�_query_next_printer�_drivers_got)r�statusr#�printers�xs     rr!z!OpenPrintingRequest._printers_gotNs�������Q�;���$�.�/��I�I�w���1��:B�0C�45�23�H�Q�K�0@�0C��,�%'��"�$(�F��!��'�'�*���� �+��
0Cs�Bc���	|jj�}|\}}tj
rd|j_nd|j_t�}tjrd|d<nd|d<tj|d<t|�d	|���|jj||j||�
�|_
y#t$rtd|z�YywxYw)z�
        If there are more printers to query, kick off a query and
        return True.

        Otherwise return False.
        z'%s: All printer driver queries finishedF�r�1�onlyppdfiles�onlydownload�
packagesystemz: Querying drivers for )r#�
extra_optionsT)r%�pop�
IndexErrorr
�config�DOWNLOADABLE_ONLYFREEr�onlyfreer'�DOWNLOADABLE_ONLYPPDr3�listDrivers�_printer_drivers_gotr)rr#�
printer_id�printer_name�optionss     rr)z'OpenPrintingRequest._query_next_printer^s���	��<�<�@�@�C�I�)2�&�Z��
�'�'�)*�D���&�)*�D���&��&���&�&�&)�G�N�#�&)�G�N�#�'-�';�';�G�O�$��T�:�F�G��(�(�4�4�j�6:�6O�6O�@I�DK�5�M���
��-�	��A�D�H�I��	�s�C�C%�$C%c�2�d|_|dk7r"td|z�|jd||�y|r�td|z�i}|j�D]X}||}d|vrt	|d�dkDs%t
jsd|vrt	|d�dkDr	||||<�Ktd|z��Zt	|�dkDr=td|z�|\}}||j|<|jj|�|j�s|j�yy)	Nrrrz%s: - drivers found�ppds�packagesz!Not using invalid driver entry %sz.%s: - drivers with installable resources found)rr
r�keys�lenr7r:r(r&�appendr)r*)	rr+r#�drivers�drivers_installable�	driverkey�driverr=r>s	         rr<z(OpenPrintingRequest._printer_drivers_got�s5������Q�;���$�.�/��I�I�w���0����-��4�5�"%��$�\�\�_�
+�	� ��+���v�%�����(�1�,��4�4��6�)���
�+�,�q�0�6=�Y�5G�'�	�2�� C� )�!*�+�
+��&�'�!�+��L� �!�"�-6�*��\�8K��)�)�*�5��*�*�1�1�9�=��'�'�*���� �+rc�|�d|_td|z�|jd|j|j�y)Nz%s -> 'finished'r)rr
rr&r(rs rr*z OpenPrintingRequest._drivers_got�s7������&��-�.��	�	�:��-�-��,�,�	.r�N)�__name__�
__module__�__qualname__r�SignalFlags�RUN_LAST�
TYPE_PYOBJECT�int�__gsignals__rrrr r!r)r<r*rrrrr s��� �,�,�5�5�t�%�2�2�%�2�2�
��!�,�,�5�5�t�!�$�2�2�	���L�("�"�+�D�!� !�F !�D.rr�__main__)�pprintTc��tD]}|j|��tjdtj
�y)Nr/)�handlers�
disconnectr�timeout_add_seconds�mainloop�quit)�obj�handlers  r�doner^�s3���	%�G��N�N�G�$�	%�	�#�#�Q��
�
�6rc�^�td|z�tt|��t|�y)Nz	Error: %d)�print�reprr^)r\r+�errs   rrr�s"��
�{�V�#�$�
�t�S�z���c�
rc�F�t|�t|�t|�yrK)rUr^)r\r,rFs   rrr�s���������c�
rrrz
ricoh 8000)r7r�debug�
gi.repositoryrrrLrU�MainLooprZ�
set_debugging�set_debugprint_fnr
�reqrWr^rrrE�connect�idle_addr �runrrr�<module>rms���2���!�H.�'�/�/�H.�T�z����w���"�H��4��!�K�!�!�:�.�
�
 �C��H�7��
�

�O�O�S�[�[�'�5�1�2��O�O�S�[�[�*�h�7�8��G���c�(�(�,�7��L�L�O��9r

Zerion Mini Shell 1.0