[totem] Remove workaround for bgo#622987
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem] Remove workaround for bgo#622987
- Date: Sat, 23 Oct 2010 13:37:33 +0000 (UTC)
commit db514ed6f5d61929a0b240f7cca7eddc9139f373
Author: Philip Withnall <philip tecnocode co uk>
Date: Sat Oct 23 13:53:32 2010 +0100
Remove workaround for bgo#622987
Since bgo#622987 now has a fix, the workaround for it in the Jamendo plugin
is no longer necessary.
src/plugins/jamendo/jamendo.py | 20 ++++----------------
src/plugins/jamendo/jamendo.ui | 6 +++---
2 files changed, 7 insertions(+), 19 deletions(-)
---
diff --git a/src/plugins/jamendo/jamendo.py b/src/plugins/jamendo/jamendo.py
index 96d4933..7cf2b11 100644
--- a/src/plugins/jamendo/jamendo.py
+++ b/src/plugins/jamendo/jamendo.py
@@ -264,7 +264,7 @@ class JamendoPlugin(gobject.GObject, Peas.Activatable, PeasGtk.Configurable):
])
# append album row
parent = treeview.get_model().append(None,
- [DictWrapper(album), album['image'], title, dur, tip]
+ [album, album['image'], title, dur, tip]
)
# append track rows
@@ -285,7 +285,7 @@ class JamendoPlugin(gobject.GObject, Peas.Activatable, PeasGtk.Configurable):
_('Duration: %s') % td,
])
# append track
- treeview.get_model().append(parent, [DictWrapper(track), icon, tt, td, tip])
+ treeview.get_model().append(parent, [track, icon, tt, td, tip])
# update current album count
pindex = self.treeviews.index(treeview)
self.album_count[pindex] += 1
@@ -295,9 +295,6 @@ class JamendoPlugin(gobject.GObject, Peas.Activatable, PeasGtk.Configurable):
Add an album to the playlist, mode can be: replace, enqueue or
enqueue_and_play.
"""
- if album is DictWrapper:
- album = album.dictionary
-
for i, track in enumerate(album['tracks']):
if mode in ('replace', 'enqueue_and_play'):
if i == 0:
@@ -452,9 +449,9 @@ class JamendoPlugin(gobject.GObject, Peas.Activatable, PeasGtk.Configurable):
except:
return
if len(path) == 1:
- self.add_album_to_playlist('replace', item.dictionary)
+ self.add_album_to_playlist('replace', item)
else:
- self.add_track_to_playlist('replace', item.dictionary)
+ self.add_track_to_playlist('replace', item)
def on_treeview_row_clicked(self, tv, evt):
"""
@@ -680,12 +677,3 @@ class JamendoService(threading.Thread):
data = handle.read()
handle.close()
return data
-
-# Hack to work around bgo#622987; we need to wrap dicts in a GObject so that
-# we can insert them into the GtkTreeStore
-class DictWrapper(gobject.GObject):
- __gtype_name__ = 'DictWrapper'
-
- def __init__(self, dictionary):
- self.dictionary = dictionary
- gobject.GObject.__init__(self)
diff --git a/src/plugins/jamendo/jamendo.ui b/src/plugins/jamendo/jamendo.ui
index 4e46bf5..20d0d6a 100644
--- a/src/plugins/jamendo/jamendo.ui
+++ b/src/plugins/jamendo/jamendo.ui
@@ -37,7 +37,7 @@
</object>
<object class="GtkTreeStore" id="results_treeview_model">
<columns>
- <column type="GObject"/>
+ <column type="PyObject"/>
<column type="GdkPixbuf"/>
<column type="gchararray"/>
<column type="gchararray"/>
@@ -46,7 +46,7 @@
</object>
<object class="GtkTreeStore" id="popular_treeview_model">
<columns>
- <column type="GObject"/>
+ <column type="PyObject"/>
<column type="GdkPixbuf"/>
<column type="gchararray"/>
<column type="gchararray"/>
@@ -55,7 +55,7 @@
</object>
<object class="GtkTreeStore" id="latest_treeview_model">
<columns>
- <column type="GObject"/>
+ <column type="PyObject"/>
<column type="GdkPixbuf"/>
<column type="gchararray"/>
<column type="gchararray"/>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]