Bug 404943 - [10.5] Bounce the download folder in the Dock when downloads finish. Patch by Ilya Sherman <ishermandom+bugs@gmail.com>, r=cl, sr=smorgan

git-svn-id: svn://10.0.0.236/trunk@255509 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
alqahira%ardisson.org 2008-12-12 19:50:07 +00:00
parent 633e4a126f
commit f6b4ece647

View File

@ -52,6 +52,9 @@
// but that requires linkage and extra search paths.
static NSString* XPCOMShutDownNotificationName = @"XPCOMShutDown";
// This is the OS notification name to make the Dock icon for the downloads folder bounce.
static NSString* const DownloadFinishedOSNotificationName = @"com.apple.DownloadFileFinished";
enum {
kLabelTagFilename = 1000,
kLabelTagStatus,
@ -383,6 +386,13 @@ enum {
[mProgressWindowController removeDownload:self suppressRedraw:NO];
else if (!mDownloadFailed)
[self setupFileSystemNotification];
// Sending this notification makes the Dock icon (if it exists)
// for the folder containing the downloaded file bounce.
if (!mUserCancelled && !mDownloadFailed) {
[[NSDistributedNotificationCenter defaultCenter]
postNotificationName:DownloadFinishedOSNotificationName object:mDestPath];
}
}
}