mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-23 00:47:31 +09:00
Issue #1258 - Part 7: UXP Specific fixes
* This includes Bug 1326433 for Janek fallout (ldap already had this fix)
This commit is contained in:
parent
28473a58a2
commit
971009881c
8 changed files with 54 additions and 37 deletions
|
|
@ -56,7 +56,6 @@
|
|||
|
||||
#define NOTIFICATIONCLASSNAME "MailBiffNotificationMessageWindow"
|
||||
#define UNREADMAILNODEKEY "Software\\Microsoft\\Windows\\CurrentVersion\\UnreadMail\\"
|
||||
#define SHELL32_DLL L"shell32.dll"
|
||||
#define DOUBLE_QUOTE "\""
|
||||
#define MAIL_COMMANDLINE_ARG " -mail"
|
||||
#define IDI_MAILBIFF 32576
|
||||
|
|
@ -336,14 +335,6 @@ nsMessengerWinIntegration::Init()
|
|||
{
|
||||
nsresult rv;
|
||||
|
||||
// Get shell32.dll handle
|
||||
HMODULE hModule = ::GetModuleHandleW(SHELL32_DLL);
|
||||
|
||||
if (hModule) {
|
||||
// SHQueryUserNotificationState is available from Vista
|
||||
mSHQueryUserNotificationState = (fnSHQueryUserNotificationState)GetProcAddress(hModule, "SHQueryUserNotificationState");
|
||||
}
|
||||
|
||||
nsCOMPtr <nsIMsgAccountManager> accountManager =
|
||||
do_GetService(NS_MSGACCOUNTMANAGER_CONTRACTID, &rv);
|
||||
NS_ENSURE_SUCCESS(rv,rv);
|
||||
|
|
@ -492,9 +483,10 @@ nsresult nsMessengerWinIntegration::ShowNewAlertNotification(bool aUserInitiated
|
|||
prefBranch->GetBoolPref(SHOW_ALERT_PREF, &showAlert);
|
||||
|
||||
// check if we are allowed to show a notification
|
||||
if (showAlert && mSHQueryUserNotificationState) {
|
||||
MOZ_QUERY_USER_NOTIFICATION_STATE qstate;
|
||||
if (SUCCEEDED(mSHQueryUserNotificationState(&qstate))) {
|
||||
if (showAlert) {
|
||||
QUERY_USER_NOTIFICATION_STATE qstate;
|
||||
|
||||
if (SUCCEEDED(SHQueryUserNotificationState(&qstate))) {
|
||||
if (qstate != QUNS_ACCEPTS_NOTIFICATIONS) {
|
||||
showAlert = false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,22 +20,6 @@
|
|||
#include "nsIMutableArray.h"
|
||||
#include "nsIObserver.h"
|
||||
|
||||
typedef enum tagMOZ_QUERY_USER_NOTIFICATION_STATE {
|
||||
QUNS_NOT_PRESENT = 1,
|
||||
QUNS_BUSY = 2,
|
||||
QUNS_RUNNING_D3D_FULL_SCREEN = 3,
|
||||
QUNS_PRESENTATION_MODE = 4,
|
||||
QUNS_ACCEPTS_NOTIFICATIONS = 5,
|
||||
QUNS_QUIET_TIME = 6
|
||||
} MOZ_QUERY_USER_NOTIFICATION_STATE;
|
||||
|
||||
// this function is exported by shell32.dll on Windows Vista or later
|
||||
extern "C"
|
||||
{
|
||||
// Vista or later
|
||||
typedef HRESULT (__stdcall *fnSHQueryUserNotificationState)(MOZ_QUERY_USER_NOTIFICATION_STATE *pquns);
|
||||
}
|
||||
|
||||
#define NS_MESSENGERWININTEGRATION_CID \
|
||||
{0xf62f3d3a, 0x1dd1, 0x11b2, \
|
||||
{0xa5, 0x16, 0xef, 0xad, 0xb1, 0x31, 0x61, 0x5c}}
|
||||
|
|
@ -105,8 +89,6 @@ private:
|
|||
nsCOMPtr <nsIAtom> mTotalUnreadMessagesAtom;
|
||||
nsCOMPtr <nsITimer> mUnreadCountUpdateTimer;
|
||||
|
||||
fnSHQueryUserNotificationState mSHQueryUserNotificationState;
|
||||
|
||||
nsCString mInboxURI;
|
||||
nsCString mEmail;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue