[Sugar-devel] New method for Activity class to send notifications

2014-03-26 Thread Martin Abente
Hello Everyone,

We recently landed a messages notifications feature, based on Gary's
designs [1]. One of our GCI 2013 hackers, Sam Parkinson, is has sent the
bits to enable activities to send notifications too, as in Gary's design.

His work is almost done [2,3,4], but it introduces a new method to the base
Activity class, therefore I wanted your opinions regarding the name of this
method, the current options are [4]:

* send_notification
* add_notification
* shell_notify
* sugar_notify


Thanks for your time!
tch.

Refs:
1. http://wiki.sugarlabs.org/go/Design_Team/Proposals/Notifications
2. https://github.com/sugarlabs/sugar/pull/301
3. https://github.com/sugarlabs/sugar/pull/300
4. https://github.com/sugarlabs/sugar-toolkit-gtk3/pull/114
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] New method for Activity class to send notifications

2014-03-26 Thread Gonzalo Odiard
I vote for add_notification

Gonzalo


On Wed, Mar 26, 2014 at 9:40 AM, Martin Abente 
martin.abente.lah...@gmail.com wrote:

 Hello Everyone,

 We recently landed a messages notifications feature, based on Gary's
 designs [1]. One of our GCI 2013 hackers, Sam Parkinson, is has sent the
 bits to enable activities to send notifications too, as in Gary's design.

 His work is almost done [2,3,4], but it introduces a new method to the
 base Activity class, therefore I wanted your opinions regarding the name of
 this method, the current options are [4]:

 * send_notification
 * add_notification
 * shell_notify
 * sugar_notify


 Thanks for your time!
 tch.

 Refs:
 1. http://wiki.sugarlabs.org/go/Design_Team/Proposals/Notifications
 2. https://github.com/sugarlabs/sugar/pull/301
 3. https://github.com/sugarlabs/sugar/pull/300
 4. https://github.com/sugarlabs/sugar-toolkit-gtk3/pull/114

 ___
 Sugar-devel mailing list
 Sugar-devel@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/sugar-devel




-- 
Gonzalo Odiard

SugarLabs - Learning Software for children
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] New method for Activity class to send notifications

2014-03-26 Thread Sebastian Silva

Hi Martin,

What about using this:
https://developer.gnome.org/notification-spec/ ?

I really think we should be moving towards FreeDesktop standards 
instead of rolling our own.


Currently it would look like this, or you can add some syntax sugar to 
it:


#!/usr/bin/python
from gi.repository import Notify
Notify.init (Hello world)
Hello=Notify.Notification.new (Hello world,This is an example 
notification.,dialog-information)

Hello.show ()

El mié, 26 de mar 2014 a las 7:40 AM, Martin Abente 
martin.abente.lah...@gmail.com escribió:

Hello Everyone,

We recently landed a messages notifications feature, based on Gary's 
designs [1]. One of our GCI 2013 hackers, Sam Parkinson, is has sent 
the bits to enable activities to send notifications too, as in Gary's 
design. 

His work is almost done [2,3,4], but it introduces a new method to 
the base Activity class, therefore I wanted your opinions regarding 
the name of this method, the current options are [4]:


* send_notification
* add_notification
* shell_notify
* sugar_notify
 


Thanks for your time!
tch.

Refs:
1. http://wiki.sugarlabs.org/go/Design_Team/Proposals/Notifications
2. https://github.com/sugarlabs/sugar/pull/301
3. https://github.com/sugarlabs/sugar/pull/300
4. https://github.com/sugarlabs/sugar-toolkit-gtk3/pull/114
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] New method for Activity class to send notifications

2014-03-26 Thread Martin Abente
Hello Sebastian,

The notification back-end is already a subset of freedesktop notification
definition. That is something we had in Sugar since a long time. We just
added some other missing parts (displaying subject and body).

But, for the front-end, If you look at Gary's design, you will see that is
not the typical independent bubble UI component, as it groups notifications
according to some context (ie., when is an activity).

So, the motivation behind this method is (as you also suggest) to add some
sugar syntax to facilitate its usage for activity developers.

Having explained that, any recommendation for the name? :)

Saludos!
tch.




