#1930: Only take preview before closing.
This commit is contained in:
parent
9d860bd5b1
commit
52fff021d0
1
NEWS
1
NEWS
@ -4,6 +4,7 @@
|
|||||||
* Add brazilian translation. (DiegoZacarao)
|
* Add brazilian translation. (DiegoZacarao)
|
||||||
* Some fixes for changing the selected clipboard object. (tomeu)
|
* Some fixes for changing the selected clipboard object. (tomeu)
|
||||||
* Fix palettes around the mesh edges. (edsiper)
|
* Fix palettes around the mesh edges. (edsiper)
|
||||||
|
* #1930: Only take preview before closing. (tomeu)
|
||||||
|
|
||||||
Snapshot de8b3b4c01
|
Snapshot de8b3b4c01
|
||||||
|
|
||||||
|
@ -221,6 +221,7 @@ class Activity(Window, gtk.Container):
|
|||||||
self._share_id = None
|
self._share_id = None
|
||||||
self._join_id = None
|
self._join_id = None
|
||||||
self._can_close = True
|
self._can_close = True
|
||||||
|
self._preview = None
|
||||||
|
|
||||||
shared_activity = handle.get_shared_activity()
|
shared_activity = handle.get_shared_activity()
|
||||||
if shared_activity:
|
if shared_activity:
|
||||||
@ -337,7 +338,10 @@ class Activity(Window, gtk.Container):
|
|||||||
def save(self):
|
def save(self):
|
||||||
"""Request that the activity is saved to the Journal."""
|
"""Request that the activity is saved to the Journal."""
|
||||||
self.metadata['buddies'] = self._get_buddies()
|
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:
|
try:
|
||||||
file_path = os.path.join(tempfile.gettempdir(), '%i' % time.time())
|
file_path = os.path.join(tempfile.gettempdir(), '%i' % time.time())
|
||||||
self.write_file(file_path)
|
self.write_file(file_path)
|
||||||
@ -400,6 +404,7 @@ class Activity(Window, gtk.Container):
|
|||||||
if self._shared_activity:
|
if self._shared_activity:
|
||||||
self._shared_activity.leave()
|
self._shared_activity.leave()
|
||||||
|
|
||||||
|
self._preview = self._get_preview()
|
||||||
self.save()
|
self.save()
|
||||||
|
|
||||||
def get_metadata(self):
|
def get_metadata(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user