Re: source.unseenCount's strange behavior



2012/9/29 Thiago Bellini Ribeiro <hackedbellini gmail com>:
> Hi all,
>
> I'm the developer of Notifications Alert extension[1].
>
> I was updating it to work with 3.6, testing it on
> ubuntu-gnome-remix[2] that I downloaded today (I'm on Debian Testing
> and it will take a long time before I can play with 3.6 here =P).
>
> On 3.2 and 3.4, what my extension did was: Every time a notifications
> was created, destroyed or had it's count updated, I checked if any
> source had '_counterBin' visible and it's count was != '0'. That to
> check for chat notifications. To check for simple notifications
> (notify-send alikes), I checked each 'source.notifications' and if it
> had one not resident, it would get alerted too (excluding resident to
> not notify for Rhythmbox notifications for example, that doesn't go
> away on clicking).
>
> Taking a look at the source code[3], I noticed that there's a new api
> for notification's source, 'unseenCount'.
> When I first look at it, I thought it would be perfect for what I want
> (to check for chat notifications). If a notification has unseen
> notifications, it needs to get alerted (and vice-versa). It worked ok
> for chat notifications, and for simple notifications (notify-send
> alikes), I just continued to check for not resident notifications. But
> something strange happened: Rhythmbox's notification had it's
> 'source.unseenCount' returning 1 always. Even if I click on the
> notification and then on the notification's popup, it never gets
> acknowledged.
>
> Is this the expected behavior or is this a bug? What would be the
> right way to check what I'm checking?
> To help, this is the check I'm doing[4]. I'm using
> 'source.countVisible' to check, but I don't think that it's the right
> thing to do..

It's very possible that there is a bug, as that count is used by the
screen lock and only for non resident notifications. It would be very
helpful if you could debug, or otherwise just look at
js/ui/screenShield.js : NotificationBox for code to filter out
resident sources, as I understand you don't want to show them anyway.

Giovanni


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