Save activity previews to the datastore as binary png images.

This commit is contained in:
Tomeu Vizoso 2007-10-05 22:39:45 +02:00
parent 32ecdd8ad6
commit eeae5d011f
3 changed files with 5 additions and 5 deletions

2
NEWS
View File

@ -1,3 +1,5 @@
* Save activity previews to the datastore as binary png images. (tomeu)
Snapshot acca55e861
* #3905 Wait 3 seconds, rather than 3000, if NetworkManager doesn't respond

View File

@ -449,9 +449,7 @@ class Activity(Window, gtk.Container):
f.close()
os.remove(file_path)
# TODO: Take this out when the datastore accepts binary data.
import base64
return base64.b64encode(preview_data)
return preview_data
def _get_buddies(self):
if self._shared_activity is not None:
@ -481,7 +479,7 @@ class Activity(Window, gtk.Container):
if self._preview is None:
self.metadata['preview'] = ''
else:
self.metadata['preview'] = self._preview
self.metadata['preview'] = dbus.ByteArray(self._preview)
try:
if self._jobject.file_path:

View File

@ -67,7 +67,7 @@ def delete(uid):
def get_properties(uid):
logging.debug('dbus_helpers.get_properties: %s' % uid)
return _get_data_store().get_properties(uid)
return _get_data_store().get_properties(uid, byte_arrays=True)
def get_filename(uid):
filename = _get_data_store().get_filename(uid)