%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/share/hplip/ui5/__pycache__/
Upload File :
Create Path :
Current File : //usr/share/hplip/ui5/__pycache__/systemtray.cpython-312.pyc

�

=	fc����ddlZddlZddlZddlZddlZddlZddlZddl�ddlm	Z	m
Z
mZddl�ddl
�	ddl�ddl�ddlmZ	ddlZddlmZmZddlZej4d	e�d
Z	ddlZdZd
Z dZ!dZ"dZ#dZ$e%e&jNe(e&jNe)e&jTe+e&jXe-e&jTe.e&jTe/e&jTe0e&jNe1e&jNe2e&jNe3e&jNe4e&jNiZ5er�e6d�Z7e6d�Z8e6d�Z9e%e7ejtfe(e7ejtfe)e8ejvfe+e9ejxfe-e8ejvfe.e8ejvfe/e8ejvfe0e7ejtfe1e7ejtfe2e7ejtfe3e7ejtfe4e7ejtfiZ=iZ>Gd�de?�Z@Gd�deA�ZBGd�deC�ZDGd�deE�ZFd�ZGy#e$r'ej%d�ej&d�Y���wxYw#e$r'ej%d�ej&d�Y��wxYw#e$r	ddlZn
#e$rdZYnwxYwY��
wxYw)�N)�*)�device�utils�models�z<Python bindings for Qt4 not found. Try using --qt3. Exiting!)�SystrayFrame)�
SessionBus�lowlevelz,Python bindings for dbus not found. Exiting!�ignoreTFi'i�i�i��
i\&�info�warning�errorc��eZdZd�Zd�Zy)�
DeviceMenuc�\�tj|||�||_||_||_y�N)�QMenu�__init__�
device_uri�device_hist�index)�self�title�parentrrrs      �"/usr/share/hplip/ui5/systemtray.pyrzDeviceMenu.__init__us(��
���t�U�F�+�$���&�����
�c	���|j�|j�rd}|jD�]}tj|jt
�}t
j|jd�}ttt|�|j�|�dt|j���|�}|rd|j�}|jd�|j!|�|j#tt|�|j��d}|j%|���y|j%tt'dd��t(j+ddd��y)	NTr� Fr�16x16�
SystemTrayz(No events))�clearr�STATUS_TO_ERROR_STATE_MAP�get�
event_code�ERROR_STATE_CLEARr�queryString�QAction�QIcon�getStatusListIconr�getTimeDeltaDesc�timedate�font�setBold�setFont�setIcon�	addAction�load_pixmap�QApplication�	translate)r�first�e�error_state�ess�a�fs       r�updatezDeviceMenu.update|s���
�
������E��%�%�
"��7�;�;�A�L�L�J[�\���(�(����q�9���E�"3�K�"@����"L�M�-0�1A�!�*�*�1M�$N�PT�V�������A��I�I�d�O��I�I�a�L��L�L��'8��'E�d�j�j�'Q�!R�S�!�E����q�!�
"�"
�N�N�5��Y��!@�A��&�&�|�]�D�I�
KrN)�__name__�
__module__�__qualname__rr;�rrrrts
���Krrc�"�eZdZdd�Zd�Zdd�Zy)�
HistoryDevicec	��||_||_tj|�\	}}}}}}}	}
}|dk(r||_n!|dk(r|	|_n|dk(r||_nd|_tj|�|_|dk(r<t|_	|j|j�d|j�d��|_n�|dk(r<t|_	|j|j�d	|j�d��|_n||d
k(r<t|_	|j|j�d|j�d��|_n;t|_	|j|j�d|j�d��|_tj|j�|_d
|_|j j%dt&�t(t*fvrd|_d|_y)N�usb�net�par�unknown�hp�
 Printer (�)�hpaio�
 Scanner (�hpfax� Fax (� (rz	tech-typer)�needs_updaterr�parseDeviceURI�idr�normalizeModelUIName�model�DEVICE_TYPE_PRINTER�device_type�_HistoryDevice__tr�	menu_text�DEVICE_TYPE_SCANNER�DEVICE_TYPE_FAX�DEVICE_TYPE_UNKNOWN�queryModelByURI�mqrr$�TECH_TYPE_NONE�TECH_TYPE_MONO_LASER�TECH_TYPE_COLOR_LASER�history)rrrO�back_end�is_hp�busrS�serial�dev_file�host�zc�ports            rrzHistoryDevice.__init__�su��(���$����%�%�j�1�	F��%��e�V�X�t�R���%�<��D�G�
�E�\��D�G�
�E�\��D�G��D�G��0�0��7��
��t��2�D��!�Y�Y�$�*�*�T�W�W�'M�N�D�N�
��
 �2�D��!�Y�Y�$�*�*�T�W�W�'M�N�D�N�
��
 �.�D��!�Y�Y�d�j�j����'I�J�D�N� 3�D��!�Y�Y�$�*�*�T�W�W�'E�F�D�N��(�(����9�����
��7�7�;�;�{�N�3�8L�Nc�7d�d��D�J���rc��|�u|jrh|j|j�\}}t|�dtd�D�cgc]}tjt|����c}|_d|_yyycc}w)N���F)	rO�
GetHistoryr�list�MAX_MENU_EVENTSr�Event�tupler`)r�servicer�hr6s     r�
getHistoryzHistoryDevice.getHistory�so����4�#4�#4�#�.�.�t���?�M�J��=A�!�W�EY��FV�WY�EY�=Z�[��F�L�L�%��(�3�[�D�L� %�D��$5����"A9Nc�0�tjd||�S�Nr!�r3r4�r�s�cs   r�__trzHistoryDevice.__tr�����%�%�l�A�q�9�9r)Tr)r<r=r>rrrrVr?rrrArA�s��&�R&�:rrAc�2�eZdZ					dd�Zd�Zd�Zdd�Zy)�SystraySettingsDialogNc��tj||�||_||_|�||_ni|_||_||_||_|	|_||_	|
|_
|j�|jj�yr)�QDialogr�systray_visible�systray_messages�device_list�polling�polling_interval�upgrade_notify�upgrade_last_update_time�upgrade_pending_time�upgrade_msg�initUi�SystemTraySettings�updateUi)rrrr�r�r�r�r�r�r�r�s           rrzSystraySettingsDialog.__init__�s���	����v�&�.��� 0����"�*�D��!�D����� 0���+���&>��%�"6��!�$������
����(�(�*rc
�~�|jd�|jttdddd�j	��j|j
���t|�|_|jjd�t|�|_
|jj|j|j|j|j|j |j"|j$|j&�t)t(j*t(j*�}|j-d�|j/d�|j1|jj3�j5��|jj7|�|jj9t:j<�|jjd�|jj?|jdddd�tAd	d
t(j*t(jB�}|jjE|dddd�tG|�|_$|jHjKtFjLtFjNztFjPz�|jHjSd�|jHjd�|jj?|jHdddd�|jHjTjW|jX�|jHjZjW|j\�|j_|jad
��|jctetgdd���y)Nr|ri�i5�
gridlayoutr�r�i-�F�
StdButtonsz(HP Device Manager - System Tray Settings�hp_logo�128x128)4�
setObjectName�resize�QSize�QRect�size�
expandedTo�minimumSizeHint�QGridLayoutr�rr�r�rr�r�r�r�r�r�r��QSizePolicy�	Expanding�setHorizontalStretch�setVerticalStretch�setHeightForWidth�
sizePolicy�hasHeightForWidth�
setSizePolicy�setFrameShadow�QFrame�Raised�	addWidget�QSpacerItem�Minimum�addItem�QDialogButtonBoxr��setStandardButtons�Cancel�NoButton�Ok�setCenterButtons�accepted�connect�
acceptClicked�rejected�reject�setWindowTitle�_SystraySettingsDialog__tr�
setWindowIconr)r2)rr��
spacerItems   rr�zSystraySettingsDialog.initUi�s������2�3����E�%��!�C��,�1�1�3�4�?�?��@T�@T�@V�W�X�%�d�+������%�%�l�3�".�t�"4������&�&�t�';�';�'+�|�|�T�5J�5J�'+�'7�'7�'+�'<�'<�'+�':�':�'+�'@�'@�'+�'7�'7�
	9�!��!6�!6�{�7L�7L�M�
��'�'��*��%�%�a�(��$�$�T�%<�%<�%G�%G�%I�%[�%[�%]�^����-�-�j�9����.�.�v�}�}�=����-�-�.B�C����!�!�$�"9�"9�!�A�a��B� ��R��(=�(=�k�>Q�>Q�R�
������
�1�Q�q��3�*�4�0������*�*�+;�+B�+B�CS�C\�C\�+\�]m�]p�]p�+p�q����(�(��/����%�%�l�3����!�!�$�/�/�!�A�a��:�
	
��� � �(�(��);�);�<���� � �(�(����5�	
���D�I�I�&P�Q�R����5��Y�	�!B�C�Drc�h�|jj|_|jj|_|jj|_|jj|_|jj
|_|jj|_|j�yr)r�rr�r�r�r�r��accept�rs rr�z#SystraySettingsDialog.acceptClickeds���#�6�6�F�F����.�.�6�6��� $� 7� 7� H� H����2�2�>�>��� $� 7� 7� H� H���!�4�4�C�C������
rc�0�tjd||�S)Nr|rurvs   rryzSystraySettingsDialog.__tr)s���%�%�&=�q�!�D�Dr)NTrr�r)r<r=r>rr�r�r�r?rrr|r|�s+��"� $�&'�*+��
+�@+E�`�Err|c��eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zej$ddddfd�Zd�Zd�Zdd�Zy)�
SystemTrayAppc��tj||�d|_||_d|_tj|j�|_d|_d|_	t�|_|jj�|jj�t�|_t!dd�}t#|�|_t!dd�}t'|�}|j)dd|�|j+�t#|�|_|jj/|j$�t1�|_d|_t7j8d	d
g��D]}|j;|��|jj=|j?d��|jj@jC|j@�tE|jtDjF�}|jHtJjC|jL�|jjHd
jC|jN�tQjPtPjRtPjT�|jjW�|jjXtZk(r|jj]d�n$t^jatb|jd�|jj/|j,�d|_	d|vr|jg�t^jath|jj�t_�|_6|jljnjC|jf�|jljqtr�y)N�80s80sI32sI80sfFr��32x32�activer � rrGrL��back_end_filter�HPLIP Status Servicez!QSystemTrayIcon::ActivationReasonTz--ignore-update-firsttime):r3r�menu�	read_pipe�fmt�struct�calcsize�fmt_size�timer_active�active_icon�UserSettings�
user_settings�load�debug�QSystemTrayIcon�	tray_iconr2r)�	prop_icon�QPainter�
drawPixmap�end�prop_active_iconr0r	�session_busrpr�getSupportedCUPSDevices�	addDevice�
setToolTip�_SystemTrayApp__tr�messageClickedr��QSocketNotifier�Read�	activated�int�notifierActivated�
trayActivated�signal�SIGINT�SIG_DFL�showr�SYSTRAY_VISIBLE_SHOW_ALWAYS�
setVisible�QTimer�
singleShot�HIDE_INACTIVE_DELAY�timeoutHideWhenInactive�handle_hplip_updation�SET_MENU_DELAY�initDone�update_timer�timeout�start�UPGRADE_CHECK_DELAY)r�argsr��pmr9�painter�d�notifiers        rrzSystemTrayApp.__init__/s������d�D�)���	�"���$���������1��
�!��� ���)�^��������!���� � �"�(�*���
��G�
,���r������'�*���2�,�����2�q�!�$����
� %�b�	��������t�~�~�.�%�<�������/�/��w��P�	�A��N�N�1��	�	
���!�!�$�)�)�,B�"C�D����%�%�-�-�d�.A�.A�B�"�4�>�>�?�3G�3G�H�����3��'�'��(>�(>�?���� � �!D�E�M�M�d�N`�N`�a��
�
�f�m�m�V�^�^�4����������-�-�1L�L��N�N�%�%�d�+����1�4�3O�3O�P������t�4�4�5����&�d�2��&�&�(����.�$�-�-�8�"�H������!�!�)�)�$�*D�*D�E������ 3�4rc�|�|jj|j�d|_|j	�y�NF)r�r0r�r��setMenur�s rr�zSystemTrayApp.initDonews)�������t�~�~�.� ������rc�,�tj�yr)�devicesr"r�s r�resetDevicezSystemTrayApp.resetDevice}s���
�
�rc�v�	t|dt|_y#t$rt|�t|<YywxYw)NT)rrO�KeyErrorrA)rrs  rr�zSystemTrayApp.addDevice�s>��	4��J��04�G�J��,���	<�"/�
�";�G�J��	<�s�	�8�8c��tjd�tjdd�}d|z}t	j
|�y)Nzhandle_hplip_clean �dirs�homezsh %s/hplip_clean.sh)�logr��sys_confr$�os�system)r�home_dir�cmds   r�handle_hplip_cleanz SystemTrayApp.handle_hplip_clean�s4���	�	�'�(��<�<���/��$�X�-��
�	�	�#�rc��tjd|jjz�t	j
d�}|jjdur�tjd�|r�tjj|d�}tjd|z�t
jtj|dd�tjd�	t
jdtj�yytj�}t!|�|jj"kDr�t	j
d�}|rttjj|d�}tjd|z�t
jtj|dd	�tjd�nDtj%d
�n.tjd|jj"|fz�	t
jdtj�y#t$rYywxYw#t$rYywxYw)Nz(handle_hplip_updation upgrade_notify =%dz
hp-upgradeFz,upgrade notification is disabled in systray zRunning hp-upgrade: %s z--check�rz--notifyz+Unable to find hp-upgrade --notify on PATH.zOupgrade schedule time is not yet completed. schedule time =%d current time =%d )rr�r�r�r�whichr	�path�join�spawnlp�P_NOWAIT�time�sleep�waitpid�WNOHANG�OSErrorr��upgrade_pending_update_timer)rr�current_times   rr�z#SystemTrayApp.handle_hplip_updation�s����	�	�<�d�>P�>P�>_�>_�`�a��{�{�<�(�����,�,��5��I�I�D�E���w�w�|�|�D�,�7���	�	�3�t�<�=��
�
�2�;�;��l�I�F��
�
�1�
���J�J�q�"�*�*�-�
��y�y�{���|��t�1�1�M�M�M��;�;�|�,�D���w�w�|�|�D�,�7���	�	�3�t�<�=��
�
�2�;�;��l�J�G��
�
�1�
��	�	�G�H��I�I�g�jn�j|�j|�kY�kY�[g�jh�h�
i�	��J�J�q�"�*�*�%��+������,�	��	�s$�%$H6�$I�6	I�I�	I�Ic	�&�t�|_t|j�}|j|j	d��|j|j�|jd�|jjd|�t�r|j�Id}|dkrB	|jjdd�|_
|dz
}t#j$d	�|dkr�B|j��|jj'�tD]�}t|j)|j�t+t|j,|j|t|j.t|j0�}|jj3|�|j5���|jj'�|jj7|j	d
�|j8�|jj'�|jj7t;t=dd��|j	d
�|j>�|_ |jj'�|jj7t;t=dd��d|jB�|jDjG|j�y#tj$rtj!d�Y��FwxYw)Nr�Tr��com.hplip.StatusServicez/com/hplip/StatusServicez/Unable to connect to StatusService. Retrying...rg�?zHP Device Manager...�settingsr zSettings...�quit�Quit)$rr�r(�setTextr�r0r��setIconVisibleInMenu�insertActionrrpr��
get_object�dbus�
DBusExceptionr�warnrr�addSeparatorrrrrWr`r�addMenur;r1�toolboxTriggeredr)r2�settingsTriggered�settings_action�
quitTriggeredr��setContextMenu)rr�tr�r�s     rr�zSystemTrayApp.setMenu�sK���G��	���	�	�"��	�
�
�d�i�i� 6�7�8�
�
�
�d�n�n�%�
�"�"�4�(��	�	���t�U�+���|�|�#����!�e�T�'+�'7�'7�'B�'B�C\�B\�(^���
��F�A��J�J�s�O��!�e��|�|�'��	�	�&�&�(� �"�A��A�J�)�)�$�,�,�7�%�g�a�j�&:�&:�D�I�I�q�'�RS�*�J\�J\�^e�fg�^h�^n�^n�o�D��I�I�%�%�d�+��K�K�M�"�	
�	�	��� ��	�	���D�I�I�&<�=�t�?T�?T�U��	�	��� �#�y�y�2�2�5��Z�QX�9Y�3Z�$(�I�I�m�$<�t�?U�?U� W���	
�	�	��� ��	�	���E�+�f�g�">�?���I[�I[�\����%�%�d�i�i�0��7 �-�-�T����!R�S�T�s�(!K$�$(L�Lc�*�|j�y|jddt�tj	dd�}|j
j
�tjdtj|j
j��}tj||j
j�r�ttj��|j
jkratjdtj|j
j��}d|�d|�d|j
j�d|�d	�	}nz|j
jr!d|�d|�d|j
j�d
�}nCd|�d|j
j�d
�}n%|j
jr
d|�d|�d	�}nd|z}	t!|j|j
j"|j
j$|j
j&|j
j(|j
j*|j
j,|j
j|j
j|�
}|j/�t0j2k(�r5|j"|j
_|j(|j
_|j,|j
_t4j7d
|j
j,z�|j
j9�|j
j"t:k(r1t4j7d�|j<j?d�n9t4j7d�t@jCtD|jF�|jddtH�|jddtJ�y#|jddtJ�wxYw)Nr��hplip�versionz%d-%m-%YzHPLIP-z version was installed on z.

New version of HPLIP-z9 is available for upgrade. HPLIP upgrade is scheduled on �.z is available for upgrade.z. version was installed.

New version of HPLIP-zHPLIP-%s version was installed.zHPLIP update  notification = %d�
Showing...T�Waiting to hide...)&r��sendMessage�EVENT_DEVICE_STOP_POLLINGrr$r�r�r�strftime�	localtimer�r�Is_HPLIP_older_version�latest_available_versionr�rr|rr�r�r��polling_device_listr��exec_r~�Acceptedrr��saver�r�r�r�r�r�r�� EVENT_USER_CONFIGURATION_CHANGED�EVENT_DEVICE_START_POLLING)r�cur_vers�installed_time�postponed_timer��dlgs      rr,zSystemTrayApp.settingsTriggered�sQ���9�9�������R�!:�;��<�<���3�������!��
�
�j�$�.�.��AS�AS�Al�Al�2m�n���'�'��$�2D�2D�2]�2]�^��4�9�9�;��$�"4�"4�"P�"P�P� $�
�
�j�$�.�.��I[�I[�Iw�Iw�:x� y��_g�hv�y}�yK�yK�yd�yd�ft�u���#�#�<�<�}E�FT�W[�Wi�Wi�WB�WB�C��=�w�AE�AS�AS�Al�Al�m��
�
�
�
8�
8�BJ�N�[�K�:�H�E�K�	A�'��	�	�4�3E�3E�3U�3U�(,�(:�(:�(B�(B�D�DV�DV�Dg�Dg�(,�(:�(:�(K�(K�(,�(:�(:�(N�(N�(,�(:�(:�(I�(I�(,�(:�(:�(V�(V�(,�(:�(:�(S�(S�(3�5�C��y�y�{�g�.�.�.�58�5H�5H��"�"�2�69�6J�6J��"�"�3�47�4F�4F��"�"�1��	�	�;�T�=O�=O�=^�=^�_�`��"�"�'�'�)��%�%�5�5�9T�T��I�I�l�+��N�N�-�-�d�3��I�I�2�3��%�%�&9�4�;W�;W�X�� � ��R�)I�J�
���R��%?�@��D���R��%?�@�s
�HO9�9Pc���tjd�|jjtt
fvr1|jjd�tjd�yy)Nz	Hiding...F�Hidden)rr�r�r�"SYSTRAY_VISIBLE_HIDE_WHEN_INACTIVE�SYSTRAY_VISIBLE_HIDE_ALWAYSr�r�r�s rr�z%SystemTrayApp.timeoutHideWhenInactive$sM���	�	�+�����-�-�2T�Vq�1r�r��N�N�%�%�e�,��I�I�h��src��|j�y|jj�D]!}	|j�j��#y#t$rY�0wxYwr)r��actionsr;�AttributeError)rr9s  r�
updateMenuzSystemTrayApp.updateMenu+sT���9�9������"�"�$�	�A�
�������!�	��"�
��
�s�A
�
	A�Ac�v�|tjk(r|j�y|tjk(r|j	�y|tj
k(rJ|j�|j�-|jjtj��y|tjk(ryyr)r��ContextrN�DoubleClickr+�Triggerr��popup�QCursor�pos�MiddleClick)r�reasons  rr�zSystemTrayApp.trayActivated6s����_�,�,�,��O�O����2�2�
2��!�!�#��
��.�.�
.��O�O���9�9�$��	�	������
�.��
��2�2�
2��3rc��yrr?r�s rr�zSystemTrayApp.messageClickedLs��rc��tjd�|jddt�|j	�|`y)N�Exitingr�)rr�r7�EVENT_SYSTEMTRAY_EXITr r�r�s rr.zSystemTrayApp.quitTriggeredQs/���	�	�)������R�!6�7��	�	���Nrc��	tjdtj�t	j
dd�\}}|r�t	j|�t	jd�}|r!tjj|d�}nd|jj|jd�|jd�tjt�t j#d�yt j%d�tj&tj(|d�y|j+ddt,d	�
�y#t$rY��-wxYw)Nrjz
hp-toolboxTr�z+Unable to locate hp-toolbox on system PATH.z"Unable to find hp-toolbox on PATH.zRunning hp-toolbox: hp-toolboxr�zcom.hplip.Toolbox)�	interface)r	rrrr�lock_app�unlockrrrr��showMessager�r��Critical�TRAY_MESSAGE_DELAYrrr�rrr7�EVENT_RAISE_DEVICE_MANAGER)r�ok�	lock_filers    rr+zSystemTrayApp.toolboxTriggeredWs���	��J�J�r�2�:�:�&�
���|�T�:�
��I�
��L�L��#��;�;�|�,�D���w�w�|�|�D�,�7�����*�*�4�9�9�5K�+L� $�	�	�*W� X� /� 8� 8�:L�N��	�	�>�?��
�I�I�6�7��J�J�r�{�{�D�,�7�
���R��%?�K^��_��3�	��	�s�$E�	E�Err�rc	�l�tj||||||�j|j|�yr)rrn�
send_via_dbusr�)	rr�printer_namer%�username�job_idr�	pipe_namer]s	         rr7zSystemTrayApp.sendMessagevs/��	���Z��z�8�V�U�S�a�a�bf�br�br�t}�~rc
�T�d}		tj|jgg|jgd�\}}}|rtjd|z�y|�	rtj|j|j�}t|�|jk\�r�tjtj|j|d|j�D�cgc]4}t|t�r |j!d�j#d�n|��6c}�}||jd}|j$t&k(s|j$t(k(rN|j+�tj,dd	g�
�D]}|j/|��|j1�|j$t2k(rJtj	d�|j4j7�|j4j	�n$|j$t8k(r|j;�y|j4j<t>t@fv�r;tj	d�|jBjEd�|j$tFk(r:|jHs,|jBjK|jL�d|_$��8|j$tNk(r:|jHr,|jBjK|jP�d
|_$���|j$tRk(r^|jHsP|jBjK|jL�d|_$tTjWtX|jZ����|j4j<t@t\fvr9tj	d�tTjWt^|j`�|j$tbks'|j$t&k(s|j$t(k(�rO|j$t&k7r+|j/|jd�|j1�|jBjg��r�tj	d�|j	�thjk|j$tl�}	tjn|j$�}
d
}|j4jptrk(rd}n`|j4jptttvfvr>|	txk(rd}n2|j4jpttk(r|	tzt|t~fvrd}|j�r
|j�}n�tj�|jd�\	}}
}}}}}}}|dk(r|}n|dk(r|}n
|dk(r|}nd}t�j�|�|_D|dk(r|j�|�d|�d��}nQ|dk(r|j�|�d|�d��}n4|d	k(r|j�|�d|�d��}n|j�|�d|�d��}|�r%t��r�t�j�d��r�t�jk|	t�d�t�j�f�\}}|j�r�|j�r�t�|��d|
�d|j��d|j��d|j��d�
}tj	d |jd|
|j�|j�|j�|j$fz�nMt�|��d|
�d|j$�d�}tj	d!|jd|
|j$fz�t�j�d"||�}|j�d#d�|j�|�|	txk(r |j�t�j��n|j�t��|j���n^t�jk|	t�j��}|j�r�|j�r�tj	d$|jd|
|j�|j�|j�|j$fz�|jBj�|j�d"�|�d|
�d|j��d|j��d|j��d�
|t��nstj	d%|jd|
|j$fz�|jBj�|j�d"�|�d|
�d|j$�d�|t��t|�|jk\r���ny�	�s#tj$rtj	d�YywxYwcc}w)&Nr�T��?zError in select()zPipe error: %s�zutf-8rGrLr�z;Re-reading configuration (EVENT_USER_CONFIGURATION_CHANGED)r5Fr6zTray icon message:rCrDrErFrHrIrJrKrMrNr2r
�
z: z
(�/z9Notify: uri=%s desc=%s title=%s user=%s job_id=%d code=%dzNotify: uri=%s desc=%s code=%dzHPLIP Device Status�	transientz9Bubble: uri=%s desc=%s title=%s user=%s job_id=%d code=%dzBubble: uri=%s desc=%s code=%d)[�selectr�rrr�r	�readr��lenrrnr��unpackr��
isinstance�bytes�rstrip�decoder%�EVENT_CUPS_QUEUES_REMOVED�EVENT_CUPS_QUEUES_ADDEDrr�r�r�rAr�r�r[r rr�rIr�r��EVENT_DEVICE_UPDATE_ACTIVEr�r0r��EVENT_DEVICE_UPDATE_INACTIVEr��EVENT_DEVICE_UPDATE_BLIPr�r��
BLIP_DELAY�blipTimeoutrJr�r��EVENT_MAX_USER_EVENTr�supportsMessagesr#r$r&r'r��SYSTRAY_MESSAGES_SHOW_ALL�)SYSTRAY_MESSAGES_SHOW_ERRORS_AND_WARNINGS�!SYSTRAY_MESSAGES_SHOW_ERRORS_ONLY�ERROR_STATE_ERROR�ERROR_STATE_WARNING�ERROR_STATE_LOW_SUPPLIES�ERROR_STATE_LOW_PAPERrhrPrrRrSr��
have_pynotify�pynotify�init�(ERROR_STATE_TO_ICON_AND_URGENCY_PYNOTIFY�getPynotifyIcon�URGENCY_NORMALrjr�
to_unicoderi�Notification�set_hint�set_urgency�set_timeout�
EXPIRES_NEVERrbr��ERROR_STATE_TO_ICONr��Informationr`)rrw�m�r�wr6�x�eventr�r7�desc�show_messagerarbrcrSrdrerfrgrh�idd�icon�urgency�msg�ns                          rr�zSystemTrayApp.notifierActivated|s1�����
� �-�-����(8�"�t�~�~�>N�PS�T���1�a�
��	�	�*�Q�.�/����G�G�D�N�N�D�M�M�:���!�f��
�
�-�"�L�L�u{�vC�vC�DH�DL�DL�NO�P^�QU�Q^�Q^�N_�v`�+a�pq�PZ�[\�^c�Pd�1�8�8�G�+<�+C�+C�G�+L�jk�+k�+a�b�E��$�-�-�.�)�A��'�'�+D�D��HX�HX�\s�Hs��(�(�*�!'�!?�!?�QU�W^�P_�!`�.�A� �N�N�1�-�.������'�'�+K�K��	�	�"_�`��*�*�/�/�1��*�*�0�0�2��)�)�-B�B��	�	����)�)�9�9�4�6X�Y�Z��	�	�,�/����1�1�$�7� �+�+�/I�I�#'�#3�#3� $��� 6� 6�t�7L�7L� M�37�� 0�$�"�-�-�1M�M�#�/�/� $��� 6� 6�t�~�~� F�38�� 0�$�"�-�-�1I�I�#'�#3�#3� $��� 6� 6�t�7L�7L� M�37�� 0� &� 1� 1�*�d�>N�>N� O�$��)�)�9�9�>`�b}�=~�~��	�	�"6�7��)�)�*=�t�?[�?[�\��'�'�+?�?��(�(�,E�E��IY�IY�]t�It� �+�+�/H�H� �N�N�5�+;�+;�<� �L�L�N��>�>�:�:�<��I�I�&:�;�!�K�K�M�*C�*G�*G��HX�HX�Zk�*l�K�#)�#5�#5�e�6F�6F�#G�D�+0�L�#�1�1�B�B�F_�_�/3��!%�!3�!3�!D�!D�Ir�uV�IW�"W�#.�2C�#C�37�L�%)�%7�%7�%H�%H�Lu�%u�$/�4G�Ia�cx�3y�$y�37�L�$�1�1�$)�$6�$6��17�0E�0E�e�FV�FV�0W�!^��%��e�V�X�t�UW�Y]�$'�%�<�*0�C�%(�E�\�*.�C�%(�E�\�*2�C�*3�C�-3�-H�-H��-O��
�#+�t�#3�(,�	�	�U�3�2O�(P�A�%-��%8�(,�	�	�U�3�2O�(P�A�%-��%8�(,�	�	��s�2K�(L�A�)-�	�	�U�3�2G�(H�A�+�#0�X�]�]�7�5K�4\�4`�4`�al�)8��)@�(�BY�BY�(Z�5\�M�D�'�(-�|�|����GQ�RS�}�VZ�\a�\g�\g�in�iw�iw�y~�zF�zF�/G��(+�	�	�2m�16�1A�1A�4����V[�Vd�Vd�fk�fr�fr�ty�uE�uE�1F�3F�)G�@J�!�}�d�TY�Td�Td�.e��(+�	�	�2R�V[�Vf�Vf�hl�ns�n~�n~�U�2�)A�(0�(=�(=�>S�UX�Z^�(_�A�$%�J�J�{�D�$A�$%�M�M�'�$:�'2�6G�'G�()�
�
�h�6L�6L�(M�()�
�
�6H�(I�$%�F�F�H�,?�+B�+B�;�P_�Pk�Pk�+l�D�',�|�|����(+�	�	�2m�16�1A�1A�4����V[�Vd�Vd�fk�fr�fr�ty�uE�uE�1F�3F�)G�(,���(B�(B�4�9�9�Mb�Cc�Z[�\`�bg�bm�bm�ns�n|�n|�~C�~J�~J�DK�CG�I[�)]�
),�	�	�2R�V[�Vf�Vf�hl�ns�n~�n~�U�2�)A�(,���(B�(B�4�9�9�Mb�Cc�RS�TX�Y^�Yi�Yi�Cj�CG�I[�)]�]�!�f��
�
�-�f�C���<�<�
��	�	�-�.��
��+as�2e7�9f%�7(f"�!f"c�v�|jr-|jj|j�d|_yyr�)r�r�r0r�r�s rr�zSystemTrayApp.blipTimeout#s.������N�N�"�"�4�>�>�2�$�D��rNc�0�tjd||�Srtrurvs   rryzSystemTrayApp.__tr*rzrr)r<r=r>rr�rr�r
r�r�r,r�rNr�r�r.r+�proprir7r�r�r�r?rrr�r�-sz��<5�P��4��$�T.1�f5A�p ���,
�
�`�>JN����B�"�@Y��c�N%�:rr�c���tjd�tjdtj�z�	ttj|�}jd�d}|dkr5tj�rn tjd�|dz
}|dkr�5tj�rWt!|t j"�}|j$t&j)|j*�|j-�yy#tj$r7}tjd|z�t
jd�Yd}~��d}~wwxYw)	Nzhp-systray(qt5)zPID=%dzCaught exception: %srFr�<rm)r�
set_moduler�r	�getpidr��sys�argvr&r'�exit�setQuitOnLastWindowClosedr��isSystemTrayAvailablerrr�r�r�r�r�r�r>)r��appr6�ir�s     r�runr�/s���N�N�$�%��I�I�h�����$�%���C�H�H�i�0���!�!�%�(�	�A�
�b�&��0�0�2���
�
�3��	�Q���	�b�&��,�,�.�"�9�o�.B�.B�C�����3��'�'��(=�(=�>��	�	��/�������	�	�(�1�,�-���������s�D�E�'-E�E)Hr�r�rrr	r��os.pathr�base.g�baserrr�
base.codes�ui_utils�PyQt5.QtCore�PyQt5.QtGui�ImportErrorrrr��systrayframerr&r	r
�warnings�simplefilter�DeprecationWarningr��notify2r�rbr�rr�rmr�r&r�r��ERROR_STATE_OKr��Warningr�rar��ERROR_STATE_BUSYr��ERROR_STATE_PRINTING�ERROR_STATE_SCANNING�ERROR_STATE_PHOTOCARD�ERROR_STATE_FAXING�ERROR_STATE_COPYINGr�r�r
r(�err�URGENCY_LOWr��URGENCY_CRITICALr�rrr�QObjectrAr~r|r3r�r�r?rr�<module>r�s���,�
�
�	�
����&�&������
'���)�
�����h� 2�3��
�������
�
�����!���o�9�9��o�9�9��o�5�5��o�6�6��o�5�5��o�5�5��o�5�5��o�9�9��o�9�9��o�9�9��o�9�9��o�9�9�
����6�"�D��9�%�D�
�'�
"�C��4��)=�)=�">��4��)=�)=�">��4��)@�)@�"A��3��(A�(A�"B� �4��)@�)@�"A��4��)@�)@�"A��4��)@�)@�"A��4��)=�)=�">��4��)=�)=�">��4��)=�)=�">��4��)=�)=�">��4��)=�)=�">�
0�,�
��K��K�F2:�G�2:�n\E�G�\E�~~:�L�~:�D��O���I�I�L�M��C�H�H�Q�K������I�I�<�=��C�H�H�Q�K�����������
����sY�
H�H5�.I$�(H2�1H2�5(I!� I!�$J�*I/�.J�/I9�6J�8I9�9J�?J

Zerion Mini Shell 1.0