403Webshell
Server IP : 209.205.66.10  /  Your IP : 216.73.216.173
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux ammon 5.15.0-186-generic #196-Ubuntu SMP Sat Jun 20 16:09:34 UTC 2026 x86_64
User :  ( 1006)
PHP Version : 8.5.8
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/rhythmbox/plugins/alternative-toolbar/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/rhythmbox/plugins/alternative-toolbar/__pycache__/alttoolbar_controller.cpython-310.pyc
o

1�bFP�@s6ddlmZddlmZddlmZddlmZGdd�de�ZGdd�dej�Z	Gd	d
�d
e	�Z
Gdd�de
�ZGd
d�de
�ZGdd�de
�Z
Gdd�de
�ZGdd�de
�ZGdd�de
�ZGdd�de
�ZGdd�de
�ZGdd�de
�ZGdd�de
�ZGdd �d e
�ZGd!d"�d"e
�ZGd#d$�d$e
�Zd%S)&�)�CoverLocale)�GObject)�Gio)�Gtkc@seZdZdZdZdZdZdS)�AltControllerCategoryr���N)�__name__�
__module__�__qualname__�OTHER�LOCAL�ONLINE�PLAYLIST�rr�G/usr/lib/rhythmbox/plugins/alternative-toolbar/alttoolbar_controller.pyrs
rcsxeZdZdZ�fdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Z�ZS)�AltControllerBasez
    base controller
    cs(||_|jj|_d|_tt|���dS��)
        Initialises the object.
        N)�header�find�_pixbuf�superr�__init__��selfr��	__class__rrr%s
zAltControllerBase.__init__cC�tjS)z<
           return the category type for the source
        )rr
�rrrr�get_category0szAltControllerBase.get_categorycC�dS)zm
            return the toolbar visibility
              by default None which means user controlled
        Nrr rrr�toolbar_visibility7�z$AltControllerBase.toolbar_visibilitycCs|jjr|jjSdS)zR
          return the source icon
        :param source:
        :return:
        N)�props�icon�r�sourcerrr�	get_gicon?szAltControllerBase.get_giconcCr")zT
          returns bool if the given source is applicable to the controller
        Frr'rrr�valid_sourceK�zAltControllerBase.valid_sourcecCr")�=
           update the button controls on the header
        Nrr'rrr�update_controlsRr+z!AltControllerBase.update_controlscCs|��D]}|�|�qdS)zI
          remove any controls that are contained in a container
        N)�get_children�remove)r�	container�childrrr�remove_controlsYs�z!AltControllerBase.remove_controlscCr")z8
          hide controls for a given controller
        Nrr'rrr�
