List filling works. Got to change their color now

This commit is contained in:
2012-08-29 07:44:46 +02:00
parent 2037bf20dc
commit 9f92f8cd61
3 changed files with 13 additions and 2 deletions

View File

@@ -64,8 +64,12 @@ class FacemovieThread(threading.Thread, Observable, Observer):
#self.console_logger.debug(message)
self.my_logger.debug(message)
# notify gui about small updates
self.notify(["Lib", ["STATUS", message[0], message[1]]])
if message[0] == "FILEADD":
print "got it !"
self.notify(["Interface", [message[0], message[1], 0]])
else:
# notify gui about small updates
self.notify(["Interface", ["STATUS", message[0], message[1]]])
# checking for fatal error
if message[0] == "Error":

View File

@@ -121,6 +121,7 @@ class FaceMovie(object, Observable, Observer):
# populating guys
self.guys.append(a_guy)
self.notify(["Application", ["FILEADD", guy_name]])
except:
self.console_logger.info("Skipping %s. Not an image file" % (guy_source))
self.my_logger.info("Skipping %s. Not an image file" % (guy_source))

View File

@@ -294,6 +294,12 @@ class IvolutionWindow(IvolutionTemplate, Observer, Observable):
wx.MutexGuiEnter() # to avoid thread problems
self.statusbar.SetStatusText(message[1], 1)
wx.MutexGuiLeave()
elif message[0] == "FILEADD":
item = wx.ListItem()
item.SetText(message[1])
wx.MutexGuiEnter() # to avoid thread problems
self.filelist.InsertItem(item)
wx.MutexGuiLeave()
elif len(message) > 1: # system commands shall be ignored
self.console_logger.debug("Unrecognized command")