[Sugar-devel] Widget to show a notification message with a link

Gustavo Duarte gus.duarte at gmail.com
Sat Dec 6 11:42:03 EST 2014


Add an actions, isn't an option, because the notification-daemon
(Ubuntu 12.04 precise) does't support actions.

>From freedesktop specs https://developer.gnome.org/notification-spec/
"
Actions

The actions send a request message back to the notification client
when invoked. This functionality may not be implemented by the
notification server, conforming clients should check if it is
available before using it (see the GetCapabilities message in
Protocol). An implementation is free to ignore any requested by the
client. As an example one possible rendering of actions would be as
buttons in the notification popup.

Actions are sent over as a list of pairs. Each even element in the
list (starting at index 0) represents the identifier for the action.
Each odd element in the list is the localized string that will be
displayed to the user."


However hyperlinks is supported, if I add <a
href="http://sugarlabs.org"> SugarLabs </a>, works. Not exactly as I
want .... :(

When I do a click on the link, Firefox is opened.

I tried change the system default browser setting with:

gconftool-2 -s /desktop/gnome/applications/browser/exec --type string
'/usr/local/bin/sugar-browser "%s"'

Notice: sugar-browser is a bash script to launch BrowserActivity.

But after that, Firefox still opened each doing click on link of
notification message.


So the problem now is, how change the default browser on Sugar.

Any idea ?

Thanks in advance.

Gustavo.

On Fri, Dec 5, 2014 at 9:27 PM, Gustavo Duarte <gus.duarte at gmail.com> wrote:
> Greats !! Thanks for these tips.
>
> El 05/12/2014 17:59, "Gonzalo Odiard" <godiard at sugarlabs.org> escribió:
>
>> +1
>>
>> On Fri, Dec 5, 2014 at 4:57 PM, Sam P. <sam.parkinson3 at gmail.com> wrote:
>>>
>>> Hi,
>>>
>>> If my memory is right, the freedesktop notification spec includes
>>> "actions". You can have multiple of these and they are displayed like
>>> buttons [1]. When they are clicked you get a callback event.
>>>
>>> I would prefer to implement the standard ranter than something
>>> proprietary. That is just my opinions.
>>>
>>> Thanks,
>>> Sam
>>>
>>> [1]:  imgur.com/e8r9OZr
>>
>>
>>
>>
>> --
>> Gonzalo Odiard
>>
>> SugarLabs - Software for children learning


More information about the Sugar-devel mailing list