Green color switch when a face is found

This commit is contained in:
2012-08-29 13:29:05 +02:00
parent e6c479a9e6
commit 491b176020
2 changed files with 11 additions and 5 deletions

View File

@@ -66,9 +66,6 @@ class FacemovieThread(threading.Thread, Observable, Observer):
self.my_logger.debug(message)
if message[0] == "FILEADD":
self.notify(["Interface", [message[0], message[1], 0]])
elif message[0] == "FILEDONE":
print "tointerface"
self.notify(["Interface", message])
else:
# notify gui about small updates
self.notify(["Interface", ["STATUS", message[0], message[1]]])
@@ -80,6 +77,10 @@ class FacemovieThread(threading.Thread, Observable, Observer):
self.stop_process = True
self.notify(["Lib", ["STOP"]])
elif len(message) == 3: # notifications
if message[0] == "FILEDONE":
self.notify(["Interface", message])
else:
self.console_logger.debug("Unrecognized command")
self.my_logger.debug("Unrecognized command")
@@ -87,7 +88,6 @@ class FacemovieThread(threading.Thread, Observable, Observer):
self.my_logger.debug(message)
def run(self):
# FIXME : Quite ugly way of doing. Find better!
if not self.stop_process:
self.my_logger.debug("Listing pictures")

View File

@@ -301,7 +301,13 @@ class IvolutionWindow(IvolutionTemplate, Observer, Observable):
self.filelist.InsertItem(item)
wx.MutexGuiLeave()
elif message[0] == "FILEDONE":
print "Done : %s" % (message[1])
for i in range(self.filelist.GetItemCount()):
if message[1] == self.filelist.GetItemText(i):
print "FUCKKKKKK"
wx.MutexGuiEnter() # to avoid thread problems
#self.filelist.GetItem(i).SetBackgroundColour('green'), 1)
self.filelist.SetItemTextColour(i, "green")
wx.MutexGuiLeave()
elif len(message) > 1: # system commands shall be ignored
self.console_logger.debug("Unrecognized command")