On Wed, Mar 26, 2014 at 10:20 AM, Sebastian Silva sebast...@fuentelibre.org
 wrote:

 Hi Martin,

 What about using this:
 https://developer.gnome.org/notification-spec/ ?

 I really think we should be moving towards FreeDesktop standards instead
 of rolling our own.

 Currently it would look like this, or you can add some syntax sugar to it:

 #!/usr/bin/python
 from gi.repository import Notify
 Notify.init (Hello world)
 Hello=Notify.Notification.new (Hello world,This is an example
 notification.,dialog-information)
 Hello.show ()

 El mié, 26 de mar 2014 a las 7:40 AM, Martin Abente 
 martin.abente.lah...@gmail.com escribió:

 Hello Everyone,

 We recently landed a messages notifications feature, based on Gary's
 designs [1]. One of our GCI 2013 hackers, Sam Parkinson, is has sent the
 bits to enable activities to send notifications too, as in Gary's design.

 His work is almost done [2,3,4], but it introduces a new method to the
 base Activity class, therefore I wanted your opinions regarding the name of
 this method, the current options are [4]:

 * send_notification
 * add_notification
 * shell_notify
 * sugar_notify


 Thanks for your time!
 tch.

 Refs:
 1. http://wiki.sugarlabs.org/go/Design_Team/Proposals/Notifications
 2. https://github.com/sugarlabs/sugar/pull/301
 3. https://github.com/sugarlabs/sugar/pull/300
 4. https://github.com/sugarlabs/sugar-toolkit-gtk3/pull/114


___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] New method for Activity class to send notifications

2014-03-26 Thread Sebastian Silva

Sorry I hadn't read the proposal in detail.

So if I understand correctly, if a regular X11 application emits a 
gi.repository.Notification, it will display correctly in Sugar?


That's great, kudos on the work.

Sebastian 

El mié, 26 de mar 2014 a las 10:21 AM, Martin Abente 
martin.abente.lah...@gmail.com escribió:

Hello Sebastian,

The notification back-end is already a subset of freedesktop 
notification definition. That is something we had in Sugar since a 
long time. We just added some other missing parts (displaying subject 
and body).


But, for the front-end, If you look at Gary's design, you will see 
that is not the typical independent bubble UI component, as it groups 
notifications according to some context (ie., when is an activity).


So, the motivation behind this method is (as you also suggest) to add 
some sugar syntax to facilitate its usage for activity developers.


Having explained that, any recommendation for the name? :)

Saludos!
tch.




On Wed, Mar 26, 2014 at 10:20 AM, Sebastian Silva 
sebast...@fuentelibre.org wrote:

Hi Martin,

What about using this:
https://developer.gnome.org/notification-spec/ ?

I really think we should be moving towards FreeDesktop standards 
instead of rolling our own.


Currently it would look like this, or you can add some syntax sugar 
to it:


#!/usr/bin/python
from gi.repository import Notify
Notify.init (Hello world)
Hello=Notify.Notification.new (Hello world,This is an example 
notification.,dialog-information)

Hello.show ()

El mié, 26 de mar 2014 a las 7:40 AM, Martin Abente 
martin.abente.lah...@gmail.com escribió:



Hello Everyone,

We recently landed a messages notifications feature, based on 
Gary's designs [1]. One of our GCI 2013 hackers, Sam Parkinson, is 
has sent the bits to enable activities to send notifications too, 
as in Gary's design. 

His work is almost done [2,3,4], but it introduces a new method to 
the base Activity class, therefore I wanted your opinions regarding 
the name of this method, the current options are [4]:


* send_notification
* add_notification
* shell_notify
* sugar_notify
 


Thanks for your time!
tch.

Refs:
1. http://wiki.sugarlabs.org/go/Design_Team/Proposals/Notifications
2. https://github.com/sugarlabs/sugar/pull/301
3. https://github.com/sugarlabs/sugar/pull/300
4. https://github.com/sugarlabs/sugar-toolkit-gtk3/pull/114


___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] New method for Activity class to send notifications

2014-03-26 Thread Sam Parkinson
Hi,

It is compatible with the dbus interface thing. But notifications with an
app name of something like Chat activity will get a new icon in the
frame. The function in the toolkit just sends a notification where the name
is the activities id, which shows it under the activity button.

