Skip to content

Commit

Permalink
deploy: 5c857fc
Browse files Browse the repository at this point in the history
  • Loading branch information
linkfrg committed Aug 5, 2024
1 parent 9778306 commit edd6715
Show file tree
Hide file tree
Showing 12 changed files with 87 additions and 82 deletions.
2 changes: 1 addition & 1 deletion _sources/dbus.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
D-Bus
============

There are some classes that can help you with intercating with D-Bus
There are several classes that can help you interact with D-Bus.

.. autoclass:: ignis.dbus.DBusService
:members:
Expand Down
4 changes: 2 additions & 2 deletions _sources/developer_guide/creating_service.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ Creating D-Bus Service
--------------------------

We will use :class:`~ignis.dbus.DBusService` in this template.
Use ``PascalCase`` for D-Bus methods and properties naming.
Also make D-Bus methods/properties private (add ``__`` before name).
- Use ``PascalCase`` for D-Bus methods and properties naming.
- Also make D-Bus methods/properties private (add ``__`` before name).

.. code-block:: python
Expand Down
15 changes: 9 additions & 6 deletions _sources/developer_guide/documentation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,26 @@ For functions, use the standard Google docstring style.
.. code-block:: python
"""
Get a standard icon name for the file or directory.
Description of the function.
Args:
path (``str``): The path to the file or directory.
symbolic (``bool``, optional): Whether the icon should be symbolic.
arg1 (``str``): description...
arg2 (``bool``, optional): description...
Returns:
``str``: The name of the icon.
``str``: description...
Raises:
SomeException: description...
"""
For Class
------------
If a class has custom signals, define them in the ``Signals`` section.
- If a class has custom signals, define them in the ``Signals`` section.
Signal names should be in double quotes.
In brackets, indicate the custom arguments that the signal passes to the callback.

If a class has custom properties, define them in the ``Properties`` section.
- If a class has custom properties, define them in the ``Properties`` section.
In brackets, indicate the property type and ``read-only`` or ``read-write``.

.. code-block:: python
Expand Down
4 changes: 2 additions & 2 deletions _sources/developer_guide/env.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ Create Python Virtual Environment
Activate Virtual Environment
----------------------------

For Bash:
- For Bash:

.. code-block:: bash
source venv/bin/activate
For Fish:
- For Fish:

.. code-block:: fish
Expand Down
27 changes: 11 additions & 16 deletions _sources/developer_guide/subclassing_widgets.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,31 +43,26 @@ Replace ``WIDGET_NAME`` with the actual name of the widget.
Docstrings
------------
Use the same patterns as described here: `Documentation <documentation.html>`_.
Additionally, specify the base widget and link to the PyGObject API Reference.
Also, specify whether properties are optional.
It is good practice to include a code example.

- Use the same patterns as described here: `Documentation <documentation.html>`_.
- Specify the base widget and link to the PyGObject API Reference.
- Specify whether properties are ``optional``/``required``.
- Include a code example.

