Re: Sending notification



Il giorno mar, 24/05/2011 alle 15.39 -0400, Erick Pérez ha scritto:
> Now I have this problem:
> I manage to create a Source and a new Notification subclass to add a
> pair of buttons to the notification, One for Closing and one for doing
> something else.
> 1. When the user don't interact with the first notification, the
> notification stays in the notification bar, and that's what I want
> 2. The problem is when the user click 'Close' button I added to the
> notification (which I connected to 'this.destroy'). That close the
> notification, and the source disappears from the notification bar if
> there was just one notification, and then if I launch a notification
> again and the user don't interact with it, the new notification does
> not stay in the bar, cause the sources is missing.
> Why this.destroy from the notification class remove the source from
> the notification bar ?

Because that's the default behaviour of Source._lastNotificationRemoved
(to call source.destroy()). Override the method, if you don't want it
(but notice that a source with no associated notification is weird to
see).

Giovanni

Attachment: signature.asc
Description: This is a digitally signed message part



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]