%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/rhythmbox/plugins/alternative-toolbar/__pycache__/
Upload File :
Create Path :
Current File : //lib/rhythmbox/plugins/alternative-toolbar/__pycache__/alttoolbar_plugins.cpython-312.pyc

�

 ]e�<����ddlZddlZddlZddlmZddlmZddlmZddlmZddlm	Z	ddlm
Z
ddlmZGd	�d
ej�Z
Gd�dej�Zy)
�N)�CoverLocale)�GLib)�Gio)�Gtk)�Pango)�Peas)�PeasGtkc�6��eZdZ�fd�Zd�Zd�Zd�Zd�Z�xZS)�
PluginListRowc���tt|��||_d|_||_t
j�}tj|j��}|jd|zdz�|jtjj�tj j"|j$_|j)d�d|j$_|j-d|j.�t
j|j1��}|jtjj�tj j"|j$_|j)d�|j-d|j.�d|j$_tj4j7�}||_tj j:|j$_d}	|j?�rd}|jA|jC��t
jD�}|jGtjHjJ�|jM|ddd�|jM|ddd�t
jD�}	|	jGtjHjN�|	jMt
jd	�ddd�|	jM|ddd�|	jQ|ddd
�|jS|	�|	|_*|s|jW�|j-d|jX�y#Y��=xYw)NF�<b>�</b>T�z
query-tooltipr�z  �znotify::active)-�superr�__init__�plugin�_refresh�_switch_callbackr�Labelr�markup_escape_text�get_name�
set_markup�
set_ellipsizer�
EllipsizeMode�END�Align�START�props�halign�set_has_tooltip�
margin_top�connect�_display_tooltip�get_description�
margin_bottom�Switch�new�_switch�CENTER�valign�is_available�
set_active�	is_loaded�Box�set_orientation�Orientation�VERTICAL�
pack_start�
HORIZONTAL�pack_end�add�outerbox�	add_error�_switch_changed)�selfr�switch_callback�label1�escape�label2�switch�	sensitive�boxr8�	__class__s          ��D/usr/lib/rhythmbox/plugins/alternative-toolbar/alttoolbar_plugins.pyrzPluginListRow.__init__!s|���
�m�T�+�-������
� /���������(�(����):�;�����%�&�.�6�1�2����U�0�0�4�4�5�!�i�i�o�o��������t�$�"#����������(=�(=�>����6�1�1�3�4�����U�0�0�4�4�5�!�i�i�o�o��������t�$������(=�(=�>�%&����"������!�����!�i�i�.�.������	�	��"�"�$� �	����f�.�.�0�1��g�g�i�����C�O�O�4�4�5����v�t�U�A�.����v�t�U�A�.��7�7�9��� � ����!;�!;�<����C�I�I�d�O�U�E�1�=����C���q�1����&�%���2������ ��
���N�N�����'��)=�)=�>��)	��s�1M4�4M9c��|j�j�r |j|j��yy)NTF)�
get_layout�
is_ellipsized�set_text�get_text)r;�label�x�y�mode�tooltips      rDr%zPluginListRow._display_tooltipXs2������+�+�-����U�^�^�-�.���c�j����jryd�_��fd�}tjd|d�y)NFTc���td�t�j���j��j�d�_y)N�switch_changedF)�print�
get_activerrr)�argsr;r@s ��rD�delayz,PluginListRow._switch_changed.<locals>.delayds8����"�#��&�#�#�%�&��!�!�&�$�+�+�6�!�D�MrO�)rr�timeout_add)r;r@rUrVs``  rDr:zPluginListRow._switch_changed^s-����=�=����
�	"�	
����e�T�*rOc��tjd��}tj�}d|j_|j
|tjj�|j�|jd�|jtd��|jj|ddd�|jd�y)Nzdialog-error-symbolic��namerTzThe plugin cannot be enabledF�)r�
ThemedIconr�Imager �margin�set_from_gicon�IconSize�BUTTON�show_allr"�set_tooltip_text�_r8r6�
set_sensitive)r;�icon�error_images   rDr9zPluginListRow.add_errorms����~�~�#:�;���i�i�k��#$���� ��"�"�4����)<�)<�=������#�#�D�)��$�$�Q�'E�%F�G��
�
���{�E�5�!�<����5�!rOc�Z�	|jj�s|j�|jj	�|jj�k(ry|jj
|jj��y#|j�YyxYw�N)rr-r9r*rTr/r.)r;rUs  rD�refreshzPluginListRow.refreshxsv��
	��;�;�+�+�-���� ��|�|�&�&�(�D�K�K�,A�,A�,C�C���L�L�#�#�D�K�K�$9�$9�$;�<��	��N�N��s�AB�"3B�B*)	�__name__�
__module__�__qualname__rr%r:r9rk�
__classcell__�rCs@rDrr s���5?�n�
+�	"�rOrc�N��eZdZ�fd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Z�xZS)
�PluginDialogc�B��|r/tt|�d|tjj
��n-tt|�|tjj
��||_||_tjj�}|j|jd�||_i|_
tjj!�|_|j"j%�}|j"j'd|j(�|j"j'd|j(�|D]h}|j+�r�|j-�r�%t/||j0�}||j|j3�<|j5|��jt7�}|j9|j:j<�d�}tj>j�}	|	jA�}
|
jCtjD�tjFj�}tjH�}tKjLd��}
tjN�}d	|jP_)|j5|�|jU|d
��|jW|
tjXjZ�tj\�}|j_|ddd�|j5|�|	ja|d�|jcd
|jd�||_3tjh�}|jA�}
|
jCd�|jktjljn�tjH�}tKjLd��}
tjN�}d	|jP_)|j5|�|jU|d��|jW|
tjXjZ�|j5|�|jq|dd�|jcd
|jr�||_:tjH�}tKjLd��}
tjN�}d	|jP_)|j5|�|jU|d��|jW|
tjXjZ�|j5|�|jq|dd�|jcd
|jv�||_<tjzj�}d|jP_>|	ja|d�|	jq|dd�tjFj�}|j5|�|	ja|d�tj\�}|jtj�j��tj�jdd�}|j5|�d|jP_Cd|jP_D|j_|ddd�|j_|	ddd�t�d�|jP_F|js9|j�tj�tj�j��n!|j��}|j�d�|j��|j��}|j5|�|jcd|j��y)NT)�use_header_bar�parent�flags)rurvz
unload-pluginzload-pluginc��tj|�}tjdd|tj��}|j	dd�}|S)Nz\(..\)��rvre)�gettext�re�sub�DOTALL�replace)�str�translations  rD�extract_textz+PluginDialog.__init__.<locals>.extract_text�s@��!�/�/�#�.�K��&�&��2�{�"�)�)�L�K�%�-�-�c�2�6�K��rOzpreferences-system-symbolicrZr�_PreferencesFr�clicked�linkedz#preferences-system-details-symbolic�_Aboutznon-homogeneouszhelp-contents-symbolic�_Helpr�expand�zConfigure Pluginszrow-selected)Prrrrr�DialogFlags�MODAL�_has_headerbar�_parent_window�ListBoxr)�
set_sort_func�
_listbox_sort�_listbox�_itemsr�Engine�get_default�_peas�get_plugin_list�
connect_after�_on_load_unload_plugin�
is_builtin�	is_hiddenrr�get_module_namer7r�
switch_locale�Locale�RB�Toolbar�get_style_context�	add_class�STYLE_CLASS_INLINE_TOOLBAR�ToolItem�Buttonrr]r^r r_rdr`rarbr0r4�insertr$�_preferences_button_clicked�_preferences_button�	ButtonBox�
set_layout�ButtonBoxStyler�child_set_property�_info_button_clicked�_info_button�_help_button_clicked�_help_button�SeparatorToolItem�drawr1r2r3�ScrolledWindow�hexpand�vexpandre�title�
add_button�STOCK_CLOSE�ResponseType�CLOSE�get_header_bar�set_show_close_buttonrc�get_content_area�_listbox_row_selected)r;�
parent_window�
has_headerbar�listbox�pluginsr�row�clr��toolbar�context�item�btnrg�imagerB�minitoolbar_box�
contentbox�scrollwindow�	headerbar�arearCs                     �rDrzPluginDialog.__init__�s������,��.�d�6C�58�_�_�5J�5J�
/�
L�
�,��.�m�58�_�_�5J�5J�
/�
L�,���+����+�+�/�/�#�����d�0�0�$�7���
�����[�[�,�,�.��
��*�*�,�,�.���
�
� � ��$�2M�2M�N��
�
� � ���0K�0K�L��	!�F��$�$�&�v�/?�/?�/A�#�F�D�,A�,A�B��8;����F�2�2�4�5����C� �		!��]��
��������&�	��+�+�/�/�#���+�+�-�����#�8�8�9��|�|���!���j�j�l���~�~�#@�A���	�	����������������\�.�9�:�
���T�3�<�<�#6�#6�7��g�g�i�����s�E�5�!�,�����
����t�Q�����I�t�?�?�@�#&�� ��-�-�/��!�3�3�5�����(�#��"�"�3�#5�#5�#;�#;�<��j�j�l���~�~�#H�I���	�	����������������\�(�3�4�
���T�3�<�<�#6�#6�7����C� ��*�*�3�0A�4�H����I�t�8�8�9�����j�j�l���~�~�#;�<���	�	����������������\�'�2�3�
���T�3�<�<�#6�#6�7����C� ��*�*�3�0A�4�H����I�t�8�8�9�����$�$�(�(�*����
�
�����t�Q���"�"�4��4�8��|�|���!������!����t�Q���W�W�Y�
��"�"�3�?�?�#;�#;�<��)�)�-�-�d�D�9������!�%)����"�%)����"����l�D�$��:����g�u�e�Q�7��0�1��
�
���"�"��O�O�C�O�O�S�-=�-=�-C�-C�D��+�+�-�I��+�+�D�1������$�$�&������������(B�(B�CrOc��|j�}t|�||jvr|j|j�yyrj)r�rSr�rk)r;�enginer�module_names    rDr�z#PluginDialog._on_load_unload_plugins>���,�,�.��
�k���$�+�+�%��K�K��$�,�,�.�&rOc��|jj�j�|jj�j�kDSrj)rr�lower)r;�row1�row2rUs    rDr�zPluginDialog._listbox_sorts9���{�{�#�#�%�+�+�-����0D�0D�0F�0L�0L�0N�N�NrOc�v�|j�}|r+|j�s|jj|�|s+|j�r|jj	|�|j�j�}|jj|�|jt|�yrj)
rTr/r��load_plugin�
unload_plugin�
get_parentr��
select_rowr�re)r;r@r�valuer�s     rDrzPluginDialog._switch_callbacks����!�!�#����)�)�+��J�J�"�"�6�*���)�)�+��J�J�$�$�V�,����!�,�,�.���
�
� � ��%��"�"�1�c�*rOc��	|jj|jtjd�}|j�}t
�}|j|jj�|S#YyxYwrj)
r��create_extensionrr	�Configurable�create_configure_widgetrr�r�r�)r;r��ext�widgetr�s     rD�_get_preference_widgetz#PluginDialog._get_preference_widgetsl��		��*�*�-�-�c�j�j�.5�.B�.B�.2�4�C��0�0�2�F���B����R�Y�Y�\�\�*��M��	���s�A5A8�8A<c��|r�d}|j|�}|rd}|jj|�|jj	�}|r|j
jd�y|j
jd�yy)NFT)r�r�rfr�get_help_urir�)r;r�r��has_preferencer��	help_links      rDr�z"PluginDialog._listbox_row_selected*sx���"�N��0�0��5�F��!%���$�$�2�2�>�B��
�
�/�/�1�I���!�!�/�/��5��!�!�/�/��6�rOc��|jj�}|jj�}t	j
|�yrj)r��get_selected_rowrr��
webbrowser�open)r;rUr�r�s    rDr�z!PluginDialog._help_button_clicked;s2���m�m�,�,�.���J�J�+�+�-�	����	�"rOc�@�|jrOtjdtjj��}|j�j
d�nftjtjj��}|jtjtjj�|jj�}|jj�}|jj�}t!d�|j"_|j'�}tj(�}|j+tj,j.�|jj1�}|jj3�}	|jj5�}
|jj7�}d}d�}
tj8�}t;j<|�}|j?d|zdz�|jAtjBjD�d	|j"_#|jI|d
d
|�|dz
}|r>|
t!d�|z�}d	|j"_#|jI|d
d
|�|dz
}|
r2|
|
�}d	|j"_#|jI|d
d
|�|dz
}|	r2|
|	�}d	|j"_#|jI|d
d
|�|dz
}|t!d
�k(�r�tjJ�}tjLjD|j"_'tj8t!d��}tjLjP|j"_'|jS|dddd�tj8�}tjLjT|j"_'d}|j?|�|jS|dddd�tj8t!d��}tjLjP|j"_'|jS|dddd�tj8�}tjLjT|j"_'d}|j?|�|jS|dddd�|jI|d
d
|�d	|j"_#|dz
}tj(�}|jWd�d�}tjXt!d��}|r|j[d||�n|j]d
�|jI|d
dd�tjXt!d��}|r|j[d||�n|j]d
�|jItj8d�d
dd�|jItj8d�d
dd�|jI|d
dd�|jI|d
d|�|j_�tj`jcd�}d|j"_2|jgtjhjj�|jm|�|j_�|jm|�|jod
�|jq�|js�y)NT�rtrvryzAbout this pluginrc���tj|�}|jd�|jtjj
�|j
d�|S)NT�<)rr�
set_line_wrap�set_justify�
Justificationr+�set_max_width_chars)rJs rD�	get_labelz4PluginDialog._info_button_clicked.<locals>.get_label\sK���I�I�e�$�E�����%����c�/�/�6�6�7��%�%�b�)��LrOr
rrFrz	Version: zAlternative Toolbarz
Developer:z< <a href="https://github.com/fossfreedom">David Mohammed</a>z	Designer:z= <a href="https://github.com/me4oslav">Georgi Karavasilev</a>c�.�tj|�yrj)r�r�)�button�uris  rD�launch_browserz9PluginDialog._info_button_clicked.<locals>.launch_browser�s���O�O�C� rO�Helpr��Homepagerxr�r�):r�r�Dialogr�r�r�r�r�r�r�r�r�r�rr�get_versionrer r�r�r0r1r2r3�get_website�
get_copyrightr&r�rrrrr�r�r+r'r4�Gridrr!r�attachr�set_homogeneousr�r$rfrc�Framer)r_�set_shadow_type�
ShadowType�NONEr7�
set_resizable�run�destroy)r;rU�dlgr�r��versionr�r��website�	copyright�description�help�posr�rJr>�grid�link�mrBr�r��frames                       rDr�z!PluginDialog._info_button_clickedAs+������*�*�D����8M�8M�N�C���� �6�6�t�<��*�*�3�?�?�#8�#8�9�C��N�N�3�?�?�C�,<�,<�,B�,B�C��m�m�,�,�.���
�
�#�#�%���*�*�(�(�*���/�0��	�	���#�#�%����������s���7�7�8��*�*�(�(�*���J�J�,�,�.�	��j�j�0�0�2���z�z�&�&�(����	��	�	����(�(��/��
������&�0�1�
���#�+�+�2�2�3�$%����!����%���s�3��q�����a��n�w�6�7�E�()�E�K�K�%����e�U�E�3�7��1�H�C���k�*�E�()�E�K�K�%����e�U�E�3�7��1�H�C���i�(�E�()�E�K�K�%����e�U�E�3�7��1�H�C��A�+�,�,��8�8�:�D� #�	�	� 0� 0�D�J�J���I�I�a��o�.�E�!$�����E�K�K���K�K��q�!�Q��*��9�9�;�D� #�	�	���D�J�J���A��O�O�A���K�K��a��A�q�)��I�I�a��n�-�E�!$�����E�K�K���K�K��q�!�Q��*��9�9�;�D� #�	�	���D�J�J��"�A��O�O�A���K�K��a��A�q�)����d�E�5�#�6�'(�D�J�J�$��1�H�C��g�g�i�����D�!�	!����A�f�I�&����N�N�9�n�d�;�� � ��'����v�u�d�A�.����A�j�M�*����N�N�9�n�g�>�� � ��'����s�y�y��}�e�T�1�5����s�y�y��}�e�T�1�5����v�u�d�A�.����#�u�d�C�0�	�����	�	�
�
�b�!�������
���c�n�n�1�1�2�
�	�	�&��
������������%� ����	����
rOc���|jj�}|j|�}|sy|jrOt	j
dtjj��}|j�jd�nft	j
tjj��}|jtjtjj�|jj�|j _|j%�}|j'|�|j)d�|j+�|j-�y)NTr�ryF)r�r�r�r�rr�r�r�r�r�r�r�r�r�rrr r�r�r7rrr)r;rUr�r�rr�s      rDr�z(PluginDialog._preferences_button_clicked�s����m�m�,�,�.���,�,�S�1��������*�*�D����8M�8M�N�C���� �6�6�t�<��*�*�3�?�?�#8�#8�9�C��N�N�3�?�?�C�,<�,<�,B�,B�C��*�*�-�-�/��	�	���#�#�%����������%� ����	����
rO)
rlrmrnrr�r�rr�r�r�r�r�rorps@rDrrrr�s6���|D�|/�O�+��7�"#�I�VrOrr)rzr{r��alttoolbar_preferencesr�
gi.repositoryrrrrrr	�
ListBoxRowrr�rr�rOrD�<module>rsJ��&�	��.������!�c�C�N�N�c�LZ�3�:�:�ZrO

Zerion Mini Shell 1.0