зеркало из https://github.com/mozilla/pjs.git
fix spawning of several new 3 pane windows when following news: urls, and an infinite number when using a non-default folder view, 355633 sr=mscott
This commit is contained in:
Родитель
b20f3f9e6f
Коммит
a9430b9bf2
|
@ -1011,7 +1011,8 @@ function loadStartFolder(initialUri)
|
|||
}
|
||||
catch(ex)
|
||||
{
|
||||
if (initialUri)
|
||||
// this is the case where we're trying to auto-subscribe to a folder.
|
||||
if (initialUri && !startFolder.parent)
|
||||
{
|
||||
messenger.loadURL(window, initialUri);
|
||||
return;
|
||||
|
|
|
@ -1776,9 +1776,6 @@ nsNntpService::HandleContent(const char * aContentType, nsIInterfaceRequestor* a
|
|||
if (uri)
|
||||
{
|
||||
nsXPIDLCString uriStr;
|
||||
nsCOMPtr<nsIWindowMediator> mediator(do_GetService(NS_WINDOWMEDIATOR_CONTRACTID, &rv));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
nsCOMPtr<nsIDOMWindowInternal> window;
|
||||
nsCOMPtr <nsIMsgFolder> msgFolder;
|
||||
nsCOMPtr <nsINNTPProtocol> protocol = do_QueryInterface(aChannel);
|
||||
if (protocol)
|
||||
|
@ -1788,11 +1785,24 @@ nsNntpService::HandleContent(const char * aContentType, nsIInterfaceRequestor* a
|
|||
|
||||
if (!uriStr.IsEmpty())
|
||||
{
|
||||
nsCOMPtr <nsIMessengerWindowService> messengerWindowService = do_GetService(NS_MESSENGERWINDOWSERVICE_CONTRACTID,&rv);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
rv = messengerWindowService->OpenMessengerWindowWithUri("mail:3pane", uriStr.get(), nsMsgKey_None);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
nsCOMPtr <nsIURI> originalUri;
|
||||
aChannel->GetOriginalURI(getter_AddRefs(originalUri));
|
||||
if (originalUri)
|
||||
{
|
||||
nsCOMPtr <nsIMsgMailNewsUrl> mailUrl = do_QueryInterface(originalUri);
|
||||
if (mailUrl)
|
||||
{
|
||||
nsCOMPtr <nsIMsgWindow> msgWindow;
|
||||
mailUrl->GetMsgWindow(getter_AddRefs(msgWindow));
|
||||
if (msgWindow)
|
||||
{
|
||||
nsCOMPtr <nsIMsgWindowCommands> windowCommands;
|
||||
msgWindow->GetWindowCommands(getter_AddRefs(windowCommands));
|
||||
if (windowCommands)
|
||||
windowCommands->SelectFolder(uriStr);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else
|
||||
|
|
Загрузка…
Ссылка в новой задаче