Exemplo n.º 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)
Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 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