Closed Bug 230768 Opened 22 years ago Closed 22 years ago

New download should flash taskbar icon 2 times if download window is open, but not focused.

Categories

(Toolkit :: Downloads API, defect, P3)

x86
Windows XP
defect

Tracking

()

RESOLVED FIXED
mozilla1.7

People

(Reporter: bugs, Assigned: bugs)

References

Details

Attachments

(3 files)

If you have the download manager window open but not in the foreground, when you click a link to initiate a download it isn't immediately apparent that a download has begun, especially if you have a lot of windows open. I want to see if I can make the window flash in the taskbar a small number of times (e.g. 3) to provide feedback that the transfer has begun.
If "Show the download manager when a download begins" is unchecked, it shouldn't flash IMO.
Summary: New download should flash taskbar icon 3 times if download window is open, but not focused. → New download should flash taskbar icon 3 times if download window is open, but not focused.
Fair comment.
Status: NEW → ASSIGNED
Priority: -- → P3
Target Milestone: --- → Firebird0.9
Make that 2 times. This is hidden-pref-controlled anyhow. Patch in a sec.
Summary: New download should flash taskbar icon 3 times if download window is open, but not focused. → New download should flash taskbar icon 2 times if download window is open, but not focused.
I added a new method to nsIDOMChromeWindow (to maintain compatibility with older uses of GetAttention) that takes a cycle count parameter that is the number of times the OS implementation should perform its notification procedure (flash taskbar button, bounce dock icon, etc). The name is a little verbose.
Attached patch widget changesSplinter Review
Change to GetAttention nsIWidget method, now takes a cycle count parameter. This is implemented on Windows to only flash the taskbar a the supplied number of times. There is no flasher implementation for gtk, I'll look at seeing if this will mesh with the MacOS dock notification system later.
flash the download manager window n times, controlled by pref.
Attachment #139160 - Flags: review?(danm-moz)
Comment on attachment 139159 [details] [diff] [review] dom changes (new getAttentionWithCycleCount method) I'm in love with the name, but I'll learn to live with it (since I don't have a better suggestion). :-) r+sr=jst
Attachment #139159 - Flags: superreview+
Attachment #139159 - Flags: review?(jst)
Attachment #139159 - Flags: review+
Comment on attachment 139160 [details] [diff] [review] widget changes Welcome to the wonderful "let's change nsIWidget.h" hurt locker. >@@ -6725,48 +6741,67 @@ void nsWindow::GetCompositionWindowPos(H > static VOID CALLBACK nsGetAttentionTimerFunc(HWND hwnd, UINT uMsg, UINT idEvent, DWORD dwTime) { >... >+ PRInt32 maxFlashCount = gAttentionTimerMonitor->GetMaxFlashCount(hwnd); >+ PRInt32 flashCount = gAttentionTimerMonitor->GetFlashCount(hwnd); >+ if (maxFlashCount > 0) { >+ // We have a max flash count, if we haven't met it yet, flash again. >+ if (flashCount < maxFlashCount) { >+ ::FlashWindow(flashwnd, TRUE); >+ gAttentionTimerMonitor->IncrementFlashCount(hwnd); >+ } >+ else >+ gAttentionTimerMonitor->KillTimer(hwnd); >+ } >+ else { >+ // The caller didn't specify a flash count. >+ ::FlashWindow(flashwnd, TRUE); >+ } >+ > gAttentionTimerMonitor->SetFlashed(hwnd); > } > else > gAttentionTimerMonitor->KillTimer(hwnd); > } Though you abort elsewhere if maxFlashCount == 0, I'd still rather see you call SetFlashed only if you actually called FlashWindow.
Attachment #139160 - Flags: review?(danm-moz) → review+
It's easier to read now that I'm not editing it. Ignore my dead, invalid above comment. There is still some maxFlashCount == 0 funkiness going on, though it'll be weeded out in two places.
Attachment #139160 - Flags: superreview+
This should obey the global setting for the number of times to flash on Windows.
Checked in by Ben on 2/10. You'd think he'd have the decency to close his own bug.
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
*** Bug 227145 has been marked as a duplicate of this bug. ***
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: