Popdown when the toplevel of the parent item loses focus.

This commit is contained in:
Tomeu Vizoso
2007-07-09 14:26:41 +02:00
parent 8b72656ca4
commit a4f4d969fe
3 changed files with 47 additions and 23 deletions
+9 -2
View File
@@ -99,14 +99,21 @@ def create():
def write(ds_object, reply_handler=None, error_handler=None):
logging.debug('datastore.write')
properties = ds_object.metadata.get_dictionary().copy()
# The title property should be sent as a 'text' property so it gets indexed
if properties.has_key('title'):
properties['title:text'] = properties['title']
del properties['title']
if ds_object.object_id:
dbus_helpers.update(ds_object.object_id,
ds_object.metadata.get_dictionary(),
properties,
ds_object.file_path,
reply_handler=reply_handler,
error_handler=error_handler)
else:
ds_object.object_id = dbus_helpers.create(ds_object.metadata.get_dictionary(),
ds_object.object_id = dbus_helpers.create(properties,
ds_object.file_path)
# TODO: register the object for updates
logging.debug('Written object %s to the datastore.' % ds_object.object_id)
+1 -1
View File
@@ -37,7 +37,7 @@ def create(properties, filename):
return object_id
def update(uid, properties, filename, reply_handler=None, error_handler=None):
logging.debug('dbus_helpers.update: %s, %s' % (uid, filename))
logging.debug('dbus_helpers.update: %s, %s, %s' % (uid, filename, properties))
if reply_handler and error_handler:
_data_store.update(uid, dbus.Dictionary(properties), filename,
reply_handler=reply_handler,