%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_preferences.cpython-312.pyc

�

 ]e$1���ddlZddlZddlZddlZddlZddlZddlZddlmZddlm	Z	ddlm
Z
ejdd�ddlmZddlm
Z
Gd	�d
�ZGd�d�ZGd
�dej ej"�Zy)�N)�GObject)�Gio)�Gtk�PeasGtkz1.0)r)�RBc�:�eZdZdZdZGd�d�Zd�Zd�Zd�Zy)�GSettingzg
    This class manages the different settings that the plugin has to
    access to read or write.
    Nc�.�eZdZdZd�Zd�Zd�Zd�Zd�Zy)�GSetting.__impl�+ Implementation of the singleton interface c��|jd��|_|jddddddd	d
ddd
dddd��|_i|_y)��
            Initializes the singleton interface, assigning all the constants
            used to access the plugin's settings.
            z/org.gnome.rhythmbox.plugins.alternative_toolbar)�PLUGINzdisplay-typezstart-hiddenzshow-compactzcompact-posz
playing-labelzvolume-controlzinline-labelzenhanced-sidebar�	expandersz
show-tooltipszrepeat-typezshow-source-toolbarzhoriz-categorieszapp-menu-displayz
dark-theme)�DISPLAY_TYPE�START_HIDDEN�SHOW_COMPACT�COMPACT_POS�
PLAYING_LABEL�VOLUME_CONTROL�INLINE_LABEL�ENHANCED_SIDEBAR�	EXPANDERS�
SHOW_TOOLTIPS�REPEAT_TYPE�SOURCE_TOOLBAR�HORIZ_CATEGORIES�APP_MENU�
DARK_THEMEN)�_enum�Path�	PluginKey�setting��selfs �H/usr/lib/rhythmbox/plugins/alternative-toolbar/alttoolbar_preferences.py�__init__zGSetting.__impl.__init__2sj��
�
�
�H�#�J�D�I�"�Z�Z�+�+�+�)�-�/�+�!3�%�-�)�4�!3�+�'�(��D�N�$�D�L�c��	|j|}|S#tjj|�|j|<|j|}Y|SxYw)z[
            Return an instance of Gio.Settings pointing at the selected path.
            )r#r�Settings�new)r%�pathr#s   r&�get_settingzGSetting.__impl.get_settingNsS��
