epiphany r8208 - branches/gnome-2-22/embed/mozilla



Author: chpe
Date: Thu Apr 10 22:24:59 2008
New Revision: 8208
URL: http://svn.gnome.org/viewvc/epiphany?rev=8208&view=rev

Log:
Fix print preview. Bug #510694.


Modified:
   branches/gnome-2-22/embed/mozilla/GeckoPrintService.cpp

Modified: branches/gnome-2-22/embed/mozilla/GeckoPrintService.cpp
==============================================================================
--- branches/gnome-2-22/embed/mozilla/GeckoPrintService.cpp	(original)
+++ branches/gnome-2-22/embed/mozilla/GeckoPrintService.cpp	Thu Apr 10 22:24:59 2008
@@ -517,7 +517,6 @@
 				      PRBool aIsForPrinting,
 				      nsIPrintSettings *aSettings)
 {
-  NS_ENSURE_ARG (aPrinter);
   NS_ENSURE_ARG (aGtkSettings);
   NS_ENSURE_ARG (aPageSetup);
 
@@ -529,7 +528,12 @@
   }
 #endif
 
-  GtkPrintCapabilities capabilities = gtk_printer_get_capabilities (aPrinter);
+  GtkPrintCapabilities capabilities;
+  if (aIsForPrinting) {
+    NS_ENSURE_TRUE (aPrinter, NS_ERROR_FAILURE);
+
+    capabilities = gtk_printer_get_capabilities (aPrinter);
+  }
 
   /* Initialisation */
   aSettings->SetIsInitializedFromPrinter (PR_FALSE); /* FIXME: PR_TRUE? */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]