Re: Question on the org.gnome.panel(.applet) prefix in applet plumbing
- From: Marcin Owsiany <marcin owsiany pl>
- To: desktop-devel-list gnome org
- Subject: Re: Question on the org.gnome.panel(.applet) prefix in applet plumbing
- Date: Fri, 16 Sep 2011 10:03:28 +0100
On Thu, Sep 01, 2011 at 03:48:42PM +0100, Marcin Owsiany wrote:
> [posting here, since gnome-utils-list seems inactive]
>
> Hello,
>
> I'm porting my little "command runner" Python applet
> (https://github.com/porridge/command-runner-applet) to GTK+3 and
> libpanel-applet-4 with D-Bus activation.
>
> I've read http://live.gnome.org/GnomeGoals/AppletsDbusMigration and had
> a look at a similar migration for invest-applet and netspeed applet as
> examples.
>
> I seem to have succeeded, but I'm wondering about the org.gnome.panel
> and org.gnome.panel.applet prefixes which often appear in the:
> - *.panel-applet file name
> - *.service file name
> - "Name" field of the *.service file
>
> My applet is not a part of the GNOME proper code base, so I don't know
> whether I should be using the org.gnome. prefix. Also, in some cases
> (like the IDs within the *.panel-applet files) the applet/factory type
> names are unqualified, but in other places (like the content of the
> *.service file) - they are. See e.g.
> http://git.gnome.org/browse/gnome-applets/commit/invest-applet?id=92d0dcf62dfcd60c8e87f64213c14f7f786627fe
>
> What are the rules here? Can someone explain or point to some
> documentation? The only clue I've found so far is that the name of the
> *.service file is arbitrary. Is that the case also for the
> *.panel-applet file? What about the "Name" field in the *.service file?
> In case the org.gnome.panel prefix is not mandatory, should I use
> something else (e.g. my private domain name)?
Since noone bothered to answer, here's what I've found out, for the
benefit of future generations. The following works:
$ cat CommandRunnerApplet.panel-applet
[Applet Factory]
Id=CommandRunnerAppletFactory
Location=/usr/share/command-runner-applet/command_runner
Name=Command Runner
Description=Factory for creating the command runner applet.
[CommandRunnerApplet]
Name=Command Runner
Description=Periodically runs a command and displays its output.
Category=Utility
Icon=command_runner
BonoboId=OAFIID:CommandRunnerApplet_Factory
$ cat CommandRunnerAppletFactory.service
[D-BUS Service]
Name=org.gnome.panel.applet.CommandRunnerAppletFactory
Exec=/usr/share/command-runner-applet/command_runner
However the following DOES NOT work:
$ cat CommandRunnerAppletFactory.service
[D-BUS Service]
Name=CommandRunnerAppletFactory
Exec=/usr/share/command-runner-applet/command_runner
So you do need the prefix in the Name field of the .service file, but not
anywhere else.
--
Marcin Owsiany <marcin owsiany pl> http://marcin.owsiany.pl/
GnuPG: 1024D/60F41216 FE67 DA2D 0ACA FC5E 3F75 D6F6 3A0D 8AA0 60F4 1216
"Every program in development at MIT expands until it can read mail."
-- Unknown
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]