Sam
On Mar 27, 2014 4:21 AM, Sebastian Silva sebast...@fuentelibre.org
wrote:

 Sorry I hadn't read the proposal in detail.

 So if I understand correctly, if a regular X11 application emits a
 gi.repository.Notification, it will display correctly in Sugar?

 That's great, kudos on the work.

 Sebastian

 El mié, 26 de mar 2014 a las 10:21 AM, Martin Abente 
 martin.abente.lah...@gmail.com escribió:

 Hello Sebastian,

 The notification back-end is already a subset of freedesktop notification
 definition. That is something we had in Sugar since a long time. We just
 added some other missing parts (displaying subject and body).

 But, for the front-end, If you look at Gary's design, you will see that is
 not the typical independent bubble UI component, as it groups notifications
 according to some context (ie., when is an activity).

 So, the motivation behind this method is (as you also suggest) to add some
 sugar syntax to facilitate its usage for activity developers.

 Having explained that, any recommendation for the name? :)

 Saludos!
 tch.




 On Wed, Mar 26, 2014 at 10:20 AM, Sebastian Silva 
 sebast...@fuentelibre.org wrote:

 Hi Martin,

 What about using this:
 https://developer.gnome.org/notification-spec/ ?

 I really think we should be moving towards FreeDesktop standards instead
 of rolling our own.

 Currently it would look like this, or you can add some syntax sugar to it:

 #!/usr/bin/python
 from gi.repository import Notify
 Notify.init (Hello world)
 Hello=Notify.Notification.new (Hello world,This is an example
 notification.,dialog-information)
 Hello.show ()

 El mié, 26 de mar 2014 a las 7:40 AM, Martin Abente 
 martin.abente.lah...@gmail.com escribió:

 Hello Everyone,

 We recently landed a messages notifications feature, based on Gary's
 designs [1]. One of our GCI 2013 hackers, Sam Parkinson, is has sent the
 bits to enable activities to send notifications too, as in Gary's design.

 His work is almost done [2,3,4], but it introduces a new method to the
 base Activity class, therefore I wanted your opinions regarding the name of
 this method, the current options are [4]:

 * send_notification
 * add_notification
 * shell_notify
 * sugar_notify


 Thanks for your time!
 tch.

 Refs:
 1. http://wiki.sugarlabs.org/go/Design_Team/Proposals/Notifications
 2. https://github.com/sugarlabs/sugar/pull/301
 3. https://github.com/sugarlabs/sugar/pull/300
 4. https://github.com/sugarlabs/sugar-toolkit-gtk3/pull/114



 ___
 Sugar-devel mailing list
 Sugar-devel@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/sugar-devel


___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] New method for Activity class to send notifications

2014-03-26 Thread James Cameron
On Wed, Mar 26, 2014 at 09:40:41AM -0300, Martin Abente wrote:
 His work is almost done [2,3,4], but it introduces a new method to
 the base Activity class, therefore I wanted your opinions regarding
 the name of this method, the current options are [4]:
 
 * send_notification
 * add_notification
 * shell_notify
 * sugar_notify

shell_ and sugar_ prefixes are superfluous given that the base
Activity class is already a part of Sugar, and the Shell isn't the
eventual target of the notification; the user is.

_notify and _notification are ambiguous, because they don't say
what is being notified; the system, the class instance, or the user.

add_ prefix exposes an implementation detail; that notifications are
a list.  This exposure is unnecessary.

Of the ones you listed, send_notification fits best.

Of the ones you didn't list, notify_user would be best.

sugar_shell_add_notification_and_send_to_user would be the worst.

-- 
James Cameron
http://quozl.linux.org.au/
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] New method for Activity class to send notifications

2014-03-26 Thread Gonzalo Odiard


 sugar_shell_add_notification_and_send_to_user would be the worst.


Maybe is a good name for a Java implementation :)

-- 
Gonzalo Odiard

SugarLabs - Learning Software for children
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] New method for Activity class to send notifications

2014-03-26 Thread Manuel Quiñones
2014-03-26 18:12 GMT-03:00 James Cameron qu...@laptop.org:
 On Wed, Mar 26, 2014 at 09:40:41AM -0300, Martin Abente wrote:
 His work is almost done [2,3,4], but it introduces a new method to
 the base Activity class, therefore I wanted your opinions regarding
 the name of this method, the current options are [4]:

 * send_notification
 * add_notification
 * shell_notify
 * sugar_notify

 shell_ and sugar_ prefixes are superfluous given that the base
 Activity class is already a part of Sugar, and the Shell isn't the
 eventual target of the notification; the user is.

 _notify and _notification are ambiguous, because they don't say
 what is being notified; the system, the class instance, or the user.

 add_ prefix exposes an implementation detail; that notifications are
 a list.  This exposure is unnecessary.

 Of the ones you listed, send_notification fits best.

I agree.  Thanks for the detailed comments on each proposal.


 Of the ones you didn't list, notify_user would be best.

 sugar_shell_add_notification_and_send_to_user would be the worst.

 --
 James Cameron
 http://quozl.linux.org.au/
 ___
 Sugar-devel mailing list
 Sugar-devel@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/sugar-devel



-- 
.. manuq ..
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] New method for Activity class to send notifications

2014-03-26 Thread Martin Abente
notify_user sounds good to me :)


