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

Jerry Vonau me at jvonau.ca
Sat Dec 6 12:59:32 EST 2014


Hi Gustavo,

> On December 6, 2014 at 10:42 AM Gustavo Duarte <gus.duarte at gmail.com>
> wrote:
>
>
> 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 , 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.
>

Hum, sounds like the system's default mime definitions might be pointed to
Firefox in /usr/share/applications/defaults.list. What does "xdg-mime query
default text/html" return? The XO here returns 'firefox.desktop' even
without having the Firefox rpm installed. Not sure what the correct way of
overriding this list would be, create
"~/.local/share/applications/mimeapps.list", or maybe using "xdg-mime
default ..."? Both of those ideas would need a .desktop file for browse
thou.

Hope it helps,

Jerry

> 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
> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel


More information about the Sugar-devel mailing list