3
NZ                 @   sp  d Z dZdZdZddlZddlZddlZddlZddlT ddl	m
Z
mZ ddlmZ ed	krlejej ej kr|ej  ejeee edefeeefZejejd&gd ejdddgd\ZZZZZZ dZ!xeD ]\Z"Z#e"d'krdZ!qW ej$ dkre%j&d ej'd edkr<e
j( s^e%j&de  ej'd n"e
j) s^e%j&de  ej'd e!se
j*dd ej+ D dd se%j,d ej'd ej-  ej. \Z/Z0e%j1de0e/f  ej Z2ej3 Z4e4rej5e0 edkr$yddl6j7Z8W n* e9k
r    e%j&d  ej'd Y nX nzy.ed!kr<ddl:j7Z8ned"krPddl;j7Z8W nJ e9k
r Z< z,e%j&e< e%j&d# ej=  ej'd W Y ddZ<[<X nX ze8j>e/ W dej=  X nej5e/ ed(krZej. \Z?Z@ej. \ZAZBe%j1d$e@e?f  e%j1d%eBeAf  ej3 ZCeCr:ej5e? ddlDZDeDj>e0e@eA nej5e@ ddlEZEeEj>e?eB nddlDZDeDj>e0 dS ))z2.0z
hp-systrayzSystem Tray Status Servicez6System Tray monitors the HP device status and Displays    N)*)utilsmodule)cups__main__1Startup even if no hplip CUPS queues are present:-x or --force-startupoptionF)Zextra_optionsxzforce-startupzignore-update-firsttime-x--force-startupTz*hp-systray cannot be run as root. Exiting.   Zqt3z.%s requires Qt3 GUI and DBus support. Exiting.z.%s requires Qt4 GUI and DBus support. Exiting.c             C   s   g | ]
}|j qS  )
device_uri).0pr   r   /usr/share/hplip/systray.py
<listcomp>R   s    r   c             C   s
   | j dS )NZhp)
startswith)r
   r   r   r   <lambda>R   s    r   zDNo hp: or hpfax: devices found in any installed CUPS queue. Exiting.z-Creating pipe: hpssd (%d) ==> systemtray (%d)z,Unable to load Qt3 support. Is it installed?qt4qt5z0Unable to load Qt4/Qt5 support. Is it installed?z(Creating pipe: hpssd (%d) ==> hpdio (%d)z(Creating pipe: hpdio (%d) ==> hpssd (%d))r   r   r	   F)r   r   )r   r   )F__version____mod__Z	__title____doc__sysosZgetoptsignalZbase.gbaser   r   Zprntr   __name__getpgidgetpidsetsidZModuleZGUI_MODEZUI_TOOLKIT_QT5ZUI_TOOLKIT_QT4ZUI_TOOLKIT_QT3modZsetUsageZUSAGE_FLAG_NONEZparseStdOptsZoptsr   Zprinter_namemodeZ
ui_toolkitZlangZforce_startupoagetuidlogerrorexitZcanEnterGUIModeZcanEnterGUIMode4anyZgetPrinterswarnZlockInstancepipeZr1Zw1debugZ
parent_pidforkZ
child_pid1closeZui.systemtrayZ
systemtrayZsystrayImportErrorZui4.systemtrayZui5.systemtrayeZunlockInstanceZrunZr2Zw2Zr3Zw3Z
child_pid2ZhpssdZhpdior   r   r   r   <module>   s   







 












