~ubuntu-branches/ubuntu/quantal/rhythmbox/quantal-proposed

« back to all changes in this revision

Viewing changes to plugins/context/LyricsTab.py

  • Committer: Package Import Robot
  • Author(s): Rico Tzschichholz
  • Date: 2011-09-09 14:13:24 UTC
  • mfrom: (1.1.59 upstream)
  • Revision ID: package-import@ubuntu.com-20110909141324-72ef36aetwiidw8e
Tags: 2.90.1~20110908-0ubuntu1
* New upstream git snapshot up to commit
  31e8e0e6b3a4af101f60b5733e0cfdd736f3dd6d
* reverted commit "visualizer: add colorspace converter so it works 
  with playbin2" (d9fe72447999c2777ddc053dfa28ff363e84336d) and 
  "visualizer: new clutter-based visualizer plugin"
  (082eaf958b60e3830f1607114353d777c930d616) to prevent dependency on
  clutter-gst which is in universe

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
# along with this program; if not, write to the Free Software
25
25
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA.
26
26
 
27
 
import gobject
28
27
import urllib
29
28
import re, os
30
29
import cgi
31
30
from mako.template import Template
32
31
 
33
32
import rb
34
 
from gi.repository import Gtk
 
33
from gi.repository import GObject, Gtk
35
34
from gi.repository import RB
36
35
 
37
 
class LyricsTab (gobject.GObject):
 
36
class LyricsTab (GObject.GObject):
38
37
    
39
38
    __gsignals__ = {
40
 
        'switch-tab' : (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE,
41
 
                                (gobject.TYPE_STRING,))
 
39
        'switch-tab' : (GObject.SIGNAL_RUN_LAST, GObject.TYPE_NONE,
 
40
                                (GObject.TYPE_STRING,))
42
41
    }
43
42
 
44
43
    def __init__ (self, shell, toolbar, ds, view):
45
 
        gobject.GObject.__init__ (self)
 
44
        GObject.GObject.__init__ (self)
46
45
        self.shell      = shell
47
46
        self.sp         = shell.props.shell_player
48
47
        self.db         = shell.props.db
75
74
        self.datasource.fetch_lyrics (entry)
76
75
        self.view.loading (self.datasource.get_artist(), self.datasource.get_title())
77
76
 
78
 
class LyricsView (gobject.GObject):
 
77
class LyricsView (GObject.GObject):
79
78
 
80
79
    def __init__ (self, shell, plugin, webview, ds):
81
 
        gobject.GObject.__init__ (self)
 
80
        GObject.GObject.__init__ (self)
82
81
        self.webview = webview
83
82
        self.ds      = ds
84
83
        self.shell   = shell
131
130
                                          stylesheet = self.styles)
132
131
        self.load_view ()
133
132
 
134
 
class LyricsDataSource (gobject.GObject):
 
133
class LyricsDataSource (GObject.GObject):
135
134
    
136
135
    __gsignals__ = {
137
 
        'lyrics-ready' : (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, (RB.RhythmDBEntry, gobject.TYPE_STRING,)),
 
136
        'lyrics-ready' : (GObject.SIGNAL_RUN_LAST, GObject.TYPE_NONE, (RB.RhythmDBEntry, GObject.TYPE_STRING,)),
138
137
    }
139
138
 
140
139
    def __init__ (self, db):
141
 
        gobject.GObject.__init__ (self)
 
140
        GObject.GObject.__init__ (self)
142
141
        self.db = db
143
142
        self.db.connect ('entry-extra-metadata-notify::rb:lyrics', self.lyrics_notify)
144
143