File: nemo-python-location-widget-provider.xml

package info (click to toggle)
nemo-python 5.6.0%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 384 kB
  • sloc: xml: 1,732; ansic: 795; python: 157; makefile: 9
file content (101 lines) | stat: -rw-r--r-- 3,596 bytes parent folder | download | duplicates (3)
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<?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-nemo-python-location-widget-provider">
  <refmeta>
    <refentrytitle>Nemo.LocationWidgetProvider</refentrytitle>
  </refmeta>
  <refnamediv>
    <refname>Nemo.LocationWidgetProvider</refname>
    <refpurpose>Nemo.LocationWidgetProvider Reference</refpurpose>
  </refnamediv>

<!-- ******************************* -->
<!-- BEGIN OF SYNOPSIS -->
<!-- ******************************* -->

  <refsect1>
    <title>Synopsis</title>

    <classsynopsis language="python">
      <ooclass><classname>Nemo.LocationWidgetProvider</classname></ooclass>

      <methodsynopsis language="python">
        <methodname><link linkend="method-nemo-location-widget-provider--get-widget">get_widget</link></methodname>
        <methodparam><parameter role="keyword">uri</parameter></methodparam>
        <methodparam><parameter role="keyword">window</parameter></methodparam>
      </methodsynopsis>
    </classsynopsis>
  </refsect1>

<!-- ********************************** -->
<!-- BEGIN OF DESCRIPTION -->
<!-- ********************************** -->

  <refsect1 id="description-location-widget-provider">
    <title>Description</title>

      <para>
      If subclassed, Nemo will request a widget to be displayed at the top of the directory listing.
      </para>

<example>
    <title>Nemo.LocationWidgetProvider Example</title>
    <programlisting>
from gi.repository import Nemo, GObject, Gtk

class ColumnExtension(GObject.GObject, Nemo.LocationWidgetProvider):
    def __init__(self):
        pass
    
    def get_widget(self, uri, window):
        entry = Gtk.Entry()
        entry.set_text(uri)
        entry.show()
        return entry
    </programlisting>
</example>
        
  </refsect1>

<!-- ****************************** -->
<!-- BEGIN OF METHODS -->
<!-- ****************************** -->

  <refsect1>
        <title>Passive Methods</title>

        <refsect2 id="method-nemo-location-widget-provider--get-widget">
          <title>Nemo.LocationWidgetProvider.get_widget</title>

          <programlisting><methodsynopsis language="python">
            <methodname>get_widget</methodname>
            <methodparam><parameter role="keyword">uri</parameter></methodparam>
            <methodparam><parameter role="keyword">window</parameter></methodparam>
          </methodsynopsis></programlisting>

          <variablelist>
            <varlistentry>
	            <term><parameter role="keyword">uri</parameter>&nbsp;:</term>
	            <listitem><simpara>the current folder uri</simpara></listitem>
            </varlistentry>
            <varlistentry>
                <term><parameter role="keyword">window</parameter>&nbsp;:</term>
                <listitem><simpara>the current <link linkend="class-gtkwindow"><classname>gtk.Window</classname></link> instance</simpara></listitem>
            </varlistentry>
            <varlistentry>
              <term><emphasis>Returns</emphasis>&nbsp;:</term>
              <listitem><simpara>a <link linkend="class-gtk-widget"><classname>gtk.Widget</classname></link> object</simpara></listitem>
            </varlistentry>
          </variablelist>

          <para>
                This function is called by Nemo when it wants a location widget from the extension.  
                It is called in the main thread before a directory listing is shown, so it should return quickly.
          </para>
        </refsect2>
    </refsect1>

</refentry>