�
QKfd
� � � d dl Z d dlmZ dZ d dlZ ej
dd� ej
dd� d dlmZmZ d Z G d� de
� Z G d
� de� ZereZyeZy# e e
f$ rZ e j d
ez � Y dZ[�?dZ[ww xY w)� N)�gettextF�Dbusmenuz0.4�Unityz7.0)r r Tzcan not import unity GI %sc �* � e Zd ZdZdd�Zd� Zd� Zd� Zy)�
IUnitySupportzinterface for unity supportNc � � y �N� )�self�parents �</usr/lib/python3/dist-packages/UpdateManager/UnitySupport.py�__init__zIUnitySupport.__init__+ � � �� c � � y r r
�r �urgents r
�set_urgencyzIUnitySupport.set_urgency. r r c � � y r r
�r �visibles r
�set_install_menuitem_visiblez*IUnitySupport.set_install_menuitem_visible1 r r c � � y r r
�r �progresss r
�set_progresszIUnitySupport.set_progress4 r r r )�__name__�
__module__�__qualname__�__doc__r r r r r
r r
r r ( s � �%�
�
�
�
r r c �0 � e Zd ZdZdd�Zd� Zd� Zd� Zd� Zy) �UnitySupportImplz7implementation of unity support (if unity is available)Nc �x � t j j d� }|| _ |r| j |� y y )Nzupdate-manager.desktop)r �
LauncherEntry�get_for_desktop_id�_unity�_add_quicklist)r r �um_launcher_entrys r
r zUnitySupportImpl.__init__; s; � �!�/�/�B�B�$�
�� (��������'� r c � � t j j � }t j j � | _ | j j t j
t
d� � | j j t j d� | j j d|j d � |j | j � | j j d|� y )NzInstall All Available UpdatesTzitem-activated� quicklist)r �Menuitem�new�install_dbusmenuitem�property_set�MENUITEM_PROP_LABEL�_�property_set_bool�MENUITEM_PROP_VISIBLE�connect�install_all_updates�child_appendr& |