wm_tweaks icon changing

Grab the gdk lock before changing the icon.  For some reason changing
the title already gets the lock, but changing the icon doesn't.
This commit is contained in:
Bryan Schumaker 2010-11-03 22:30:40 -04:00
parent 5839190bb4
commit aa098080ff
1 changed files with 6 additions and 4 deletions

View File

@ -1,6 +1,7 @@
# 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
@ -8,10 +9,11 @@ invite = libsaria.event.invite
def tweak_icon(file):
if file != None:
ocarina.set_window_icon(file)
else:
ocarina.set_window_icon("images/ocarina.png")
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: