%PDF- %PDF-
Direktori : /usr/share/hplip/__pycache__/ |
Current File : //usr/share/hplip/__pycache__/toolbox.cpython-312.pyc |
� = f-# � �p � d Z dZdZdZddlZddlZddlZddlZddl� ddl m Z ddlmZm Z mZ ddlmZ dZdZdZdZd � Z ej6 eee edefeeef� Z e jC � e jE ejF dgg d�� � e jI ddg� \ Z%Z&Z'Z(Z)Z*dZ+e%D ] \ Z,Z-e,dv s�e)dk( s�dZ+� e)dk( r8 e j\ � scej_ dez � ej` d� n<e)dk( r7 e jb � s&ej_ dez � ej` d� d\ Z2ZZ3e)dk( �r� ddl4m5Z5 ddl6Z4ddl7m8Z8m9Z9 ddl:m;Z; ddl<Z< e<jr � e4jz jx js � e+sJ ej| � \ Z3Z ej~ � Z@ej) de@z � ej� � Z2e+se2�rTej� d� er ej� e� ddlD� ddlEmFZF eGej� � Ze*�PeIj� d d!d"� Z*e*j� � d"k( r* eLeMj� � � Z*ej) d#e*z � e*j� � d$k7 r�d%Z e*j� d&� \ ZPZQd&j� ePeg� Z*ej) d'e*z � eTd� ZUd(ePz ZVej) d)eVz � eUj� eVeXj� � ZZeZrej� eU� nd$Z*e*d$k( rej) d*� n^ej) d+e*z � e\j� e\e*� � e*eX_N eNj� eNj� eNj� e*� � eFe3e e&e+� Zej� e� ej� � ej) d,� ej� � e2r2ej) d-e2z � ej� e2ej� � e j� � ej` d� ye+s�ej� d/� dd0lmkZk ej� e3� e8d�1� Zl e4jj � Zej� ed4d5d6d7d8�9� ej) d:� e;� j� � e@r2ej) d<e@z � ej� e@ej� � e j� � ej` d� yy e j� e)� \ ZGZs eesd=z � Ztej� d� eGej� � Zetj� e e&d� Zej� � ej) d,� ej� � e j� � ej` d� y# e$ r"Zej) e� dd l mZ Y dZ[���dZ[ww xY w# e$ r ej_ d� dZ+Y ��tw xY w# e$ r' ej_ d� ej` d� Y ��!w xY w# eS$ r e*ZPd&j� e*eg� Z*Y ���w xY w# eNj� $ r Y ���w xY w# ee$ r ej` d� Y ���w xY w# eh$ r)Zej) d.ej� z � Y dZ[���dZ[ww xY w# e2rcej) d-e2z � ej� e2ej� � n0# eh$ r(Zej) d.ej� z � Y dZ[ndZ[ww xY we j� � ej` d� w xY w# e4j� j� $ rfZ ej� � dk7 r$ej_ d2� ej` d� n#ej_ d3� ej` d� Y dZ[��GdZ[ww xY w# ee$ r ej) d;� Y ��*w xY w# eh$ r)Zej) d.ej� z � Y dZ[��#dZ[ww xY w# e@rcej) d<e@z � ej� e@ej� � n0# eh$ r(Zej) d.ej� z � Y dZ[ndZ[ww xY we j� � w xY w# ee$ r ej` d� Y ��w xY w)>z15.0z hp-toolboxzHP Device ManagerzyThe HP Device Manager (aka "Toolbox") for HPLIP supported devices. Provides access to status, tools, and supplies levels.� N)�*)�status�tui�module)� import_module)�dyn_import_modc �v � |d dk( r�|d dk( r�t j | � }|j � |j t kD r$t j |j � |_ t j d|j z � |j t d� st j d� y y y y )N� interfacezcom.hplip.Toolbox�member�EventzReceived event notifier: %dz toolbox ui� )�devicer �debug� event_code�EVENT_MAX_EVENTr �MapPJLErrorCode�log� send_via_pipe�w�sys�exit)�args�kwds�events �/usr/share/hplip/toolbox.py�handle_session_signalr 8 s� � ��K��/�/��X��'�!����d�#�� ��� ����o�-�%�5�5�e�6F�6F�G�E�� � � �/�%�2B�2B�B�C��"�"�1�l�3��H�H�Q�K� 4� "� 0� )zDisable dbus (Qt3 only):z-x or --disable-dbus�optionF)zhp-alignzhp-cleanzhp-colorcalzhp-devicesettingszhp-faxsetupzhp-firmwarezhp-infoz hp-levelszhp-linefeedcalz hp-makecopiesz hp-pluginz hp-pqdiagzhp-printzhp-printsettingszhp-scanz hp-sendfaxzhp-testpagezhp-timedatez hp-unload)� extra_options� see_also_list�xzdisable-dbusF)z-xz--disable-dbus�qt3Tz!%s requires GUI support. Exiting.r �qt4)r r r )� SessionBus)� DBusGMainLoop�threads_init)�MainLoopzXUnable to load dbus - Automatic status updates in HPLIP Device Manager will be disabled.z Parent PID=%dzhp-toolbox(UI))�DevMgr4z,Unable to load Qt3 support. Is it installed?�ui�loc�systemzUsing system locale: %s�c�utf8�.z&Trying to load .qm file for %s locale.zhplip_%s.qmzName of .qm file: %szUsing default 'C' localezUsing locale: %szStarting GUI loop...z)Killing child toolbox process (pid=%d)...z Failed: %szhp-toolbox(dbus))r )�set_as_defaultz/Unable to connect to dbus session bus. Exiting.z8Unable to connect to dbus session bus (running as root?)�sender�destr r �path)�sender_keyword�destination_keyword�interface_keyword�member_keyword�path_keywordzEntering main loop...zCtrl-C: Exiting...z*Killing parent toolbox process (pid=%d)...z.devmgr5)w�__version__�__mod__� __title__�__doc__r �os�getopt�signal�base.g� base.utils�utils�baser r r � importlibr �ImportError�er r r r �app�toolbox�session_busr �Module�GUI_MODE�UI_TOOLKIT_QT3�UI_TOOLKIT_QT4�UI_TOOLKIT_QT5�mod�lockInstance�setUsage�USAGE_FLAG_NONE�parseStdOpts�opts� device_uri�printer_name�mode� ui_toolkitr* �disable_dbus�o�a�canEnterGUIMode�errorr �canEnterGUIMode4� child_pid�r�dbusr$ �dbus.service�dbus.mainloop.glibr% r&