Back out unix changes I didn't intend to commit while fixing the build bustage.

This commit is contained in:
scott%scott-macgregor.org 2007-05-22 00:25:20 +00:00
Родитель fbd0bb1b47
Коммит a532615c3b
2 изменённых файлов: 15 добавлений и 9 удалений

Просмотреть файл

@ -79,7 +79,7 @@
#define NEW_MAIL_ALERT_ICON "chrome://messenger/skin/icons/new-mail-alert.png"
#define SHOW_ALERT_PREF "mail.biff.show_alert"
static void openMailWindow(const nsACString& aFolderUri)
static void openMailWindow(const PRUnichar * aMailWindowName, const char * aFolderUri)
{
nsresult rv;
nsCOMPtr<nsIMsgMailSession> mailSession ( do_GetService(NS_MSGMAILSESSION_CONTRACTID, &rv));
@ -90,7 +90,7 @@ static void openMailWindow(const nsACString& aFolderUri)
rv = mailSession->GetTopmostMsgWindow(getter_AddRefs(topMostMsgWindow));
if (topMostMsgWindow)
{
if (!aFolderUri.IsEmpty())
if (aFolderUri)
{
nsCOMPtr<nsIMsgWindowCommands> windowCommands;
topMostMsgWindow->GetWindowCommands(getter_AddRefs(windowCommands));
@ -112,7 +112,7 @@ static void openMailWindow(const nsACString& aFolderUri)
// (and add code to the messenger window service to make that work)
if (messengerWindowService)
messengerWindowService->OpenMessengerWindowWithUri(
"mail:3pane", PromiseFlatCString(aFolderUri).get(), nsMsgKey_None);
"mail:3pane", aFolderUri, nsMsgKey_None);
}
}
@ -283,12 +283,14 @@ nsresult nsMessengerUnixIntegration::AlertClicked()
nsCOMPtr<nsIDOMWindowInternal> domWindow;
rv = topMostMsgWindow->GetDomWindow(getter_AddRefs(domWindow));
NS_ENSURE_SUCCESS(rv, rv);
domWindow->Focus();
}
#else
nsCString folderURI;
GetFirstFolderWithNewMail(folderURI);
openMailWindow(folderURI);
GetFirstFolderWithNewMail(getter_Copies(folderURI));
openMailWindow(NS_LITERAL_STRING("mail:3pane").get(), folderURI.get());
#endif
return NS_OK;
}
@ -345,7 +347,7 @@ void nsMessengerUnixIntegration::FillToolTipInfo()
// get the first top level folder which we know has new mail, then enumerate over all the subfolders
// looking for the first real folder with new mail. Return the folderURI for that folder.
nsresult nsMessengerUnixIntegration::GetFirstFolderWithNewMail(nsACString& aFolderURI)
nsresult nsMessengerUnixIntegration::GetFirstFolderWithNewMail(char ** aFolderURI)
{
nsresult rv;
NS_ENSURE_TRUE(mFoldersWithNewMail, NS_ERROR_FAILURE);
@ -382,7 +384,7 @@ nsresult nsMessengerUnixIntegration::GetFirstFolderWithNewMail(nsACString& aFold
{
rv = enumerator->CurrentItem(getter_AddRefs(supports));
if (supports)
{
{
msgFolder = do_QueryInterface(supports, &rv);
if (msgFolder)
{
@ -397,7 +399,11 @@ nsresult nsMessengerUnixIntegration::GetFirstFolderWithNewMail(nsACString& aFold
} // if enumerator
if (msgFolder)
msgFolder->GetURI(aFolderURI);
{
nsCString tmpStr;
msgFolder->GetURI(tmpStr);
*aFolderURI = ToNewCString(tmpStr);
}
}
return NS_OK;

Просмотреть файл

@ -75,7 +75,7 @@ private:
#ifndef MOZ_THUNDERBIRD
nsresult ShowAlertMessage(const PRUnichar * aAlertTitle, const PRUnichar * aAlertText, const char * aFolderURI);
#endif
nsresult GetFirstFolderWithNewMail(nsACString& aFolderURI);
nsresult GetFirstFolderWithNewMail(char ** aFolderURI);
nsresult GetStringBundle(nsIStringBundle **aBundle);
nsresult AlertFinished();
nsresult AlertClicked();