[Sugar-devel] Widget to show a notification message with a link
Gustavo Duarte
gus.duarte at gmail.com
Fri Dec 5 09:54:24 EST 2014
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.
More information about the Sugar-devel
mailing list