summaryrefslogtreecommitdiff
path: root/examples/update-file-info-async.py
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2012-01-13 23:18:04 +0100
committerStefano Karapetsas <[email protected]>2012-01-13 23:18:04 +0100
commitca0a8f4d6cc24707bc07c3013bff321e2f0c24fd (patch)
tree4c4d47f249603be3cb816b1456a9dc71c0b48999 /examples/update-file-info-async.py
downloadpython-caja-ca0a8f4d6cc24707bc07c3013bff321e2f0c24fd.tar.bz2
python-caja-ca0a8f4d6cc24707bc07c3013bff321e2f0c24fd.tar.xz
initial import from Mate-Extra repo
Diffstat (limited to 'examples/update-file-info-async.py')
-rw-r--r--examples/update-file-info-async.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/examples/update-file-info-async.py b/examples/update-file-info-async.py
new file mode 100644
index 0000000..349b169
--- /dev/null
+++ b/examples/update-file-info-async.py
@@ -0,0 +1,15 @@
+import caja
+import gobject
+
+class UpdateFileInfoAsync(caja.InfoProvider):
+ def __init__(self):
+ pass
+
+ def update_file_info_full(self, provider, handle, closure, file):
+ print "update_file_info_full"
+ gobject.timeout_add_seconds(3, self.update_cb, provider, handle, closure)
+ return caja.OPERATION_IN_PROGRESS
+
+ def update_cb(self, provider, handle, closure):
+ print "update_cb"
+ self.update_complete_invoke(provider, handle, closure, result=caja.OPERATION_FAILED)