[gnome-music/wip/merge: 100/343] widgets: correctly install renderers



commit ca1f1ddf5a61022f859acc1b48055d0167045b7f
Author: Vadim Rutkovsky <vrutkovs redhat com>
Date:   Mon Jul 15 16:10:21 2013 +0200

    widgets: correctly install renderers

 gnomemusic/widgets.py |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/gnomemusic/widgets.py b/gnomemusic/widgets.py
index e53d747..087b790 100644
--- a/gnomemusic/widgets.py
+++ b/gnomemusic/widgets.py
@@ -134,8 +134,7 @@ class AlbumWidget(Gtk.EventBox):
         typeRenderer = Gd.StyledTextRenderer(xpad=16)
         typeRenderer.ellipsize = Pango.EllipsizeMode.END
         typeRenderer.xalign = 0.0
-        # self function is not needed, just add the renderer!
-        listWidget.add_renderer(typeRenderer)
+        listWidget.add_renderer(typeRenderer, self._typeRendererText, None)
         cols[0].clear_attributes(typeRenderer)
         cols[0].add_attribute(typeRenderer, "markup", 0)
 
@@ -143,7 +142,10 @@ class AlbumWidget(Gtk.EventBox):
         durationRenderer.add_class('dim-label')
         durationRenderer.ellipsize = Pango.EllipsizeMode.END
         durationRenderer.xalign = 1.0
-        listWidget.add_renderer(durationRenderer, self._durationRendererText())
+        listWidget.add_renderer(durationRenderer, self._durationRendererText, None)
+
+    def _typeRendererText(self, col, cell, model, iter):
+        pass
 
     def _durationRendererText(self):
         item = self.model.get_value(iter, 5)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]