$OpenBSD: patch-konq-embed_kdesrc_khtml_khtmlview_cpp,v 1.1 2006/10/21 00:41:09 espie Exp $
--- konq-embed/kdesrc/khtml/khtmlview.cpp.orig	Sat Oct 21 00:32:22 2006
+++ konq-embed/kdesrc/khtml/khtmlview.cpp	Sat Oct 21 01:06:14 2006
@@ -71,9 +71,7 @@
 #include <kimageio.h>
 #include <klocale.h>
 #include <knotifyclient.h>
-#ifndef ENABLE_PRINTING
 #include <kprinter.h>
-#endif
 #include <ksimpleconfig.h>
 #include <kstandarddirs.h>
 #include <kstdaccel.h>
@@ -2706,12 +2704,12 @@ void KHTMLView::print(bool quick)
     khtml::RenderCanvas *root = static_cast<khtml::RenderCanvas *>(m_part->xmlDocImpl()->renderer());
     if(!root) return;
 
-    KPrinter *printer = new KPrinter(true, QPrinter::ScreenResolution);
-    printer->addDialogPage(new KHTMLPrintSettings());
+    KPrinter *printer = new KPrinter();
+//    printer->addDialogPage(new KHTMLPrintSettings());
     QString docname = m_part->xmlDocImpl()->URL().prettyURL();
     if ( !docname.isEmpty() )
         docname = KStringHandler::csqueeze(docname, 80);
-    if(quick || printer->setup(this, i18n("Print %1").arg(docname))) {
+    if(quick || printer->setup(this)) {
         viewport()->setCursor( waitCursor ); // only viewport(), no QApplication::, otherwise we get the busy cursor in kdeprint's dialogs
         // set up KPrinter
         printer->setFullPage(false);
@@ -2728,13 +2726,11 @@ void KHTMLView::print(bool quick)
         // We ignore margin settings for html and body when printing
         // and use the default margins from the print-system
         // (In Qt 3.0.x the default margins are hardcoded in Qt)
-        m_part->xmlDocImpl()->setPrintStyleSheet( printer->option("app-khtml-printfriendly") == "true" ?
+        m_part->xmlDocImpl()->setPrintStyleSheet(
                                                   "* { background-image: none !important;"
                                                   "    background-color: white !important;"
                                                   "    color: black !important; }"
 						  "body { margin: 0px !important; }"
-						  "html { margin: 0px !important; }" :
-						  "body { margin: 0px !important; }"
 						  "html { margin: 0px !important; }"
 						  );
 
@@ -2752,7 +2748,7 @@ void KHTMLView::print(bool quick)
 
         m_part->xmlDocImpl()->styleSelector()->computeFontSizes(&metrics, 100);
         m_part->xmlDocImpl()->updateStyleSelector();
-        root->setPrintImages( printer->option("app-khtml-printimages") == "true");
+        root->setPrintImages( true );
         root->makePageBreakAvoidBlocks();
 
         root->setNeedsLayoutAndMinMaxRecalc();
@@ -2761,12 +2757,12 @@ void KHTMLView::print(bool quick)
 
         // check sizes ask for action.. (scale or clip)
 
-        bool printHeader = (printer->option("app-khtml-printheader") == "true");
+        bool printHeader = true;
 
         int headerHeight = 0;
         QFont headerFont("Sans Serif", 8);
 
-        QString headerLeft = KGlobal::locale()->formatDate(QDate::currentDate(),true);
+        QString headerLeft;
         QString headerMid = docname;
         QString headerRight;
 
