Difference between revisions of "Features/Notification System"

From Sugar Labs
Jump to navigation Jump to search
(Added view link)
Line 19: Line 19:
  
 
'''A good video''': https://vidd.me/0Lv
 
'''A good video''': https://vidd.me/0Lv
 +
 +
So basically as the video shows there are 2 types of notifications. Both have a pulsing icon in the top left. Activity notifications show there notification under their icon. System notifications get their own icon per notification. Both modifications icons have a [!] icon.
  
 
== Benefit to Sugar ==
 
== Benefit to Sugar ==
Line 57: Line 59:
  
 
== Documentation ==
 
== Documentation ==
I've added the doc strings :)
+
I've added the doc strings, see sugar3.activity.activity.notify
 +
 
  
 
== Comments and Discussion ==
 
== Comments and Discussion ==
  
 
http://lists.sugarlabs.org/archive/sugar-devel/2014-February/047096.html
 
http://lists.sugarlabs.org/archive/sugar-devel/2014-February/047096.html

Revision as of 15:38, 13 February 2014

Summary

This adds a simple notification system for sugar that can be used in activities and by the system/

Owner

  • Name: SAMdroid
  • Email: sam.parkinson3@gmail.com

Current status

  • Targeted release: Soon
  • Last updated: 8th of Feb
  • Percentage of completion: 90%

Detailed Description

Based off http://wiki.sugarlabs.org/go/Design_Team/Proposals/Notifications

See some pictures:

A good video: https://vidd.me/0Lv

So basically as the video shows there are 2 types of notifications. Both have a pulsing icon in the top left. Activity notifications show there notification under their icon. System notifications get their own icon per notification. Both modifications icons have a [!] icon.

Benefit to Sugar

This would be nice for chat, calenders... It would help bring us into line with the other desktop environs.

Scope

The stuff in the shell is done. It probably needs to be improved.

I haven't mad any activities use it, so yeah.

UI Design

http://wiki.sugarlabs.org/go/Design_Team/Proposals/Notifications

How To Test

Here is an example activity: https://git.sugarlabs.org/~samdroid/hello-world/hello-notification-world This shows you a notification after a delay.

The docs for using notifications in activities are https://github.com/SAMdroid-apps/sugar-toolkit-gtk3/blob/bfadc8648bb0c594d9b12160affdd2c2c8819164/src/sugar3/activity/activity.py#L641

For system notifications you can run this code:

   import dbus
   BUS_NAME = 'org.freedesktop.Notifications'
   OBJ_PATH = '/org/freedesktop/Notifications'
   IFACE_NAME = 'org.freedesktop.Notifications'
   bus = dbus.SessionBus()
   notify_obj = bus.get_object(BUS_NAME,OBJ_PATH)
   notifications = dbus.Interface(notify_obj,IFACE_NAME)
   notifications.Notify("HelloWorld", 0, , "Summary", "Body", [], {'x-sugar-icon-name': 'activity-journal'}, -1)
   #You can change the icon above

User Experience

I think this is usable?

Contingency Plan

WORK HARDER

Documentation

I've added the doc strings, see sugar3.activity.activity.notify


Comments and Discussion

http://lists.sugarlabs.org/archive/sugar-devel/2014-February/047096.html