summaryrefslogtreecommitdiff
path: root/examples/update-file-info-async.py
diff options
context:
space:
mode:
authorYaakov Selkowitz <[email protected]>2012-12-20 00:41:24 -0600
committerStefano Karapetsas <[email protected]>2013-01-22 14:10:00 +0100
commit825c1dd01981c159368a1a7a99931146fbbe60f1 (patch)
tree13a781b2b2023d06a1d8fb52d600e71ff40f911a /examples/update-file-info-async.py
parent29149f504a4e5e28a19b92d9ebb831bb53100a01 (diff)
downloadpython-caja-825c1dd01981c159368a1a7a99931146fbbe60f1.tar.bz2
python-caja-825c1dd01981c159368a1a7a99931146fbbe60f1.tar.xz
Port examples to g-i and gsettings
Diffstat (limited to 'examples/update-file-info-async.py')
-rw-r--r--examples/update-file-info-async.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/examples/update-file-info-async.py b/examples/update-file-info-async.py
index 349b169..e4f90c7 100644
--- a/examples/update-file-info-async.py
+++ b/examples/update-file-info-async.py
@@ -1,15 +1,14 @@
-import caja
-import gobject
+from gi.repository import Caja, GObject
-class UpdateFileInfoAsync(caja.InfoProvider):
+class UpdateFileInfoAsync(GObject.GObject, 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
+ return Caja.OperationResult.IN_PROGRESS
def update_cb(self, provider, handle, closure):
print "update_cb"
- self.update_complete_invoke(provider, handle, closure, result=caja.OPERATION_FAILED)
+ Caja.info_provider_update_complete_invoke(closure, provider, handle, Caja.OperationResult.FAILED)