On Wed, Mar 26, 2014 at 5:36 PM, Manuel Quiñones ma...@laptop.org wrote:

 2014-03-26 18:12 GMT-03:00 James Cameron qu...@laptop.org:
  On Wed, Mar 26, 2014 at 09:40:41AM -0300, Martin Abente wrote:
  His work is almost done [2,3,4], but it introduces a new method to
  the base Activity class, therefore I wanted your opinions regarding
  the name of this method, the current options are [4]:
 
  * send_notification
  * add_notification
  * shell_notify
  * sugar_notify
 
  shell_ and sugar_ prefixes are superfluous given that the base
  Activity class is already a part of Sugar, and the Shell isn't the
  eventual target of the notification; the user is.
 
  _notify and _notification are ambiguous, because they don't say
  what is being notified; the system, the class instance, or the user.
 
  add_ prefix exposes an implementation detail; that notifications are
  a list.  This exposure is unnecessary.
 
  Of the ones you listed, send_notification fits best.

 I agree.  Thanks for the detailed comments on each proposal.

 
  Of the ones you didn't list, notify_user would be best.
 
  sugar_shell_add_notification_and_send_to_user would be the worst.
 
  --
  James Cameron
  http://quozl.linux.org.au/
  ___
  Sugar-devel mailing list
  Sugar-devel@lists.sugarlabs.org
  http://lists.sugarlabs.org/listinfo/sugar-devel



 --
 .. manuq ..

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] New method for Activity class to send notifications

2014-03-26 Thread Manuel Quiñones
2014-03-26 19:23 GMT-03:00 Martin Abente martin.abente.lah...@gmail.com:
 notify_user sounds good to me :)

Same to me, notify_user fits best.  I meant to add my comment below
that one, sorry.



 On Wed, Mar 26, 2014 at 5:36 PM, Manuel Quiñones ma...@laptop.org wrote:

 2014-03-26 18:12 GMT-03:00 James Cameron qu...@laptop.org:
  On Wed, Mar 26, 2014 at 09:40:41AM -0300, Martin Abente wrote:
  His work is almost done [2,3,4], but it introduces a new method to
  the base Activity class, therefore I wanted your opinions regarding
  the name of this method, the current options are [4]:
 
  * send_notification
  * add_notification
  * shell_notify
  * sugar_notify
 
  shell_ and sugar_ prefixes are superfluous given that the base
  Activity class is already a part of Sugar, and the Shell isn't the
  eventual target of the notification; the user is.
 
  _notify and _notification are ambiguous, because they don't say
  what is being notified; the system, the class instance, or the user.
 
  add_ prefix exposes an implementation detail; that notifications are
  a list.  This exposure is unnecessary.
 
  Of the ones you listed, send_notification fits best.

 I agree.  Thanks for the detailed comments on each proposal.

 
  Of the ones you didn't list, notify_user would be best.
 
  sugar_shell_add_notification_and_send_to_user would be the worst.
 
  --
  James Cameron
  http://quozl.linux.org.au/
  ___
  Sugar-devel mailing list
  Sugar-devel@lists.sugarlabs.org
  http://lists.sugarlabs.org/listinfo/sugar-devel



 --
 .. manuq ..



 ___
 Sugar-devel mailing list
 Sugar-devel@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/sugar-devel




-- 
.. manuq ..
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] New method for Activity class to send notifications

2014-03-26 Thread Walter Bender
On Wed, Mar 26, 2014 at 6:43 PM, Manuel Quiñones ma...@laptop.org wrote:
 2014-03-26 19:23 GMT-03:00 Martin Abente martin.abente.lah...@gmail.com:
 notify_user sounds good to me :)

+1

 Same to me, notify_user fits best.  I meant to add my comment below
 that one, sorry.



 On Wed, Mar 26, 2014 at 5:36 PM, Manuel Quiñones ma...@laptop.org wrote:

 2014-03-26 18:12 GMT-03:00 James Cameron qu...@laptop.org:
  On Wed, Mar 26, 2014 at 09:40:41AM -0300, Martin Abente wrote:
  His work is almost done [2,3,4], but it introduces a new method to
  the base Activity class, therefore I wanted your opinions regarding
  the name of this method, the current options are [4]:
 
  * send_notification
  * add_notification
  * shell_notify
  * sugar_notify
 
  shell_ and sugar_ prefixes are superfluous given that the base
  Activity class is already a part of Sugar, and the Shell isn't the
  eventual target of the notification; the user is.
 
  _notify and _notification are ambiguous, because they don't say
  what is being notified; the system, the class instance, or the user.
 
  add_ prefix exposes an implementation detail; that notifications are
  a list.  This exposure is unnecessary.
 
  Of the ones you listed, send_notification fits best.

 I agree.  Thanks for the detailed comments on each proposal.

 
  Of the ones you didn't list, notify_user would be best.
 
  sugar_shell_add_notification_and_send_to_user would be the worst.
 
  --
  James Cameron
  http://quozl.linux.org.au/
  ___
  Sugar-devel mailing list
  Sugar-devel@lists.sugarlabs.org
  http://lists.sugarlabs.org/listinfo/sugar-devel



 --
 .. manuq ..



 ___
 Sugar-devel mailing list
 Sugar-devel@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/sugar-devel




 --
 .. manuq ..
 ___
 Sugar-devel mailing list
 Sugar-devel@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/sugar-devel



-- 
Walter Bender
Sugar Labs
http://www.sugarlabs.org
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel