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)
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
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
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