From 9627530cdaeb8d0ad9984f55f6fb0804740a1343 Mon Sep 17 00:00:00 2001 From: Lars Uebernickel Date: Fri, 24 May 2013 18:17:45 -0400 Subject: IndicatorNg: update indicator file format The old file format had some shortcomings: (1) It was impossible to efficiently reuse a menu for different profiles, because the profile name was implicit in the object path. The only way to do this was to export the same menu twice. Now, object paths have to be set explicitly in the indicator file. (2) The well-known dbus name of a service and the name of its service file were similar but slightly different (com.canonical.indicator.test vs com.canonical.test.indicator), which caused some confusion on when to use which. Now, the file name *is* the bus name, and the `BusName` key has been dropped. The new file format is documented in README. --- README | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'README') diff --git a/README b/README index e69de29..1ea62ef 100644 --- a/README +++ b/README @@ -0,0 +1,35 @@ +The indicator service file format +================================= + +Unity's panel finds out about indicator by looking at indicator service +files in `/usr/share/unity/indicators`. These files have to have the same +name as the well-known D-Bus name that the corresponding service owns. + +An indicator file is a normal key file (like desktop files). It must have +an `[Indicator Service]` section, that contains the service's name +(`Name`) and optionally the object path at which its action group is found +(`ObjectPath`). For example: + + [Indicator Service] + Name=indicator-example + ObjectPath=/com/canonical/indicator/example + +An indicator can only export one action group, but a menu for each profile +("desktop", "greeter", "phone") supports. There must be a section for each +of those profiles, containing the object path on which the menu is +exported: + + [desktop] + ObjectPath=/com/canonical/indicator/example/desktop + + [greeter] + ObjectPath=/com/canonical/indicator/example/desktop + + [phone] + ObjectPath=/com/canonical/indicator/example/phone + +Object paths can be reused for different profiles (the greeter uses the +same menu as the desktop in the above example). + +There are no fallbacks. If a profile is not mentioned in the service file, +the indicator will not show up for that profile. -- cgit v1.2.3