Just updating files that are NOT PART OF THE BUILD!!!

This commit is contained in:
rhp%netscape.com 2000-02-15 15:38:40 +00:00
Родитель cb3ebd6620
Коммит c6a144449a
4 изменённых файлов: 23 добавлений и 81 удалений

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

@ -66,9 +66,9 @@ function InitPrintEngineWindow()
dump(uriArray[i]);
printEngine.AddPrintURI(uriArray[i]);
dump("\n");
}
}
}
}
}
}
function ClearPrintEnginePane()

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

@ -27,7 +27,7 @@ Rights Reserved.
<!DOCTYPE window SYSTEM "chrome://messenger/locale/messenger.dtd">
<window id="printEngine"
<window id="printEngineWin"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns:nc="http://home.netscape.com/NC-rdf#"
@ -48,5 +48,5 @@ Rights Reserved.
<html:script src="chrome://messenger/content/msgMail3PaneWindow.js"/>
<!-- The main display frame -->
<html:iframe id="printengine" style="height: 0px" flex="1" name="printengine" type="content" src="about:blank"/>
<html:iframe id="printengine" style="height: 0px" flex="1" name="printengine" type="content" src="about:blank" />
</window>

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

@ -55,7 +55,7 @@ nsMsgPrintEngine::nsMsgPrintEngine() :
nsMsgPrintEngine::~nsMsgPrintEngine()
{
mWebShell = nsnull;
NS_IF_RELEASE(mWindow);
}
// Implement AddRef and Release
@ -68,40 +68,6 @@ nsresult nsMsgPrintEngine::Init()
return NS_OK;
}
/** Initializes simple container for native window widget
* @param aNativeWidget native window widget (e.g., GtkWidget)
* @param width window width (pixels)
* @param height window height (pixels)
* @param aPref preferences object
*/
/** RICHIE
NS_IMETHODIMP nsMsgPrintEngine::WillLoadURL(nsIWebShell* aShell, const PRUnichar* aURL, nsLoadType aReason)
{
return NS_OK;
}
NS_IMETHODIMP nsMsgPrintEngine::BeginLoadURL(nsIWebShell* aShell, const PRUnichar* aURL)
{
return NS_OK;
}
NS_IMETHODIMP nsMsgPrintEngine::ProgressLoadURL(nsIWebShell* aShell,
const PRUnichar* aURL, PRInt32 aProgress, PRInt32 aProgressMax)
{
return NS_OK;
}
NS_IMETHODIMP nsMsgPrintEngine::EndLoadURL(nsIWebShell* aShell,
const PRUnichar* aURL,
nsresult aStatus)
{
return NS_OK;
}
***/
NS_IMETHODIMP
nsMsgPrintEngine::OnStartDocumentLoad(nsIDocumentLoader *aLoader, nsIURI *aURL, const char *aCommand)
{
@ -115,7 +81,6 @@ nsMsgPrintEngine::OnEndDocumentLoad(nsIDocumentLoader *loader, nsIChannel *aChan
nsresult rv = NS_ERROR_FAILURE;
nsCOMPtr<nsIContentViewer> viewer;
NS_ASSERTION(mWebShell,"can't print, there is no webshell");
if ( (!mWebShell) || (!aChannel) )
{
@ -213,32 +178,7 @@ nsMsgPrintEngine::SetWindow(nsIDOMWindow *aWin)
nsresult rv = rootWebShell->FindChildWithName(webShellName.GetUnicode(), *getter_AddRefs(mWebShell));
if (NS_SUCCEEDED(rv) && mWebShell)
{
nsCOMPtr <nsIDocumentLoader> docLoader = nsnull;
mWebShell->GetDocumentLoader(*getter_AddRefs(docLoader));
if (docLoader)
{
nsCOMPtr<nsIDocumentLoaderObserver> observer = do_QueryInterface(this);
if (observer)
docLoader->AddObserver(observer);
nsIWebShell *mRootWebShell;
mWebShell->GetRootWebShell(mRootWebShell);
nsIWebShell *root = mRootWebShell;
NS_RELEASE(root); // don't hold reference
if (mRootWebShell)
{
nsCOMPtr<nsIDocShell> docShell(do_QueryInterface(mRootWebShell));
if (docShell)
docShell->SetDocLoaderObserver(observer);
}
}
//RICHIE nsCOMPtr<nsIDocumentLoaderObserver> observer = do_QueryInterface(this);
// if (observer)
// mWebShell->SetDocLoaderObserver(observer);
SetupObserver();
}
}
@ -262,7 +202,6 @@ nsMsgPrintEngine::SetPrintURICount(PRInt32 aCount)
NS_IMETHODIMP
nsMsgPrintEngine::StartPrintOperation()
{
return NS_OK;
return StartNextPrintOperation();
}
@ -275,10 +214,12 @@ nsMsgPrintEngine::StartNextPrintOperation()
if (mCurrentlyPrintingURI == -1)
InitializeDisplayCharset();
// SetupObserver();
// First, check if we are at the end of this stuff!
if ( (mCurrentlyPrintingURI+1) >= mURIArray.Count() )
{
Release();
// Release();
return NS_OK;
}
@ -319,19 +260,6 @@ nsMsgPrintEngine::FireThatLoadOperation(nsString *uri)
mWebShell->LoadURL(uri->GetUnicode(), nsnull, nsIChannel::LOAD_DOCUMENT_URI);
}
// Force add an observer!
nsCOMPtr <nsIDocumentLoader> docLoader = nsnull;
mWebShell->GetDocumentLoader(*getter_AddRefs(docLoader));
if (docLoader)
{
nsCOMPtr<nsIDocumentLoaderObserver> observer = do_QueryInterface(this);
if (observer)
{
docLoader->RemoveObserver(observer);
docLoader->AddObserver(observer);
}
}
PR_FREEIF(tString);
return rv;
}
@ -355,3 +283,16 @@ nsMsgPrintEngine::InitializeDisplayCharset()
}
}
}
void
nsMsgPrintEngine::SetupObserver()
{
if (!mWebShell)
return;
nsCOMPtr<nsIDocumentLoaderObserver> observer = do_QueryInterface(this);
if (observer)
{
mWebShell->SetDocLoaderObserver(observer);
}
}

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

@ -55,6 +55,7 @@ protected:
NS_IMETHOD FireThatLoadOperation(nsString *uri);
NS_IMETHOD StartNextPrintOperation();
void InitializeDisplayCharset();
void SetupObserver();
nsIDOMWindow *mWindow;
nsCOMPtr<nsIWebShell> mWebShell;