#1930: Only take preview before closing.

This commit is contained in:
Tomeu Vizoso 2007-07-06 22:43:16 +02:00
parent 9d860bd5b1
commit 52fff021d0
2 changed files with 7 additions and 1 deletions

1
NEWS
View File

@ -4,6 +4,7 @@
* Add brazilian translation. (DiegoZacarao)
* Some fixes for changing the selected clipboard object. (tomeu)
* Fix palettes around the mesh edges. (edsiper)
* #1930: Only take preview before closing. (tomeu)
Snapshot de8b3b4c01

View File

@ -221,6 +221,7 @@ class Activity(Window, gtk.Container):
self._share_id = None
self._join_id = None
self._can_close = True
self._preview = None
shared_activity = handle.get_shared_activity()
if shared_activity:
@ -337,7 +338,10 @@ class Activity(Window, gtk.Container):
def save(self):
"""Request that the activity is saved to the Journal."""
self.metadata['buddies'] = self._get_buddies()
self.metadata['preview'] = self._get_preview()
if self._preview is None:
self.metadata['preview'] = ''
else:
self.metadata['preview'] = self._preview
try:
file_path = os.path.join(tempfile.gettempdir(), '%i' % time.time())
self.write_file(file_path)
@ -400,6 +404,7 @@ class Activity(Window, gtk.Container):
if self._shared_activity:
self._shared_activity.leave()
self._preview = self._get_preview()
self.save()
def get_metadata(self):