First patch for bug 158080

Description: replace the hardcode of "@mozilla.org/embedcomp/window-watcher;1" with NS_WINDOWWATCHER_CONTRACTID
Patch by Henry.Jia@sun.com
r=blizzard, sr=alecf, a=asa(for trunk)
This commit is contained in:
henry.jia%sun.com 2002-07-23 02:27:19 +00:00
parent 0555c49b12
commit 21d39b52f2
3 changed files with 4 additions and 5 deletions

View File

@ -162,5 +162,6 @@ interface nsIWindowWatcher : nsISupports {
// {002286a8-494b-43b3-8ddd-49e3fc50622b}
#define NS_WINDOWWATCHER_IID \
{0x002286a8, 0x494b, 0x43b3, {0x8d, 0xdd, 0x49, 0xe3, 0xfc, 0x50, 0x62, 0x2b}}
%}
#define NS_WINDOWWATCHER_CONTRACTID "@mozilla.org/embedcomp/window-watcher;1"
%}

View File

@ -42,8 +42,6 @@
// {a21bfa01-f349-4394-a84c-8de5cf0737d0}
#define NS_WINDOWWATCHER_CID \
{0xa21bfa01, 0xf349, 0x4394, {0xa8, 0x4c, 0x8d, 0xe5, 0xcf, 0x7, 0x37, 0xd0}}
#define NS_WINDOWWATCHER_CONTRACTID \
"@mozilla.org/embedcomp/window-watcher;1"
#include "nsCOMPtr.h"
#include "jspubtd.h"

View File

@ -2130,7 +2130,7 @@ nsImapIncomingServer::FEAlert(const PRUnichar* aString, nsIMsgWindow * aMsgWindo
if (!dialog) // if we didn't get one, use the default....
{
nsCOMPtr<nsIWindowWatcher> wwatch(do_GetService("@mozilla.org/embedcomp/window-watcher;1"));
nsCOMPtr<nsIWindowWatcher> wwatch(do_GetService(NS_WINDOWWATCHER_CONTRACTID));
if (wwatch)
wwatch->GetNewPrompter(0, getter_AddRefs(dialog));
}
@ -2150,7 +2150,7 @@ NS_IMETHODIMP nsImapIncomingServer::FEAlertFromServer(const char *aString, nsIM
if (!dialog) // if we didn't get one, use the default....
{
nsCOMPtr<nsIWindowWatcher> wwatch(do_GetService("@mozilla.org/embedcomp/window-watcher;1"));
nsCOMPtr<nsIWindowWatcher> wwatch(do_GetService(NS_WINDOWWATCHER_CONTRACTID));
if (wwatch)
wwatch->GetNewPrompter(0, getter_AddRefs(dialog));
}