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_repeat.cpython-310.pyc
o

1�b`?�@s�ddlmZddlmZddlmZddlmZddlmZddlmZddlmZGdd	�d	ej	�Z
Gd
d�dej�ZGdd
�d
ej
�ZdS)�)�CoverLocale)�GSetting)�GLib)�GObject)�Gdk)�Gio)�Gtkc@sReZdZdZdZdZdd�Zdd�Zdd	�Zd
d�Z	ddd
�Z
dd�Zdd�ZdS)�Repeatzn
    Object handling song repeating, with an additional feature of
    repeating one song, one song only.
    r�c	Cs�tj�|�d|_||_|j|_|jj}|jj	�
d|j�|�
d|j�z'zt
j�|�}Wn
ty:t|�}Ynw|�d�Wt||�}|�|�nt||�}|�|�w|�
d|j||�|�
d|j�|�||���dS)zy
        :param shell: the plugin object
        :param toggle_button: button that controls the repeat functions
        F�eoszplaying-song-changed�toggled�repeat-type-changedN)r�Object�__init__�repeat_song�
toggle_button�SONG_CHANGED_MANUAL�song_changed�props�shell_player�player�connect�on_gst_player_eos�on_song_changer�Popover�new�AttributeError�
CustomPopover�	set_modal�RepeatPopContainer�add�
_on_toggle�_on_repeat_type_changed�get_repeat_type)�self�shellrr�popover�repeat�r(�C/usr/lib/rhythmbox/plugins/alternative-toolbar/alttoolbar_repeat.pyr&s*�
�

�zRepeat.__init__cCsJ|��r|��|��tjk|_n|��d|_|�|�td|j�dS)NFz	on toggle)	�
get_active�show_allr#r�ONE_SONGr�hide�_set_toggle_tooltip�print)r$�toggler&r'r(r(r)r!Ms�
zRepeat._on_togglecCsbt�}|�|jj�|j��r%|��tjkrt	d�}nt	d�}|j�
|�t�}|�|jj�dS)N�Repeat all tracks�Repeat the current track)r�
switch_locale�Locale�
LOCALE_DOMAINr�get_has_tooltipr#r�	ALL_SONGS�_�set_tooltip_text�RB)r$r'�cl�messager(r(r)r.Zs

zRepeat._set_toggle_tooltipcCsD|j��r|tjkrd|_nd|_nd|_|�|�td|j�dS)NTFzrepeat type changed)rr*rr,rr.r/)r$r'�repeat_typer(r(r)r"gs


zRepeat._on_repeat_type_changedcCs|jr	|j|_dSdS)zs
        Set song_changed to SONG_CHANGED_EOS so that on_song_change will
        know to repeat the song.
        N)r�SONG_CHANGED_EOSr)r$�
gst_player�stream_data�earlyr(r(r)rts�zRepeat.on_gst_player_eoscCs$|j|jkr|j|_|��dSdS)zd
        Repeat song that has just been played
        (when called on song change signal).
        N)rr>r�do_previous)r$r�timer(r(r)r|s�zRepeat.on_song_changecCs<|jr|��}|dkr||dkr|�d�dSdSdSdS)zs
        This is a old method to 'repeat' the current song as soon as
        it reaches the last seconds.
        r�N)r�get_playing_song_duration�set_playing_time)r$rrC�durationr(r(r)�on_elapsed_change�s�zRepeat.on_elapsed_changeN)r)
�__name__�
__module__�__qualname__�__doc__rr>rr!r.r"rrrHr(r(r(r)r	s'


r	csNeZdZdejdeffiZdZdZ�fdd�Z	dd�Z
d	d
�Zdd�Z�Z
S)
rr
Nr
rDcs�tt|�j|i|��|�tjj�|�tjj	�d|j
_|��}|�
d�d}tj�d�}|�d�d}tj�|�}	t��}
|
�|	|�d|
j
_|�|
�|�d|j�|�d|j�|�d|j�t�}|�|jj�|��rx|�t d	��||_!|�"|�|�#|d
d�|�$�t��|_%|j%�|	|�d|j%j
_tj�&|�}|�d�d}
tj�|
�}t��}|�||�d|j
_|�|�|��r�|�t d
��t��|_'|j'�||�d|j'j
_|�d|j�|�d|j�|�d|j�|�$�||_(|�"|�|�#|d
d�d|_)|�d|j�|�d|j�|�d|j�|�d|j�|�|j%�||_*||_+t,�|_-|j-�.|j-j/j0�|_1|j1|j-j2j3}|tj4k�rU|j(�5d�dSdS)N��linked�Fzmedia-playlist-repeat-symboliczleave-notify-eventzenter-notify-eventrr1znon-homogeneousTz#media-playlist-repeat-song-symbolicr2r)6�superrr�set_orientationr�Orientation�
HORIZONTAL�
set_layout�ButtonBoxStyle�STARTr�margin�get_style_context�	add_class�RadioButtonr�set_moder�
ThemedIcon�new_with_default_fallbacks�Image�set_from_gicon�	set_imager�_on_popover_mouse_over�_on_popover_button_toggledrr3r4r5r6r9r8�_repeat_buttonr �child_set_propertyr+�
_repeat_image�new_from_widget�_repeat_song_image�_repeat_song_button�_popover_inprogress�_parent_container�_parent_buttonr�gs�get_setting�Path�PLUGIN�plugin_settings�	PluginKey�REPEAT_TYPEr,�
set_active)r$�parent_container�
parent_button�args�kwargs�context�	icon_size�toggle1�fallback�icon�imager;�toggle2�sym�icon2�image2r=��	__class__r(r)r�s�










�����zRepeatPopContainer.__init__cGs�td�|��r?||jkr&|j�|j�|�dtj�tj|j	|j
jj<dS|j�|j
�|�dtj�tj|j	|j
jj<dSdS)Nzpopover toggler
)r/r*rcrkr`re�emitrr7rprlrqrrrgr,)r$�buttonrvr(r(r)rb�s
���z-RepeatPopContainer._on_popover_button_toggledcCstj}|j��rtj}|S�N)rr7rhr*r,)r$r=r(r(r)r#s
z"RepeatPopContainer.get_repeat_typecs�|jtjjkr8�jdkrd�_td�nd�_td�d�_t|�tjur7td�|�	�r7t�j
��j
��ntd�d�_�fd	d
�}�jdkrYtd�d�_t�
d|�dSdS)
Nrr
�enter1rD�enter2�here�exit�csF�jdkr!�jd7_�jdkrdS�j��d�_td�dSdS)Nr�r
rMTrzexit timeoutF)ri�_popover_inprogress_countrjr-r/)rv�r$r(r)�delayed%s


