ocarina: Remove commented out code

This includes all of ocarina/components/label.py
This commit is contained in:
Bryan Schumaker 2011-04-22 08:08:34 -04:00
parent aac05e92b5
commit 27c3d2b3f1
2 changed files with 0 additions and 50 deletions

View File

@ -8,7 +8,6 @@ label = gtk.Label("Now Playing")
def pack_label(box, label):
a = gtk.Alignment(0, 0.5, 0, 0)
a.add(label)
#a.show()
box.pack_start(a)
TITLE = gtk.Label()

View File

@ -1,49 +0,0 @@
# Bryan Schumaker (10 / 18 / 2010)
import ocarina
gtk = ocarina.gtk
gobject = ocarina.gobject
invite = ocarina.libsaria.event.invite
libsaria = ocarina.libsaria
get_time = None
get_attrs = None
def set_fns():
global get_time
global get_attrs
global file_id
get_time = ocarina.libsaria.audio.get_time
get_attrs = libsaria.sources.get_attrs
invite("POSTSTART", set_fns)
class AttrLabel(gtk.Alignment):
def __init__(self, attr, other = None):
gtk.Alignment.__init__(self, 0, 0.5, 0, 0)
self.label = gtk.Label()
self.attr = attr
self.other = other
self.add(self.label)
self.show_all()
invite("POSTLOAD", self.update)
def update(self, filepath):
if id != None:
text = str(get_attrs(self.attr))
if self.other:
text = "%s %s" % (self.other, text)
self.label.set_text(text)
else:
self.label.set_text("")
class YearLabel(AttrLabel):
def __init__(self):
AttrLabel.__init__(self, "year", "Year:")
class CountLabel(AttrLabel):
def __init__(self):
AttrLabel.__init__(self, "count", "Play count:")
class LengthLabel(AttrLabel):
def __init__(self):
AttrLabel.__init__(self, "lenstr", "Length:")