aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla/GeckoPrintService.cpp
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2006-06-22 03:15:06 +0800
committerChristian Persch <chpe@src.gnome.org>2006-06-22 03:15:06 +0800
commit191581a455b75c7477c17801fcd89ab1f916f15f (patch)
treeb974d12a688f10555800ff39a6ddc0ea962fd3dd /embed/mozilla/GeckoPrintService.cpp
parenta34ac6a1677d14a3f69e0116bc7188844141c36f (diff)
downloadgsoc2013-epiphany-191581a455b75c7477c17801fcd89ab1f916f15f.tar
gsoc2013-epiphany-191581a455b75c7477c17801fcd89ab1f916f15f.tar.gz
gsoc2013-epiphany-191581a455b75c7477c17801fcd89ab1f916f15f.tar.bz2
gsoc2013-epiphany-191581a455b75c7477c17801fcd89ab1f916f15f.tar.lz
gsoc2013-epiphany-191581a455b75c7477c17801fcd89ab1f916f15f.tar.xz
gsoc2013-epiphany-191581a455b75c7477c17801fcd89ab1f916f15f.tar.zst
gsoc2013-epiphany-191581a455b75c7477c17801fcd89ab1f916f15f.zip
Fix build with latest gtk printing changes.
2006-06-21 Christian Persch <chpe@cvs.gnome.org> * embed/mozilla/GeckoPrintService.cpp: * embed/mozilla/GeckoPrintSession.cpp: * embed/mozilla/GeckoPrintSession.h: Fix build with latest gtk printing changes.
Diffstat (limited to 'embed/mozilla/GeckoPrintService.cpp')
-rw-r--r--embed/mozilla/GeckoPrintService.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/embed/mozilla/GeckoPrintService.cpp b/embed/mozilla/GeckoPrintService.cpp
index 81a5bcc08..edbbc5303 100644
--- a/embed/mozilla/GeckoPrintService.cpp
+++ b/embed/mozilla/GeckoPrintService.cpp
@@ -134,7 +134,7 @@ GeckoPrintService::ShowPrintDialog (nsIDOMWindow *aParent,
ephy_embed_shell_get_page_setup (shell),
sourceFile, PR_TRUE, aSettings);
} else {
- rv = NS_ERROR_ABORT;
+ rv = NS_ERROR_FAILURE;
}
return rv;
@@ -163,7 +163,8 @@ GeckoPrintService::ShowPrintDialog (nsIDOMWindow *aParent,
GTK_PRINT_CAPABILITY_COPIES |
GTK_PRINT_CAPABILITY_COLLATE |
GTK_PRINT_CAPABILITY_REVERSE |
- GTK_PRINT_CAPABILITY_SCALE));
+ GTK_PRINT_CAPABILITY_SCALE |
+ GTK_PRINT_CAPABILITY_GENERATE_PS));
gtk_print_unix_dialog_set_page_setup (print_dialog,
ephy_embed_shell_get_page_setup (shell));
gtk_print_unix_dialog_set_settings (print_dialog,
@@ -198,7 +199,7 @@ GeckoPrintService::ShowPrintDialog (nsIDOMWindow *aParent,
if (!sourceFile.IsEmpty ()) {
rv = TranslateSettings (settings, pageSetup, sourceFile, PR_TRUE, aSettings);
} else {
- rv = NS_ERROR_ABORT;
+ rv = NS_ERROR_FAILURE;
}
}
@@ -241,7 +242,7 @@ GeckoPrintService::ShowProgress (nsIDOMWindow *aParent,
nsCOMPtr<nsIPrintProgress> progress (do_QueryInterface (session, &rv));
NS_ENSURE_SUCCESS (rv, rv);
- /* Out print session implements those interfaces */
+ /* Our print session implements those interfaces */
rv = CallQueryInterface (session, _webProgressListener);
rv |= CallQueryInterface (session, _printProgressParams);
NS_ENSURE_SUCCESS (rv, rv);
@@ -263,6 +264,8 @@ NS_IMETHODIMP GeckoPrintService::ShowPageSetup (nsIDOMWindow *aParent,
nsIPrintSettings *aPrintSettings,
nsIObserver *aObserver)
{
+ /* This function is never called from gecko code */
+#if 0
/* Locked down? */
if (eel_gconf_get_boolean (CONF_LOCKDOWN_DISABLE_PRINTING) ||
eel_gconf_get_boolean (CONF_LOCKDOWN_DISABLE_PRINT_SETUP)) {
@@ -290,6 +293,8 @@ NS_IMETHODIMP GeckoPrintService::ShowPageSetup (nsIDOMWindow *aParent,
/* FIXME do we need to notify aObserver somehow? */
return NS_OK;
+#endif
+ return NS_ERROR_NOT_IMPLEMENTED;
}
/* void showPrinterProperties (in nsIDOMWindow parent,
@@ -315,11 +320,13 @@ GeckoPrintService::TranslateSettings (GtkPrintSettings *aGtkSettings,
NS_ENSURE_ARG (aGtkSettings);
NS_ENSURE_ARG (aPageSetup);
+#if 0
/* Locked down? */
if (gtk_print_settings_get_print_to_file (aGtkSettings) &&
eel_gconf_get_boolean (CONF_LOCKDOWN_DISABLE_SAVE_TO_DISK)) {
return NS_ERROR_GFX_PRINTER_ACCESS_DENIED;
}
+#endif
/* Initialisation */
aSettings->SetIsInitializedFromPrinter (PR_FALSE);