HEX
Server: Apache
System: Linux scp1.abinfocom.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: confeduphaar (1010)
PHP: 8.1.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //proc/self/root/lib/python3/dist-packages/UpdateManager/__pycache__/UnitySupport.cpython-38.pyc
U

ρ�fF
�
@s�ddlZddlmZdZz8ddlZe�dd�e�dd�ddlmZmZd	ZWn4e	e
fk
r�Zze�d
e�W5dZ[XYnXGdd�de
�ZGd
d�de�Zer�eZneZdS)�N)�gettextF�Dbusmenuz0.4�Unityz7.0)rrTzcan not import unity GI %sc@s2eZdZdZddd�Zdd�Zdd�Zd	d
�ZdS)�
IUnitySupportz interface for unity support NcCsdS�N�)�self�parentrr�</usr/lib/python3/dist-packages/UpdateManager/UnitySupport.py�__init__(szIUnitySupport.__init__cCsdSrr�r�urgentrrr
�set_urgency+szIUnitySupport.set_urgencycCsdSrr�rZvisiblerrr
�set_install_menuitem_visible.sz*IUnitySupport.set_install_menuitem_visiblecCsdSrr�r�progressrrr
�set_progress1szIUnitySupport.set_progress)N)�__name__�
__module__�__qualname__�__doc__rrrrrrrr
r&s

rc@s:eZdZdZd
dd�Zdd�Zdd�Zd	d
�Zdd�ZdS)�UnitySupportImplz9 implementation of unity support (if unity is available) NcCs$tj�d�}||_|r |�|�dS)Nzupdate-manager.desktop)rZ
LauncherEntryZget_for_desktop_id�_unity�_add_quicklist)rr	Zum_launcher_entryrrr
r8s�zUnitySupportImpl.__init__cCsjtj��}tj��|_|j�tjtd��|j�tjd�|j�	d|j
d�|�|j�|j�
d|�dS)NzInstall All Available UpdatesTzitem-activated�	quicklist)rZMenuitem�new�install_dbusmenuitemZproperty_setZMENUITEM_PROP_LABEL�_�property_set_bool�MENUITEM_PROP_VISIBLEZconnectZinstall_all_updatesZchild_appendr�set_property)rr	rrrr
r@s"
���zUnitySupportImpl._add_quicklistcCsD|j�d|d�|dks"|dkr2|j�dd�n|j�dd�dS)	z set the progress [0,100] rgY@r�dZprogress_visibleFTN�rr!rrrr
rOszUnitySupportImpl.set_progresscCs|j�d|�dS)Nr
r#rrrr
rXszUnitySupportImpl.set_urgencycCs|j�tj|�dSr)rrrr rrrr
r[s�z-UnitySupportImpl.set_install_menuitem_visible)N)	rrrrrrrrrrrrr
r5s
	r)ZloggingrrZHAVE_UNITY_SUPPORTZgiZrequire_versionZ
gi.repositoryrr�
ValueError�ImportError�eZwarning�objectrrZUnitySupportrrrr
�<module>s ,