Starting discussion on a new version of the notification spec
A. Walton
awalton at gmail.com
Sat Jun 13 15:39:43 PDT 2009
On Sat, Jun 13, 2009 at 6:19 PM, Brian J. Tarricone<bjt23 at cornell.edu> wrote:
> On 06/13/2009 03:11 PM, Christian Hammond wrote:
>> On Sat, Jun 13, 2009 at 3:08 PM, Brian J. Tarricone<bjt23 at cornell.edu>wrote:
>>
>>> Might be a little OT for xdg-list, but: would you be interested in
>>> adding support to libnotify (or accepting a patch) to query for the
>>> 'actions' capability, and if the daemon doesn't support it,
>>> transparently convert notifications with actions into dialog boxes (and
>>> proxy GtkDialog::response to NotifyNotification::action-invoked and
>>> ::closed appropriately)? Would be great to avoid having to write
>>> special-case code in apps to handle daemons that doesn't support
>>> actions, and I'd bet the Ubuntu guys would be happier to not have to
>>> support actions at all for compatibility.
>>
>> I'll definitely support querying for the actions capability. There's a patch
>> that was submitted (which I'll try to get in soon) that checks for
>> individual capabilities.
>
> What would that do in the case where actions aren't supported but an app
> tries to pop up a notification that includes actions? If it strips the
> actions, that might not be the best route, as apparently Canonical's
> notify daemon actually *does* handle actions even though it doesn't
> advertise the capability (unless the wiki page is inaccurate).
>
If the app is doing this, then the app is wrong. The daemon shouldn't
crash, it should just ignore it and/or make a note of it. File bugs.
> Or will the patch add API to make it easy for app authors to query for
> actions themselves? Though that does give better visibility to the fact
> that actions aren't mandatory, it still has the same problem that we
> have now of app authors either not knowing or being to lazy to check for
> capabilities. But I suppose no solution is perfect.
The patch provided by Sack just makes it very easy to query for any
capability, which is a good thing. It doesn't really go as far as it
could go (e.g. caching the caps so that successive calls to the
convenience function doesn't spam D-Bus messages) but that's another
bug entirely ;).
>
>> I would support libnotify popping up a dialog when actions aren't supported,
>> but I'm not ready to do that, specifically because I'm still against
>> Ubuntu's notification-daemon replacement not supporting actions. As you'll
>> see in another e-mail I just sent, the original intention was for graphical
>> daemons (notification-daemon being the only one in existence when we wrote
>> the spec) to support actions, and console/file loggers (something we
>> considered building early on) to not support actions.
>
> Gotcha, thanks for the explanation. It's a shame this all wasn't
> spelled out in the spec better from the beginning, but... ah well,
> hindsight is 20/20 and all that.
>
> -brian
-A. Walton
> _______________________________________________
> xdg mailing list
> xdg at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/xdg
>
More information about the xdg
mailing list