Put dates to work correctly on the journal, create a new journal entry when resuming a past entry.
This commit is contained in:
parent
04fc7047c2
commit
11c89d86c9
@ -201,12 +201,14 @@ class Activity(Window, gtk.Container):
|
||||
|
||||
if handle.object_id:
|
||||
self.jobject = datastore.get(handle.object_id)
|
||||
self.jobject.object_id = ''
|
||||
del self.jobject['ctime']
|
||||
del self.jobject['mtime']
|
||||
elif create_jobject:
|
||||
logging.debug('Creating a jobject.')
|
||||
self.jobject = datastore.create()
|
||||
self.jobject['title'] = '%s %s' % (get_bundle_name(), 'Activity')
|
||||
self.jobject['activity'] = self.get_service_name()
|
||||
self.jobject['date'] = str(time.time())
|
||||
self.jobject['icon'] = self._get_icon()
|
||||
self.jobject['keep'] = '0'
|
||||
self.jobject['buddies'] = ''
|
||||
|
@ -39,6 +39,9 @@ class DSObject(gobject.GObject):
|
||||
self.metadata[key] = value
|
||||
self.emit('updated')
|
||||
|
||||
def __delitem__(self, key):
|
||||
del self.metadata[key]
|
||||
|
||||
def get_metadata(self):
|
||||
return self._metadata
|
||||
|
||||
|
@ -40,7 +40,7 @@ def create(properties, filename):
|
||||
return object_id
|
||||
|
||||
def update(uid, properties, filename, reply_handler=None, error_handler=None):
|
||||
logging.debug('dbus_helpers.update')
|
||||
logging.debug('dbus_helpers.update: %s, %s' % (uid, filename))
|
||||
if reply_handler and error_handler:
|
||||
_data_store.update(uid, dbus.Dictionary(properties), filename,
|
||||
reply_handler=reply_handler,
|
||||
|
Loading…
Reference in New Issue
Block a user