Closed
Bug 597244
Opened 14 years ago
Closed 14 years ago
re-work PopupNotifications event callback API
Categories
(Toolkit :: General, defect)
Toolkit
General
Tracking
()
VERIFIED
FIXED
mozilla2.0b7
Tracking | Status | |
---|---|---|
blocking2.0 | --- | beta7+ |
People
(Reporter: Gavin, Assigned: Gavin)
References
(Blocks 1 open bug)
Details
(Whiteboard: [doorhanger])
Attachments
(1 file)
12.15 KB,
patch
|
Dolske
:
review+
|
Details | Diff | Splinter Review |
Bug 590794 added a "dismissalHandler", and bug 595253 has a patch adding a "shown" handler. A "removed" handler is potentially useful as well. Rather than have the caller specify separate callbacks for all of these events, we should consolidate and have a single "eventHandler" callback that gets called for each of the events, with a parameter. Bug 590794 doesn't have any users yet (was just added recently), so I think we can make this change without affecting any users (but we need to do it soon).
Assignee | ||
Comment 1•14 years ago
|
||
Assignee | ||
Updated•14 years ago
|
Updated•14 years ago
|
Attachment #476078 -
Flags: review?(dolske) → review+
Comment 3•14 years ago
|
||
If I understand correctly, the "removed" event won't be called when you close a tab or the window.
In bug 588266 a cleanup function (cancel add-on installation) needs to be called if the user didn't click on the main action of the notification.
As of now, the cleanup function in called from the dismissal callback introduced in bug 590794, but there's a drawback: the notification is removed when dismissed, so you can't dismiss it and install the add-on later.
Using the "removed" event would fix that issue, but it would need to be fired in all situations where the user didn't accept the notification (tab or window is closed, location change, ...). I could open a followup bug if that's reasonable to have such semantic for the "removed" event.
Assignee | ||
Comment 4•14 years ago
|
||
Yeah, please do file a followup. We may be able to fix that by having browsers remove() their notifications in their destructor, or something along those lines.
Assignee | ||
Comment 5•14 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla2.0b7
Comment 6•14 years ago
|
||
(In reply to comment #4)
> Yeah, please do file a followup. We may be able to fix that by having browsers
> remove() their notifications in their destructor, or something along those
> lines.
I filed bug 609804 for that.
You need to log in
before you can comment on or make changes to this bug.
Description
•