Bonobo Activation .server Files For Applets

Since an applet is a bonobo component, you must write a .server file so that the bonobo 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-bonobo-applet"

        oaf_attribute name="repo_ids" type="stringv"
                item value="IDL:Bonobo/GenericFactory:1.0"/
                item value="IDL:Bonobo/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:GNOME/Vertigo/PanelAppletShell:1.0"/
                item value="IDL:Bonobo/Control:1.0"/
                item value="IDL:Bonobo/Unknown:1.0"/
        /oaf_attribute
        oaf_attribute name="name" type="string" value="Hello World Applet"/
        oaf_attribute name="description" type="string" value="My fist applet for the GNOME2 panel"/
        oaf_attribute name="panel:category" type="string" value="Amusements"/
        oaf_attribute name="panel:icon" type="string" value="gnome-applets.png"/
/oaf_server
/oaf_info
      

Probably the most important thing to note here is that, unlike .server files for other bonobo components, applet .server files contain two special attributes - 'panel:category' and 'panel:icon'. Both are used by the panel to display an entry for the applet in the 'Add to Panel' menu.