/usr/share/gtk-doc/html/caja-python/class-caja-python-property-page-provider.html is in python-caja-common 1.20.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | <html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>Caja.PropertyPageProvider</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="caja-python Reference Manual"><link rel="up" href="caja-python-provider-reference.html" title="Provider Interfaces"><link rel="prev" href="class-caja-python-menu-provider.html" title="Caja.MenuProvider"><link rel="next" href="caja-python-enum-reference.html" title="Available Enums"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Caja.PropertyPageProvider</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-caja-python-menu-provider.html">Prev</a> </td><th width="60%" align="center">Provider Interfaces</th><td width="20%" align="right"> <a accesskey="n" href="caja-python-enum-reference.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="class-caja-python-property-page-provider"></a><div class="titlepage"></div><div class="refnamediv"><h2>Caja.PropertyPageProvider</h2><p>Caja.PropertyPageProvider — Caja.PropertyPageProvider Reference</p></div><div class="refsect1"><a name="idm1420"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">Caja.PropertyPageProvider</span></span>:
<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-caja-python-property-page-provider.html#method-caja-property-page-provider--get-pages" title="Caja.PropertyPageProvider.get_pages">get_pages</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>files</code></strong></span></span>)</code><br></pre></td></tr></table></div><div class="refsect1"><a name="description-property-page-provider"></a><h2>Description</h2><p>
If subclassed, Caja will request a list of custom property pages that should
appear when a user opens the Properties dialog for a file or folder.
</p><div class="example"><a name="idm1433"></a><p class="title"><b>Example 6. Caja.PropertyPageProvider Example</b></p><div class="example-contents"><pre class="programlisting">
import hashlib
import urllib
from gi.repository import Caja, GObject, Gtk
class ColumnExtension(GObject.GObject, Caja.PropertyPageProvider):
def __init__(self):
pass
def get_property_pages(self, files):
if len(files) != 1:
return
file = files[0]
if file.get_uri_scheme() != 'file':
return
if file.is_directory():
return
filename = urllib.unquote(file.get_uri()[7:])
self.property_label = Gtk.Label('MD5Sum')
self.property_label.show()
self.hbox = Gtk.HBox(homogeneous=False, spacing=0)
self.hbox.show()
label = Gtk.Label('MD5Sum:')
label.show()
self.hbox.pack_start(label, False, False, 0)
self.value_label = Gtk.Label()
self.hbox.pack_start(self.value_label, False, False, 0)
md5sum = hashlib.md5()
with open(filename,'rb') as f:
for chunk in iter(lambda: f.read(8192), ''):
md5sum.update(chunk)
f.close()
self.value_label.set_text(md5sum.hexdigest())
self.value_label.show()
return Caja.PropertyPage(name="CajaPython::md5_sum",
label=self.property_label,
page=self.hbox),
</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm1436"></a><h2>Passive Methods</h2><div class="refsect2"><a name="method-caja-property-page-provider--get-pages"></a><h3>Caja.PropertyPageProvider.get_pages</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_pages</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>files</code></strong> :</span></p></td><td>a list of <a class="link" href="class-caja-python-file-info.html" title="Caja.FileInfo"><code class="classname">Caja.FileInfo</code></a> objects.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a list of <a class="link" href="class-caja-python-property-page.html" title="Caja.PropertyPage"><code class="classname">Caja.PropertyPage</code></a> objects</td></tr></tbody></table><p>
This function is called by Caja when it wants property page items from the extension.
It is called in the main thread before a property page is shown, so it should return quickly.
</p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-caja-python-menu-provider.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="caja-python-provider-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="caja-python-enum-reference.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Caja.MenuProvider </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Available Enums</td></tr></table></div></body></html>
|