Desktop Notifications Spec 0.3

Bryan Clark bclark at redhat.com
Wed Sep 29 21:28:06 EEST 2004


On Wed, 2004-09-29 at 09:39 -0700, Christian Hammond wrote:
> Agreed. Simple messages with a little bit of HTML markup (bold,
> italic, etc.) is probably going to be sufficient. I don't see a need
> for complex formatting with CSS and such, but if we ever need it,
> things can be extended.

Hey ~

Sorry I haven't been back in the discussion much but I was thinking
about this the other day and started to realize that we're probably
heading in the wrong direction here.

Passing XML or HTML or anything over the wire seems excessive.  I'll try
to explain why.  Notifications are essentially a type of dialog, however
they are at a lower level of interaction then normal dialogs and modal
dialogs.  We have always used glade or pre-constructed dialogs in the
application code and then replaced the %s tags with the text that needs
to appear at the time.  This is an acceptable solution to dialogs since
we never want applications to auto-generate dialog prompts via whatever
messages need to be displayed.  The application programmer always knows
ahead of time what dialogs might appear when, and roughly what they will
say and display.

The notification system is no different than dialogs in this respect.
Therefore, having applications send dialogs auto-constructed in some
kind of structured language over to the notification system is going to
create significant overhead for what seems to be no real gain.

I would recommend that we use a similar system to normal dialogs where
we design how the dialog looks in something similar to glade (perhaps an
XML format which is a subset for describing the notification).  Then our
applications register these XML files with the notification system.  The
applications would then send *only* the messages necessary to populate
the notifications.  Your spec could describe how the messages are sent,
i.e. the messages are arrays of strings that will populate the
notifications in top down order matching the array index starting at
zero.  Also you'd define your notification popups with id's so that the
notification system would be able to recognize which file to use.

This would also give us the added benefit of being able to describe in
the registered XML files, how too many messages should appear.  It's
pretty easy to embed this type of logic in XSL/XML systems.

Sorry for the late reply,
~ Bryan




More information about the xdg mailing list