diff --git a/mozilla/widget/public/nsIPrintOptions.idl b/mozilla/widget/public/nsIPrintOptions.idl index a9142f3276b..873daa4a983 100644 --- a/mozilla/widget/public/nsIPrintOptions.idl +++ b/mozilla/widget/public/nsIPrintOptions.idl @@ -133,6 +133,7 @@ interface nsIPrintOptions : nsISupports attribute short howToEnableFrameUI; attribute short printFrameType; + attribute boolean isCancelled; /* Additional XP Related */ attribute boolean printReversed; @@ -142,6 +143,8 @@ interface nsIPrintOptions : nsISupports attribute boolean printToFile; attribute wstring toFileName; + attribute long printPageDelay; /* in milliseconds */ + /* No Script Methods */ [noscript] void SetFontNamePointSize(in nsNativeStringRef aName, in PRInt32 aPointSize); diff --git a/mozilla/widget/src/xpwidgets/nsPrintOptionsImpl.cpp b/mozilla/widget/src/xpwidgets/nsPrintOptionsImpl.cpp index b229ffa9ba0..60e4b97e356 100644 --- a/mozilla/widget/src/xpwidgets/nsPrintOptionsImpl.cpp +++ b/mozilla/widget/src/xpwidgets/nsPrintOptionsImpl.cpp @@ -75,6 +75,7 @@ const char * kPrintPaperSize = "print.print_paper_size"; const char * kPrintCommand = "print.print_command"; const char * kPrintFile = "print.print_file"; const char * kPrintToFile = "print.print_tofile"; +const char * kPrintPageDelay = "print.print_pagedelay"; // There are currently NOT supported //const char * kPrintBevelLines = "print.print_bevellines"; @@ -104,7 +105,9 @@ nsPrintOptions::nsPrintOptions() : mPrintToFile(PR_FALSE), mPrintFrameType(kSelectedFrame), mHowToEnableFrameUI(kFrameEnableNone), - mPageNumJust(kJustLeft) + mPageNumJust(kJustLeft), + mIsCancelled(PR_FALSE), + mPrintPageDelay(500) { NS_INIT_ISUPPORTS(); @@ -281,6 +284,7 @@ nsPrintOptions::ReadPrefs() ReadPrefString(prefs, kPrintCommand, mPrintCommand); prefs->GetBoolPref(kPrintFile, &mPrintToFile); ReadPrefString(prefs, kPrintToFile, mToFileName); + prefs->GetIntPref(kPrintPageDelay, &mPrintPageDelay); return NS_OK; } @@ -318,6 +322,7 @@ nsPrintOptions::WritePrefs() WritePrefString(prefs, kPrintCommand, mPrintCommand); prefs->SetBoolPref(kPrintFile, mPrintToFile); WritePrefString(prefs, kPrintToFile, mToFileName); + prefs->SetIntPref(kPrintPageDelay, mPrintPageDelay); return NS_OK; } @@ -428,6 +433,18 @@ NS_IMETHODIMP nsPrintOptions::SetToFileName(const PRUnichar * aToFileName) return NS_OK; } +/* attribute long printPageDelay; */ +NS_IMETHODIMP nsPrintOptions::GetPrintPageDelay(PRInt32 *aPrintPageDelay) +{ + *aPrintPageDelay = mPrintPageDelay; + return NS_OK; +} +NS_IMETHODIMP nsPrintOptions::SetPrintPageDelay(PRInt32 aPrintPageDelay) +{ + mPrintPageDelay = aPrintPageDelay; + return NS_OK; +} + /* attribute double marginTop; */ NS_IMETHODIMP nsPrintOptions::GetMarginTop(double *aMarginTop) { @@ -560,6 +577,19 @@ NS_IMETHODIMP nsPrintOptions::SetPrintFrameType(PRInt16 aPrintFrameType) return NS_OK; } +/* attribute long isCancelled; */ +NS_IMETHODIMP nsPrintOptions::GetIsCancelled(PRBool *aIsCancelled) +{ + NS_ENSURE_ARG_POINTER(aIsCancelled); + *aIsCancelled = mIsCancelled; + return NS_OK; +} +NS_IMETHODIMP nsPrintOptions::SetIsCancelled(PRBool aIsCancelled) +{ + mIsCancelled = aIsCancelled; + return NS_OK; +} + //----------------------------------------------------- //-- Protected Methods //----------------------------------------------------- diff --git a/mozilla/widget/src/xpwidgets/nsPrintOptionsImpl.h b/mozilla/widget/src/xpwidgets/nsPrintOptionsImpl.h index 0bc57750392..f9be58ad75b 100644 --- a/mozilla/widget/src/xpwidgets/nsPrintOptionsImpl.h +++ b/mozilla/widget/src/xpwidgets/nsPrintOptionsImpl.h @@ -62,6 +62,8 @@ protected: PRInt16 mPrintFrameType; PRBool mHowToEnableFrameUI; + PRBool mIsCancelled; + PRInt32 mPrintPageDelay; nsFont* mDefaultFont; nsString mTitle;