Skip to content

Commit

Permalink
Updated write-applet.xml with new example (Cin from 4.6 to 5.8+)
Browse files Browse the repository at this point in the history
  • Loading branch information
claudiux committed Jul 31, 2023
1 parent 9437b96 commit dc888f1
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions docs/reference/cinnamon-tutorials/write-applet.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
</listitem>
</itemizedlist>
<para>
Applets go in <code>~/.local/share/cinnamon/applets</code> (or in <code>/usr/share/cinnamon/applets</code> if you want them installed system-wide). So let’s go there and let’s create the files and folders necessary for any Cinnamon applet.
Applets go in <code>~/.local/share/cinnamon/applets</code> (or in <code>/usr/share/cinnamon/applets</code> if you want them installed system-wide). So let's go ahead and create the files and folders required for any Cinnamon applet.

</para>

<screen>
Expand Down Expand Up @@ -181,6 +182,7 @@

<para>
The third line imports the GLib, which contains the get_user_name() method to access to the Linux user name. Next!

</para>
<informalexample>
<programlisting>
Expand Down Expand Up @@ -214,7 +216,7 @@
</informalexample>

<para>
To be more precise:
However, contrary to popular belief, the applet API is not psychic. It has no idea what your applet wants to do (apart from displaying an icon). You have to first tell it what icon you want, in the line
</para>

<informalexample>
Expand Down Expand Up @@ -292,9 +294,5 @@
<para>
Next, in our <code>constructor</code> function, we call the <link linkend="cinnamon-js-ui-Applet-IconApplet-_init"><code>_init</code></link> (or <code>constructor</code>) function of <code>Applet.IconApplet</code>. Here we pass on all the information about <code>orientation</code> etc. to this <code>_init</code> (or<code>constructor</code>) function, and this function will help us sort out all the mess required to make the applet display properly.
</para>

<para>
However, contrary to popular belief, the applet API is not psychic. It has no idea what your applet wants to do (apart from displaying an icon). You have to first tell it what icon you want, in the line
</para>
</sect2>
</chapter>

0 comments on commit dc888f1

Please sign in to comment.