[nautilus-python] Beginning of adding formal documentation via docbook/gtk-doc
- From: Adam Plumb <adamplumb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus-python] Beginning of adding formal documentation via docbook/gtk-doc
- Date: Wed, 19 May 2010 19:22:38 +0000 (UTC)
commit 81cff8e39665ef0f7197bcb3f94b1dbf3c59fb16
Author: Adam Plumb <adamplumb gmail com>
Date: Wed May 19 15:22:23 2010 -0400
Beginning of adding formal documentation via docbook/gtk-doc
Makefile.am | 6 +
configure.in | 35 ++
docs/Makefile.am | 71 ++++
docs/reference/entities.docbook.in | 1 +
docs/reference/nautilus-python-column-provider.xml | 107 +++++
docs/reference/nautilus-python-column.xml | 159 +++++++
docs/reference/nautilus-python-menu-item.xml | 434 ++++++++++++++++++++
docs/reference/nautilus-python-menu-provider.xml | 418 +++++++++++++++++++
docs/reference/nautilus-python-menu.xml | 123 ++++++
docs/reference/nautilus-python-ref.xml | 36 ++
10 files changed, 1390 insertions(+), 0 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 0285d80..cacedbb 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,6 +1,12 @@
SUBDIRS = src examples
+if ENABLE_DOCS
+SUBDIRS += docs
+endif
+
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = nautilus-python.pc
EXTRA_DIST = nautilus-python.pc.in nautilus-python.spec.in nautilus-python.spec
+
+DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc
diff --git a/configure.in b/configure.in
index c57b3de..3e90afb 100644
--- a/configure.in
+++ b/configure.in
@@ -58,10 +58,41 @@ PYGOBJECT_DEFSDIR=`$PKG_CONFIG --variable=defsdir pygobject-2.0`
AC_SUBST(PYGOBJECT_DEFSDIR)
AC_MSG_RESULT($PYGOBJECT_DEFSDIR)
+PYGOBJECT_DATADIR=`$PKG_CONFIG --variable=datadir pygobject-2.0`
+AC_SUBST(PYGOBJECT_DATADIR)
+
+PYGOBJECT_PYGDOCS="`$PKG_CONFIG --variable=pygdocs pygobject-2.0`"
+AC_SUBST(PYGOBJECT_PYGDOCS)
+
+PYGOBJECT_FIXXREF="$PYTHON `$PKG_CONFIG --variable=fixxref pygobject-2.0`"
+AC_SUBST(PYGOBJECT_FIXXREF)
+
NAUTILUS_LIBDIR=`$PKG_CONFIG --variable=libdir libnautilus-extension`
AC_SUBST(NAUTILUS_LIBDIR)
AC_DEFINE_UNQUOTED(NAUTILUS_LIBDIR, "$NAUTILUS_LIBDIR", [Nautilus libdir])
+dnl Building documentation
+AC_ARG_ENABLE(docs,
+ AC_HELP_STRING([--disable-docs], [Disable documentation building]),,
+ enable_docs=yes)
+if test "${enable_docs}" != no; then
+ dnl Check for xsltproc
+ AC_PATH_PROG([XSLTPROC], [xsltproc])
+ if test -z "$XSLTPROC"; then
+ enable_docs=no
+ fi
+fi
+
+if test x$enable_docs = xyes; then
+ if ! $PKG_CONFIG "pygobject-2.0 >= 2.11.3"; then
+ AC_MSG_WARN([pygobject-2.0 < 2.11.3; disabling generation of docs])
+ enable_docs=no
+ fi
+fi
+
+AM_CONDITIONAL(ENABLE_DOCS, test x$enable_docs != xno)
+
+
dnl ---------------------------------
dnl Get nautilus extensions directory
dnl ---------------------------------
@@ -69,11 +100,15 @@ NAUTILUS_EXTENSION_DIR=`$PKG_CONFIG --variable=extensiondir libnautilus-extensio
AC_SUBST(NAUTILUS_EXTENSION_DIR)
AC_DEFINE_UNQUOTED(NAUTILUS_EXTENSION_DIR, "$NAUTILUS_EXTENSION_DIR", [Nautilus' extensions directory])
+GTK_DOC_CHECK(1.4)
+
AC_OUTPUT([
Makefile
examples/Makefile
src/Makefile
nautilus-python.spec
nautilus-python.pc
+ docs/Makefile
+ docs/reference/entities.docbook
])
diff --git a/docs/Makefile.am b/docs/Makefile.am
new file mode 100644
index 0000000..87855dc
--- /dev/null
+++ b/docs/Makefile.am
@@ -0,0 +1,71 @@
+BUILDDIR = $(top_builddir)/docs
+
+REF_VERSION = $(VERSION)
+FULL_VERSION = $(VERSION)
+
+HTML_STYLE = $(PYGOBJECT_DATADIR)/pygobject/xsl/ref-html-style.xsl
+PDF_STYLE = $(PYGOBJECT_DATADIR)/pygobject/xsl/pdf-style.xsl
+
+XMLFILES = \
+ reference/nautilus-python-ref.xml \
+ reference/nautilus-python-column.xml \
+ reference/nautilus-python-column-provider.xml \
+ reference/nautilus-python-menu.xml \
+ reference/nautilus-python-menu-item.xml \
+ reference/nautilus-python-menu-provider.xml
+
+HTMLdir = $(datadir)/gtk-doc/html/nautilus-python
+HTML_DATA = \
+ html/index.html \
+ html/index.sgml \
+ html/class-nautilus-python-column.html \
+ html/class-nautilus-python-column-provider.html \
+ html/class-nautilus-python-menu.html \
+ html/class-nautilus-python-menu-item.html \
+ html/class-nautilus-python-menu-provider.html \
+ html/nautilus-python.devhelp
+
+CSS_FILES = $(PYGOBJECT_PYGDOCS)/style.css
+CSSdir = $(HTMLdir)
+CSS_DATA = $(CSS_FILES)
+
+BUILT_SOURCES = \
+ build_stamp \
+ reference/builddate.xml \
+ $(HTML_DATA)
+
+CLEANFILES = \
+ build_stamp \
+ nautilus-python-ref.* \
+ reference/builddate.xml \
+ $(HTML_DATA)
+
+EXTRA_DIST = \
+ $(XMLFILES)
+
+REFERENCE_DEPS = \
+ reference \
+ $(XMLFILES)
+
+$(HTML_DATA): build_stamp
+
+if ENABLE_DOCS
+
+reference/builddate.xml: $(REFERENCE_DEPS)
+ $(PYTHON) -c 'import datetime; print datetime.date.today()' > $@
+
+build_stamp: $(REFERENCE_DEPS) reference/builddate.xml
+ xsltproc --nonet --xinclude -o $(BUILDDIR)/html/ \
+ --path $(BUILDDIR)/reference:$(srcdir)/reference \
+ --stringparam gtkdoc.bookname "nautilus-python" \
+ --stringparam gtkdoc.version ${REF_VERSION} \
+ $(HTML_STYLE) $(srcdir)/reference/nautilus-python-ref.xml
+ $(PYGOBJECT_FIXXREF) -i $(PYGOBJECT_PYGDOCS) $(BUILDDIR)/html
+ touch $@
+
+pdf: $(REFERENCE_DEPS) reference/builddate.xml
+ xsltproc --nonet --xinclude -o nautilus-python-ref.fo \
+ $(PDF_STYLE) reference/nautilus-python-ref.xml
+ pdfxmltex nautilus-python-ref.fo >output </dev/null
+endif
+
diff --git a/docs/reference/entities.docbook.in b/docs/reference/entities.docbook.in
new file mode 100644
index 0000000..7b2eb41
--- /dev/null
+++ b/docs/reference/entities.docbook.in
@@ -0,0 +1 @@
+<!ENTITY version "@VERSION@">
diff --git a/docs/reference/nautilus-python-column-provider.xml b/docs/reference/nautilus-python-column-provider.xml
new file mode 100644
index 0000000..8735feb
--- /dev/null
+++ b/docs/reference/nautilus-python-column-provider.xml
@@ -0,0 +1,107 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-nautilus-python-column-provider">
+ <refnamediv>
+ <refname>nautilus.ColumnProvider</refname>
+ <refpurpose>nautilus.ColumnProvider Reference</refpurpose>
+ </refnamediv>
+
+<!-- ******************************* -->
+<!-- BEGIN OF SYNOPSIS -->
+<!-- ******************************* -->
+
+ <refsect1>
+ <title>Synopsis</title>
+
+ <classsynopsis language="python">
+ <ooclass><classname>nautilus.ColumnProvider</classname></ooclass>
+
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-nautilus-column-provider--get-columns">get_columns</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ </classsynopsis>
+ </refsect1>
+
+<!-- ********************************** -->
+<!-- BEGIN OF DESCRIPTION -->
+<!-- ********************************** -->
+
+ <refsect1 id="description-column-provider">
+ <title>Description</title>
+
+ <para>
+ An extension that sub-classes <link linkend="class-nautilus-python-column-provider"><classname>nautilus.ColumnProvider</classname></link>
+ will be asked to provide a list of custom columns back to Nautilus, which are then displayed when the user is in <literal>List</literal> mode. Nautilus
+ does this by calling each extension's <link linkend="method-nautilus-column-provider--get-columns">get_columns</link> method, which returns a list of
+ <link linkend="class-nautilus-python-column"><classname>nautilus.Column</classname></link>.
+
+ <note>An extension sub-classing <link linkend="class-nautilus-python-column-provider"><classname>nautilus.ColumnProvider</classname></link>
+ will almost always want to sub-class <link linkend="class-info-provider"><classname>nautilus.InfoProvider</classname></link>
+ as well, since that is how an extension provides information for each item in a directory listing.
+ </note>
+ </para>
+
+<example>
+ <title>nautilus.ColumnProvider Example</title>
+ <programlisting>
+import os
+import urllib
+
+import nautilus
+
+class ColumnExtension(nautilus.ColumnProvider, nautilus.InfoProvider):
+ def __init__(self):
+ pass
+
+ def get_columns(self):
+ return nautilus.Column("NautilusPython::block_size_column",
+ "block_size",
+ "Block size",
+ "Get the block size"),
+
+ def update_file_info(self, file):
+ if file.get_uri_scheme() != 'file':
+ return
+
+ filename = urllib.unquote(file.get_uri()[7:])
+
+ file.add_string_attribute('block_size', str(os.stat(filename).st_blksize))
+ </programlisting>
+</example>
+
+ </refsect1>
+
+<!-- ****************************** -->
+<!-- BEGIN OF METHODS -->
+<!-- ****************************** -->
+
+ <refsect1>
+ <title>Expected Methods</title>
+
+ <refsect2 id="method-nautilus-column-provider--get-columns">
+ <title>nautilus.ColumnProvider.get_columns</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_columns</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis> :</term>
+ <listitem><simpara>a list of <literal>nautilus.Column</literal></simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_columns</methodname>() method returns a list of
+ <link linkend="class-nautilus-python-column"><classname>nautilus.Column</classname></link>.
+ </para>
+ </refsect2>
+ </refsect1>
+
+</refentry>
+
diff --git a/docs/reference/nautilus-python-column.xml b/docs/reference/nautilus-python-column.xml
new file mode 100644
index 0000000..a21da75
--- /dev/null
+++ b/docs/reference/nautilus-python-column.xml
@@ -0,0 +1,159 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-nautilus-python-column">
+ <refnamediv>
+ <refname>nautilus.Column</refname>
+ <refpurpose>nautilus.Column Reference</refpurpose>
+ </refnamediv>
+
+<!-- ******************************* -->
+<!-- BEGIN OF NAUTILUS-PYTHON SYNOPSIS -->
+<!-- ******************************* -->
+
+ <refsect1>
+ <title>Synopsis</title>
+
+ <classsynopsis language="python">
+ <ooclass><classname>nautilus.Column</classname></ooclass>
+ <ooclass><classname><link linkend="class-gobject">gobject.GObject</link></classname></ooclass>
+
+ <constructorsynopsis language="python">
+ <methodname><link linkend="constructor-nautilus-column">nautilus.Column</link></methodname>
+ <methodparam><parameter role="keyword">name</parameter></methodparam>
+ <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+ <methodparam><parameter role="keyword">label</parameter></methodparam>
+ <methodparam><parameter role="keyword">description</parameter></methodparam>
+ </constructorsynopsis>
+ </classsynopsis>
+ </refsect1>
+
+<!-- ********************************* -->
+<!-- BEGIN OF ANCESTRY -->
+<!-- ********************************* -->
+
+<refsect1>
+ <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
+ +-- <link linkend="class-nautilus-python-column">nautilus.Column</link>
+</synopsis>
+</refsect1>
+
+
+<!-- ********************************** -->
+<!-- BEGIN OF DESCRIPTION -->
+<!-- ********************************** -->
+
+ <refsect1 id="description-column">
+ <title>Description</title>
+
+ <para>
+ A list of <link linkend="class-nautilus-python-column"><classname>nautilus.Column</classname></link> objects is returned by <link linkend="class-nautilus-python-column-provider"><classname>nautilus.ColumnProvider</classname></link> extensions.
+ </para>
+
+ </refsect1>
+
+
+<!-- *********************************** -->
+<!-- BEGIN OF PROPERTIES -->
+<!-- *********************************** -->
+
+<refsect1>
+ <title>Properties</title>
+
+ <blockquote role="properties">
+ <informaltable pgwide="1" frame="none">
+ <tgroup cols="3">
+ <colspec column="1" colwidth="1in"/>
+ <colspec column="2" colwidth="1in"/>
+ <colspec column="3" colwidth="4in"/>
+ <tbody>
+
+ <row valign="top">
+ <entry>"attribute"</entry>
+ <entry>string</entry>
+ <entry>Read / Write</entry>
+ </row>
+
+ <row valign="top">
+ <entry>"attribute-q"</entry>
+ <entry>int</entry>
+ <entry>Read</entry>
+ </row>
+
+ <row valign="top">
+ <entry>"description"</entry>
+ <entry>string</entry>
+ <entry>Read / Write</entry>
+ </row>
+
+ <row valign="top">
+ <entry>"label"</entry>
+ <entry>string</entry>
+ <entry>Read / Write</entry>
+ </row>
+
+ <row valign="top">
+ <entry>"name"</entry>
+ <entry>string</entry>
+ <entry>Read / Write / Construct Only</entry>
+ </row>
+
+ <row valign="top">
+ <entry>"xalign"</entry>
+ <entry>float</entry>
+ <entry>Read / Write</entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </blockquote>
+</refsect1>
+
+
+<!-- ************************************ -->
+<!-- BEGIN OF CONSTRUCTOR -->
+<!-- ************************************ -->
+
+<refsect1 id="constructor-nautilus-column">
+ <title>Constructor</title>
+
+ <programlisting><constructorsynopsis language="python">
+ <methodname>nautilus.Column</methodname>
+ <methodparam><parameter role="keyword">name</parameter></methodparam>
+ <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+ <methodparam><parameter role="keyword">label</parameter></methodparam>
+ <methodparam><parameter role="keyword">description</parameter></methodparam>
+ </constructorsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">name</parameter> :</term>
+ <listitem><simpara>identifier of the column</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">attribute</parameter> :</term>
+ <listitem><simpara>the file attribute to be displayed in the column</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">label</parameter> :</term>
+ <listitem><simpara>the user-visible label for the column</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">description</parameter> :</term>
+ <listitem><simpara>a user-visible description of the column</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ Creates a new <link linkend="class-nautilus-python-column"><classname>nautilus.Column</classname></link> object.
+ </para>
+</refsect1>
+
+
+
+</refentry>
+
diff --git a/docs/reference/nautilus-python-menu-item.xml b/docs/reference/nautilus-python-menu-item.xml
new file mode 100644
index 0000000..6f798cc
--- /dev/null
+++ b/docs/reference/nautilus-python-menu-item.xml
@@ -0,0 +1,434 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-nautilus-python-menu-item">
+ <refnamediv>
+ <refname>nautilus.MenuItem</refname>
+ <refpurpose>nautilus.MenuItem Reference</refpurpose>
+ </refnamediv>
+
+<!-- ******************************* -->
+<!-- BEGIN OF NAUTILUS-PYTHON SYNOPSIS -->
+<!-- ******************************* -->
+
+ <refsect1>
+ <title>Synopsis</title>
+
+ <classsynopsis language="python">
+ <ooclass><classname>nautilus.MenuItem</classname></ooclass>
+ <ooclass><classname><link linkend="class-gobject">gobject.GObject</link></classname></ooclass>
+
+ <constructorsynopsis language="python">
+ <methodname><link linkend="constructor-nautilus-menu-item">nautilus.MenuItem</link></methodname>
+ <methodparam><parameter role="keyword">name</parameter></methodparam>
+ <methodparam><parameter role="keyword">label</parameter></methodparam>
+ <methodparam><parameter role="keyword">tooltip</parameter></methodparam>
+ <methodparam><parameter role="keyword">icon</parameter></methodparam>
+ </constructorsynopsis>
+
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-nautilus-python-menu-item--activate">activate</link></methodname>
+ </methodsynopsis>
+
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-nautilus-python-menu-item--set_submenu">set_submenu</link></methodname>
+ <methodparam><parameter role="keyword">menu</parameter></methodparam>
+ </methodsynopsis>
+
+ </classsynopsis>
+ </refsect1>
+
+<!-- ********************************* -->
+<!-- BEGIN OF ANCESTRY -->
+<!-- ********************************* -->
+
+<refsect1>
+ <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
+ +-- <link linkend="class-nautilus-python-menu-item">nautilus.MenuItem</link>
+</synopsis>
+</refsect1>
+
+
+<!-- ********************************** -->
+<!-- BEGIN OF DESCRIPTION -->
+<!-- ********************************** -->
+
+ <refsect1 id="description-menu-item">
+ <title>Description</title>
+
+ <para>
+ <link linkend="class-nautilus-python-menu-item"><classname>nautilus.MenuItem</classname></link> objects are appended to lists to create menus and submenus.
+ </para>
+
+ </refsect1>
+
+
+<!-- *********************************** -->
+<!-- BEGIN OF PROPERTIES -->
+<!-- *********************************** -->
+
+<refsect1>
+ <title>Properties</title>
+
+ <blockquote role="properties">
+ <informaltable pgwide="1" frame="none">
+ <tgroup cols="3">
+ <colspec menu="1" colwidth="1in"/>
+ <colspec menu="2" colwidth="1in"/>
+ <colspec menu="3" colwidth="4in"/>
+ <tbody>
+
+ <row valign="top">
+ <entry>"<link linkend="property-nautilus-python-menu-item--icon">icon</link>"</entry>
+ <entry>string</entry>
+ <entry>Read / Write</entry>
+ </row>
+
+ <row valign="top">
+ <entry>"<link linkend="property-nautilus-python-menu-item--label">label</link>"</entry>
+ <entry>string</entry>
+ <entry>Read / Write</entry>
+ </row>
+
+ <row valign="top">
+ <entry>"<link linkend="property-nautilus-python-menu-item--menu">menu</link>"</entry>
+ <entry><link linkend="class-nautilus-python-menu">nautilus.Menu</link></entry>
+ <entry>Read / Write</entry>
+ </row>
+
+ <row valign="top">
+ <entry>"<link linkend="property-nautilus-python-menu-item--name">name</link>"</entry>
+ <entry>string</entry>
+ <entry>Read / Write / Construct Only</entry>
+ </row>
+
+ <row valign="top">
+ <entry>"<link linkend="property-nautilus-python-menu-item--priority">priority</link>"</entry>
+ <entry>boolean</entry>
+ <entry>Read / Write</entry>
+ </row>
+
+ <row valign="top">
+ <entry>"<link linkend="property-nautilus-python-menu-item--sensitive">sensitive</link>"</entry>
+ <entry>boolean</entry>
+ <entry>Read / Write</entry>
+ </row>
+
+ <row valign="top">
+ <entry>"<link linkend="property-nautilus-python-menu-item--tip">tip</link>"</entry>
+ <entry>string</entry>
+ <entry>Read / Write</entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </blockquote>
+</refsect1>
+
+
+<!-- ****************************************** -->
+<!-- BEGIN OF SIGNAL PROTOTYPES -->
+<!-- ****************************************** -->
+
+<refsect1>
+ <title>Signals</title>
+ <variablelist>
+ <varlistentry>
+ <term><link linkend="signal-nautilus-python-menu-item--activate">"activate"</link></term>
+ <listitem>
+ <methodsynopsis language="python"><methodname>callback</methodname>
+ <methodparam><parameter>item</parameter></methodparam>
+ <methodparam><parameter>user_param1</parameter></methodparam>
+ <methodparam><parameter>user_param2</parameter></methodparam>
+ <methodparam><parameter>...</parameter></methodparam>
+ </methodsynopsis>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+</refsect1>
+
+
+
+
+<!-- ************************************ -->
+<!-- BEGIN OF CONSTRUCTOR -->
+<!-- ************************************ -->
+
+<refsect1 id="constructor-nautilus-menu-item">
+ <title>Constructor</title>
+
+ <programlisting><constructorsynopsis language="python">
+ <methodname>nautilus.MenuItem</methodname>
+ <methodparam><parameter role="keyword">name</parameter></methodparam>
+ <methodparam><parameter role="keyword">label</parameter></methodparam>
+ <methodparam><parameter role="keyword">tooltip</parameter></methodparam>
+ <methodparam><parameter role="keyword">icon</parameter></methodparam>
+ </constructorsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">name</parameter> :</term>
+ <listitem><simpara>identifier of the item</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">label</parameter> :</term>
+ <listitem><simpara>the user-visible label for the item</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">tooltip</parameter> :</term>
+ <listitem><simpara>the user-visible tooltip for the item</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">icon</parameter> :</term>
+ <listitem><simpara>Name of the icon to display in the item</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ Creates a new <link linkend="class-nautilus-python-menu-item"><classname>nautilus.MenuItem</classname></link> object.
+ </para>
+</refsect1>
+
+
+<!-- ******************************** -->
+<!-- BEGIN OF METHODS -->
+<!-- ******************************** -->
+
+<refsect1>
+ <title>Public Methods</title>
+
+ <refsect2 id="method-nautilus-python-menu-item--activate">
+ <title>nautilus.MenuItem.activate</title>
+ <programlisting><methodsynopsis language="python">
+ <methodname>activate</methodname>
+ </methodsynopsis></programlisting>
+
+ <para>
+ Generates the "<link linkend="signal-nautilus-python-menu-item--activate">activate</link>" signal for this <link linkend="class-nautilus-python-menu-item"><classname>nautilus.MenuItem</classname></link>.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-nautilus-python-menu-item--set_submenu">
+ <title>nautilus.MenuItem.set_submenu</title>
+ <programlisting><methodsynopsis language="python">
+ <methodname>set_submenu</methodname>
+ <methodparam><parameter role="keyword">menu</parameter></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">menu</parameter> :</term>
+ <listitem><simpara>a <link linkend="class-nautilus-python-menu"><classname>nautilus.Menu</classname></link></simpara></listitem>
+ </varlistentry>
+ </variablelist>
+ <para>
+ Attaches a <link linkend="class-nautilus-python-menu"><classname>nautilus.Menu</classname></link> as the submenu for this <link linkend="class-nautilus-python-menu-item"><classname>nautilus.MenuItem</classname></link>.
+ </para>
+ </refsect2>
+</refsect1>
+
+
+<!-- ******************************** -->
+<!-- BEGIN OF PROPERTY DETAILS -->
+<!-- ******************************** -->
+<refsect1>
+ <title>Property Details</title>
+
+ <refsect2 id="property-nautilus-python-menu-item--icon">
+ <title>The "name" property</title>
+ <blockquote role="properties">
+ <informaltable pgwide="1" frame="none">
+ <tgroup cols="3">
+ <colspec menu="1" colwidth="1in"/>
+ <colspec menu="2" colwidth="1in"/>
+ <colspec menu="3" colwidth="4in"/>
+ <tbody>
+ <row valign="top">
+ <entry>"icon"</entry>
+ <entry>string</entry>
+ <entry>Read / Write</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </blockquote>
+ <para>Name of the icon to display in the menu item.</para>
+ <para>Default value: None</para>
+ </refsect2>
+
+ <refsect2 id="property-nautilus-python-menu-item--label">
+ <title>The "label" property</title>
+ <blockquote role="properties">
+ <informaltable pgwide="1" frame="none">
+ <tgroup cols="3">
+ <colspec menu="1" colwidth="1in"/>
+ <colspec menu="2" colwidth="1in"/>
+ <colspec menu="3" colwidth="4in"/>
+ <tbody>
+ <row valign="top">
+ <entry>"label"</entry>
+ <entry>string</entry>
+ <entry>Read / Write</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </blockquote>
+ <para>Label to display to the user.</para>
+ <para>Default value: None</para>
+ </refsect2>
+
+ <refsect2 id="property-nautilus-python-menu-item--menu">
+ <title>The "menu" property</title>
+ <blockquote role="properties">
+ <informaltable pgwide="1" frame="none">
+ <tgroup cols="3">
+ <colspec menu="1" colwidth="1in"/>
+ <colspec menu="2" colwidth="1in"/>
+ <colspec menu="3" colwidth="4in"/>
+ <tbody>
+ <row valign="top">
+ <entry>"menu"</entry>
+ <entry><link linkend="class-nautilus-python-menu-item">nautilus.Menu</link></entry>
+ <entry>Read / Write</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </blockquote>
+ <para>The menu belonging to this item. May be null.</para>
+ </refsect2>
+
+ <refsect2 id="property-nautilus-python-menu-item--name">
+ <title>The "name" property</title>
+ <blockquote role="properties">
+ <informaltable pgwide="1" frame="none">
+ <tgroup cols="3">
+ <colspec menu="1" colwidth="1in"/>
+ <colspec menu="2" colwidth="1in"/>
+ <colspec menu="3" colwidth="4in"/>
+ <tbody>
+ <row valign="top">
+ <entry>"name"</entry>
+ <entry>string</entry>
+ <entry>Read / Write / Construct Only</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </blockquote>
+ <para>Name of the item.</para>
+ <para>Default value: None</para>
+ </refsect2>
+
+ <refsect2 id="property-nautilus-python-menu-item--priority">
+ <title>The "priority" property</title>
+ <blockquote role="properties">
+ <informaltable pgwide="1" frame="none">
+ <tgroup cols="3">
+ <colspec menu="1" colwidth="1in"/>
+ <colspec menu="2" colwidth="1in"/>
+ <colspec menu="3" colwidth="4in"/>
+ <tbody>
+ <row valign="top">
+ <entry>"priority"</entry>
+ <entry>boolean</entry>
+ <entry>Read / Write</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </blockquote>
+ <para>Show priority text in toolbars.</para>
+ <para>Default value: True</para>
+ </refsect2>
+
+ <refsect2 id="property-nautilus-python-menu-item--sensitive">
+ <title>The "sensitive" property</title>
+ <blockquote role="properties">
+ <informaltable pgwide="1" frame="none">
+ <tgroup cols="3">
+ <colspec menu="1" colwidth="1in"/>
+ <colspec menu="2" colwidth="1in"/>
+ <colspec menu="3" colwidth="4in"/>
+ <tbody>
+ <row valign="top">
+ <entry>"sensitive"</entry>
+ <entry>boolean</entry>
+ <entry>Read / Write</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </blockquote>
+ <para>Whether the menu item is sensitive.</para>
+ <para>Default value: True</para>
+ </refsect2>
+
+ <refsect2 id="property-nautilus-python-menu-item--tip">
+ <title>The "tip" property</title>
+ <blockquote role="properties">
+ <informaltable pgwide="1" frame="none">
+ <tgroup cols="3">
+ <colspec menu="1" colwidth="1in"/>
+ <colspec menu="2" colwidth="1in"/>
+ <colspec menu="3" colwidth="4in"/>
+ <tbody>
+ <row valign="top">
+ <entry>"tip"</entry>
+ <entry>string</entry>
+ <entry>Read / Write</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </blockquote>
+ <para>Tooltip for the menu item.</para>
+ <para>Default value: None</para>
+ </refsect2>
+</refsect1>
+
+
+<!-- ******************************** -->
+<!-- BEGIN OF SIGNAL DETAILS -->
+<!-- ******************************** -->
+
+<refsect1>
+ <title>Signal Details</title>
+
+ <refsect2 id="signal-nautilus-python-menu-item--activate">
+ <title>The "activate" nautilus.MenuItem Signal</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>callback</methodname>
+ <methodparam><parameter>item</parameter></methodparam>
+ <methodparam><parameter>user_param1</parameter></methodparam>
+ <methodparam><parameter>user_param2</parameter></methodparam>
+ <methodparam><parameter>...</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>item</parameter> :</term>
+ <listitem><simpara>the <link linkend="class-nautilus-python-menu-item"><classname>nautilus.MenuItem</classname></link> being activated</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>user_param1[,2,3...]</parameter> :</term>
+ <listitem><simpara>Additional parameter(s) the user attaches to the signal connector</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ Emits the "<link linkend="signal-nautilus-python-menu-item--activate">activate</link>" signal.
+ </para>
+
+ </refsect2>
+</refsect1>
+
+
+
+</refentry>
+
diff --git a/docs/reference/nautilus-python-menu-provider.xml b/docs/reference/nautilus-python-menu-provider.xml
new file mode 100644
index 0000000..a02e8b1
--- /dev/null
+++ b/docs/reference/nautilus-python-menu-provider.xml
@@ -0,0 +1,418 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-nautilus-python-menu-provider">
+ <refnamediv>
+ <refname>nautilus.MenuProvider</refname>
+ <refpurpose>nautilus.MenuProvider Reference</refpurpose>
+ </refnamediv>
+
+<!-- ******************************* -->
+<!-- BEGIN OF SYNOPSIS -->
+<!-- ******************************* -->
+
+ <refsect1>
+ <title>Synopsis</title>
+
+ <classsynopsis language="python">
+ <ooclass><classname>nautilus.MenuProvider</classname></ooclass>
+
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-nautilus-python-menu-provider--get-file-items">get_file_items</link></methodname>
+ <methodparam><parameter role="keyword">window</parameter></methodparam>
+ <methodparam><parameter role="keyword">files</parameter></methodparam>
+ </methodsynopsis>
+
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-nautilus-python-menu-provider--get-file-items-full">get_file_items_full</link></methodname>
+ <methodparam><parameter role="keyword">provider</parameter></methodparam>
+ <methodparam><parameter role="keyword">window</parameter></methodparam>
+ <methodparam><parameter role="keyword">files</parameter></methodparam>
+ </methodsynopsis>
+
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-nautilus-python-menu-provider--get-background-items">get_background_items</link></methodname>
+ <methodparam><parameter role="keyword">window</parameter></methodparam>
+ <methodparam><parameter role="keyword">folder</parameter></methodparam>
+ </methodsynopsis>
+
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-nautilus-python-menu-provider--get-background-items-full">get_background_items_full</link></methodname>
+ <methodparam><parameter role="keyword">provider</parameter></methodparam>
+ <methodparam><parameter role="keyword">window</parameter></methodparam>
+ <methodparam><parameter role="keyword">folder</parameter></methodparam>
+ </methodsynopsis>
+
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-nautilus-python-menu-provider--get-toolbar-items">get_toolbar_items</link></methodname>
+ <methodparam><parameter role="keyword">window</parameter></methodparam>
+ <methodparam><parameter role="keyword">folder</parameter></methodparam>
+ </methodsynopsis>
+
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-nautilus-python-menu-provider--get-toolbar-items-full">get_toolbar_items_full</link></methodname>
+ <methodparam><parameter role="keyword">provider</parameter></methodparam>
+ <methodparam><parameter role="keyword">window</parameter></methodparam>
+ <methodparam><parameter role="keyword">folder</parameter></methodparam>
+ </methodsynopsis>
+
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-nautilus-python-menu-provider--emit-items-updated-signal">emit_items_updated_signal</link></methodname>
+ <methodparam><parameter role="keyword">provider</parameter></methodparam>
+ </methodsynopsis>
+ </classsynopsis>
+ </refsect1>
+
+<!-- ********************************** -->
+<!-- BEGIN OF DESCRIPTION -->
+<!-- ********************************** -->
+
+ <refsect1 id="description-menu-provider">
+ <title>Description</title>
+
+ <para>
+ An extension that sub-classes <link linkend="class-nautilus-python-menu-provider"><classname>nautilus.MenuProvider</classname></link>
+ will be asked to provide a list of menu items back to Nautilus, which are then attached to various menus. Nautilus expects at least one of
+ the following methods to be defined (or their *_full variants): get_file_items, get_background_items, or get_toolbar_items.
+ </para>
+
+<example>
+ <title>nautilus.MenuProvider Example</title>
+ <programlisting>
+import os
+import urllib
+
+import gtk
+import nautilus
+import gconf
+
+TERMINAL_KEY = '/desktop/gnome/applications/terminal/exec'
+
+class OpenTerminalExtension(nautilus.MenuProvider):
+ def __init__(self):
+ self.client = gconf.client_get_default()
+
+ def _open_terminal(self, file):
+ filename = urllib.unquote(file.get_uri()[7:])
+ terminal = self.client.get_string(TERMINAL_KEY)
+
+ os.chdir(filename)
+ os.system('%s &' % terminal)
+
+ def menu_activate_cb(self, menu, file):
+ self._open_terminal(file)
+
+ def menu_background_activate_cb(self, menu, file):
+ self._open_terminal(file)
+
+ def get_file_items(self, window, files):
+ if len(files) != 1:
+ return
+
+ file = files[0]
+ if not file.is_directory() or file.get_uri_scheme() != 'file':
+ return
+
+ item = nautilus.MenuItem('NautilusPython::openterminal_file_item',
+ 'Open Terminal' ,
+ 'Open Terminal In %s' % file.get_name())
+ item.connect('activate', self.menu_activate_cb, file)
+ return item,
+
+ def get_background_items(self, window, file):
+ item = nautilus.MenuItem('NautilusPython::openterminal_item',
+ 'Open Terminal Here',
+ 'Open Terminal In This Directory')
+ item.connect('activate', self.menu_background_activate_cb, file)
+ return item,
+ </programlisting>
+</example>
+
+
+<!-- ****************************************** -->
+<!-- BEGIN OF SIGNAL PROTOTYPES -->
+<!-- ****************************************** -->
+
+<refsect1>
+ <title>Signals</title>
+ <variablelist>
+ <varlistentry>
+ <term><link linkend="signal-nautilus-python-menu-provider--items-updated">"items-updated"</link></term>
+ <listitem>
+ <methodsynopsis language="python"><methodname>callback</methodname>
+ </methodsynopsis>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+</refsect1>
+
+
+ </refsect1>
+
+<!-- ****************************** -->
+<!-- BEGIN OF METHODS -->
+<!-- ****************************** -->
+
+ <refsect1>
+ <title>Expected Methods</title>
+
+ <refsect2 id="method-nautilus-python-menu-provider--get-file-items">
+ <title>nautilus.MenuProvider.get_file_items</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_file_items</methodname>
+ <methodparam><parameter role="keyword">window</parameter></methodparam>
+ <methodparam><parameter role="keyword">files</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">window</parameter> :</term>
+ <listitem><simpara>the current <link linkend="class-gtkwindow"><classname>gtk.Window</classname></link> instance</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">menu</parameter> :</term>
+ <listitem><simpara>a list of <link linkend="class-nautilus-python-file-info"><classname>nautilus.FileInfo</classname></link> objects.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis> :</term>
+ <listitem><simpara>a list of <link linkend="class-nautilus-python-menu-item"><classname>nautilus.MenuItem</classname></link> objects</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_file_items</methodname>() method returns a list of
+ <link linkend="class-nautilus-python-menu-item"><classname>nautilus.MenuItem</classname></link> objects.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-nautilus-python-menu-provider--get-file-items-full">
+ <title>nautilus.MenuProvider.get_file_items_full</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_file_items_full</methodname>
+ <methodparam><parameter role="keyword">provider</parameter></methodparam>
+ <methodparam><parameter role="keyword">window</parameter></methodparam>
+ <methodparam><parameter role="keyword">files</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">provider</parameter> :</term>
+ <listitem><simpara>the current <link linkend="class-nautilus-python-menu-provider"><classname>nautilus.MenuProvider</classname></link> instance</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">window</parameter> :</term>
+ <listitem><simpara>the current <link linkend="class-gtkwindow"><classname>gtk.Window</classname></link> instance</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">files</parameter> :</term>
+ <listitem><simpara>a list of <link linkend="class-nautilus-python-file-info"><classname>nautilus.FileInfo</classname></link> objects.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis> :</term>
+ <listitem><simpara>a list of <link linkend="class-nautilus-python-menu-item"><classname>nautilus.MenuItem</classname></link> objects</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_file_items_full</methodname>() method returns a list of
+ <link linkend="class-nautilus-python-menu-item"><classname>nautilus.MenuItem</classname> objects</link>.
+ </para>
+ <para>
+ This method was created in order to allow extension writers to call the
+ <link linkend="method-nautilus-menu-provider--emit_items_updated_signal">nautilus.MenuProvider.emit_items_updated_signal</link>, which must
+ be passed the current provider instance.
+ </para>
+ </refsect2>
+
+
+ <refsect2 id="method-nautilus-python-menu-provider--get-background-items">
+ <title>nautilus.MenuProvider.get_background_items</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_background_items</methodname>
+ <methodparam><parameter role="keyword">window</parameter></methodparam>
+ <methodparam><parameter role="keyword">folder</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">window</parameter> :</term>
+ <listitem><simpara>the current <link linkend="class-gtkwindow"><classname>gtk.Window</classname></link> instance</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">folder</parameter> :</term>
+ <listitem><simpara>the current folder, as a <link linkend="class-nautilus-python-file-info"><classname>nautilus.FileInfo</classname></link> object.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis> :</term>
+ <listitem><simpara>a list of <link linkend="class-nautilus-python-menu-item"><classname>nautilus.MenuItem</classname></link> objects</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_background_items</methodname>() method returns a list of
+ <link linkend="class-nautilus-python-menu-item"><classname>nautilus.MenuItem</classname> objects</link>.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-nautilus-python-menu-provider--get-background-items-full">
+ <title>nautilus.MenuProvider.get_background_items_full</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_background_items_full</methodname>
+ <methodparam><parameter role="keyword">provider</parameter></methodparam>
+ <methodparam><parameter role="keyword">window</parameter></methodparam>
+ <methodparam><parameter role="keyword">folder</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">provider</parameter> :</term>
+ <listitem><simpara>the current <link linkend="class-nautilus-python-menu-provider"><classname>nautilus.MenuProvider</classname></link> instance</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">window</parameter> :</term>
+ <listitem><simpara>the current <link linkend="class-gtkwindow"><classname>gtk.Window</classname></link> instance</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">folder</parameter> :</term>
+ <listitem><simpara>the current folder, as a <link linkend="class-nautilus-python-file-info"><classname>nautilus.FileInfo</classname></link> object.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis> :</term>
+ <listitem><simpara>a list of <link linkend="class-nautilus-python-menu-item"><classname>nautilus.MenuItem</classname></link> objects</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_background_items_full</methodname>() method returns a list of
+ <link linkend="class-nautilus-python-menu-item"><classname>nautilus.MenuItem</classname> objects</link>.
+ </para>
+ <para>
+ This method was created in order to allow extension writers to call the
+ <link linkend="method-nautilus-menu-provider--emit_items_updated_signal">nautilus.MenuProvider.emit_items_updated_signal</link>, which must
+ be passed the current provider instance.
+ </para>
+ </refsect2>
+
+
+ <refsect2 id="method-nautilus-python-menu-provider--get-toolbar-items">
+ <title>nautilus.MenuProvider.get_toolbar_items</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_toolbar_items</methodname>
+ <methodparam><parameter role="keyword">window</parameter></methodparam>
+ <methodparam><parameter role="keyword">folder</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">window</parameter> :</term>
+ <listitem><simpara>the current <link linkend="class-gtkwindow"><classname>gtk.Window</classname></link> instance</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">folder</parameter> :</term>
+ <listitem><simpara>the current folder, as a <link linkend="class-nautilus-python-file-info"><classname>nautilus.FileInfo</classname></link> object.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis> :</term>
+ <listitem><simpara>a list of <link linkend="class-nautilus-python-menu-item"><classname>nautilus.MenuItem</classname></link> objects</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_toolbar_items</methodname>() method returns a list of
+ <link linkend="class-nautilus-python-menu-item"><classname>nautilus.MenuItem</classname> objects</link>.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-nautilus-python-menu-provider--get-toolbar-items-full">
+ <title>nautilus.MenuProvider.get_toolbar_items_full</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_toolbar_items_full</methodname>
+ <methodparam><parameter role="keyword">provider</parameter></methodparam>
+ <methodparam><parameter role="keyword">window</parameter></methodparam>
+ <methodparam><parameter role="keyword">folder</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">provider</parameter> :</term>
+ <listitem><simpara>the current <link linkend="class-nautilus-python-menu-provider"><classname>nautilus.MenuProvider</classname></link> instance</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">window</parameter> :</term>
+ <listitem><simpara>the current <link linkend="class-gtkwindow"><classname>gtk.Window</classname></link> instance</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">folder</parameter> :</term>
+ <listitem><simpara>the current folder, as a <link linkend="class-nautilus-python-file-info"><classname>nautilus.FileInfo</classname></link> object.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis> :</term>
+ <listitem><simpara>a list of <link linkend="class-nautilus-python-menu-item"><classname>nautilus.MenuItem</classname></link> objects</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_toolbar_items_full</methodname>() method returns a list of
+ <link linkend="class-nautilus-python-menu-item"><classname>nautilus.MenuItem</classname> objects</link>.
+ </para>
+ <para>
+ This method was created in order to allow extension writers to call the
+ <link linkend="method-nautilus-menu-provider--emit_items_updated_signal">nautilus.MenuProvider.emit_items_updated_signal</link>, which must
+ be passed the current provider instance.
+ </para>
+ </refsect2>
+ </refsect1>
+
+ <refsect1>
+ <title>Public Methods</title>
+
+ <refsect2 id="method-nautilus-python-menu-provider--emit-items-updated-signal">
+ <title>nautilus.MenuProvider.emit_items_updated_signal</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>emit_items_updated_signal</methodname>
+ <methodparam><parameter role="keyword">provider</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">provider</parameter> :</term>
+ <listitem><simpara>the current <link linkend="class-nautilus-python-menu-provider"><classname>nautilus.MenuProvider</classname></link> instance</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ Emits the "<link linkend="signal-nautilus-python-menu-provider--items-updated">items-updated</link>" signal.
+ </para>
+ </refsect2>
+ </refsect1>
+
+
+
+<!-- ******************************** -->
+<!-- BEGIN OF SIGNAL DETAILS -->
+<!-- ******************************** -->
+
+<refsect1>
+ <title>Signal Details</title>
+
+ <refsect2 id="signal-nautilus-python-menu-provider--items-updated">
+ <title>The "items-updated" nautilus.MenuProvider Signal</title>
+
+ <para>
+ Emits the "<link linkend="signal-nautilus-python-menu-provider--items-updated">items-updated</link>" signal.
+ </para>
+
+ </refsect2>
+</refsect1>
+
+
+</refentry>
+
diff --git a/docs/reference/nautilus-python-menu.xml b/docs/reference/nautilus-python-menu.xml
new file mode 100644
index 0000000..fcb89a3
--- /dev/null
+++ b/docs/reference/nautilus-python-menu.xml
@@ -0,0 +1,123 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-nautilus-python-menu">
+ <refnamediv>
+ <refname>nautilus.Menu</refname>
+ <refpurpose>nautilus.Menu Reference</refpurpose>
+ </refnamediv>
+
+<!-- ******************************* -->
+<!-- BEGIN OF NAUTILUS-PYTHON SYNOPSIS -->
+<!-- ******************************* -->
+
+ <refsect1>
+ <title>Synopsis</title>
+
+ <classsynopsis language="python">
+ <ooclass><classname>nautilus.Menu</classname></ooclass>
+ <ooclass><classname><link linkend="class-gobject">gobject.GObject</link></classname></ooclass>
+
+ <constructorsynopsis language="python">
+ <methodname><link linkend="constructor-nautilus-menu">nautilus.Menu</link></methodname>
+ </constructorsynopsis>
+
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-nautilus-python-menu--append_item">append_item</link></methodname>
+ <methodparam><parameter role="keyword">item</parameter></methodparam>
+ </methodsynopsis>
+
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-nautilus-python-menu--get_items">get_items</link></methodname>
+ </methodsynopsis>
+
+ </classsynopsis>
+ </refsect1>
+
+<!-- ********************************* -->
+<!-- BEGIN OF ANCESTRY -->
+<!-- ********************************* -->
+
+<refsect1>
+ <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
+ +-- <link linkend="class-nautilus-python-menu">nautilus.Menu</link>
+</synopsis>
+</refsect1>
+
+
+<!-- ********************************** -->
+<!-- BEGIN OF DESCRIPTION -->
+<!-- ********************************** -->
+
+ <refsect1 id="description-menu">
+ <title>Description</title>
+
+ <para>
+ A nautilus.Menu object allows an extension to create sub-menus.
+ </para>
+
+ </refsect1>
+
+
+
+<!-- ************************************ -->
+<!-- BEGIN OF CONSTRUCTOR -->
+<!-- ************************************ -->
+
+<refsect1 id="constructor-nautilus-menu">
+ <title>Constructor</title>
+
+ <programlisting><constructorsynopsis language="python">
+ <methodname>nautilus.Menu</methodname>
+ </constructorsynopsis></programlisting>
+
+ <para>
+ Creates a new <link linkend="class-nautilus-python-menu"><classname>nautilus.Menu</classname></link> object.
+ </para>
+</refsect1>
+
+
+
+<!-- ******************************** -->
+<!-- BEGIN OF METHODS -->
+<!-- ******************************** -->
+
+<refsect1>
+ <title>Public Methods</title>
+
+ <refsect2 id="method-nautilus-python-menu--append_item">
+ <title>nautilus.Menu.append_item</title>
+ <programlisting><methodsynopsis language="python">
+ <methodname>append_item</methodname>
+ <methodparam><parameter role="keyword">item</parameter></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">item</parameter> :</term>
+ <listitem><simpara>a <link linkend="class-nautilus-python-menu-item"><classname>nautilus.MenuItem</classname></link></simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ Append a <link linkend="class-nautilus-python-menu-item"><classname>nautilus.MenuItem</classname></link> to a <link linkend="class-nautilus-python-menu"><classname>nautilus.Menu</classname></link>.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-nautilus-python-menu--get_items">
+ <title>nautilus.Menu.get_items</title>
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_items</methodname>
+ </methodsynopsis></programlisting>
+ <para>
+ Returns a list of <link linkend="class-nautilus-python-menu-item"><classname>nautilus.MenuItem</classname></link> objects attached to the <link linkend="class-nautilus-python-menu"><classname>nautilus.Menu</classname></link>.
+ </para>
+ </refsect2>
+</refsect1>
+
+
+
+</refentry>
+
diff --git a/docs/reference/nautilus-python-ref.xml b/docs/reference/nautilus-python-ref.xml
new file mode 100644
index 0000000..b406727
--- /dev/null
+++ b/docs/reference/nautilus-python-ref.xml
@@ -0,0 +1,36 @@
+<?xml version='1.0'?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"
+[
+<!ENTITY % entities SYSTEM "entities.docbook">
+%entities;
+<!ENTITY builddate SYSTEM "builddate.xml">
+<!ENTITY version SYSTEM "version.xml">
+]>
+<book id="nautilus-python-reference" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <bookinfo>
+ <pubdate>&builddate;</pubdate>
+ <title>nautilus-python Reference Manual</title>
+ <edition>Reference Manual for nautilus-python &version;</edition>
+ <releaseinfo>For nautilus-python version &version;</releaseinfo>
+ <authorgroup>
+ <author>
+ <firstname>Adam</firstname>
+ <surname>Plumb</surname>
+ </author>
+ </authorgroup>
+ <abstract>
+ <para>This reference describes the classes of the nautilus-python module.</para>
+ </abstract>
+ </bookinfo>
+ <toc>
+ </toc>
+
+<!-- the reference page chapters for the nautilus-python classes -->
+
+ <xi:include href="nautilus-python-column.xml"/>
+ <xi:include href="nautilus-python-column-provider.xml"/>
+ <xi:include href="nautilus-python-menu.xml"/>
+ <xi:include href="nautilus-python-menu-item.xml"/>
+ <xi:include href="nautilus-python-menu-provider.xml"/>
+</book>
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]