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

Gonzalo Odiard godiard at sugarlabs.org
Fri Dec 5 14:51:04 EST 2014


On Fri, Dec 5, 2014 at 1:35 PM, Gustavo Duarte <gus.duarte at gmail.com> wrote:

> Hi Gonzalo,
>
> Do you remember, if is there a thread where it addition  was discussed ?
>

I didn't found it.


> Or do you suggest me a start point to achieve that ?
>
>
You can look at:
jarabe/model/notifications.py
jarabe/frame/notification.py

Gonzalo




> Thanks
> Gustavo.
>
> On Fri, Dec 5, 2014 at 1:27 PM, Gonzalo Odiard <godiard at sugarlabs.org>
> wrote:
> > I think the firs option is the best. That addition was discussed a few
> times
> > but never implemented in Sugar.
> > Please share your code then can be added in the next version of Sugar.
> >
> > Gonzalo
> >
> > On Fri, Dec 5, 2014 at 11:54 AM, Gustavo Duarte <gus.duarte at gmail.com>
> > wrote:
> >>
> >> Hi Guys,
> >>
> >>
> >> I need build an app, which shows a message to kids with some text and
> >> one link which could be opened by Browser activity, like a
> >> notification.
> >>
> >> I know that already exist a way, to show notifications which will be
> >> placed on the top bar,  by dbus, "org.freedesktop.Notifications",
> >> however it doesn't work for because, when I did a click on the link
> >> the Browser activity isn't opened.
> >>
> >>         DBUS_NAME="org.freedesktop.Notifications"
> >>         OBJ_PATH="/org/freedesktop/Notifications"
> >>         icon = None
> >>         IFACE_NAME="org.freedesktop.Notifications"
> >>         bus = dbus.SessionBus()
> >>         notify_obj = bus.get_object(DBUS_NAME,OBJ_PATH)
> >>         notifications=dbus.Interface(notify_obj,IFACE_NAME)
> >>         notifications.Notify("",0,icon,'Title',"www.google.com",[],
> hints
> >> ,-1)
> >>
> >>
> >>
> >> I think, may be, I have  tow options,
> >>
> >> 1) Add a kind of event, on the notification widget, to recognise the
> >> click and open the Browser activity.
> >>
> >> 2) Make another type of widget, like a Dialog, where ca be easier add
> >> an event click to open the Browser.
> >>
> >> What is your opinion ? Are there other obvious options, that I'm can't
> >> seeing ?
> >>
> >>
> >> Thanks in advance.
> >>
> >> Gustavo.
> >> _______________________________________________
> >> Sugar-devel mailing list
> >> Sugar-devel at lists.sugarlabs.org
> >> http://lists.sugarlabs.org/listinfo/sugar-devel
> >
> >
> >
> >
> > --
> > Gonzalo Odiard
> >
> > SugarLabs - Software for children learning
> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
>



-- 
Gonzalo Odiard

SugarLabs - Software for children learning
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20141205/c942ab2b/attachment.html>


More information about the Sugar-devel mailing list