run plugin_downbloaded callback in the main thread instead of in Ftp Thread. Fixes freeze under windows when plugin is downloaded

This commit is contained in:
Yann Leboulanger 2011-08-28 10:08:38 +02:00
parent 98432f6666
commit b0e1bbac56
1 changed files with 2 additions and 1 deletions

View File

@ -432,7 +432,8 @@ class Ftp(threading.Thread):
print 'ERROR: cannot read file "%s"' % filename
os.unlink(filename)
self.ftp.quit()
self.window.emit('plugin_downloaded', self.remote_dirs)
gobject.idle_add(self.window.emit, 'plugin_downloaded',
self.remote_dirs)
gobject.source_remove(self.pulse)