%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /snap/core22/current/usr/share/subiquity/subiquitycore/ui/__pycache__/
Upload File :
Create Path :
Current File : //snap/core22/current/usr/share/subiquity/subiquitycore/ui/__pycache__/actionmenu.cpython-310.pyc

o

K��^��@s�ddlZddlmZmZmZmZmZmZmZm	Z	m
Z
ddlmZm
Z
mZddlmZGdd�de�ZGdd�de�ZGd	d
�d
e�ZGdd�de�ZejGd
d�d��ZGdd�de�ZdS)�N)	�ACTIVATE�AttrWrap�Button�connect_signal�LineBox�
PopUpLauncher�SelectableIcon�Text�Widget)�Columns�ListBox�
WidgetWrap)�Colorc@�eZdZed�Zed�ZdS)�ActionBackButtonu◂�N��__name__�
__module__�__qualname__r	�button_left�button_right�rr�3/usr/share/subiquity/subiquitycore/ui/actionmenu.pyr%�rc@r)�ActionMenuOpenButtonr�▸Nrrrrrr*rrc@seZdZed�Zed�ZdS)�ActionMenuButtonrNrrrrrr/rrcs<eZdZdZ�fdd�Zdd�Zdd�Z�fdd	�Z�ZS)
�_ActionMenuDialogz0A list of action buttons with a box around them.csL||_d}t|�}t|d|j�t�|�g}t|�}t|jj�D]s\}}|j	rYt
|jt�r1|j}n|j
r=t�t|j��}nt�t|j��}t|t|jj��}t|jd|j|j�n5|j}	t
|	t�re|	jj}	t|t|	��}|j
rrd}
nd}
tddtd�ft|	�ddt|
�fgdd�}t|d�}|�|�q ||_t��t�tt|����dS)	Nz(close)�clickrr�fixed�)�dividechars�
info_minor)�parentrr�closer�menu_button�len�	enumerate�_actions�enabled�
isinstance�labelr
�opens_dialogrr�max�base_widgetr�valuerr	r�append�width�super�__init__�bodyrr)�selfr$�
close_textr%�groupr2�i�action�btnr,�rhs��	__class__rrr47sF�
��
z_ActionMenuDialog.__init__cCs|j��dS�N)r$�close_pop_up)r6�senderrrrr%\sz_ActionMenuDialog.closecCs|j�|�|j��dSr?)r$�_actionr@)r6r;r0rrrr_sz_ActionMenuDialog.clickcs$|dkr|j��dSt��||�S)N�esc)r$r@r3�keypress�r6�size�keyr=rrrDcsz_ActionMenuDialog.keypress)	rrr�__doc__r4r%rrD�
__classcell__rrr=rr4s%rc@s0eZdZe��Ze��Ze��Zejdd�ZdS)�ActionF)�defaultN)	rrr�attr�ibr,r*r0r-rrrrrJjs
rJcsheZdZgd�Z	d�fdd�	Zdd�Zdd�Zd	d
�Z�fdd�Z�fd
d�Z	dd�Z
dd�Z�ZS)�
ActionMenu)r:�openr%rcs^g|_|D]}t|t�st|�}|j�|�q||_t|jd�|_t��|j�t	|�|_
dS)Nr)r)r+rJr1�iconr�_buttonr3r4r�_dialog)r6�optsrP�optr=rrr4ys
zActionMenu.__init__cCs
t|j�Sr?)r'rP�r6rrr�get_natural_width�s
zActionMenu.get_natural_widthcCs|j|tkr	|S|��dSr?)�_command_mapr�open_pop_uprErrrrD�szActionMenu.keypresscCs|�d|�dS)Nr:)�_emit)r6r:rrrrB�szActionMenu._actioncs$d|jjj_|�d�t���dS)NrrO)rR�_wr/�focus_positionrYr3rXrUr=rrrX�s
zActionMenu.open_pop_upcs|�d�t���dS)Nr%)rYr3r@rUr=rrr@�s
zActionMenu.close_pop_upcCs|jSr?)rRrUrrr�
create_pop_up�szActionMenu.create_pop_upcCs$|jjd}dd|t|j�dd�S)N�r!����)�left�top�
overlay_width�overlay_height)rRr2r'r))r6r2rrr�get_pop_up_parameters�s�z ActionMenu.get_pop_up_parameters)r)
rrr�signalsr4rVrDrBrXr@r\rdrIrrr=rrNus�rN)rL�urwidrrrrrrrr	r
�subiquitycore.ui.containerrrr
�subiquitycore.ui.utilsrrrrr�srJrNrrrr�<module>s,6

Zerion Mini Shell 1.0