39 lines
786 B
Python
39 lines
786 B
Python
# Bryan Schumaker (10/30/2010)
|
|
|
|
import ocarina
|
|
gdk = ocarina.gdk
|
|
libsaria = ocarina.libsaria
|
|
lib_find_id = libsaria.collection.lib_find_id
|
|
lib_get_attr = libsaria.collection.lib_get_attr
|
|
invite = libsaria.event.invite
|
|
|
|
|
|
def tweak_icon(file):
|
|
if file == None:
|
|
file = "images/ocarina.png"
|
|
gdk.threads_enter()
|
|
ocarina.set_window_icon(file)
|
|
gdk.threads_leave()
|
|
|
|
def tweak_title(filepath):
|
|
if filepath != None:
|
|
id = lib_find_id(filepath)
|
|
title = lib_get_attr(id, "title")
|
|
else:
|
|
title = ocarina.__vers__
|
|
ocarina.set_window_title(title)
|
|
|
|
def start():
|
|
invite("POSTLOAD", tweak_title)
|
|
invite("POSTGETART", tweak_icon)
|
|
|
|
def stop():
|
|
pass
|
|
|
|
def check_version():
|
|
if ocarina.__major__ != 4:
|
|
return False
|
|
if ocarina.__minor__ >= 1:
|
|
return True
|
|
return False
|