Beispiel #1
0
def gen(x, y):
    if y >= x:
        pixbuf = draw_pill_pixbuf(str(x), str(y))
        return gtk.image_new_from_pixbuf(pixbuf)
    else:
        pixbuf = draw_pill_pixbuf('0', '0')
        return gtk.image_new_from_pixbuf(pixbuf)
Beispiel #2
0
 def _get_pill_image(self, channel, count_downloaded, count_unplayed):
     if count_unplayed > 0 or count_downloaded > 0:
         return draw.draw_pill_pixbuf(str(count_unplayed),
                                      str(count_downloaded),
                                      widget=self.widget)
     else:
         return None
Beispiel #3
0
 def _get_pill_image(self, channel, count_downloaded, count_unplayed):
     if count_unplayed > 0 or count_downloaded > 0:
         return draw.draw_pill_pixbuf('{:n}'.format(count_unplayed),
                                      '{:n}'.format(count_downloaded),
                                      widget=self.widget,
                                      scale=self._scale)
     else:
         return None
Beispiel #4
0
 def _get_pill_image(self, channel, count_downloaded, count_unplayed):
     if count_unplayed > 0 or count_downloaded > 0:
         return draw.draw_pill_pixbuf(str(count_unplayed), str(count_downloaded))
     else:
         return None