Bug #122626 --> biff icon isn't showing up in the system tray for win98. This is because
win98 defines support for the unicode friendly shell notify routines even though it doesn't implement them. Fall back to the ascii version in this case. r=bhuvan sr=bienvenu a=dbaron
This commit is contained in:
Родитель
6248cca19e
Коммит
6cfc2815ae
|
@ -722,11 +722,37 @@ void nsMessengerWinIntegration::SetToolTipStringOnIconData(const PRUnichar * aTo
|
|||
void nsMessengerWinIntegration::GenericShellNotify(DWORD aMessage)
|
||||
{
|
||||
if (mUseWideCharBiffIcon)
|
||||
mShellNotifyWideChar( aMessage, &mWideBiffIconData );
|
||||
{
|
||||
BOOL res = mShellNotifyWideChar( aMessage, &mWideBiffIconData );
|
||||
if (!res)
|
||||
RevertToNonUnicodeShellAPI(); // oops we don't really implement the unicode shell apis...fall back.
|
||||
else
|
||||
return;
|
||||
}
|
||||
|
||||
::Shell_NotifyIcon( aMessage, &mAsciiBiffIconData );
|
||||
}
|
||||
|
||||
// some flavors of windows define ShellNotifyW but when you actually try to use it,
|
||||
// they return an error. In this case, we'll have a routine which converts us over to the
|
||||
// default ASCII version.
|
||||
void nsMessengerWinIntegration::RevertToNonUnicodeShellAPI()
|
||||
{
|
||||
mUseWideCharBiffIcon = PR_FALSE;
|
||||
if (mWideBiffIconData.hIcon) // release any windows handles
|
||||
DestroyIcon(mWideBiffIconData.hIcon);
|
||||
|
||||
// now initialize the ascii shell notify struct
|
||||
InitializeBiffStatusIcon();
|
||||
|
||||
// now we need to copy over any left over tool tip strings
|
||||
if (mWideBiffIconData.szTip)
|
||||
{
|
||||
const PRUnichar * oldTooltipString = mWideBiffIconData.szTip;
|
||||
SetToolTipStringOnIconData(oldTooltipString);
|
||||
}
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsMessengerWinIntegration::OnItemPropertyFlagChanged(nsISupports *item, nsIAtom *property, PRUint32 oldFlag, PRUint32 newFlag)
|
||||
{
|
||||
|
|
|
@ -92,6 +92,8 @@ private:
|
|||
void GenericShellNotify(DWORD aMessage);
|
||||
void SetToolTipStringOnIconData(const PRUnichar * aToolTipString);
|
||||
void DestroyBiffIcon();
|
||||
void RevertToNonUnicodeShellAPI();
|
||||
|
||||
PRUint32 GetToolTipSize(); // available space for the tooltip string
|
||||
nsresult ShowAlertMessage(const PRUnichar * aAlertText, const char * aFolderURI);
|
||||
nsresult GetFirstFolderWithNewMail(char ** aFolderURI);
|
||||
|
|
Загрузка…
Ссылка в новой задаче