hide_controls`r+zAltControllerBase.hide_controlscCr")z�
          find the GtkEntry field corresponding to the search entry
          returns 1. the GtkWidget containing the GtkEntry
                  2. the GtkEntry
          returns None if nothing found
        Nr)r�toolbar_containerrrr�get_search_entrygsz"AltControllerBase.get_search_entrycCr")zw
          return GtkWidget corresponding to the toolbar within the source
                 None if no toolbar
        Nrr'rrr�get_toolbarqr$zAltControllerBase.get_toolbarcCr")zI
          move from toolbar the widget and add to the searchbar
        Nr)r�toolbar�widget�	searchbarrrr�moveto_searchbaryr+z"AltControllerBase.moveto_searchbarcCs|j��dS)zE
          set the centre library song-category button label
        N)r�set_library_labelsr rrrr;��z$AltControllerBase.set_library_labels)r
rr�__doc__rr!r#r)r*r-r2r3r5r6r:r;�
__classcell__rrrrr s
rcsTeZdZdZdZ�fdd�Zdd�Zdd�Zdd	�Zd
d�Z	dd
�Z
dd�Z�ZS)�AltGenericControllerz5
    generic controller for the headerbar (only)
    cs tt|��|�i|_i|_dSr)rr?r�centre_controls�end_controlsrrrrr�s
zAltGenericController.__init__cCr�N�rrr rrrr!��z!AltGenericController.get_categorycCs,|j�|td��\}}|r|�d�dSdS)NzView AllF)r�has_button_with_label�_�set_visible)rr(�val�view_buttonrrrr3�s��z"AltGenericController.hide_controlscCs"|�|dd�}t|�t|�|S)N�RBSourceToolbar�by_name)r�print)rr(r7rrrr6�sz AltGenericController.get_toolbarcCsP|dur
td�dS|�|dd�}|std�dS|�|dd�}t|�||fS)Nzno container to search)NN�
RBSearchEntryrKzno RBSearchEntry found�GtkEntry)rLr)rr0�search�entryrrrr5�sz%AltGenericController.get_search_entrycCs"|�|�|�d�|�|�dS)NF)r/rG�add)rr7rOr9rrrr:�s

z%AltGenericController.moveto_searchbarcCs�|j�|�\}}|std�|j�d�ntd�|�d�|j�d�d|j_|�|�}|s<td�|�|jj�dS|�	|�||j
v�rtd�i}|�|jj�t|�|�|�\}}|scdS|jjrn|jj�d�t
j��|j_|��}t|�|d}	t
��}
|
�t
jj�|
�|jjddd�|
��t
j�||	�|
�|	ddd	�|�|
�|jj|	||
d
�|�|||jj�|�dd�|jj�|�|jj�d�t
j��}d
}t
j� |t
j!j"�}
|�|
�|jj�|�|jj�#|d�|��|�$d|jj%�|jj|d<||d<||j_||j
|<t|�dStd�t|j
|�|j
|d}|jj�r;|jj�d�||j_|�|jj�|j
|d}||j_|jj��|jj�|�&��|jj�|�|jj�#|d�|jj��dS)r,zno browser viewFzbrowser view foundTNz:no toolbar so nothing left to do - cleanup endbox and exitzfirst time aroundrr�r1�
old_parent�
new_parenti,���z"preferences-system-search-symbolic�toggledr9�
search_buttonzsecond time around)'r�is_browser_viewrL�set_library_box_sensitiverG�current_search_buttonr6r2�end_boxr3rAr5r9r�	SearchBar�newr.�Box�set_orientation�Orientation�VERTICAL�
pack_start�show_all�	Containerr/rQ�register_moved_controlr:�set_size_request�
connect_entry�ToggleButton�Image�new_from_icon_name�IconSize�
SMALL_TOOLBAR�
reorder_child�connect�search_button_toggled�
get_active)rr(rH�browser_buttonr7�controlsrOrP�children�first�boxrW�sym�imagerrrr-�s�



�
�


z$AltGenericController.update_controls)
r
rrr=�!_AltGenericController__gtype_namerr!r3r6r5r:r-r>rrrrr?�s	r?cs,eZdZdZdZ�fdd�Zdd�Z�ZS)�AltMusicLibraryControllerz"
    music library controller
    cstt|��|�dSr)rryrrrrrr3sz"AltMusicLibraryController.__init__cC�dt|�jvS)�
          override
        �
LibrarySource��typer
r'rrrr*9r<z&AltMusicLibraryController.valid_source)r
rrr=�&_AltMusicLibraryController__gtype_namerr*r>rrrrry-s
rycsDeZdZdZdZ�fdd�Zdd�Zdd�Zdd	�Zd
d�Z	�Z
S)�AltSoundCloudControllerz 
    sound-cloud controller
    c�tt|��|�d|_dSr)rr�r�_has_toolbarrrrrrG�
z AltSoundCloudController.__init__cCrz)r{�
SoundCloudr}r'rrrr*Or<z$AltSoundCloudController.valid_sourcecCrrB�rrr rrrr!VrDz$AltSoundCloudController.get_categorycCs$|jr|jS|�|dd�}||_|S)N�box1�by_id�r�r�rr(�
search_boxrrrr6Ys
z#AltSoundCloudController.get_toolbarcCs2|��}|�|�|�|�|jj|||d�dS�zv
          override - here we want to actually remove the toolbar from the
          source so get the parent
        rRN)�
get_parentr/rQrre�rr7r8r9�parent_gridrrrr:bs


�z(AltSoundCloudController.moveto_searchbar)r
rrr=�$_AltSoundCloudController__gtype_namerr*r!r6r:r>rrrrr�As	r�c�LeZdZdZdZ�fdd�Zdd�Zdd�Zdd	�Zd
d�Z	dd
�Z
�ZS)�AltCoverArtBrowserControllerz$
    CoverArtBrowser controller
    cr�r)rr�rr�rrrrrwr�z%AltCoverArtBrowserController.__init__cCrz)r{�CoverArtBrowserr}r'rrrr*r<z)AltCoverArtBrowserController.valid_sourcecCrrBrCr rrrr!�rDz)AltCoverArtBrowserController.get_categorycCs |js
|�|dd�}||_|jS)Nr7r�r�r�rrrr6�sz(AltCoverArtBrowserController.get_toolbarcCs:|��}|�|�|�|�|��|jj|||d�dSr�)r�r/rQrcrrer�rrrr:�s


�z-AltCoverArtBrowserController.moveto_searchbarcCs$|�|dd�}|�|dd�}||fS)zF
          override - use the GtkEntry in the coverartbrowser
        �entry_search_alignmentr�rNrK)r)rr7�entrysearchrPrrrr5�sz-AltCoverArtBrowserController.get_search_entry)r
rrr=�)_AltCoverArtBrowserController__gtype_namerr*r!r6r:r5r>rrrrr�qsr�c�<eZdZdZdZ�fdd�Zdd�Zdd�Zdd	�Z�Z	S)
�AltCoverArtPlaySourceControllerz'
    CoverArtPlaySource controller
    cr�r)rr�rr�rrrrr�r�z(AltCoverArtPlaySourceController.__init__cCrz)r{�CoverArtPlaySourcer}r'rrrr*�r<z,AltCoverArtPlaySourceController.valid_sourcecCrrBrCr rrrr!�rDz,AltCoverArtPlaySourceController.get_categorycCs(|js|�|dd�|_td|j�|jS)N�RBButtonBarrKz############)r�rrLr'rrrr6�sz+AltCoverArtPlaySourceController.get_toolbar)
r
rrr=�,_AltCoverArtPlaySourceController__gtype_namerr*r!r6r>rrrrr��sr�c�4eZdZdZdZ�fdd�Zdd�Zdd�Z�ZS)�AltQueueControllerz#
    RB QueueSource controller
    c�"tt|��|�tjdd�|_dS)rzaudio-x-queue-symbolic��nameN)rr�rr�
ThemedIcon�_giconrrrrr��zAltQueueController.__init__cCrz)N�RBPlayQueueSourcer}r'rrrr*��zAltQueueController.valid_sourcecC�|jSrB�r�r'rrrr)�rDzAltQueueController.get_gicon)	r
rrr=�_AltQueueController__gtype_namerr*r)r>rrrrr��sr�cr�)
�AltErrorsControllerz$
    RB ErrorsSource controller
    cs,tt|��|�tjdd�|_ddg|_dS)rzdialog-error-symbolicr��RBImportErrorsSource�RBMissingFilesSourceN)rr�rrr�r��
_source_typesrrrrr�s

�zAltErrorsController.__init__cCs2tt|�j�|jD]}|t|�jvrdSq
dS�NT�rLr~r
r��rr(�source_typerrrr*�s
��z AltErrorsController.valid_sourcecCrrBrCr rrrr!�rDz AltErrorsController.get_categorycCr�rBr�r'rrrr)�rDzAltErrorsController.get_gicon)
r
rrr=� _AltErrorsController__gtype_namerr*r!r)r>rrrrr��sr�cr�)�AltRadioControllerz#
    RB RadioSource controller
    cr�)rzaudio-radio-symbolicr�N)rr�rrr�r�rrrrrr�zAltRadioController.__init__cCrz)N�RBIRadioSourcer}r'rrrr*r�zAltRadioController.valid_sourcecCr�rBr�r'rrrr)rDzAltRadioController.get_giconcCrrBr�r rrrr!rDzAltRadioController.get_categorycCs|jjtd�d�dS)N�Stations��
song_label)rr;rFr rrrr;sz%AltRadioController.set_library_labelscCr"r�rr rrrr#�z%AltRadioController.toolbar_visibility)r
rrr=�_AltRadioController__gtype_namerr*r)r!r;r#r>rrrrr��sr�cr�)
�AltLastFMControllerz$
    RB LastFMSource controller
    cs0tt|��|�tjdd�|_tjdd�|_dS)rzlibrefm-symbolicr�zlastfm-symbolicN)rr�rrr��_libre_gicon�
_lastfm_giconrrrrr!szAltLastFMController.__init__cCrz)N�RBAudioscrobblerProfilePager}r'rrrr**r�z AltLastFMController.valid_sourcecCs0t�}|�|jj�|jjtd�kr|jS|jS)NzLibre.fm)	r�
switch_locale�Locale�RBr%r�rFr�r��rr(�clrrrr)-s
zAltLastFMController.get_giconcCrrBr�r rrrr!7rDz AltLastFMController.get_category)
r
rrr=� _AltLastFMController__gtype_namerr*r)r!r>rrrrr�s	
r�cr�)
�AltPlaylistControllerz
    playlist controller
    csZtt|��|�tjdd�|_tjdd�|_tjdd�|_tjdd�|_tjdd�|_	dS)rzaudio-x-playlist-symbolicr�z#audio-x-playlist-automatic-symboliczstarred-symbolicz(audio-x-playlist-recently-added-symbolicz)audio-x-playlist-recently-played-symbolicN)
rr�rrr��
_static_gicon�_auto_gicon�_toprated_gicon�_recentlyadded_gicon�_recentlyplayed_giconrrrrrAs
�
�
�
�zAltPlaylistController.__init__cCrz)r{�PlaylistSourcer}r'rrrr*R�z"AltPlaylistController.valid_sourcecCs�t�}|�|jj�t|jj�|jjtd�ks|jjdkr!|jS|jjtd�ks/|jjdkr2|j	S|jjtd�ks@|jjdkrC|j
Sdt|�jvrM|j
S|jS)NzMy Top RatedzRecently AddedzRecently Played�StaticPlaylistSource)rr�r�r�rLr%r�rFr�r�r�r~r
r�r�r�rrrr)XszAltPlaylistController.get_giconcCrrB)rrr rrrr!nrDz"AltPlaylistController.get_category)
r
rrr=�"_AltPlaylistController__gtype_namerr*r)r!r>rrrrr�;sr�c@s4eZdZdZdZdd�Zdd�Zdd�Zdd	�Zd
S)�AltPodcastControllerz
    podcast controller
    cCrz)r{�RBPodcastMainSourcer}r'rrrr*xr�z!AltPodcastController.valid_sourcecCrrBrCr rrrr!~rDz!AltPodcastController.get_categorycCs*t�}|�|jj�|jjtd�d�dS)N�Podcastsr�)rr�r��
LOCALE_DOMAINrr;rF)rr�rrrr;�sz'AltPodcastController.set_library_labelscCr"r�rr rrrr#�r�z'AltPodcastController.toolbar_visibilityN)	r
rrr=�!_AltPodcastController__gtype_namer*r!r;r#rrrrr�rsr�cr�)�AltStandardOnlineController�I
      standard controller where we dont need specific customisation
    cstt|��|�gd�|_dS)r)�MagnatuneSource�
RBGriloSource�RadioBrowserSourceN)rr�rr�rrrrr�sz$AltStandardOnlineController.__init__cC�2tt|�j�|jD]}|t|�jvrdSq
dS�NTFr�r�rrrr*��
�z(AltStandardOnlineController.valid_sourcecCrrBr�r rrrr!�rDz(AltStandardOnlineController.get_category)	r
rrr=�(_AltStandardOnlineController__gtype_namerr*r!r>rrrrr��s
	r�cr�)�AltStandardLocalControllerr�cstt|��|�dg|_dS)r�RBMtpSourceN)rr�rr�rrrrr�sz#AltStandardLocalController.__init__cCr�r�r�r�rrrr*�r�z'AltStandardLocalController.valid_sourcecCrrBrCr rrrr!�rDz'AltStandardLocalController.get_category)	r
rrr=�'_AltStandardLocalController__gtype_namerr*r!r>rrrrr��s	r�c@s$eZdZdZdZdd�Zdd�ZdS)�AltAndroidControllerz
    android controller
    cCrz)r{�RBAndroidSourcer}r'rrrr*�r�z!AltAndroidController.valid_sourcecCrrBrCr rrrr!�rDz!AltAndroidController.get_categoryN)r
rrr=�!_AltAndroidController__gtype_namer*r!rrrrr��s
r�N)�alttoolbar_preferencesr�
gi.repositoryrrr�objectr�Objectrr?ryr�r�r�r�r�r�r�r�r�r�r�r�rrrr�<module>s*h&09  7

Youez - 2016 - github.com/yon3zu
LinuXploit