~ubuntu-branches/ubuntu/saucy/nautilus-python/saucy

« back to all changes in this revision

Viewing changes to docs/reference/nautilus-python-location-widget-provider.xml

  • Committer: Bazaar Package Importer
  • Author(s): Michael Terry
  • Date: 2011-07-06 13:17:39 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20110706131739-ardhj06fem65n3l3
Tags: 1.0-0ubuntu1
* New upstream release that works with nautilus 3.0
* debian/control.in:
  - Update dependencies

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" standalone="no"?>
 
2
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
 
3
    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
 
4
 
 
5
<refentry id="class-nautilus-python-location-widget-provider">
 
6
  <refnamediv>
 
7
    <refname>Nautilus.LocationWidgetProvider</refname>
 
8
    <refpurpose>Nautilus.LocationWidgetProvider Reference</refpurpose>
 
9
  </refnamediv>
 
10
 
 
11
<!-- ******************************* -->
 
12
<!-- BEGIN OF SYNOPSIS -->
 
13
<!-- ******************************* -->
 
14
 
 
15
  <refsect1>
 
16
    <title>Synopsis</title>
 
17
 
 
18
    <classsynopsis language="python">
 
19
      <ooclass><classname>Nautilus.LocationWidgetProvider</classname></ooclass>
 
20
 
 
21
      <methodsynopsis language="python">
 
22
        <methodname><link linkend="method-nautilus-location-widget-provider--get-widget">get_widget</link></methodname>
 
23
        <methodparam><parameter role="keyword">uri</parameter></methodparam>
 
24
        <methodparam><parameter role="keyword">window</parameter></methodparam>
 
25
      </methodsynopsis>
 
26
    </classsynopsis>
 
27
  </refsect1>
 
28
 
 
29
<!-- ********************************** -->
 
30
<!-- BEGIN OF DESCRIPTION -->
 
31
<!-- ********************************** -->
 
32
 
 
33
  <refsect1 id="description-location-widget-provider">
 
34
    <title>Description</title>
 
35
 
 
36
      <para>
 
37
      If subclassed, Nautilus will request a widget to be displayed at the top of the directory listing.
 
38
      </para>
 
39
 
 
40
<example>
 
41
    <title>Nautilus.LocationWidgetProvider Example</title>
 
42
    <programlisting>
 
43
import gobject
 
44
from gi.repository import Nautilus, Gtk
 
45
 
 
46
class LocationProviderExample(gobject.GObject, Nautilus.LocationWidgetProvider):
 
47
    def __init__(self):
 
48
        pass
 
49
    
 
50
    def get_widget(self, uri, window):
 
51
        entry = Gtk.Entry()
 
52
        entry.set_text(uri)
 
53
        entry.show()
 
54
        return entry
 
55
    </programlisting>
 
56
</example>
 
57
        
 
58
  </refsect1>
 
59
 
 
60
<!-- ****************************** -->
 
61
<!-- BEGIN OF METHODS -->
 
62
<!-- ****************************** -->
 
63
 
 
64
  <refsect1>
 
65
        <title>Passive Methods</title>
 
66
 
 
67
        <refsect2 id="method-nautilus-location-widget-provider--get-widget">
 
68
          <title>Nautilus.LocationWidgetProvider.get_widget</title>
 
69
 
 
70
          <programlisting><methodsynopsis language="python">
 
71
            <methodname>get_widget</methodname>
 
72
            <methodparam><parameter role="keyword">uri</parameter></methodparam>
 
73
            <methodparam><parameter role="keyword">window</parameter></methodparam>
 
74
          </methodsynopsis></programlisting>
 
75
 
 
76
          <variablelist>
 
77
            <varlistentry>
 
78
                    <term><parameter role="keyword">uri</parameter>&nbsp;:</term>
 
79
                    <listitem><simpara>the current folder uri</simpara></listitem>
 
80
            </varlistentry>
 
81
            <varlistentry>
 
82
                <term><parameter role="keyword">window</parameter>&nbsp;:</term>
 
83
                <listitem><simpara>the current <link linkend="class-gtkwindow"><classname>gtk.Window</classname></link> instance</simpara></listitem>
 
84
            </varlistentry>
 
85
            <varlistentry>
 
86
              <term><emphasis>Returns</emphasis>&nbsp;:</term>
 
87
              <listitem><simpara>a <link linkend="class-gtk-widget"><classname>gtk.Widget</classname></link> object</simpara></listitem>
 
88
            </varlistentry>
 
89
          </variablelist>
 
90
 
 
91
          <para>
 
92
                This function is called by Nautilus when it wants a location widget from the extension.  
 
93
                It is called in the main thread before a directory listing is shown, so it should return quickly.
 
94
          </para>
 
95
        </refsect2>
 
96
    </refsect1>
 
97
 
 
98
</refentry>
 
99