intel / dleyna-control

dLeyna-control is a Digital Media Player written in python to demonstrate how to use the dleyna DMS APIs. It detects Digital Media Servers on the local area network and allows users to browse, search and play their contents.
https://01.org/dleyna/
GNU Lesser General Public License v2.1
8 stars 12 forks source link

remote image loading is synchronous #12

Open jku opened 11 years ago

jku commented 11 years ago

Server icons are loaded synchronously, which means UI might block waiting for a server to respond.

This is a surprisingly difficult problem to solve. Normal solution would be this:

Unfortunately gdk_pixbuf_new_from_stream_async() is not exposed in pygtk, and pygtk is already legacy so it will never appear there. Threading in python is pretty awful so don't want to got there either...

The real solution is to upgrade gobject-introspection and we probably do want to do that at some point... but maybe not just now as it practically means upgrading to gtk3 as well.

It should be possible to do this with a g_file_read_async() + GdkPixbufLoader, will try that.