z:RepeatPopContainer._on_popover_mouse_over.<locals>.delayedzadding timeout�d)�typer�	EventType�ENTER_NOTIFYrir/r�r�ToggleButtonr*rjr+r�timeout_add)r$�widget�
eventcrossingr�r(r�r)ras*



�
�z)RepeatPopContainer._on_popover_mouse_over)rIrJrKr�SIGNAL_RUN_LAST�int�__gsignals__r,r7rrbr#ra�
__classcell__r(r(r�r)r�s�Xrcs@eZdZ�fdd�Z�fdd�Zdd�Zdd�Zd	d
�Z�ZS)rcsntt|�j|dtjji|��|�d�|�d�|�t	j
j�|��||_
|�d|j�|�d|j�dS)Nr�F�showzconfigure-event)rPrrr�
WindowType�POPUP�
set_decorated�
set_resizable�
set_type_hintr�WindowTypeHint�DOCK�stickrk�
connect_after�_on_showr�on_window_config)r$rurvrwr�r(r)r:s�

zCustomPopover.__init__cs6t��|_|j�|�tt|��|j�|j��dSr�)r�Frame�_framer rPrr+)r$r�r�r(r)r Gs
zCustomPopover.addcCs`|j��}|j��}|����\}}}||j}||j|j}|�||�\}	}
|�	|	|
�dSr�)
rk�get_allocation�get_toplevel�
get_window�
get_origin�x�y�height�apply_screen_coord_correction�move)r$r��rect�main_window�val�win_x�win_y�cal_x�cal_yr�r�r(r(r)r�gs


zCustomPopover._on_showcCs�|}|}|��}tj��}tj��}|||j}|||j}	|dkr,||7}td�|dkr2d}|j��}
|j����\}}||
j	|
jd}
|	dksR|
dkrc|j��j}||j|}td�|dkrid}||gS)Nrzat xrDzat y)
r�r�Screen�widthr�r/rkr��get_sizer�)r$r�r��corrected_y�corrected_xr��screen_w�screen_h�delta_x�delta_y�button_rect�window_width�
window_height�calc�btn_hgtr(r(r)r�ys.


�z+CustomPopover.apply_screen_coord_correctioncCst|��r8|j��}|j��}|����\}}}||j}||j|j}	|�	�|�
||	�\}
}|�|
|�dSdSr�)�
get_mappedrkr�r�r�r�r�r�r�r+r�r�)r$r��eventr�r�r�r�r�r�r�r�r�r(r(r)r��s


�zCustomPopover.on_window_config)	rIrJrKrr r�r�r�r�r(r(r�r)r9s
 rN)�alttoolbar_preferencesrr�
gi.repositoryrrrrrrr	�	ButtonBoxr�Windowrr(r(r(r)�<module>s

Youez - 2016 - github.com/yon3zu
LinuXploit