28 lines
539 B
Python
28 lines
539 B
Python
# Bryan Schumaker (10 / 18 / 2010)
|
|
import ocarina
|
|
|
|
gtk = ocarina.gtk
|
|
gobject = ocarina.gobject
|
|
|
|
#update = None
|
|
get_time = None
|
|
|
|
def set_fns():
|
|
#global update
|
|
global get_time
|
|
#update = ocarina.libsaria.music.get_progress
|
|
get_time = ocarina.libsaria.music.get_time
|
|
ocarina.libsaria.event.invite("POSTSTART", set_fns)
|
|
|
|
|
|
class TimeLabel(gtk.Label):
|
|
def __init__(self):
|
|
gtk.Label.__init__(self)
|
|
gobject.timeout_add(500, self.update)
|
|
self.show()
|
|
|
|
def update(self):
|
|
global get_time
|
|
self.set_text(get_time())
|
|
return True
|