[rhythmbox/gobject-introspection: 32/34] hack lyrics plugin until it almost works
- From: Jonathan Matthew <jmatthew src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rhythmbox/gobject-introspection: 32/34] hack lyrics plugin until it almost works
- Date: Wed, 14 Jul 2010 05:58:46 +0000 (UTC)
commit f87f11f6d984d7959e15297afcd017b47db30672
Author: Jonathan Matthew <jonathan d14n org>
Date: Wed Jul 14 14:16:03 2010 +1000
hack lyrics plugin until it almost works
can't get lists from gconf, though, so we have to hardcode the config.
plugins/lyrics/lyrics/LyricsParse.py | 8 +++++---
plugins/lyrics/lyrics/__init__.py | 8 ++++----
2 files changed, 9 insertions(+), 7 deletions(-)
---
diff --git a/plugins/lyrics/lyrics/LyricsParse.py b/plugins/lyrics/lyrics/LyricsParse.py
index bdc6dda..660148e 100644
--- a/plugins/lyrics/lyrics/LyricsParse.py
+++ b/plugins/lyrics/lyrics/LyricsParse.py
@@ -40,9 +40,11 @@ class Parser (object):
try:
gconf = GConf.Client.get_default()
- self.engines = gconf.get_list(gconf_keys['engines'], GConf.ValueType.STRING)
- if self.engines is None:
- self.engines = []
+ # self.engines = gconf.get_list(gconf_keys['engines'], GConf.ValueType.STRING)
+ #print "what: %s" % str(self.engines)
+ #if self.engines is None:
+ # self.engines = []
+ self.engines = ["leoslyrics.com", "astraweb.com"]
except gobject.GError, e:
print e
self.engines = []
diff --git a/plugins/lyrics/lyrics/__init__.py b/plugins/lyrics/lyrics/__init__.py
index c83fdd7..fa670ee 100644
--- a/plugins/lyrics/lyrics/__init__.py
+++ b/plugins/lyrics/lyrics/__init__.py
@@ -236,7 +236,7 @@ class LyricPane(object):
self.hbox.add(self.edit)
self.hbox.add(self.clear)
self.hbox.add(self.discard)
- self.hbox.set_child_secondary (self.clear, is_secondary=True)
+ self.hbox.set_child_secondary (self.clear, True)
(self.view, self.buffer, self.tview) = create_lyrics_view()
@@ -278,13 +278,13 @@ class LyricPane(object):
self.get_lyrics()
def __got_lyrics(self, text):
- self.buffer.set_text(text)
+ self.buffer.set_text(text, -1)
def get_lyrics(self):
if self.entry is None:
return
- self.buffer.set_text(_("Searching for lyrics..."));
+ self.buffer.set_text(_("Searching for lyrics..."), -1);
lyrics_grabber = LyricGrabber(self.db, self.entry)
lyrics_grabber.search_lyrics(self.__got_lyrics)
@@ -324,7 +324,7 @@ class LyricWindow (Gtk.Window):
def __got_lyrics(self, text):
- self.buffer.set_text (text)
+ self.buffer.set_text (text, -1)
def update_song_lyrics(self, entry):
db = self.shell.props.db
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]