.. code-block:: python
"""
Bases: `Gtk.Label <https://lazka.github.io/pgi-docs/#Gtk-4.0/classes/Label.html>`_.
Bases: `Gtk.WIDGET_NAME <https://lazka.github.io/pgi-docs/#Gtk-4.0/classes/WIDGET_NAME.html>`_.
A widget that displays a small amount of text.
Properties:
- **justify** (``str``, optional, read-write): description...
- **ellipsize** (``str``, optional, read-write): description...
- **wrap_mode** (``str``, optional, read-write): description...
- **prop1** (``str``, required, read-write): description...
- **prop2** (``int``, optional, read-write): description...
.. code-block:: python
Widget.Label(
label='heh',
use_markup=False,
justify='left',
wrap=True,
wrap_mode='word',
ellipsize='end',
max_width_chars=52
Widget.WIDGET_NAME(
prop1="asd",
prop2=12
)
46 changes: 23 additions & 23 deletions dbus.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dbus_menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -408,19 +408,19 @@ <h1>D-Bus menu<a class="headerlink" href="#d-bus-menu" title="Link to this headi
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">DBusMenu</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">name</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">object_path</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#ignis.dbus_menu.DBusMenu" title="Link to this definition">#</a></dt>
<dd><p>Bases: <a class="reference external" href="https://lazka.github.io/pgi-docs/#Gtk-4.0/classes/PopoverMenu.html">Gtk.PopoverMenu</a>.</p>
<p>Like DbusmenuGtk3, but for GTK4.</p>
<p>Bus must provide <code class="docutils literal notranslate"><span class="pre">com.canonical.dbusmenu</span></code> D-Bus interface.</p>
<p>The bus must provide the <code class="docutils literal notranslate"><span class="pre">com.canonical.dbusmenu</span></code> D-Bus interface.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>name</strong> (<code class="docutils literal notranslate"><span class="pre">str</span></code>) -- A bus name (well-known or unique).</p></li>
<li><p><strong>object_path</strong> (<code class="docutils literal notranslate"><span class="pre">str</span></code>) -- An object path to menu.</p></li>
<li><p><strong>object_path</strong> (<code class="docutils literal notranslate"><span class="pre">str</span></code>) -- An object path to the menu.</p></li>
</ul>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="ignis.dbus_menu.DBusMenu.copy">
<span class="sig-name descname"><span class="pre">copy</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#ignis.dbus_menu.DBusMenu.copy" title="Link to this definition">#</a></dt>
<dd><p>Make a copy of this instance.</p>
<dd><p>Create a copy of this instance.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns<span class="colon">:</span></dt>
<dd class="field-odd"><p>A copy of this instance.</p>
Expand Down
4 changes: 2 additions & 2 deletions developer_guide/creating_service.html
Original file line number Diff line number Diff line change
Expand Up @@ -418,8 +418,8 @@ <h1>Creating Service<a class="headerlink" href="#creating-service" title="Link t
<section id="creating-d-bus-service">
<h2>Creating D-Bus Service<a class="headerlink" href="#creating-d-bus-service" title="Link to this heading">#</a></h2>
<p>We will use <a class="reference internal" href="../dbus.html#ignis.dbus.DBusService" title="ignis.dbus.DBusService"><code class="xref py py-class docutils literal notranslate"><span class="pre">DBusService</span></code></a> in this template.
Use <code class="docutils literal notranslate"><span class="pre">PascalCase</span></code> for D-Bus methods and properties naming.
Also make D-Bus methods/properties private (add <code class="docutils literal notranslate"><span class="pre">__</span></code> before name).</p>
- Use <code class="docutils literal notranslate"><span class="pre">PascalCase</span></code> for D-Bus methods and properties naming.
- Also make D-Bus methods/properties private (add <code class="docutils literal notranslate"><span class="pre">__</span></code> before name).</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">gi.repository</span> <span class="kn">import</span> <span class="n">Gio</span><span class="p">,</span> <span class="n">GLib</span>
<span class="kn">from</span> <span class="nn">ignis.gobject</span> <span class="kn">import</span> <span class="n">IgnisGObject</span>
<span class="kn">from</span> <span class="nn">ignis.dbus</span> <span class="kn">import</span> <span class="n">DBusService</span>
Expand Down
23 changes: 15 additions & 8 deletions developer_guide/documentation.html
Original file line number Diff line number Diff line change
Expand Up @@ -424,25 +424,32 @@ <h2>Docstrings<a class="headerlink" href="#docstrings" title="Link to this headi
<h2>For Function<a class="headerlink" href="#for-function" title="Link to this heading">#</a></h2>
<p>For functions, use the standard Google docstring style.</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd">Get a standard icon name for the file or directory.</span>
<span class="sd">Description of the function.</span>

<span class="sd">Args:</span>
<span class="sd"> path (``str``): The path to the file or directory.</span>
<span class="sd"> symbolic (``bool``, optional): Whether the icon should be symbolic.</span>
<span class="sd"> arg1 (``str``): description...</span>
<span class="sd"> arg2 (``bool``, optional): description...</span>

<span class="sd">Returns:</span>
<span class="sd"> ``str``: The name of the icon.</span>
<span class="sd"> ``str``: description...</span>

<span class="sd">Raises:</span>
<span class="sd"> SomeException: description...</span>
<span class="sd">&quot;&quot;&quot;</span>
</pre></div>
</div>
</section>
<section id="for-class">
<h2>For Class<a class="headerlink" href="#for-class" title="Link to this heading">#</a></h2>
<p>If a class has custom signals, define them in the <code class="docutils literal notranslate"><span class="pre">Signals</span></code> section.
Signal names should be in double quotes.
<ul class="simple">
<li><p>If a class has custom signals, define them in the <code class="docutils literal notranslate"><span class="pre">Signals</span></code> section.</p></li>
</ul>
<p>Signal names should be in double quotes.
In brackets, indicate the custom arguments that the signal passes to the callback.</p>
<p>If a class has custom properties, define them in the <code class="docutils literal notranslate"><span class="pre">Properties</span></code> section.
In brackets, indicate the property type and <code class="docutils literal notranslate"><span class="pre">read-only</span></code> or <code class="docutils literal notranslate"><span class="pre">read-write</span></code>.</p>
<ul class="simple">
<li><p>If a class has custom properties, define them in the <code class="docutils literal notranslate"><span class="pre">Properties</span></code> section.</p></li>
</ul>
<p>In brackets, indicate the property type and <code class="docutils literal notranslate"><span class="pre">read-only</span></code> or <code class="docutils literal notranslate"><span class="pre">read-write</span></code>.</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd">This is an example docstring for a class.</span>

Expand Down
8 changes: 6 additions & 2 deletions developer_guide/env.html
Original file line number Diff line number Diff line change
Expand Up @@ -421,11 +421,15 @@ <h2>Create Python Virtual Environment<a class="headerlink" href="#create-python-
</section>
<section id="activate-virtual-environment">
<h2>Activate Virtual Environment<a class="headerlink" href="#activate-virtual-environment" title="Link to this heading">#</a></h2>
<p>For Bash:</p>
<ul class="simple">
<li><p>For Bash:</p></li>
</ul>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="nb">source</span><span class="w"> </span>venv/bin/activate
</pre></div>
</div>
<p>For Fish:</p>
<ul class="simple">
<li><p>For Fish:</p></li>
</ul>
<div class="highlight-fish notranslate"><div class="highlight"><pre><span></span>. venv/bin/activate.fish
</pre></div>
</div>
Expand Down
28 changes: 12 additions & 16 deletions developer_guide/subclassing_widgets.html
Original file line number Diff line number Diff line change
Expand Up @@ -466,30 +466,26 @@ <h2>Widget Class Template<a class="headerlink" href="#widget-class-template" tit
</section>
<section id="docstrings">
<h2>Docstrings<a class="headerlink" href="#docstrings" title="Link to this heading">#</a></h2>
<p>Use the same patterns as described here: <a class="reference external" href="documentation.html">Documentation</a>.
Additionally, specify the base widget and link to the PyGObject API Reference.
Also, specify whether properties are optional.
It is good practice to include a code example.</p>
<ul class="simple">
<li><p>Use the same patterns as described here: <a class="reference external" href="documentation.html">Documentation</a>.</p></li>
<li><p>Specify the base widget and link to the PyGObject API Reference.</p></li>
<li><p>Specify whether properties are <code class="docutils literal notranslate"><span class="pre">optional</span></code>/<code class="docutils literal notranslate"><span class="pre">required</span></code>.</p></li>
<li><p>Include a code example.</p></li>
</ul>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="s2">&quot;&quot;&quot;</span>
<span class="s2">Bases: `Gtk.Label &lt;https://lazka.github.io/pgi-docs/#Gtk-4.0/classes/Label.html&gt;`_.</span>
<span class="s2">Bases: `Gtk.WIDGET_NAME &lt;https://lazka.github.io/pgi-docs/#Gtk-4.0/classes/WIDGET_NAME.html&gt;`_.</span>

<span class="s2">A widget that displays a small amount of text.</span>

<span class="s2">Properties:</span>
<span class="s2"> - **justify** (``str``, optional, read-write): description...</span>
<span class="s2"> - **ellipsize** (``str``, optional, read-write): description...</span>
<span class="s2"> - **wrap_mode** (``str``, optional, read-write): description...</span>
<span class="s2"> - **prop1** (``str``, required, read-write): description...</span>
<span class="s2"> - **prop2** (``int``, optional, read-write): description...</span>

<span class="s2">.. code-block:: python</span>

<span class="s2"> Widget.Label(</span>
<span class="s2"> label=&#39;heh&#39;,</span>
<span class="s2"> use_markup=False,</span>
<span class="s2"> justify=&#39;left&#39;,</span>
<span class="s2"> wrap=True,</span>
<span class="s2"> wrap_mode=&#39;word&#39;,</span>
<span class="s2"> ellipsize=&#39;end&#39;,</span>
<span class="s2"> max_width_chars=52</span>
<span class="s2"> Widget.WIDGET_NAME(</span>
<span class="s2"> prop1=&quot;asd&quot;,</span>
<span class="s2"> prop2=12</span>
<span class="s2"> )</span>
</pre></div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion searchindex.js

Large diffs are not rendered by default.

0 comments on commit edd6715

Please sign in to comment.