Add icon notifications to GetAttention(). Now, the mozilla icon will flash if gaetattention is called and the app is in the background. r=sfraser.

git-svn-id: svn://10.0.0.236/trunk@60860 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mscott%netscape.com
2000-02-15 09:31:11 +00:00
parent 5aa17ed391
commit 80fc72dd47

View File

@@ -39,6 +39,8 @@
#include <Appearance.h>
#include <Timer.h>
#include <Icons.h>
#include <Errors.h>
#include "nsplugindefs.h"
#include "nsMacEventHandler.h"
@@ -1943,6 +1945,9 @@ NS_IMETHODIMP nsWindow::GetAttention()
// After all that checking we install a notification manager request to mark the app's icon
// in the process menu and play the default alert sound
Handle icon;
OSErr err;
if (we_are_front_process())
return NS_OK;
@@ -1952,10 +1957,13 @@ NS_IMETHODIMP nsWindow::GetAttention()
gNotificationInstalled = false;
}
err = GetIconSuite( &gNMRec.nmIcon, 128, svAllSmallData );
if ( err != noErr )
gNMRec.nmIcon = NULL;
// Setup and install the notification manager rec
gNMRec.qType = nmType;
gNMRec.nmMark = 1; // Flag the icon in the process menu
gNMRec.nmIcon = NULL; // It'd be nice if we had an icon to flash - maybe later
gNMRec.nmSound = (Handle)-1L; // Use the default alert sound
gNMRec.nmStr = NULL; // No alert/window so no text
gNMRec.nmResp = NULL; // No response proc, use the default behavior