Add in the metadata info about every startup time

Signed-off-by: Walter Bender <walter.bender@gmail.com>
Tested-by: Gonzalo Odiard <gonzalo@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
This commit is contained in:
Gonzalo Odiard 2012-10-04 09:38:45 -03:00
parent 78ae2459e3
commit 2a15fbc0f2

View File

@ -327,6 +327,13 @@ class Activity(Window, Gtk.Container):
if 'share-scope' in self._jobject.metadata: if 'share-scope' in self._jobject.metadata:
share_scope = self._jobject.metadata['share-scope'] share_scope = self._jobject.metadata['share-scope']
if 'launch-times' in self._jobject.metadata:
self._jobject.metadata['launch-times'] += ', %d' % \
int(time.time())
else:
self._jobject.metadata['launch-times'] = \
str(int(time.time()))
self.shared_activity = None self.shared_activity = None
self._join_id = None self._join_id = None
@ -379,6 +386,7 @@ class Activity(Window, Gtk.Container):
jobject.metadata['preview'] = '' jobject.metadata['preview'] = ''
jobject.metadata['share-scope'] = SCOPE_PRIVATE jobject.metadata['share-scope'] = SCOPE_PRIVATE
jobject.metadata['icon-color'] = icon_color jobject.metadata['icon-color'] = icon_color
jobject.metadata['launch-times'] = str(int(time.time()))
jobject.file_path = '' jobject.file_path = ''
# FIXME: We should be able to get an ID synchronously from the DS, # FIXME: We should be able to get an ID synchronously from the DS,