From 1d5a8b7aa497c6d3d3257887f95832eda397347c Mon Sep 17 00:00:00 2001 From: Patrick Monnerat Date: Sun, 17 Feb 2019 17:36:11 +0100 Subject: Make Caja.OperationHandle usable. The Caja.OperationHandle.handle property is added: this gives access to the effective handle taking the form of a non-zero signed integer that can be stored in a void pointer. Trying to set this property with an invalid value raises an exception. Upon update_file_info_full call, the new Caja.OperationHandle is preset with a "unique" non-null value generated from an atomic counter. When the python method returns, the handle value is transmitted to Caja whatever it is: this fixes the problem of Caja expecting a non-null handle when CAJA_OPERATION_IN_PROGRESS is returned. Ref: https://github.com/mate-desktop/python-caja/issues/36 --- docs/Makefile.am | 4 +- docs/reference/caja-python-class-reference.xml | 1 + docs/reference/caja-python-info-provider.xml | 6 +-- docs/reference/caja-python-operation-handle.xml | 68 +++++++++++++++++++++++++ 4 files changed, 75 insertions(+), 4 deletions(-) create mode 100644 docs/reference/caja-python-operation-handle.xml (limited to 'docs') diff --git a/docs/Makefile.am b/docs/Makefile.am index 70021bc..b05ab92 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -24,7 +24,8 @@ XML_FILES = \ reference/caja-python-file-info.xml \ reference/caja-python-info-provider.xml \ reference/caja-python-enum-reference.xml \ - reference/caja-python-operation-result.xml + reference/caja-python-operation-result.xml \ + reference/caja-python-operation-handle.xml HTMLdir = $(datadir)/gtk-doc/html/caja-python HTML_FILES = \ @@ -45,6 +46,7 @@ HTML_FILES = \ html/class-caja-python-location-widget-provider.html \ html/class-caja-python-file-info.html \ html/class-caja-python-info-provider.html \ + html/class-caja-python-operation-handle.html \ html/caja-python-enum-reference.html \ html/enum-caja-python-operation-result.html \ html/caja-python.devhelp diff --git a/docs/reference/caja-python-class-reference.xml b/docs/reference/caja-python-class-reference.xml index 5386ee9..ca47353 100644 --- a/docs/reference/caja-python-class-reference.xml +++ b/docs/reference/caja-python-class-reference.xml @@ -10,5 +10,6 @@ + diff --git a/docs/reference/caja-python-info-provider.xml b/docs/reference/caja-python-info-provider.xml index 424fdb0..b8ca549 100644 --- a/docs/reference/caja-python-info-provider.xml +++ b/docs/reference/caja-python-info-provider.xml @@ -127,7 +127,7 @@ class ColumnExtension(GObject.GObject, Caja.InfoProvider): handle : - a gobject.gpointer generated solely to track this call + a Caja.OperationHandle generated solely to track this call closure : @@ -184,7 +184,7 @@ class ColumnExtension(GObject.GObject, Caja.InfoProvider): handle : - a gobject.gpointer generated by a specific update_file_info_full call + a Caja.OperationHandle generated for a specific update_file_info_full call @@ -221,7 +221,7 @@ class ColumnExtension(GObject.GObject, Caja.InfoProvider): handle : - a gobject.gpointer generated by a specific update_file_info_full call + a Caja.OperationHandle generated for a specific update_file_info_full call closure : diff --git a/docs/reference/caja-python-operation-handle.xml b/docs/reference/caja-python-operation-handle.xml new file mode 100644 index 0000000..379b51c --- /dev/null +++ b/docs/reference/caja-python-operation-handle.xml @@ -0,0 +1,68 @@ + + + + + + Caja.OperationHandle + Caja.FileInfo update in progress handle + + + + + + + + Synopsis + + + Caja.OperationHandle + + + + + + + + + + Description + + + A handle for a Caja.FileInfo update operation in progress. The handle value is a non-zero signed integer that can be stored in a gobject.gpointer. It cannot be explicitly constructed and is always generated by Caja itself. + + + As every instance is created and initialized by Caja, handle values may be used as keys within the extension. It is however possible to update these values with more convenient ones. + + + + + + + + + + + Properties + +
+ + + + + + + + + "handle" + The unique handle value. Default value: preset by Caja. + Read-Write + + + + + +
+
+ +
-- cgit v1.2.1