Comment 5 for bug 1301400

Revision history for this message
Ted Gould (ted) wrote : Re: [Bug 1301400] Re: Need to provide an api for setting launcher counters

On Wed, 2014-04-02 at 22:26 +0000, Michał Sawicz wrote:

> On 02.04.2014 20:51, Ted Gould wrote:
> > /com/canonical/Unity/Launcher/$(appid)
> > com.canonical.Unity.Launcher.SetCounter(int count, bool visible)
>
> That'd mean we have to register that for every app, right? Feels rather
> dangerous if we end up using the same for in-dash emblems, where all
> installed apps will be - and all those objects would have to be
> registered, too...

You don't have to register anything on DBus, just respond to that path.
You can set up a fallback path for the items that are not currently in
memory to just write them in settings until needed.

> > Or alternatively two properties on that object, Count and
> CountVisible.
>
> Maybe a prop would work indeed, would mean a little bit more dbus
> traffic, but this is probably a low enough traffic api that'd be fine.

Props are nice because you get the getter/setter/notification for "free"
in that you don't have to define the API for them. It can be lower
traffic because of the GetAll command if someone is querying the
interface and there are several properties they may need.