diff options
author | Christian Persch <chpe@gnome.org> | 2007-06-14 20:17:29 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2007-06-14 20:17:29 +0800 |
commit | 9155e8cd98bc489df8a2093d1769b0b1c46981d7 (patch) | |
tree | 7305d00dc5d98d62f1b76902d4d6f66512ccf04e /embed/mozilla | |
parent | a6a2cd926bc435e0dfbaf1c3d3535c0f2ba47410 (diff) | |
download | gsoc2013-epiphany-9155e8cd98bc489df8a2093d1769b0b1c46981d7.tar gsoc2013-epiphany-9155e8cd98bc489df8a2093d1769b0b1c46981d7.tar.gz gsoc2013-epiphany-9155e8cd98bc489df8a2093d1769b0b1c46981d7.tar.bz2 gsoc2013-epiphany-9155e8cd98bc489df8a2093d1769b0b1c46981d7.tar.lz gsoc2013-epiphany-9155e8cd98bc489df8a2093d1769b0b1c46981d7.tar.xz gsoc2013-epiphany-9155e8cd98bc489df8a2093d1769b0b1c46981d7.tar.zst gsoc2013-epiphany-9155e8cd98bc489df8a2093d1769b0b1c46981d7.zip |
Set the print as cancelled in the print settings too, see
2007-06-14 Christian Persch <chpe@gnome.org>
* embed/mozilla/GeckoPrintService.cpp:
* embed/mozilla/GeckoPrintSession.cpp:
* embed/mozilla/GeckoPrintSession.h:
Set the print as cancelled in the print settings too, see
https://bugzilla.mozilla.org/show_bug.cgi?id=253926.
svn path=/trunk/; revision=7081
Diffstat (limited to 'embed/mozilla')
-rw-r--r-- | embed/mozilla/GeckoPrintService.cpp | 2 | ||||
-rw-r--r-- | embed/mozilla/GeckoPrintSession.cpp | 13 | ||||
-rw-r--r-- | embed/mozilla/GeckoPrintSession.h | 3 |
3 files changed, 14 insertions, 4 deletions
diff --git a/embed/mozilla/GeckoPrintService.cpp b/embed/mozilla/GeckoPrintService.cpp index 98acb7dd9..1d00eab76 100644 --- a/embed/mozilla/GeckoPrintService.cpp +++ b/embed/mozilla/GeckoPrintService.cpp @@ -239,7 +239,7 @@ GeckoPrintService::ShowPrintDialog (nsIDOMWindow *aParent, g_object_unref (settings); settings = settingsCopy; - rv = session->SetSettings (settings, pageSetup, printer); + rv = session->SetSettings (aSettings, settings, pageSetup, printer); /* Now translate the settings to nsIPrintSettings */ if (NS_SUCCEEDED (rv)) { diff --git a/embed/mozilla/GeckoPrintSession.cpp b/embed/mozilla/GeckoPrintSession.cpp index 67f2d3819..edfd64d9c 100644 --- a/embed/mozilla/GeckoPrintSession.cpp +++ b/embed/mozilla/GeckoPrintSession.cpp @@ -98,13 +98,17 @@ GeckoPrintSession::GetSourceFile (nsACString &aSource) } nsresult -GeckoPrintSession::SetSettings (GtkPrintSettings *aSettings, +GeckoPrintSession::SetSettings (nsIPrintSettings *aPrintSettings, + GtkPrintSettings *aSettings, GtkPageSetup *aPageSetup, GtkPrinter *aPrinter) { - NS_ASSERTION (!mSettings && !mPageSetup && !mPrinter, "Already have settings!"); + NS_ASSERTION (!mPrintSettings && !mSettings && !mPageSetup && !mPrinter, "Already have settings!"); + NS_ENSURE_ARG (aPrintSettings); NS_ENSURE_ARG (aSettings); + + mPrintSettings = aPrintSettings; mSettings = (GtkPrintSettings *) g_object_ref (aSettings); NS_ENSURE_ARG (aPageSetup); @@ -562,10 +566,15 @@ GeckoPrintSession::GetProcessCanceledByUser (PRBool *aProcessCanceledByUser) *aProcessCanceledByUser = mCancelled; return NS_OK; } + NS_IMETHODIMP GeckoPrintSession::SetProcessCanceledByUser (PRBool aProcessCanceledByUser) { mCancelled = aProcessCanceledByUser; + if (mPrintSettings) { + mPrintSettings->SetIsCancelled (aProcessCanceledByUser); + } + return NS_OK; } diff --git a/embed/mozilla/GeckoPrintSession.h b/embed/mozilla/GeckoPrintSession.h index e0ddb5259..027f01e23 100644 --- a/embed/mozilla/GeckoPrintSession.h +++ b/embed/mozilla/GeckoPrintSession.h @@ -58,7 +58,7 @@ class GeckoPrintSession : public nsIPrintSession, NS_DECL_NSIPRINTPROGRESS NS_DECL_NSIPRINTPROGRESSPARAMS - nsresult SetSettings (GtkPrintSettings*, GtkPageSetup*, GtkPrinter*); + nsresult SetSettings (nsIPrintSettings *, GtkPrintSettings*, GtkPageSetup*, GtkPrinter*); void GetSourceFile (nsACString&); static GeckoPrintSession *FromSettings (nsIPrintSettings *); @@ -70,6 +70,7 @@ class GeckoPrintSession : public nsIPrintSession, void JobError (const char *); private: + nsCOMPtr<nsIPrintSettings> mPrintSettings; GtkPrintSettings *mSettings; GtkPageSetup *mPageSetup; GtkPrinter *mPrinter; |