[Kde-kiosk] Printing wo the dialog

Waldo Bastian kde-kiosk@mail.kde.org
Fri, 14 Mar 2003 12:09:01 +0100


--Boundary-00=_Nhbc+64nAF7KvIW
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

On Friday 14 March 2003 10:05, Michael Goffioul wrote:
> > > The above would do the trick for me.
> > > Thanks in advance!
> >
> > Here you go, patch will be part of KDE 3.1.2
>
> The restriction on showing the print dialog probably won't work
> because you're left with an unconfigured KPrinter object that
> cannot be used. Use the KPrinter::autoConfigure() method instead.
>
> Michael.

This additional patch should fix that then.

Cheers,
Waldo
-- 
bastian@kde.org -=|[ SuSE, The Linux Desktop Experts ]|=- bastian@suse.com

--Boundary-00=_Nhbc+64nAF7KvIW
Content-Type: text/x-diff;
  charset="iso-8859-1";
  name="printfix.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="printfix.patch"

Index: kprinter.cpp
===================================================================
RCS file: /home/kde/kdelibs/kdeprint/kprinter.cpp,v
retrieving revision 1.63
diff -u -r1.63 kprinter.cpp
--- kprinter.cpp	13 Mar 2003 23:35:37 -0000	1.63
+++ kprinter.cpp	14 Mar 2003 11:04:15 -0000
@@ -216,7 +216,10 @@
 bool KPrinter::setup(QWidget *parent, const QString& caption, bool forceExpand)
 {
 	if (!kapp->authorize("print/dialog"))
+	{
+		autoConfigure(QString::null, parent);
 		return true; // Just print it
+	}
 		
 	if (parent)
 		d->m_parentId = parent->winId();

--Boundary-00=_Nhbc+64nAF7KvIW--