-��,�,�t�,��
�N��	
-�%(�\�\�%5�%5�d�%;����T�"��,�,�t�,���N�s	��=Ac�*�|j|�|S)zO
            Return the value saved on key from the settings path.
            �r-)r%r,�keys   r&�	get_valuezGSetting.__impl.get_valueZs���#�#�D�)�#�.�.r(c�,�||j|�|<y)zK
            Set the passed value to key in the settings path.
            Nr/)r%r,r0�values    r&�	set_valuezGSetting.__impl.set_value`s��+0�D���T�"�3�'r(c��tdd|�S�z*
            Create an enumn.
            �Enum���type�r%�enumss  r&r zGSetting.__impl._enumf������E�*�*r(N)	�__name__�
__module__�__qualname__�__doc__r'r-r1r4r r8r(r&�__implr.s��9�	�8
	�	/�	0�	+r(rBc��tj�tj�t_tj|jd<y)� Create singleton instance N�_GSetting__instance)r	rE�_GSetting__impl�__dict__r$s r&r'zGSetting.__init__ls6�����&�"*�/�/�"3�H��08�/B�/B��
�
�+�,r(c�.�t|j|�S�z# Delegate access to implementation )�getattrrE�r%�attrs  r&�__getattr__zGSetting.__getattr__v����t����-�-r(c�0�t|j||�SrI)�setattrrE�r%rLr3s   r&�__setattr__zGSetting.__setattr__z����t����e�4�4r()	r>r?r@rArErFr'rMrRr8r(r&r	r	&s)���
�J�<+�<+�|C�.�5r(r	c�:�eZdZdZdZGd�d�Zd�Zd�Zd�Zy)�CoverLocalez'
    This class manages the locale
    Nc�.�eZdZdZd�Zd�Zd�Zd�Zd�Zy)�CoverLocale.__implrc�4�|jdd��|_y)r�	rhythmboxzalternative-toolbar)r�
LOCALE_DOMAINN)r �Localer$s r&r'zCoverLocale.__impl.__init__�s��
�*�*��3�%�5�D�Kr(c�j�tjtjd�tj|t	j
��tj|�tj|t	j
��tj|�tj|�y)z+
            Change the locale
            �N)	�locale�	setlocale�LC_ALL�bindtextdomainr�
locale_dir�
textdomain�gettext�install)r%�locale_types  r&�
switch_localez CoverLocale.__impl.switch_locale�sl��
���V�]�]�B�/��!�!�+�r�}�}��?����k�*��"�"�;��
�
��@����{�+��O�O�K�(r(c�0�tj�dS)zx
            return the string representation of the users locale
            for example
            en_US
            r)r^�getdefaultlocaler$s r&�
get_localezCoverLocale.__impl.get_locale�s���*�*�,�Q�/�/r(c��tdd|�Sr6r9r;s  r&r zCoverLocale.__impl._enum�r=r(c�,�tj|�S)zE
            return the translated version of the string
            )rd)r%r3s  r&�get_translationz"CoverLocale.__impl.get_translation�s���?�?�5�)�)r(N)	r>r?r@rAr'rgrjr rmr8r(r&rBrW�s��9�	5�		)�	0�	+�	*r(rBc��tj�tj�t_tj|jd<y)rDN�_CoverLocale__instance)rUro�_CoverLocale__implrGr$s r&r'zCoverLocale.__init__�s8���!�!�)�%0�%7�%7�%9�K�"�3>�2H�2H��
�
�.�/r(c�.�t|j|�SrI)rJrorKs  r&rMzCoverLocale.__getattr__�rNr(c�0�t|j||�SrI)rProrQs   r&rRzCoverLocale.__setattr__�rSr()	r>r?r@rArorpr'rMrRr8r(r&rUrUs)����J�**�**�XI�.�5r(rUc�r�eZdZdZdZejej��Zd�Z	d�Z
d�Zd�Zd�Z
d	�Zy
)�Preferencesz�
    Preferences for the Plugins. It holds the settings for
    the plugin and also is the responsible of creating the preferences dialog.
    �AlternativeToolbarPreferencesr9c���tjj|�t�|_|jj|jjj�|_y)zh
        Initialises the preferences, getting an instance of the settings saved
        by Gio.
        N)	r�Objectr'r	�gsr-r!r�plugin_settingsr$s r&r'zPreferences.__init__�sD��
	������%��*���#�w�w�2�2�4�7�7�<�<�3F�3F�G��r(c��
�td�d|_t�}|j|jj
�t
j�}|j|jj
�|jtj|d��|j|�|jd�}|j|j|j j"j$�|j'd|j(�|jd�|_|jj-|j j"j.|j*dt0j2j4�|j*j'd|j6�|jd�|_|jj-|j j"j:|j8dt0j2j4�|jd	�|_|jj-|j j"j>|j<dt0j2j4�|jd
�|_ |jj-|j j"jB|j@dt0j2j4�|jd�}|jj-|j j"jD|dt0j2j4�|jd�|_#|jj-|j j"jH|jFdt0j2j4�|jd
�|_%|jj-|j j"jL|jJdt0j2j4�|jd�|_'|jj-|j j"jP|jNdt0j2j4�|jd�}|j'd|jR�tjTjW�}|j|j j"jX}|dk(rP|jZj\r|jZj^r|jd�n:|jd�n(|dk(r|jd�n|jd�|ja�r|j*jd�|j7|j*�|jd�}|jcted�d�}	|	j'd|jf�|jd�|_4|jj-|j j"jj|jhdt0j2j4�d|_|jd�S)z9
        Creates the plugin's preferences dialog
        zDEBUG - create_display_contentsTzui/altpreferences.ui�start_hidden_checkbox�toggled�show_compact_checkbox�active�compact_pos_combobox�playing_label_checkbox�inline_label_checkbox�volume_control_checkbox�enhanced_sidebar_checkbox�tooltips_checkbox�dark_theme_checkbox�
modern_switch�notifyrF��infobar�Restart�clicked�category_combobox�preferences_box)6�print�
_first_runrUrgr[rZr�Builder�set_translation_domain�
add_from_file�rb�find_plugin_file�connect_signals�
get_object�
set_activeryrxr"r�connect�_start_hidden_checkbox_toggled�
_show_compact�bindrr�SettingsBindFlags�DEFAULT�_show_compact_checkbox_toggled�_compact_posr�_playing_labelr�
_inline_labelrr�_enhanced_sidebarr�_show_tooltipsr�_dark_themer�_modern_switch_stater*�get_defaultr�props�gtk_shell_shows_app_menu�gtk_shell_shows_menubar�
get_active�
add_button�_�_restart_button_clicked�
_category_posr)
r%�cl�builder�start_hidden�volume_controlr��default�display_typer��buttons
          r&�do_create_configure_widgetz&Preferences.do_create_configure_widget�sO��	�/�0����
�]��
������0�0�1��+�+�-���&�&�r�y�y�'>�'>�?����b�1�1�$�2H�J�	K�����%��)�)�*A�B������$�$�T�W�W�%6�%6�%C�%C�D�D�	F����Y��(K�(K�L�$�/�/�0G�H������!�!�$�'�'�"3�"3�"@�"@�"&�"4�"4�h�"%�"7�"7�"?�"?�	A�	
���"�"�9�#'�#F�#F�	H�$�.�.�/E�F������!�!�$�'�'�"3�"3�"?�"?�"&�"3�"3�X�"%�"7�"7�"?�"?�	A�&�0�0�1I�J������!�!�$�'�'�"3�"3�"A�"A�"&�"5�"5�x�"%�"7�"7�"?�"?�	A�%�/�/�0G�H������!�!�$�'�'�"3�"3�"@�"@�"&�"4�"4�h�"%�"7�"7�"?�"?�	A�!�+�+�,E�F�����!�!�$�'�'�"3�"3�"B�"B�"0�(�"%�"7�"7�"?�"?�	A�")�!3�!3�'�")������!�!�$�'�'�"3�"3�"D�"D�"&�"8�"8�(�"%�"7�"7�"?�"?�	A�&�0�0�1D�E������!�!�$�'�'�"3�"3�"A�"A�"&�"5�"5�x�"%�"7�"7�"?�"?�	A�

���4�5�	
�����!�!�$�'�'�"3�"3�">�">�"&�"2�"2�H�"%�"7�"7�"?�"?�	A� �*�*�?�;�
����h��(A�(A�B��,�,�*�*�,���+�+�D�G�G�,=�,=�,J�,J�K���1���M�M�:�:��M�M�9�9��(�(��/��(�(��.�
�Q�
��$�$�T�*��$�$�U�+��#�#�%����)�)�$�/��+�+�D�,>�,>�?��$�$�Y�/���#�#�A�i�L�!�4�����y�$�">�">�?�$�/�/�0C�D������!�!�$�'�'�"3�"3�"D�"D�"&�"4�"4�h�"%�"7�"7�"?�"?�	A� ����!�!�"3�4�4r(c�x�tjd�}tj||gtj
���y)NrY)�shutil�which�os�execl�sys�argv)r%�args�exepaths   r&r�z#Preferences._restart_button_clicked@s'���,�,�{�+��
����'�-�C�H�H�-r(c�|�|j�|j|jjj<y�N)r�ryrxr"r)r%�
toggle_buttons  r&r�z*Preferences._start_hidden_checkbox_toggledDs1���(�(�*�*�	
���T�W�W�.�.�;�;�<r(c���|j�}|jj|�|jj|�|jj|�yr�)r�r��
set_sensitiver�r�)r%r��enableds   r&r�z*Preferences._show_compact_checkbox_toggledHsL���*�*�,�����)�)�'�2����(�(��1����)�)�'�2r(c��|j�}|jj|�|jj|�|rI|jj	d�d|j
|jjj<yd|j
|jjj<y)NTr��)	r�r�r�r�r�ryrxr"r)r%�switch�param�states    r&r�z Preferences._modern_switch_stateOs����!�!�#�����(�(�U��3����'�'�E�	�2�����)�)�$�/�CD�D� � ����!2�!2�!?�!?�@�CD�D� � ����!2�!2�!?�!?�@r(N)r>r?r@rA�__gtype_name__r�propertyrw�objectr'r�r�r�r�r�r8r(r&rtrt�sF���5�N�
�W�
�
�7�>�>�
2�F�H�h5�T.�+�3�	Er(rt)rdr^r�r�r��gir��
gi.repositoryrrr�require_versionrrr	rUrw�Configurablertr8r(r&�<module>r�ss��*�
�	�
�
�	�	�!�������9�e�$�!��V5�V5�rC5�C5�LSE�'�.�.�'�"6�"6�SEr(

Zerion Mini Shell 1.0