| Panel Applet Library Reference Manual |
|---|
Since an applet is a matecomponent component, you must write a .server file so that the matecomponent activation daemon is aware that your component exists and how to activate it. Copy and paste is your friend here ...
<oaf_info>
<oaf_server iid="OAFIID:My_HelloApplet_Factory" type="exe"
location="test-matecomponent-applet">
<oaf_attribute name="repo_ids" type="stringv">
<item value="IDL:MateComponent/GenericFactory:1.0"/>
<item value="IDL:MateComponent/Unknown:1.0"/>
</oaf_attribute>
<oaf_attribute name="name" type="string" value="Hello World Applet Factory"/>
<oaf_attribute name="description" type="string" value="My first applet factory"/>
</oaf_server>
<oaf_server iid="OAFIID:My_HelloApplet" type="factory"
location="OAFIID:My_HelloApplet_Factory">
<oaf_attribute name="repo_ids" type="stringv">
<item value="IDL:MATE/Vertigo/MatePanelAppletShell:1.0"/>
<item value="IDL:MateComponent/Control:1.0"/>
<item value="IDL:MateComponent/Unknown:1.0"/>
</oaf_attribute>
<oaf_attribute name="name" type="string" value="Hello World Applet"/>
<oaf_attribute name="description" type="string" value="My first applet for the MATE2 panel"/>
<oaf_attribute name="panel:icon" type="string" value="mate-applets.png"/>
</oaf_server>
</oaf_info>
Probably the most important thing to note here is that, unlike .server files for other matecomponent components, applet .server files contain a special attribute called 'panel:icon'. This is used by the panel to display an entry for the applet in the 'Add to Panel' dialog.