summaryrefslogtreecommitdiffstats
path: root/mailnews
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2019-11-03 22:50:47 -0500
committerMatt A. Tobin <email@mattatobin.com>2019-11-03 22:50:47 -0500
commit711a5031d015a9fde7feb61905473b52d9cc3369 (patch)
tree0cace52b62bbfa1e83af8710c887b387ca6cabe1 /mailnews
parent37fbbd447b96b72f3e07e18e72509de01f94b7eb (diff)
downloadUXP-711a5031d015a9fde7feb61905473b52d9cc3369.tar
UXP-711a5031d015a9fde7feb61905473b52d9cc3369.tar.gz
UXP-711a5031d015a9fde7feb61905473b52d9cc3369.tar.lz
UXP-711a5031d015a9fde7feb61905473b52d9cc3369.tar.xz
UXP-711a5031d015a9fde7feb61905473b52d9cc3369.zip
Issue #1258 - Part 7: UXP Specific fixes
* This includes Bug 1326433 for Janek fallout (ldap already had this fix)
Diffstat (limited to 'mailnews')
-rw-r--r--mailnews/addrbook/src/nsAddbookUrl.cpp24
-rw-r--r--mailnews/base/src/nsMessengerWinIntegration.cpp16
-rw-r--r--mailnews/base/src/nsMessengerWinIntegration.h18
-rw-r--r--mailnews/base/util/nsMsgMailNewsUrl.cpp3
-rw-r--r--mailnews/base/util/nsMsgMailNewsUrl.h1
-rw-r--r--mailnews/compose/src/nsSmtpUrl.cpp24
-rw-r--r--mailnews/jsaccount/src/JaUrl.cpp2
-rw-r--r--mailnews/jsaccount/src/JaUrl.h3
8 files changed, 54 insertions, 37 deletions
diff --git a/mailnews/addrbook/src/nsAddbookUrl.cpp b/mailnews/addrbook/src/nsAddbookUrl.cpp
index 2084ca467..5d8d1c266 100644
--- a/mailnews/addrbook/src/nsAddbookUrl.cpp
+++ b/mailnews/addrbook/src/nsAddbookUrl.cpp
@@ -248,6 +248,30 @@ nsAddbookUrl::SetRef(const nsACString &aRef)
return ParseUrl();
}
+NS_IMETHODIMP
+nsAddbookUrl::GetFilePath(nsACString &aFilePath)
+{
+ return m_baseURL->GetFilePath(aFilePath);
+}
+
+NS_IMETHODIMP
+nsAddbookUrl::SetFilePath(const nsACString &aFilePath)
+{
+ return m_baseURL->SetFilePath(aFilePath);
+}
+
+NS_IMETHODIMP
+nsAddbookUrl::GetQuery(nsACString &aQuery)
+{
+ return m_baseURL->GetQuery(aQuery);
+}
+
+NS_IMETHODIMP
+nsAddbookUrl::SetQuery(const nsACString &aQuery)
+{
+ return m_baseURL->SetQuery(aQuery);
+}
+
NS_IMETHODIMP nsAddbookUrl::EqualsExceptRef(nsIURI *other, bool *_retval)
{
// The passed-in URI might be an nsMailtoUrl. Pass our inner URL to its
diff --git a/mailnews/base/src/nsMessengerWinIntegration.cpp b/mailnews/base/src/nsMessengerWinIntegration.cpp
index a014b9737..98888fcb3 100644
--- a/mailnews/base/src/nsMessengerWinIntegration.cpp
+++ b/mailnews/base/src/nsMessengerWinIntegration.cpp
@@ -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;
}
diff --git a/mailnews/base/src/nsMessengerWinIntegration.h b/mailnews/base/src/nsMessengerWinIntegration.h
index 6c49a71c2..344e05e76 100644
--- a/mailnews/base/src/nsMessengerWinIntegration.h
+++ b/mailnews/base/src/nsMessengerWinIntegration.h
@@ -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;
diff --git a/mailnews/base/util/nsMsgMailNewsUrl.cpp b/mailnews/base/util/nsMsgMailNewsUrl.cpp
index e9dc52b33..17f95fc30 100644
--- a/mailnews/base/util/nsMsgMailNewsUrl.cpp
+++ b/mailnews/base/util/nsMsgMailNewsUrl.cpp
@@ -82,7 +82,6 @@ NS_INTERFACE_MAP_BEGIN(nsMsgMailNewsUrl)
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIMsgMailNewsUrl)
NS_INTERFACE_MAP_ENTRY(nsIMsgMailNewsUrl)
NS_INTERFACE_MAP_ENTRY(nsIURL)
- NS_INTERFACE_MAP_ENTRY(nsIURIWithQuery)
NS_INTERFACE_MAP_ENTRY(nsIURI)
NS_INTERFACE_MAP_ENTRY_CONDITIONAL(nsIURIWithPrincipal, !m_isPrincipalURL)
NS_INTERFACE_MAP_END
@@ -127,6 +126,8 @@ NS_IMETHODIMP nsMsgMailNewsUrl::GetPrincipalUri(nsIURI **aPrincipalURI)
return m_principal->GetURI(aPrincipalURI);
}
+// NS_IMPL_ISUPPORTS(nsMsgMailNewsUrl, nsIMsgMailNewsUrl, nsIURL, nsIURI)
+
////////////////////////////////////////////////////////////////////////////////////
// Begin nsIMsgMailNewsUrl specific support
////////////////////////////////////////////////////////////////////////////////////
diff --git a/mailnews/base/util/nsMsgMailNewsUrl.h b/mailnews/base/util/nsMsgMailNewsUrl.h
index 5833dfef1..61fd4827e 100644
--- a/mailnews/base/util/nsMsgMailNewsUrl.h
+++ b/mailnews/base/util/nsMsgMailNewsUrl.h
@@ -46,7 +46,6 @@ public:
NS_DECL_THREADSAFE_ISUPPORTS
NS_DECL_NSIMSGMAILNEWSURL
NS_DECL_NSIURI
- NS_DECL_NSIURIWITHQUERY
NS_DECL_NSIURL
NS_DECL_NSIURIWITHPRINCIPAL
diff --git a/mailnews/compose/src/nsSmtpUrl.cpp b/mailnews/compose/src/nsSmtpUrl.cpp
index cd40bd6cc..29678397c 100644
--- a/mailnews/compose/src/nsSmtpUrl.cpp
+++ b/mailnews/compose/src/nsSmtpUrl.cpp
@@ -605,6 +605,30 @@ nsMailtoUrl::GetHasRef(bool *result)
return m_baseURL->GetHasRef(result);
}
+NS_IMETHODIMP
+nsMailtoUrl::GetFilePath(nsACString &aFilePath)
+{
+ return m_baseURL->GetFilePath(aFilePath);
+}
+
+NS_IMETHODIMP
+nsMailtoUrl::SetFilePath(const nsACString &aFilePath)
+{
+ return m_baseURL->SetFilePath(aFilePath);
+}
+
+NS_IMETHODIMP
+nsMailtoUrl::GetQuery(nsACString &aQuery)
+{
+ return m_baseURL->GetQuery(aQuery);
+}
+
+NS_IMETHODIMP
+nsMailtoUrl::SetQuery(const nsACString &aQuery)
+{
+ return m_baseURL->SetQuery(aQuery);
+}
+
/////////////////////////////////////////////////////////////////////////////////////
// smtp url definition
/////////////////////////////////////////////////////////////////////////////////////
diff --git a/mailnews/jsaccount/src/JaUrl.cpp b/mailnews/jsaccount/src/JaUrl.cpp
index 70b19329c..f103460c6 100644
--- a/mailnews/jsaccount/src/JaUrl.cpp
+++ b/mailnews/jsaccount/src/JaUrl.cpp
@@ -162,7 +162,6 @@ NS_IMPL_ISUPPORTS(JaCppUrlDelegator::Super,
nsIMsgMailNewsUrl,
nsIMsgMessageUrl,
nsIURI,
- nsIURIWithQuery,
nsIURL,
nsIInterfaceRequestor)
@@ -199,7 +198,6 @@ NS_IMETHODIMP JaCppUrlDelegator::SetJsDelegate(nsISupports *aJsDelegate)
mJsISupports = aJsDelegate;
mJsIMsgMailNewsUrl = do_QueryInterface(aJsDelegate);
mJsIURI = do_QueryInterface(aJsDelegate);
- mJsIURIWithQuery = do_QueryInterface(aJsDelegate);
mJsIURL = do_QueryInterface(aJsDelegate);
mJsIMsgMessageUrl = do_QueryInterface(aJsDelegate);
mJsIInterfaceRequestor = do_QueryInterface(aJsDelegate);
diff --git a/mailnews/jsaccount/src/JaUrl.h b/mailnews/jsaccount/src/JaUrl.h
index 57c902eee..2de90ae68 100644
--- a/mailnews/jsaccount/src/JaUrl.h
+++ b/mailnews/jsaccount/src/JaUrl.h
@@ -68,7 +68,6 @@ public:
NS_FORWARD_NSIMSGMAILNEWSURL(DELEGATE_JS(nsIMsgMailNewsUrl, mJsIMsgMailNewsUrl)->)
NS_FORWARD_NSIURI(DELEGATE_JS(nsIURI, mJsIURI)->)
- NS_FORWARD_NSIURIWITHQUERY(DELEGATE_JS(nsIURIWithQuery, mJsIURIWithQuery)->)
NS_FORWARD_NSIURL(DELEGATE_JS(nsIURL, mJsIURL)->)
NS_FORWARD_NSIMSGMESSAGEURL(DELEGATE_JS(nsIMsgMessageUrl, mJsIMsgMessageUrl)->)
NS_FORWARD_NSIINTERFACEREQUESTOR(DELEGATE_JS(nsIInterfaceRequestor, mJsIInterfaceRequestor)->)
@@ -84,7 +83,6 @@ public:
NS_DECL_ISUPPORTS
NS_FORWARD_NSIMSGMAILNEWSURL(mFakeThis->JaBaseCppUrl::)
NS_FORWARD_NSIURI(mFakeThis->JaBaseCppUrl::)
- NS_FORWARD_NSIURIWITHQUERY(mFakeThis->JaBaseCppUrl::)
NS_FORWARD_NSIURL(mFakeThis->JaBaseCppUrl::)
NS_FORWARD_NSIMSGMESSAGEURL(mFakeThis->JaBaseCppUrl::)
NS_FORWARD_NSIINTERFACEREQUESTOR(mFakeThis->JaBaseCppUrl::)
@@ -100,7 +98,6 @@ private:
// Interfaces that may be overridden by JS.
nsCOMPtr<nsIMsgMailNewsUrl> mJsIMsgMailNewsUrl;
nsCOMPtr<nsIURI> mJsIURI;
- nsCOMPtr<nsIURIWithQuery> mJsIURIWithQuery;
nsCOMPtr<nsIURL> mJsIURL;
nsCOMPtr<nsIMsgMessageUrl> mJsIMsgMessageUrl;
nsCOMPtr<nsIInterfaceRequestor> mJsIInterfaceRequestor;