2010-10-30 13:42:45 -04:00
|
|
|
# Bryan Schumaker (10/30/2010)
|
|
|
|
|
|
|
|
import ocarina
|
2010-11-27 20:07:17 -05:00
|
|
|
from ocarina import window
|
2010-12-05 13:40:39 -05:00
|
|
|
gdk = ocarina.gdk
|
|
|
|
libsaria = ocarina.libsaria
|
2010-12-07 08:13:29 -05:00
|
|
|
get_attrs = libsaria.sources.get_attrs
|
2010-12-05 13:40:39 -05:00
|
|
|
invite = libsaria.event.invite
|
2010-10-30 13:42:45 -04:00
|
|
|
|
2011-01-30 21:34:27 -05:00
|
|
|
__NAME__ = "Window Manager Tweaks"
|
|
|
|
|
2010-10-30 13:42:45 -04:00
|
|
|
|
|
|
|
def tweak_icon(file):
|
2010-11-03 22:30:40 -04:00
|
|
|
if file == None:
|
|
|
|
file = "images/ocarina.png"
|
|
|
|
gdk.threads_enter()
|
2010-11-27 20:07:17 -05:00
|
|
|
window.set_icon(file)
|
2010-11-03 22:30:40 -04:00
|
|
|
gdk.threads_leave()
|
2010-10-30 13:42:45 -04:00
|
|
|
|
|
|
|
def tweak_title(filepath):
|
|
|
|
if filepath != None:
|
2010-12-07 08:13:29 -05:00
|
|
|
title = get_attrs("title")
|
2010-11-02 17:03:57 -04:00
|
|
|
else:
|
|
|
|
title = ocarina.__vers__
|
2010-11-27 20:07:17 -05:00
|
|
|
window.set_title(title)
|
2010-10-30 13:42:45 -04:00
|
|
|
|
|
|
|
def start():
|
|
|
|
invite("POSTLOAD", tweak_title)
|
|
|
|
invite("POSTGETART", tweak_icon)
|
|
|
|
|
|
|
|
def stop():
|
|
|
|
pass
|
2010-11-05 08:14:31 -04:00
|
|
|
|
|
|
|
def check_version():
|
2011-01-22 11:19:18 -05:00
|
|
|
if libsaria.__major__ != 4:
|
2010-11-05 08:14:31 -04:00
|
|
|
return False
|
2011-01-22 11:19:18 -05:00
|
|
|
if libsaria.__minor__ == 4:
|
2010-11-05 19:18:21 -04:00
|
|
|
return True
|
|
|
|
return False
|