-
Notifications
You must be signed in to change notification settings - Fork 0
/
lyrics-downloader.py
38 lines (25 loc) · 968 Bytes
/
lyrics-downloader.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# _*_ coding: utf-8 _*_
from gi.repository import GObject, Peas, GdkPixbuf, Gtk, Notify # pylint: disable-msg=E0611
from view.sidebar import LyricsSidebar
class LyricsPlugin (GObject.Object, Peas.Activatable):
__gtype_name__ = 'LyricsPlugin'
object = GObject.property (type = GObject.Object)
def __init__ (self):
GObject.Object.__init__ (self)
self._totem = None # Reference to the player
self._sidebar = None
# totem.Plugin methods
def do_activate (self):
"""
Called when the plugin is activated.
Here the sidebar page is initialized (set up the treeview, connect
the callbacks, ...) and added to totem.
"""
self._totem = self.object
self._sidebar = LyricsSidebar (self._totem)
def do_deactivate (self):
"""
Include the Plugin destroying Actions
"""
self._sidebar.destroy ()
self._totem = None