summaryrefslogtreecommitdiffstats
path: root/kdeprint/slave
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit4aed2c8219774f5d797760606b8489a92ddc5163 (patch)
tree3f8c130f7d269626bf6a9447407ef6c35954426a /kdeprint/slave
downloadtdebase-4aed2c8219774f5d797760606b8489a92ddc5163.tar.gz
tdebase-4aed2c8219774f5d797760606b8489a92ddc5163.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdeprint/slave')
-rw-r--r--kdeprint/slave/Makefile.am22
-rw-r--r--kdeprint/slave/kio_print.cpp920
-rw-r--r--kdeprint/slave/kio_print.h70
-rw-r--r--kdeprint/slave/mimetypes/Makefile.am3
-rw-r--r--kdeprint/slave/mimetypes/class.desktop75
-rw-r--r--kdeprint/slave/mimetypes/driver.desktop76
-rw-r--r--kdeprint/slave/mimetypes/folder.desktop76
-rw-r--r--kdeprint/slave/mimetypes/jobs.desktop85
-rw-r--r--kdeprint/slave/mimetypes/manager.desktop87
-rw-r--r--kdeprint/slave/mimetypes/printer.desktop79
-rw-r--r--kdeprint/slave/mimetypes/printermodel.desktop78
-rw-r--r--kdeprint/slave/print.protocol15
-rw-r--r--kdeprint/slave/printdb.protocol14
-rw-r--r--kdeprint/slave/templates/Makefile.am31
-rw-r--r--kdeprint/slave/templates/bar-bottom-left.pngbin0 -> 369 bytes
-rw-r--r--kdeprint/slave/templates/bar-bottom-middle.pngbin0 -> 160 bytes
-rw-r--r--kdeprint/slave/templates/bar-bottom-right.pngbin0 -> 346 bytes
-rw-r--r--kdeprint/slave/templates/bar-middle-left.pngbin0 -> 126 bytes
-rw-r--r--kdeprint/slave/templates/bar-middle-right.pngbin0 -> 141 bytes
-rw-r--r--kdeprint/slave/templates/bar-top-left.pngbin0 -> 358 bytes
-rw-r--r--kdeprint/slave/templates/bar-top-middle.pngbin0 -> 145 bytes
-rw-r--r--kdeprint/slave/templates/bar-top-right.pngbin0 -> 359 bytes
-rw-r--r--kdeprint/slave/templates/bottom-left.pngbin0 -> 665 bytes
-rw-r--r--kdeprint/slave/templates/bottom-middle.pngbin0 -> 174 bytes
-rw-r--r--kdeprint/slave/templates/bottom-right.pngbin0 -> 4922 bytes
-rw-r--r--kdeprint/slave/templates/box-bottom-left.pngbin0 -> 616 bytes
-rw-r--r--kdeprint/slave/templates/box-bottom-middle.pngbin0 -> 171 bytes
-rw-r--r--kdeprint/slave/templates/box-bottom-right.pngbin0 -> 578 bytes
-rw-r--r--kdeprint/slave/templates/box-centre-kdeprint.pngbin0 -> 9633 bytes
-rw-r--r--kdeprint/slave/templates/box-middle-left.pngbin0 -> 157 bytes
-rw-r--r--kdeprint/slave/templates/box-middle-right.pngbin0 -> 161 bytes
-rw-r--r--kdeprint/slave/templates/box-top-left.pngbin0 -> 673 bytes
-rw-r--r--kdeprint/slave/templates/box-top-middle.pngbin0 -> 181 bytes
-rw-r--r--kdeprint/slave/templates/box-top-right.pngbin0 -> 679 bytes
-rw-r--r--kdeprint/slave/templates/class.template188
-rw-r--r--kdeprint/slave/templates/driver.template133
-rw-r--r--kdeprint/slave/templates/htmlstyles.css38
-rw-r--r--kdeprint/slave/templates/jobs.template140
-rw-r--r--kdeprint/slave/templates/printer.template205
-rw-r--r--kdeprint/slave/templates/pseudo.template188
-rw-r--r--kdeprint/slave/templates/top-left.pngbin0 -> 15484 bytes
-rw-r--r--kdeprint/slave/templates/top-middle.pngbin0 -> 233 bytes
-rw-r--r--kdeprint/slave/templates/top-right-kdeprint.pngbin0 -> 13466 bytes
43 files changed, 2523 insertions, 0 deletions
diff --git a/kdeprint/slave/Makefile.am b/kdeprint/slave/Makefile.am
new file mode 100644
index 000000000..b4352d4d8
--- /dev/null
+++ b/kdeprint/slave/Makefile.am
@@ -0,0 +1,22 @@
+AM_CPPFLAGS = -D_KDEPRINT_COMPILE
+
+SUBDIRS = mimetypes templates
+
+INCLUDES= $(all_includes)
+
+kde_module_LTLIBRARIES = kio_print.la
+
+kio_print_la_SOURCES = kio_print.cpp
+kio_print_la_LIBADD = $(LIB_KIO) -lkdeprint
+kio_print_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN)
+
+METASOURCES = AUTO
+
+noinst_HEADERS = kio_print.h
+
+# Services
+servicesdir = $(kde_servicesdir)
+services_DATA = print.protocol printdb.protocol
+
+messages: rc.cpp
+ $(XGETTEXT) *.cpp -o $(podir)/kio_print.pot
diff --git a/kdeprint/slave/kio_print.cpp b/kdeprint/slave/kio_print.cpp
new file mode 100644
index 000000000..6857ef2e6
--- /dev/null
+++ b/kdeprint/slave/kio_print.cpp
@@ -0,0 +1,920 @@
+/*
+ * This file is part of the KDE libraries
+ * Copyright (c) 2001 Michael Goffioul <kdeprint@swing.be>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License version 2 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ **/
+
+#include "kio_print.h"
+#include <kdeprint/kmprinter.h>
+#include <kdeprint/kmmanager.h>
+#include <kdeprint/kmjobmanager.h>
+#include <kdeprint/kmjob.h>
+#include <kdeprint/driver.h>
+
+#include <qfile.h>
+#include <qtextstream.h>
+#include <klocale.h>
+#include <kdebug.h>
+#include <kinstance.h>
+#include <kio/global.h>
+#include <kstandarddirs.h>
+#include <kiconloader.h>
+#include <kmimetype.h>
+#include <kio/job.h>
+#include <kapplication.h>
+#include <kcmdlineargs.h>
+#include <kaboutdata.h>
+#include <kprocess.h>
+#include <ktempfile.h>
+#include <qfile.h>
+#include <qdom.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/stat.h>
+
+#define PRINT_DEBUG kdDebug(7019) << "kio_print: "
+
+extern "C"
+{
+ int KDE_EXPORT kdemain(int argc, char **argv);
+}
+
+void addAtom(KIO::UDSEntry& entry, unsigned int ID, long l, const QString& s = QString::null)
+{
+ KIO::UDSAtom atom;
+ atom.m_uds = ID;
+ atom.m_long = l;
+ atom.m_str = s;
+ entry.append(atom);
+}
+
+static void createDirEntry(KIO::UDSEntry& entry, const QString& name, const QString& url, const QString& mime)
+{
+ entry.clear();
+ addAtom(entry, KIO::UDS_NAME, 0, name);
+ addAtom(entry, KIO::UDS_FILE_TYPE, S_IFDIR);
+ addAtom(entry, KIO::UDS_ACCESS, 0500);
+ addAtom(entry, KIO::UDS_MIME_TYPE, 0, mime);
+ addAtom(entry, KIO::UDS_URL, 0, url);
+ PRINT_DEBUG << "creating dir entry url=" << url << " mimetype=" << mime << endl;
+ addAtom(entry, KIO::UDS_SIZE, 0);
+ //addAtom(entry, KIO::UDS_GUESSED_MIME_TYPE, 0, "application/octet-stream");
+}
+
+static void createFileEntry(KIO::UDSEntry& entry, const QString& name, const QString& url, const QString& mime)
+{
+ entry.clear();
+ addAtom(entry, KIO::UDS_NAME, 0, name);
+ addAtom(entry, KIO::UDS_FILE_TYPE, S_IFREG);
+ addAtom(entry, KIO::UDS_URL, 0, url);
+ addAtom(entry, KIO::UDS_ACCESS, 0400);
+ addAtom(entry, KIO::UDS_MIME_TYPE, 0, mime);
+ addAtom(entry, KIO::UDS_SIZE, 0);
+ addAtom(entry, KIO::UDS_GUESSED_MIME_TYPE, 0, "application/octet-stream");
+}
+
+QString buildMenu(const QStringList& items, const QStringList& links, int active)
+{
+ if (items.count() == 0 || items.count() != links.count())
+ return QString("<td height=20 class=\"menu\">&nbsp;</td>");
+
+ QString s;
+ int index = 0;
+ for (QStringList::ConstIterator it1=items.begin(), it2=links.begin(); it1!=items.end() && it2!=links.end(); ++it1, ++it2, index++)
+ {
+ if (index == active)
+ s.append("<td height=20 class=\"menuactive\">&nbsp; ").append(*it1).append("&nbsp;</td>");
+ else
+ s.append("<td height=20 class=\"menu\">&nbsp; <a class=\"menu\" href=\"").append(*it2).append("\">").append(*it1).append("</a>&nbsp;</td>");
+ if ((unsigned int)index < items.count()-1)
+ s.append("<td height=20 class=\"menu\">|</td>");
+ }
+ return s;
+}
+
+QString buildOptionRow(DrBase *opt, bool f)
+{
+ QString s("<tr class=\"%1\"><td width=\"41%\">%1</td><td width=\"59%\">%1</td></tr>\n");
+ s = s.arg(f ? "contentwhite" : "contentyellow").arg(opt->get("text")).arg(opt->prettyText());
+ return s;
+}
+
+QString buildGroupTable(DrGroup *grp, bool showHeader = true)
+{
+ QString s("<tr class=\"top\"><td colspan=\"2\">%1</td></tr>\n");
+ if (showHeader)
+ s = s.arg(grp->get("text"));
+ else
+ s = QString::null;
+
+ QPtrListIterator<DrBase> oit(grp->options());
+ bool f(false);
+ for (; oit.current(); ++oit, f = !f)
+ s.append(buildOptionRow(oit.current(), f));
+
+ QPtrListIterator<DrGroup> git(grp->groups());
+ for (; git.current(); ++git)
+ s.append(buildGroupTable(git.current()));
+
+ return s;
+}
+
+int kdemain(int argc, char **argv)
+{
+ KInstance instance("kio_print");
+
+ PRINT_DEBUG << "starting ioslave" << endl;
+ if (argc != 4)
+ {
+ fprintf(stderr, "Usage: kio_print protocol domain-socket1 domain-socket2\n");
+ exit(-1);
+ }
+
+ /* create fake KApplicatiom object, needed for job stuffs */
+ KAboutData about( "kio_print", "kio_print", "fake_version",
+ "KDEPrint IO slave", KAboutData::License_GPL, "(c) 2003, Michael Goffioul" );
+ KCmdLineArgs::init( &about );
+ KApplication app;
+
+ KIO_Print slave(argv[2], argv[3]);
+ slave.dispatchLoop();
+
+ PRINT_DEBUG << "done" << endl;
+ return 0;
+}
+
+KIO_Print::KIO_Print(const QCString& pool, const QCString& app)
+: KIO::SlaveBase("print", pool, app)
+{
+}
+
+void KIO_Print::listDir(const KURL& url)
+{
+ if ( url.protocol() == "printdb" )
+ {
+ listDirDB( url );
+ return;
+ }
+
+ QStringList path = QStringList::split('/', url.path(), false);
+
+ PRINT_DEBUG << "listing " << url.path() << endl;
+ QString group = path[0].lower();
+ if (path.count() == 0)
+ listRoot();
+ else if (path.count() == 1 && group != "manager" && group != "jobs")
+ {
+ PRINT_DEBUG << "listing group " << path[0] << endl;
+
+ int mask;
+ QString mimeType;
+ KIO::UDSEntry entry;
+
+ if (group == "printers")
+ {
+ mask = KMPrinter::Printer;
+ mimeType = "print/printer";
+ }
+ else if (group == "classes")
+ {
+ mask = KMPrinter::Class | KMPrinter::Implicit;
+ mimeType = "print/class";
+ }
+ else if (group == "specials")
+ {
+ mask = KMPrinter::Special;
+ mimeType = "print/printer";
+ }
+ else
+ {
+ error(KIO::ERR_DOES_NOT_EXIST, url.url());
+ return;
+ }
+
+ QPtrListIterator<KMPrinter> it(*(KMManager::self()->printerList()));
+ for (;it.current();++it)
+ {
+ if (!(it.current()->type() & mask) || !it.current()->instanceName().isEmpty())
+ {
+ PRINT_DEBUG << "rejecting " << it.current()->name() << endl;
+ continue;
+ }
+
+ //createFileEntry(entry, it.current()->name(), ("print:/"+path[0]+"/"+it.current()->name()), mimeType, "text/html", S_IFDIR);
+ createDirEntry(entry, it.current()->name(), ("print:/"+group+"/"+KURL::encode_string_no_slash(it.current()->name())), mimeType);
+ PRINT_DEBUG << "accepting " << it.current()->name() << endl;
+ listEntry(entry, false);
+ }
+
+ listEntry(KIO::UDSEntry(), true);
+ finished();
+ }
+ else
+ {
+ //error(KIO::ERR_UNSUPPORTED_ACTION, i18n("Unsupported path %1").arg(url.path()));
+ // better do nothing
+ listEntry(KIO::UDSEntry(), true);
+ totalSize(0);
+ finished();
+ }
+}
+
+void KIO_Print::listRoot()
+{
+ PRINT_DEBUG << "listing root entry" << endl;
+
+ KIO::UDSEntry entry;
+
+ // Classes entry
+ createDirEntry(entry, i18n("Classes"), "print:/classes", "print/folder");
+ listEntry(entry, false);
+
+ // Printers entry
+ createDirEntry(entry, i18n("Printers"), "print:/printers", "print/folder");
+ listEntry(entry, false);
+
+ // Specials entry
+ createDirEntry(entry, i18n("Specials"), "print:/specials", "print/folder");
+ listEntry(entry, false);
+
+ // Management entry
+ //createFileEntry(entry, i18n("Manager"), "print:/manager", "print/manager", QString::null, S_IFDIR);
+ createDirEntry(entry, i18n("Manager"), "print:/manager", "print/manager");
+ listEntry(entry, false);
+
+ // Jobs entry
+ createDirEntry(entry, i18n("Jobs"), "print:/jobs", "print/jobs");
+ listEntry(entry, false);
+
+ // finish
+ totalSize(4);
+ listEntry(entry, true);
+ finished();
+}
+
+void KIO_Print::listDirDB( const KURL& url )
+{
+ PRINT_DEBUG << "listDirDB: " << url << endl;
+
+ QStringList pathComps = QStringList::split( '/', url.path(), false );
+ KURL remUrl;
+
+ remUrl.setProtocol( "http" );
+ remUrl.setHost( url.host() );
+ remUrl.setPort( url.port() );
+ remUrl.setPath( "/list-data.cgi" );
+ switch ( pathComps.size() )
+ {
+ case 0: /* list manufacturers */
+ remUrl.addQueryItem( "type", "makes" );
+ break;
+ case 1: /* list printers for the given manufacturer */
+ remUrl.addQueryItem( "type", "printers" );
+ remUrl.addQueryItem( "make", pathComps[ 0 ] );
+ break;
+ case 2: /* list drivers for given printer */
+ remUrl.addQueryItem( "type", "drivers" );
+ remUrl.addQueryItem( "printer", pathComps[ 1 ] );
+ break;
+ default:
+ error( KIO::ERR_UNSUPPORTED_ACTION, "Not implemented" );
+ return;
+ }
+ remUrl.addQueryItem( "format", "xml" );
+
+ if ( getDBFile( remUrl ) )
+ {
+ QDomDocument doc;
+ if ( doc.setContent( &m_httpBuffer, false ) )
+ {
+ QDomNodeList l;
+ KIO::UDSEntry entry;
+ switch ( pathComps.size() )
+ {
+ case 0:
+ l = doc.documentElement().elementsByTagName( "make" );
+ for ( unsigned int i=0; i<l.count(); i++ )
+ {
+ QString make = l.item( i ).toElement().text();
+ KURL makeUrl = url;
+ makeUrl.addPath( "/" + make );
+ createDirEntry( entry, make, makeUrl.url(), "print/folder" );
+ listEntry( entry, false );
+ PRINT_DEBUG << "make: " << make << endl;
+ }
+ break;
+ case 1:
+ l = doc.documentElement().elementsByTagName( "printer" );
+ for ( unsigned int i=0; i<l.count(); i++ )
+ {
+ QString ID, name;
+ for ( QDomNode n=l.item( i ).firstChild(); !n.isNull(); n=n.nextSibling() )
+ {
+ QDomElement e = n.toElement();
+ if ( e.tagName() == "id" )
+ ID = e.text();
+ else if ( e.tagName() == "model" )
+ name = e.text();
+ }
+ if ( !ID.isEmpty() && !name.isEmpty() )
+ {
+ KURL printerUrl = url;
+ printerUrl.addPath( "/" + ID );
+ createDirEntry( entry, name, printerUrl.url(), "print/printermodel" );
+ listEntry( entry, false );
+ PRINT_DEBUG << "printer: " << ID << endl;
+ }
+ }
+ break;
+ case 2:
+ l = doc.documentElement().elementsByTagName( "driver" );
+ for ( unsigned int i=0; i<l.count(); i++ )
+ {
+ QString driver = l.item( i ).toElement().text();
+ KURL driverUrl = url;
+ driverUrl.addPath( "/" + driver );
+ createFileEntry( entry, driver, driverUrl.url(), "print/driver" );
+ listEntry( entry, false );
+ PRINT_DEBUG << "driver: " << driver << endl;
+ }
+ break;
+ default:
+ error( KIO::ERR_UNSUPPORTED_ACTION, "Not implemented" );
+ return;
+ }
+ listEntry( KIO::UDSEntry(), true );
+ finished();
+ }
+ else
+ {
+ if ( m_httpBuffer.buffer().size() == 0 )
+ error( KIO::ERR_INTERNAL, i18n( "Empty data received (%1)." ).arg( url.host() ) );
+ else
+ error( KIO::ERR_INTERNAL, i18n( "Corrupted/incomplete data or server error (%1)." ).arg( url.host() ) );
+ }
+ }
+ /*
+ * If error occured while downloading, error has been called by
+ * getDBFile. No need for a "else" statement.
+ */
+}
+
+void KIO_Print::stat(const KURL& url)
+{
+ if ( url.protocol() == "printdb" )
+ {
+ statDB( url );
+ return;
+ }
+
+ PRINT_DEBUG << "stat: " << url.url() << endl;
+ QStringList path = QStringList::split('/', url.encodedPathAndQuery(-1), false);
+ KIO::UDSEntry entry;
+ QString mime;
+ bool err(false);
+
+ PRINT_DEBUG << "path components: " << path.join(", ") << endl;
+
+ switch (path.count())
+ {
+ case 0:
+ createDirEntry(entry, i18n("Print System"), "print:/", "print/folder");
+ break;
+ case 1:
+ if (path[0].lower() == "classes")
+ createDirEntry(entry, i18n("Classes"), "print:/classes", "print/folder");
+ else if (path[0].lower() == "printers")
+ createDirEntry(entry, i18n("Printers"), "print:/printers", "print/folder");
+ else if (path[0].lower() == "specials")
+ createDirEntry(entry, i18n("Specials"), "print:/specials", "print/folder");
+ else if (path[0].lower() == "manager")
+ createDirEntry(entry, i18n("Manager"), "print:/manager", "print/manager");
+ else if (path[0].lower().startsWith("jobs"))
+ createFileEntry(entry, i18n("Jobs"), url.url(), "text/html");
+ else
+ err = true;
+ break;
+ case 2:
+ if (path[0].lower() == "printers")
+ mime = "print/printer";
+ else if (path[0].lower() == "classes")
+ mime = "print/class";
+ else if (path[0].lower() == "specials")
+ mime = "print/printer";
+ else
+ err = true;
+ createFileEntry(entry, path[1], "print:/"+path[0]+"/"+path[1], "text/html");
+ break;
+ }
+
+ if (!err)
+ {
+ statEntry(entry);
+ finished();
+ }
+ else
+ error(KIO::ERR_DOES_NOT_EXIST, url.path());
+}
+
+void KIO_Print::statDB( const KURL& url )
+{
+ PRINT_DEBUG << "statDB: " << url << endl;
+ KIO::UDSEntry entry;
+ QStringList pathComps = QStringList::split( '/', url.path(), false );
+ if ( pathComps.size() == 3 )
+ createFileEntry( entry, i18n( "Printer driver" ), url.url(), "print/driver" );
+ else
+ createDirEntry( entry, i18n( "On-line printer driver database" ), url.url(), "inode/directory" );
+ statEntry( entry );
+ finished();
+}
+
+bool KIO_Print::getDBFile( const KURL& src )
+{
+ PRINT_DEBUG << "downloading " << src.url() << endl;
+
+ /* re-initialize the internal buffer */
+ if ( m_httpBuffer.isOpen() )
+ m_httpBuffer.close();
+ m_httpError = 0;
+ m_httpBuffer.open( IO_WriteOnly|IO_Truncate ); // be sure to erase the existing data
+
+ /* start the transfer job */
+ KIO::TransferJob *job = KIO::get( src, false, false );
+ connect( job, SIGNAL( result( KIO::Job* ) ), SLOT( slotResult( KIO::Job* ) ) );
+ connect( job, SIGNAL( data( KIO::Job*, const QByteArray& ) ), SLOT( slotData( KIO::Job*, const QByteArray& ) ) );
+ connect( job, SIGNAL( totalSize( KIO::Job*, KIO::filesize_t ) ), SLOT( slotTotalSize( KIO::Job*, KIO::filesize_t ) ) );
+ connect( job, SIGNAL( processedSize( KIO::Job*, KIO::filesize_t ) ), SLOT( slotProcessedSize( KIO::Job*, KIO::filesize_t ) ) );
+ kapp->enter_loop();
+ m_httpBuffer.close();
+
+ /* return the result */
+ if ( m_httpError != 0 )
+ error( m_httpError, m_httpErrorTxt );
+ return ( m_httpError == 0 );
+}
+
+void KIO_Print::getDB( const KURL& url )
+{
+ PRINT_DEBUG << "downloading PPD file for " << url.url() << endl;
+
+ QStringList pathComps = QStringList::split( '/', url.path(), false );
+ if ( pathComps.size() != 3 )
+ error( KIO::ERR_MALFORMED_URL, url.url() );
+ else
+ {
+ KURL remUrl;
+
+ remUrl.setProtocol( "http" );
+ remUrl.setHost( url.host() );
+ remUrl.setPath( "/ppd-o-matic.cgi" );
+ remUrl.addQueryItem( "driver", pathComps[ 2 ] );
+ remUrl.addQueryItem( "printer", pathComps[ 1 ] );
+
+ if ( getDBFile( remUrl ) )
+ {
+ mimeType( "text/plain" );
+ data( m_httpBuffer.buffer() );
+ finished();
+ }
+ /*
+ * no "else" statement needed, the error has
+ * already been emitted by the getDBFile function
+ */
+ }
+}
+
+void KIO_Print::slotResult( KIO::Job *j )
+{
+ /*
+ * store slave results for later user (job gets deleted
+ * after this function). Store only if no other error
+ * occured previously (when writing to the buffer).
+ */
+ if ( m_httpError == 0 )
+ {
+ m_httpError = j->error();
+ m_httpErrorTxt = j->errorText();
+ }
+ kapp->exit_loop();
+}
+
+void KIO_Print::slotData( KIO::Job *j, const QByteArray& d )
+{
+ PRINT_DEBUG << "HTTP data received (size=" << d.size() << ")" << endl;
+ if ( d.size() > 0 )
+ {
+ int len = m_httpBuffer.writeBlock( d );
+ if ( len == -1 || len != ( int )d.size() )
+ {
+ m_httpError = KIO::ERR_INTERNAL;
+ m_httpErrorTxt = "Unable to write to the internal buffer.";
+ j->kill( false );
+ }
+ }
+}
+
+void KIO_Print::slotTotalSize( KIO::Job*, KIO::filesize_t sz )
+{
+ totalSize( sz );
+}
+
+void KIO_Print::slotProcessedSize( KIO::Job*, KIO::filesize_t sz )
+{
+ processedSize( sz );
+}
+
+void KIO_Print::get(const KURL& url)
+{
+ if ( url.protocol() == "printdb" )
+ {
+ getDB( url );
+ return;
+ }
+
+ QStringList elems = QStringList::split('/', url.encodedPathAndQuery(), false);
+ QString group(elems[0].lower()), printer(KURL::decode_string(elems[1])), path, query;
+ KMPrinter *mprinter(0);
+
+ if (group == "manager")
+ {
+ PRINT_DEBUG << "opening print management part" << endl;
+
+ mimeType("print/manager");
+ finished();
+ return;
+ }
+
+ PRINT_DEBUG << "getting " << url.url() << endl;
+
+ if (group.startsWith("jobs"))
+ {
+ int p = group.find('?');
+ if (p != -1)
+ query = group.mid(p+1);
+ if (!query.isEmpty() && query != "jobs" && query != "completed_jobs")
+ {
+ error(KIO::ERR_MALFORMED_URL, QString::null);
+ return;
+ }
+ PRINT_DEBUG << "listing jobs for all printers" << endl;
+ showJobs(0, query == "completed_jobs");
+ return;
+ }
+
+ int p = printer.find('?');
+ if (p != -1)
+ {
+ query = printer.mid(p+1);
+ printer = printer.left(p);
+ }
+
+ PRINT_DEBUG << "opening " << url.url() << endl;
+ PRINT_DEBUG << "extracted printer name = " << printer << endl;
+
+ KMManager::self()->printerList(false);
+ mprinter = KMManager::self()->findPrinter(printer);
+ if (!mprinter)
+ path = locateData(printer.isEmpty() ? group : printer);
+
+ if (elems.count() > 2 || (path.isEmpty() && group != "printers" && group != "classes" && group != "specials")
+ || (mprinter == 0 && path.isEmpty()))
+ {
+ error(KIO::ERR_DOES_NOT_EXIST, url.path());
+ return;
+ }
+
+ if (mprinter != 0)
+ {
+ if (!query.isEmpty() && query != "general")
+ {
+ if (query == "jobs")
+ showJobs(mprinter, false);
+ else if (query == "completed_jobs")
+ showJobs(mprinter, true);
+ else if (query == "driver")
+ showDriver(mprinter);
+ else
+ error(KIO::ERR_MALFORMED_URL, KURL::decode_string(elems[1]));
+ }
+ else if (group == "printers" && mprinter->isPrinter())
+ showPrinterInfo(mprinter);
+ else if (group == "classes" && mprinter->isClass(true))
+ showClassInfo(mprinter);
+ else if (group == "specials" && mprinter->isSpecial())
+ showSpecialInfo(mprinter);
+ else
+ error(KIO::ERR_INTERNAL, i18n("Unable to determine object type for %1.").arg(printer));
+ }
+ else if (!path.isEmpty())
+ showData(path);
+ else
+ error(KIO::ERR_INTERNAL, i18n("Unable to determine source type for %1.").arg(printer));
+}
+
+void KIO_Print::showPrinterInfo(KMPrinter *printer)
+{
+ if (!KMManager::self()->completePrinter(printer))
+ error(KIO::ERR_INTERNAL, i18n("Unable to retrieve printer information for %1.").arg(printer->name()));
+ else
+ {
+ mimeType("text/html");
+
+ QString content;
+ if (!loadTemplate(QString::fromLatin1("printer.template"), content))
+ {
+ error(KIO::ERR_INTERNAL, i18n("Unable to load template %1").arg("printer.template"));
+ return;
+ }
+
+ content = content
+ .arg(i18n("Properties of %1").arg(printer->printerName()))
+ .arg(i18n("Properties of %1").arg(printer->printerName()))
+ .arg(buildMenu(QStringList::split('|', i18n("General|Driver|Active jobs|Completed jobs"), false),
+ QStringList::split('|', "?general|?driver|?jobs|?completed_jobs", true),
+ 0))
+ .arg(QString::null)
+ .arg(printer->pixmap())
+ .arg(printer->name())
+ .arg(i18n("General Properties"))
+ .arg(i18n("Type")).arg(printer->isRemote() ? i18n("Remote") : i18n("Local"))
+ .arg(i18n("State")).arg(printer->stateString())
+ .arg(i18n("Location")).arg(printer->location())
+ .arg(i18n("Description")).arg(printer->description())
+ .arg(i18n("URI")).arg(printer->uri().prettyURL())
+ .arg(i18n("Interface (Backend)")).arg(printer->device())
+ .arg(i18n("Driver"))
+ .arg(i18n("Manufacturer")).arg(printer->manufacturer())
+ .arg(i18n("Model")).arg(printer->model())
+ .arg(i18n("Driver Information")).arg(printer->driverInfo());
+
+ data(content.local8Bit());
+ finished();
+ }
+}
+
+void KIO_Print::showClassInfo(KMPrinter *printer)
+{
+ if (!KMManager::self()->completePrinter(printer))
+ error(KIO::ERR_INTERNAL, i18n("Unable to retrieve class information for %1.").arg(printer->name()));
+ else
+ {
+ mimeType("text/html");
+
+ QString content;
+ if (!loadTemplate(QString::fromLatin1("class.template"), content))
+ {
+ error(KIO::ERR_INTERNAL, i18n("Unable to load template %1").arg("class.template"));
+ return;
+ }
+
+ QString memberContent("<ul>\n");
+ QStringList members(printer->members());
+ for (QStringList::ConstIterator it=members.begin(); it!=members.end(); ++it)
+ {
+ memberContent.append(QString::fromLatin1("<li><a href=\"print:/printers/%1\">%2</a></li>\n").arg(*it).arg(*it));
+ }
+ memberContent.append("</ul>\n");
+
+ QString typeContent = (printer->isImplicit() ? i18n("Implicit") : (printer->isRemote() ? i18n("Remote") : i18n("Local")));
+
+ content = content
+ .arg(i18n("Properties of %1").arg(printer->printerName()))
+ .arg(i18n("Properties of %1").arg(printer->printerName()))
+ .arg(buildMenu(QStringList::split('|', i18n("General|Active jobs|Completed jobs"), false),
+ QStringList::split('|', "?general|?jobs|?completed_jobs", true),
+ 0))
+ .arg(QString::null)
+ .arg(printer->pixmap())
+ .arg(printer->name())
+ .arg(i18n("General Properties"))
+ .arg(i18n("Type")).arg(typeContent)
+ .arg(i18n("State")).arg(printer->stateString())
+ .arg(i18n("Location")).arg(printer->location())
+ .arg(i18n("Description")).arg(printer->description())
+ .arg(i18n("URI")).arg(printer->uri().prettyURL())
+ .arg(i18n("Members")).arg(memberContent);
+
+ data(content.local8Bit());
+ finished();
+ }
+}
+
+void KIO_Print::showSpecialInfo(KMPrinter *printer)
+{
+ mimeType("text/html");
+
+ QString content;
+ if (!loadTemplate(QString::fromLatin1("pseudo.template"), content))
+ {
+ error(KIO::ERR_INTERNAL, i18n("Unable to load template %1").arg("pseudo.template"));
+ return;
+ }
+
+ QString reqContent("<ul>\n");
+ QStringList requirements = QStringList::split(",", printer->option("kde-special-require"), false);
+ for (QStringList::ConstIterator it=requirements.begin(); it!=requirements.end(); ++it)
+ reqContent += ("<li>" + (*it) + "</li>\n");
+ reqContent.append("</ul>\n");
+
+ content = content
+ .arg(i18n("Properties of %1").arg(printer->printerName()))
+ .arg(i18n("Properties of %1").arg(printer->printerName()))
+ .arg(buildMenu(QStringList::split('|', i18n("General"), false),
+ QStringList::split('|', "?general", true),
+ 0))
+ .arg(QString::null)
+ .arg(printer->pixmap())
+ .arg(printer->name())
+ .arg(i18n("General Properties"))
+ .arg(i18n("Location")).arg(printer->location())
+ .arg(i18n("Description")).arg(printer->description())
+ .arg(i18n("Requirements")).arg(reqContent)
+ .arg(i18n("Command Properties"))
+ .arg(i18n("Command")).arg("<tt>"+printer->option("kde-special-command")+"</tt>")
+ .arg(i18n("Use Output File")).arg(printer->option("kde-special-file") == "1" ? i18n("Yes") : i18n("No"))
+ .arg(i18n("Default Extension")).arg(printer->option("kde-special-extension"));
+
+ data(content.local8Bit());
+ finished();
+}
+
+bool KIO_Print::loadTemplate(const QString& filename, QString& buffer)
+{
+ QFile f(locate("data", QString::fromLatin1("kdeprint/template/")+filename));
+ if (f.exists() && f.open(IO_ReadOnly))
+ {
+ QTextStream t(&f);
+ buffer = t.read();
+ return true;
+ }
+ else
+ {
+ buffer = QString::null;
+ return false;
+ }
+}
+
+void KIO_Print::showData(const QString& pathname)
+{
+ PRINT_DEBUG << "sending data: " << pathname << endl;
+ QFile f(pathname);
+ if (f.exists() && f.open(IO_ReadOnly))
+ {
+ QByteArray arr(f.readAll());
+ mimeType(KMimeType::findByURL(KURL(pathname), 0, true, true)->name());
+ data(arr);
+ finished();
+ }
+ else
+ {
+ PRINT_DEBUG << "file not found" << endl;
+ error(KIO::ERR_DOES_NOT_EXIST, pathname);
+ }
+}
+
+/**
+ * Locate a data in this order:
+ * - $KDEDIR/share/apps/kdeprint/template/
+ * - as a desktop icon
+ */
+QString KIO_Print::locateData(const QString& item)
+{
+ QString path = locate("data", "kdeprint/template/"+item);
+ if (path.isEmpty())
+ path = KGlobal::iconLoader()->iconPath(item, KIcon::Desktop, true);
+ return path;
+}
+
+void KIO_Print::showJobs(KMPrinter *prt, bool completed)
+{
+ mimeType("text/html");
+
+ // Add the printer to the current list in the job manager
+ KMJobManager::JobType type = (completed ? KMJobManager::CompletedJobs : KMJobManager::ActiveJobs);
+ KMJobManager *mgr = KMJobManager::self();
+ if (prt)
+ mgr->addPrinter(prt->printerName(), type);
+ else
+ {
+ QPtrListIterator<KMPrinter> pit(*(KMManager::self()->printerList()));
+ for (; pit.current(); ++pit)
+ if (pit.current()->isVirtual() || pit.current()->isSpecial())
+ continue;
+ else
+ mgr->addPrinter(pit.current()->printerName(), type);
+ }
+
+ QString content;
+ if (!loadTemplate(QString::fromLatin1("jobs.template"), content))
+ {
+ error(KIO::ERR_INTERNAL, i18n("Unable to load template %1").arg("pseudo.template"));
+ return;
+ }
+
+ if (prt)
+ {
+ content = content
+ .arg(i18n("Jobs of %1").arg(prt->printerName()))
+ .arg(i18n("Jobs of %1").arg(prt->printerName()))
+ .arg(prt->isClass () ?
+ buildMenu(QStringList::split('|', i18n("General|Active jobs|Completed jobs"), false),
+ QStringList::split('|', "?general|?jobs|?completed_jobs", true),
+ (completed ? 2 : 1)) :
+ buildMenu(QStringList::split('|', i18n("General|Driver|Active jobs|Completed jobs"), false),
+ QStringList::split('|', "?general|?driver|?jobs|?completed_jobs", true),
+ (completed ? 3 : 2)))
+ .arg(QString::null)
+ .arg(prt->pixmap())
+ .arg(prt->printerName());
+ }
+ else
+ {
+ content = content
+ .arg(i18n("All jobs"))
+ .arg(buildMenu(QStringList::split('|', i18n("Active jobs|Completed jobs"), false),
+ QStringList::split('|', "?jobs|?completed_jobs", true),
+ (completed ? 1 : 0)))
+ .arg("fileprint")
+ .arg(i18n("All jobs"));
+ }
+ content = content.arg(i18n("ID")).arg(i18n("Owner")).arg(i18n("Printer")).arg(i18n("Name")).arg(i18n("State"));
+
+ QString jobContent, cellContent("<td>%1</td>\n");
+ QPtrListIterator<KMJob> it(mgr->jobList());
+ bool flag(true);
+ for (; it.current(); ++it, flag = !flag)
+ {
+ jobContent.append("<tr class=\"").append(flag ? "contentyellow" : "contentwhite").append("\">\n");
+ jobContent.append(cellContent.arg(it.current()->id()));
+ jobContent.append(cellContent.arg(it.current()->owner()));
+ jobContent.append(cellContent.arg(it.current()->printer()));
+ jobContent.append(cellContent.arg(it.current()->name()));
+ jobContent.append(cellContent.arg(it.current()->stateString()));
+ jobContent.append("</tr>\n");
+ }
+ content = content.arg(jobContent);
+
+ // remove the current printer to the current list in the job manager
+ if (prt)
+ mgr->removePrinter(prt->printerName(), type);
+ else
+ {
+ QPtrListIterator<KMPrinter> pit(*(KMManager::self()->printerList()));
+ for (; pit.current(); ++pit)
+ if (pit.current()->isVirtual() || pit.current()->isSpecial())
+ continue;
+ else
+ mgr->removePrinter(pit.current()->printerName(), type);
+ }
+
+ data(content.local8Bit());
+ finished();
+}
+
+void KIO_Print::showDriver(KMPrinter *prt)
+{
+ mimeType("text/html");
+
+ QString content;
+ if (!loadTemplate(QString::fromLatin1("driver.template"), content))
+ {
+ error(KIO::ERR_INTERNAL, i18n("Unable to load template %1").arg("pseudo.template"));
+ return;
+ }
+
+ DrMain *driver = KMManager::self()->loadPrinterDriver(prt, true);
+ content = content
+ .arg(i18n("Driver of %1").arg(prt->printerName()))
+ .arg(i18n("Driver of %1").arg(prt->printerName()))
+ .arg(buildMenu(QStringList::split('|', i18n("General|Driver|Active jobs|Completed jobs"), false),
+ QStringList::split('|', "?general|?driver|?jobs|?completed_jobs", true),
+ 1))
+ .arg(QString::null)
+ .arg(prt->pixmap())
+ .arg(prt->printerName() + "&nbsp;(" + (driver ? driver->get("text") : i18n("No driver found")) + ")");
+
+ if (driver)
+ content = content.arg(buildGroupTable(driver, false));
+ else
+ content = content.arg(QString::null);
+
+ data(content.local8Bit());
+ finished();
+}
+
+#include "kio_print.moc"
diff --git a/kdeprint/slave/kio_print.h b/kdeprint/slave/kio_print.h
new file mode 100644
index 000000000..3fa20bbf1
--- /dev/null
+++ b/kdeprint/slave/kio_print.h
@@ -0,0 +1,70 @@
+/*
+ * This file is part of the KDE libraries
+ * Copyright (c) 2001 Michael Goffioul <kdeprint@swing.be>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License version 2 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ **/
+
+#ifndef KIO_PRINT_H
+#define KIO_PRINT_H
+
+#include <kio/slavebase.h>
+#include <kio/global.h>
+#include <qstring.h>
+#include <qbuffer.h>
+
+class KMPrinter;
+namespace KIO {
+ class Job;
+}
+
+class KIO_Print : public QObject, public KIO::SlaveBase
+{
+ Q_OBJECT
+public:
+ KIO_Print(const QCString& pool, const QCString& app);
+
+ void listDir(const KURL& url);
+ void get(const KURL& url);
+ void stat(const KURL& url);
+
+protected slots:
+ void slotResult( KIO::Job* );
+ void slotData( KIO::Job*, const QByteArray& );
+ void slotTotalSize( KIO::Job*, KIO::filesize_t );
+ void slotProcessedSize( KIO::Job*, KIO::filesize_t );
+
+private:
+ void listRoot();
+ void listDirDB( const KURL& );
+ void statDB( const KURL& );
+ bool getDBFile( const KURL& );
+ void getDB( const KURL& );
+ void showClassInfo(KMPrinter*);
+ void showPrinterInfo(KMPrinter*);
+ void showSpecialInfo(KMPrinter*);
+ void showData(const QString&);
+ QString locateData(const QString&);
+ void showJobs(KMPrinter *p = 0, bool completed = false);
+ void showDriver(KMPrinter*);
+
+ bool loadTemplate(const QString& filename, QString& buffer);
+
+ QBuffer m_httpBuffer;
+ int m_httpError;
+ QString m_httpErrorTxt;
+};
+
+#endif
diff --git a/kdeprint/slave/mimetypes/Makefile.am b/kdeprint/slave/mimetypes/Makefile.am
new file mode 100644
index 000000000..9992389fe
--- /dev/null
+++ b/kdeprint/slave/mimetypes/Makefile.am
@@ -0,0 +1,3 @@
+mimetype_DATA = folder.desktop printer.desktop class.desktop manager.desktop jobs.desktop \
+ driver.desktop printermodel.desktop
+mimetypedir = $(kde_mimedir)/print
diff --git a/kdeprint/slave/mimetypes/class.desktop b/kdeprint/slave/mimetypes/class.desktop
new file mode 100644
index 000000000..f73b3262d
--- /dev/null
+++ b/kdeprint/slave/mimetypes/class.desktop
@@ -0,0 +1,75 @@
+[Desktop Entry]
+Comment=Class of Printers
+Comment[af]=Klas van Drukkers
+Comment[ar]=فئة الطابعات
+Comment[be]=Клас друкарак
+Comment[bg]=Клас принтери
+Comment[bn]=প্রিন্টার-এর ক্লাস (Class)
+Comment[bs]=Klasa štampača
+Comment[ca]=Classes d'impressores
+Comment[cs]=Třída tiskáren
+Comment[csb]=Klasë drëkerów
+Comment[da]=Klasse af printere
+Comment[de]=Druckerklasse
+Comment[el]=Κλάση εκτυπωτών
+Comment[eo]=Printiloklaso
+Comment[es]=Clase de impresoras
+Comment[et]=Printerite klass
+Comment[eu]=Inprimagailu klasea
+Comment[fa]=ردۀ چاپگرها
+Comment[fi]=Tulostinten luokka
+Comment[fr]=Classe d'imprimantes
+Comment[fy]=Printerklassen
+Comment[ga]=Aicme Printéirí
+Comment[gl]=Clase de impresoras
+Comment[he]=מחלקת מדפסות
+Comment[hi]=प्रिंटर के वर्ग
+Comment[hr]=Klase pisača
+Comment[hu]=Nyomtatóosztály
+Comment[is]=Flokkur prentara
+Comment[it]=Classe di stampanti
+Comment[ja]=プリンタクラス
+Comment[ka]=პრინტერთა კლასი
+Comment[kk]=Принтерлер класы
+Comment[km]=សន្ដាន​ម៉ាស៊ីន​បោះពុម្ព
+Comment[lt]=Spausdintuvų klasė
+Comment[lv]=Drukas iekārtu klase
+Comment[mk]=Класа на печатачи
+Comment[ms]=Kelas Pencetak
+Comment[mt]=Klassi ta' printers
+Comment[nb]=Skriverklasse
+Comment[nds]=Klass vun Druckers
+Comment[ne]=मुद्रकको वर्ग
+Comment[nl]=Printerklassen
+Comment[nn]=Skrivarklasse
+Comment[pa]=ਪਰਿੰਟਰਾਂ ਦਾ ਵਰਗ
+Comment[pl]=Klasa drukarek
+Comment[pt]=Classe de Impressoras
+Comment[pt_BR]=Classes de Impressoras
+Comment[ro]=Clase de imprimante
+Comment[ru]=Класс принтеров
+Comment[rw]=Urwego rwa Mucapyi
+Comment[se]=Čálánluohkát
+Comment[sk]=Trieda tlačiarní
+Comment[sl]=Razred tiskalnikov
+Comment[sr]=Класе штампача
+Comment[sr@Latn]=Klase štampača
+Comment[sv]=Klass av skrivare
+Comment[ta]=அச்சியந்திரங்களின் வகை
+Comment[tg]=Дараҷаи чопгарҳо
+Comment[th]=คลาสของเครื่องพิมพ์
+Comment[tr]=Yazıcı Sınıfı
+Comment[tt]=Basaqlar Törläre
+Comment[uk]=Клас принтерів
+Comment[uz]=Printerlar sinfi
+Comment[uz@cyrillic]=Принтерлар синфи
+Comment[vi]=Lớp Máy in
+Comment[wa]=Classe des scrireces
+Comment[zh_CN]=打印机类
+Comment[zh_TW]=印表機類別
+Icon=print_class
+Type=MimeType
+MimeType=print/class
+Patterns=
+
+X-KDE-AutoEmbed=true
diff --git a/kdeprint/slave/mimetypes/driver.desktop b/kdeprint/slave/mimetypes/driver.desktop
new file mode 100644
index 000000000..36cd08288
--- /dev/null
+++ b/kdeprint/slave/mimetypes/driver.desktop
@@ -0,0 +1,76 @@
+[Desktop Entry]
+Comment=Printer Driver
+Comment[af]=Drukker Aandrywer
+Comment[ar]=سائق الطابعة
+Comment[be]=Драйвер друкаркі
+Comment[bg]=Драйвер за принтер
+Comment[bn]=প্রিন্টার ড্রাইভার
+Comment[br]=Sturier ar voullerez
+Comment[bs]=Drajver štampača
+Comment[ca]=Control·lador d'impressora
+Comment[cs]=Ovladač tiskárny
+Comment[csb]=Czérownik drëkera
+Comment[da]=Printerdriver
+Comment[de]=Druckertreiber
+Comment[el]=Οδηγός εκτυπωτή
+Comment[eo]=Printila pelilo
+Comment[es]=Controlador de impresora
+Comment[et]=Printeri draiver
+Comment[eu]=Inprimagailuaren driverra
+Comment[fa]=گردانندۀ چاپگر
+Comment[fi]=Tulostinajuri
+Comment[fr]=Pilote d'imprimante
+Comment[fy]=Printerstjoerprogramma
+Comment[ga]=Tiománaí Printéara
+Comment[gl]=Controlador da Impresora
+Comment[he]=מנהל התקן המדפסת
+Comment[hi]=प्रिंटर ड्राइवर
+Comment[hr]=Upravljački program pisača
+Comment[hu]=Nyomtatómeghajtó
+Comment[is]=Prentrekill
+Comment[it]=Driver stampante
+Comment[ja]=プリンタドライバ
+Comment[ka]=პრინტერის დრაივერი
+Comment[kk]=Принтердің драйвері
+Comment[km]=កម្មវិធី​បញ្ជា​ម៉ាស៊ីន​បោះពុម្ព
+Comment[lt]=Spausdintuvo tvarkyklė
+Comment[lv]=Printera draiveris
+Comment[mk]=Управувач за печатач
+Comment[ms]=Pemacu Pencetak
+Comment[mt]=Driver tal-printer
+Comment[nb]=Skriverdriver
+Comment[nds]=Druckerdriever
+Comment[ne]=मुद्रक यन्त्र
+Comment[nl]=Printerstuurprogramma
+Comment[nn]=Skrivardrivar
+Comment[pa]=ਪਰਿੰਟਰ ਡਰਾਇਵਰ
+Comment[pl]=Sterownik drukarki
+Comment[pt]=Controlador de Impressora
+Comment[pt_BR]=Driver da Impressora
+Comment[ro]=Driver de imprimantă
+Comment[ru]=Драйвер принтера
+Comment[rw]=Musomyi ya Mucapyi
+Comment[se]=Čálánstivrran
+Comment[sk]=Ovládač tlačiarne
+Comment[sl]=Tiskalniški gonilnik
+Comment[sr]=Управљачки програм за штампач
+Comment[sr@Latn]=Upravljački program za štampač
+Comment[sv]=Skrivardrivrutin
+Comment[ta]=அச்சியந்திர இயக்கி
+Comment[tg]=Драйвери чопгар
+Comment[th]=ไดรเวอร์เครื่องพิมพ์
+Comment[tr]=Yazıcı Sürücüsü
+Comment[tt]=Basaq öçen Driver
+Comment[uk]=Драйвер принтера
+Comment[uz]=Printerning drayveri
+Comment[uz@cyrillic]=Принтернинг драйвери
+Comment[vi]=Trình điều khiển Máy in
+Comment[wa]=Moenneu di scrirece
+Comment[zh_CN]=打印机驱动程序
+Comment[zh_TW]=印表機驅動程式
+Icon=postscript
+Type=MimeType
+MimeType=print/driver
+Patterns=
+
+X-KDE-AutoEmbed=true
diff --git a/kdeprint/slave/mimetypes/folder.desktop b/kdeprint/slave/mimetypes/folder.desktop
new file mode 100644
index 000000000..312c863a3
--- /dev/null
+++ b/kdeprint/slave/mimetypes/folder.desktop
@@ -0,0 +1,76 @@
+[Desktop Entry]
+Comment=Print Folder
+Comment[af]=Drukker Gids
+Comment[ar]=مجلد الطباعة
+Comment[be]=Тэчка друку
+Comment[bg]=Директория на печата
+Comment[bn]=মুদ্রণ ফোল্ডার
+Comment[br]=Renkell moulañ
+Comment[bs]=Direktorij za štampu
+Comment[ca]=Carpeta d'impressió
+Comment[cs]=Složka tisku
+Comment[csb]=Katalog drëkòwaniô
+Comment[cy]=Dogfen argraffu
+Comment[da]=Udskriftsmappe
+Comment[de]=Druckordner
+Comment[el]=Φάκελος εκτυπώσεων
+Comment[eo]=Printa dosierujo
+Comment[es]=Carpeta de impresión
+Comment[et]=Trükkimise kataloog
+Comment[eu]=Inprimaketa karpeta
+Comment[fa]=پوشۀ چاپ
+Comment[fi]=Tulostuskansio
+Comment[fr]=Dossier d'impression
+Comment[fy]=printmap
+Comment[ga]=Fillteán Priontála
+Comment[gl]=Cartafol de Impresión
+Comment[he]=תיקיית הדפסה
+Comment[hr]=Mapa pisača
+Comment[hu]=Nyomtatáskezelő-mappa
+Comment[is]=Prentmappa
+Comment[it]=Cartella di stampa
+Comment[ja]=印刷フォルダ
+Comment[ka]=საბეჭდი საქაღალდე
+Comment[kk]=Басып шығару қапшығы
+Comment[km]=ថត​បោះពុម្ព
+Comment[ko]=홈 폴더
+Comment[lt]=Spausdinimo aplankas
+Comment[mk]=Папка за печатење
+Comment[ms]=Cetak Folder
+Comment[nb]=Skrivermappe
+Comment[nds]=Druckorner
+Comment[ne]=मुद्रण फोल्डर
+Comment[nl]=Afdrukmap
+Comment[nn]=Skrivarmappe
+Comment[pa]=ਛਪਾਈ ਫੋਲਡਰ
+Comment[pl]=Folder drukowania
+Comment[pt]=Pasta de Impressão
+Comment[pt_BR]=Pasta de Impressão
+Comment[ro]=Folder de tipărire
+Comment[ru]=Папка печати
+Comment[rw]=Gucapa Ububiko
+Comment[se]=Čálihanmáhppa
+Comment[sk]=Priečinok tlače
+Comment[sl]=Tiskalniška mapa
+Comment[sr]=Фасцикла за штампање
+Comment[sr@Latn]=Fascikla za štampanje
+Comment[sv]=Skrivarkatalog
+Comment[ta]=அச்சிடும் அடைவு
+Comment[tg]=Феҳристи чоп
+Comment[th]=โฟลเดอร์งานพิมพ์
+Comment[tr]=Yazdırma dizinidizini
+Comment[tt]=Bastıru Törgäge
+Comment[uk]=Тека друку
+Comment[uz]=Bosib chiqarish jildi
+Comment[uz@cyrillic]=Босиб чиқариш жилди
+Comment[vi]=Thư mục In ấn
+Comment[wa]=Ridant d' imprimaedje
+Comment[zh_CN]=打印文件夹
+Comment[zh_TW]=列印資料夾
+Icon=folder_print
+Type=MimeType
+MimeType=print/folder
+Patterns=
+
+X-KDE-AutoEmbed=true
+X-KDE-IsAlso=inode/directory
diff --git a/kdeprint/slave/mimetypes/jobs.desktop b/kdeprint/slave/mimetypes/jobs.desktop
new file mode 100644
index 000000000..5a92ceaa5
--- /dev/null
+++ b/kdeprint/slave/mimetypes/jobs.desktop
@@ -0,0 +1,85 @@
+[Desktop Entry]
+Comment=Print Jobs
+Comment[af]=Drukker Werke
+Comment[ar]=مهمات الطباعة
+Comment[be]=Заданні друку
+Comment[bg]=Задания за печат
+Comment[bn]=মুদ্রণ তালিকা
+Comment[bs]=Zadaci štampe
+Comment[ca]=Tasques d'impressió
+Comment[cs]=Tiskové úlohy
+Comment[csb]=Pòlétë drëkòwaniô
+Comment[cy]=Swyddi Argraffu
+Comment[da]=Udskriftsjob
+Comment[de]=Druckaufträge
+Comment[el]=Εργασίες εκτύπωσης
+Comment[eo]=Printaj taskoj
+Comment[es]=Trabajos de impresión
+Comment[et]=Trükitööd
+Comment[eu]=Inprimatze lanak
+Comment[fa]=چاپ کارها
+Comment[fi]=Tulostustyöt
+Comment[fr]=Tâches d'impression
+Comment[fy]=Printtaken
+Comment[ga]=Jabanna Priontála
+Comment[gl]=Traballos de Impresión
+Comment[he]=עבודות הדפסה
+Comment[hi]=प्रिंट कार्य
+Comment[hr]=Zadaci ispisivanja
+Comment[hu]=Nyomtatási feladatok
+Comment[is]=Prentverk
+Comment[it]=Lavori di stampa
+Comment[ja]=印刷ジョブ
+Comment[ka]=ბეჭდვის დავალებები
+Comment[kk]=Басу тапсырмалары
+Comment[km]=ការងារ​បោះពុម្ព
+Comment[lo]=ໂຟນເດີງານພິມ
+Comment[lt]=Spausdinimo užduotys
+Comment[lv]=Drukas darbi
+Comment[mk]=Печатарски задачи
+Comment[mn]=Хэвлэх даалгавар
+Comment[ms]=Cetak Kerja
+Comment[mt]=Xogħlijiet ta' pprintjar
+Comment[nb]=Skriverjobber
+Comment[nds]=Druckopgaven
+Comment[ne]=मुद्रण कार्य
+Comment[nl]=Afdruktaken
+Comment[nn]=Utskriftsjobbar
+Comment[nso]=Mesomo ya Kgatiso
+Comment[pa]=ਪਰਿੰਟ ਕੰਮ
+Comment[pl]=Zadania drukowania
+Comment[pt]=Tarefas de Impressão
+Comment[pt_BR]=Imprimir trabalhos
+Comment[ro]=Lucrări de tipărit
+Comment[ru]=Задания печати
+Comment[rw]=Gucapa Imirimo
+Comment[se]=Čálihanbarggut
+Comment[sk]=Tlačové úlohy
+Comment[sl]=Tiskalna opravila
+Comment[sr]=Послови штампе
+Comment[sr@Latn]=Poslovi štampe
+Comment[sv]=Skrivarjobb
+Comment[ta]=அச்சு வேலைகள்
+Comment[te]=ప్రచురణ పనులు
+Comment[tg]=Чопҳо
+Comment[th]=งานพิมพ์
+Comment[tr]=Yazdırma işleri
+Comment[tt]=Bastıru Eşläre
+Comment[uk]=Завдання друку
+Comment[uz]=Bosib chiqarish vazifalari
+Comment[uz@cyrillic]=Босиб чиқариш вазифалари
+Comment[ven]=Mishumo yau phirintha
+Comment[vi]=Tác vụ In ấn
+Comment[wa]=Bouyes d' imprimaedje
+Comment[xh]=Imisebenzi Yoshicilelo
+Comment[zh_CN]=打印任务
+Comment[zh_TW]=列印工作
+Comment[zu]=Imisebenzi Yokushicilela
+Icon=fileprint
+Type=MimeType
+MimeType=print/jobs
+Patterns=
+
+X-KDE-AutoEmbed=true
+X-KDE-IsAlso=inode/directory
+
diff --git a/kdeprint/slave/mimetypes/manager.desktop b/kdeprint/slave/mimetypes/manager.desktop
new file mode 100644
index 000000000..7b8cd0671
--- /dev/null
+++ b/kdeprint/slave/mimetypes/manager.desktop
@@ -0,0 +1,87 @@
+[Desktop Entry]
+Comment=Print Management Tool
+Comment[af]=Drukker Bestuur Program
+Comment[ar]=أداة إدارة الطباعة
+Comment[az]=Çap Edici İdarə Vasitəsi
+Comment[be]=Кіраўнік друку
+Comment[bg]=Програма за управление на печата
+Comment[bn]=মুদ্রণ ম্যানেজমেন্ট টুল
+Comment[br]=Ostilh mererezh moulañ
+Comment[bs]=Alat za upravljanje štampanjem
+Comment[ca]=Eina per a la gestió de la impressió
+Comment[cs]=Nástroj pro správu tiskáren
+Comment[csb]=Sprôwianié wëdrëkama
+Comment[cy]=Erfyn rheoli argraffu
+Comment[da]=Udskriftshåndteringsværktøj
+Comment[de]=Dienstprogramm zur Druckerverwaltung
+Comment[el]=Εργαλείο διαχείρισης εκτυπώσεων
+Comment[eo]=Administrilo por printado
+Comment[es]=Herramienta de gestión de la impresión
+Comment[et]=Trükkimise haldur
+Comment[eu]=Inprimaketak kudeatzeko tresna
+Comment[fa]=ابزار مدیریت چاپ
+Comment[fi]=Tulostuksenhallinta
+Comment[fr]=Gestionnaire d'impression
+Comment[fy]=Helpprogramma foar printerbehear
+Comment[ga]=Uirlis Bhainisteoireacht Priontála
+Comment[gl]=Ferramenta de Xestión das Impresións
+Comment[he]=כלי ניהול הדפסה
+Comment[hi]=छापा प्रबंधन औज़ार
+Comment[hr]=Alat za upravljanje ispisivanjem
+Comment[hu]=Nyomtatáskezelő segédprogram
+Comment[is]=Prentunartól
+Comment[it]=Strumento per la gestione della stampa
+Comment[ja]=印刷マネージメントツール
+Comment[ka]=ბეჭდვის მართვის ხელსაწყო
+Comment[kk]=Басып шығаруды басқару құралы
+Comment[km]=ឧបករណ៍​គ្រប់គ្រង​ការ​បោះពុម្ព
+Comment[ko]=휴대폰 관리 도구
+Comment[lo]=ເຄື່ອງມືຈັດການການພິມ
+Comment[lt]=Spausdinimo valdymo įrankis
+Comment[lv]=Drukas Menedžmenta Rīks
+Comment[mk]=Алатка за менаџмент на печатење
+Comment[mn]=Хэвлэгчийн удирдлагын програм
+Comment[ms]=Cetak Alat Pengurusan
+Comment[mt]=Għodda għall-immaniġġjar tal-ipprintjar
+Comment[nb]=Verktøy for skriverbehandling
+Comment[nds]=Druckpleeg-Warktüüch
+Comment[ne]=मुद्रण प्रबन्धक उपकरण
+Comment[nl]=Hulpprogramma voor printerbeheer
+Comment[nn]=Verktøy for utskriftshandsaming
+Comment[nso]=Sebereka sa Taolo ya Kgatiso
+Comment[pa]=ਪਰਿੰਟ ਪਰਬੰਧਨ ਸੰਦ
+Comment[pl]=Zarządzanie wydrukiem
+Comment[pt]=Ferramenta de gestão de impressão
+Comment[pt_BR]=Ferramenta de Gerenciamento de Impressão
+Comment[ro]=Utilitar de administrare a tipăririi
+Comment[ru]=Утилита управления печатью
+Comment[rw]=Igikoresho Ubuyobozi Gucapa
+Comment[se]=Reaiddut čáliheami várás
+Comment[sk]=Nástroj na správu tlače
+Comment[sl]=Orodje za upravljanje tiskanja
+Comment[sr]=Алат за управљање штампом
+Comment[sr@Latn]=Alat za upravljanje štampom
+Comment[sv]=Verktyg för att hantera utskrifter
+Comment[ta]=அச்சு மேலாண்மை கருவி
+Comment[tg]=Обзори мудирияти чоп
+Comment[th]=เครื่องมือจัดการการพิมพ์
+Comment[tr]=Yazdırma Yönetim Aracı
+Comment[tt]=Bastıru İdäneñ Qoralı
+Comment[uk]=Засіб керування друком
+Comment[uz]=Bosib chiqarishni boshqarish vositasi
+Comment[uz@cyrillic]=Босиб чиқаришни бошқариш воситаси
+Comment[ven]=Tshishumiswa tsha vhulanguli hau phirintha
+Comment[vi]=Công cụ Quản lí In ấn
+Comment[wa]=Usteye po manaedjî l' imprimaedje
+Comment[xh]=Isixhobo Sophatho Sokushicilela
+Comment[zh_CN]=打印管理工具
+Comment[zh_TW]=列印管理工具
+Comment[zu]=Ithuluzi Lokuphatha Ushicilelo
+Icon=wizard
+Type=MimeType
+MimeType=print/manager
+Patterns=
+
+X-KDE-AutoEmbed=true
+X-KDE-IsAlso=inode/directory
+
diff --git a/kdeprint/slave/mimetypes/printer.desktop b/kdeprint/slave/mimetypes/printer.desktop
new file mode 100644
index 000000000..905a08d34
--- /dev/null
+++ b/kdeprint/slave/mimetypes/printer.desktop
@@ -0,0 +1,79 @@
+[Desktop Entry]
+Comment=Printer
+Comment[af]=Drukker
+Comment[ar]=الطابعة
+Comment[az]=Çap Edici
+Comment[be]=Друкарка
+Comment[bg]=Принтер
+Comment[bn]=প্রিন্টার
+Comment[br]=Moulañ
+Comment[bs]=Štampač
+Comment[ca]=Impressora
+Comment[cs]=Tiskárna
+Comment[csb]=Drëker
+Comment[cy]=Argraffydd
+Comment[de]=Drucker
+Comment[el]=Εκτυπωτής
+Comment[eo]=Printilo
+Comment[es]=Impresora
+Comment[eu]=Inprimagailua
+Comment[fa]=چاپگر
+Comment[fi]=Tulostin
+Comment[fr]=Imprimante
+Comment[ga]=Printéir
+Comment[gl]=Impresora
+Comment[he]=מדפסת
+Comment[hi]=प्रिंटर
+Comment[hr]=Pisač
+Comment[hu]=Nyomtató
+Comment[is]=Prentari
+Comment[it]=Stampante
+Comment[ja]=プリンタ
+Comment[ka]=პრინტერი
+Comment[kk]=Принтер
+Comment[km]=ម៉ាស៊ីន​បោះពុម្ព
+Comment[lo]=ເຄື່ອງພິມ
+Comment[lt]=Spausdintuvas
+Comment[lv]=Drukas Iekārta
+Comment[mk]=Печатач
+Comment[mn]=Хэвлэгч
+Comment[ms]=Pencetak
+Comment[nb]=Skriver
+Comment[nds]=Drucker
+Comment[ne]=मुद्रक
+Comment[nn]=Skrivar
+Comment[nso]=Segatisi
+Comment[pa]=ਪਰਿੰਟਰ
+Comment[pl]=Drukarka
+Comment[pt]=Impressora
+Comment[pt_BR]=Impressora
+Comment[ro]=Imprimantă
+Comment[ru]=Принтер
+Comment[rw]=Mucapyi
+Comment[se]=Čálán
+Comment[sk]=Tlačiareň
+Comment[sl]=Tiskalnik
+Comment[sr]=Штампач
+Comment[sr@Latn]=Štampač
+Comment[sv]=Skrivare
+Comment[ta]=அச்சியந்திரம்
+Comment[te]=ప్రింటర్
+Comment[tg]=Чопгар
+Comment[th]=เครื่องพิมพ์
+Comment[tr]=Yazıcı
+Comment[tt]=Basaq
+Comment[uk]=Принтер
+Comment[uz@cyrillic]=Принтер
+Comment[ven]=phirinthara
+Comment[vi]=Máy in
+Comment[wa]=Sicrirece
+Comment[xh]=Umshicileli
+Comment[zh_CN]=打印机
+Comment[zh_TW]=印表機
+Comment[zu]=Umshicileli
+Icon=printer1
+Type=MimeType
+MimeType=print/printer
+Patterns=
+
+X-KDE-AutoEmbed=true
diff --git a/kdeprint/slave/mimetypes/printermodel.desktop b/kdeprint/slave/mimetypes/printermodel.desktop
new file mode 100644
index 000000000..f6a471e41
--- /dev/null
+++ b/kdeprint/slave/mimetypes/printermodel.desktop
@@ -0,0 +1,78 @@
+[Desktop Entry]
+Comment=Printer Model
+Comment[af]=Drukker Model
+Comment[ar]=طراز الطابعة
+Comment[be]=Мадэль друкаркі
+Comment[bg]=Модел принтер
+Comment[bn]=প্রিন্টার মডেল
+Comment[br]=Gobari ar voullerez
+Comment[bs]=Model štampača
+Comment[ca]=Model d'impressora
+Comment[cs]=Model tiskárny
+Comment[csb]=Ôrt drëkera
+Comment[cy]=Model Argraffydd
+Comment[da]=Printermodel
+Comment[de]=Druckermodell
+Comment[el]=Μοντέλο εκτυπωτή
+Comment[eo]=Printila modelo
+Comment[es]=Modelo de impresora
+Comment[et]=Printeri mudel
+Comment[eu]=Inprimagailuaren modeloa
+Comment[fa]=مدل چاپگر
+Comment[fi]=Tulostinmalli
+Comment[fr]=Modèle d'imprimante
+Comment[fy]=Printermodel
+Comment[ga]=Déanamh an Phrintéara
+Comment[gl]=Modelo da Impresora
+Comment[he]=דגם המדפסת
+Comment[hi]=प्रिंटर मॉडल
+Comment[hr]=Model pisača
+Comment[hu]=Nyomtatótípus
+Comment[is]=Prentaragerð
+Comment[it]=Modello stampante
+Comment[ja]=プリンタモデル
+Comment[ka]=პრინტერის მოდელი
+Comment[kk]=Принтер үлгісі
+Comment[km]=ម៉ូដែលម៉ាស៊ីន​បោះពុម្ព
+Comment[ko]=제어판 모듈
+Comment[lt]=Spausdintuvo modelis
+Comment[lv]=Drukas Iekārtas modelis
+Comment[mk]=Модел на печатач
+Comment[ms]=Model Pencetak
+Comment[mt]=Mudell tal-printer
+Comment[nb]=Skrivermodell
+Comment[nds]=Druckermodell
+Comment[ne]=मुद्रक नमूना
+Comment[nl]=Printermodel
+Comment[nn]=Skrivarmodell
+Comment[pa]=ਪਰਿੰਟਰ ਮਾਡਲ
+Comment[pl]=Model drukarki
+Comment[pt]=Modelo de Impressora
+Comment[pt_BR]=Modelo de Impressora
+Comment[ro]=Model de imprimantă
+Comment[ru]=Модель принтера
+Comment[rw]=Moderi Mucapyi
+Comment[se]=Čálánmálle
+Comment[sk]=Model tlačiarne
+Comment[sl]=Model tiskalnika
+Comment[sr]=Модел штампача
+Comment[sr@Latn]=Model štampača
+Comment[sv]=Skrivarmodell
+Comment[ta]=அச்சியந்திர மாதிரி
+Comment[tg]=Намунаи чопгар
+Comment[th]=รุ่นของเครื่องพิมพ์
+Comment[tr]=Yazıcı Modeli
+Comment[tt]=Basaq Töre
+Comment[uk]=Модель принтера
+Comment[uz]=Printerning modeli
+Comment[uz@cyrillic]=Принтернинг модели
+Comment[vi]=Loại Máy in
+Comment[wa]=Modele del sicrirece
+Comment[zh_CN]=打印机型号
+Comment[zh_TW]=印表機型號
+Icon=printer1
+Type=MimeType
+MimeType=print/printermodel
+Patterns=
+
+X-KDE-AutoEmbed=true
diff --git a/kdeprint/slave/print.protocol b/kdeprint/slave/print.protocol
new file mode 100644
index 000000000..38989160b
--- /dev/null
+++ b/kdeprint/slave/print.protocol
@@ -0,0 +1,15 @@
+[Protocol]
+exec=kio_print
+protocol=print
+input=none
+output=filesystem
+listing=Name,Type,Access
+reading=true
+writing=false
+makedir=false
+deleting=false
+moving=false
+linking=false
+Icon=postscript
+DocPath=kioslave/print.html
+defaultMimetype=application/octet-stream
diff --git a/kdeprint/slave/printdb.protocol b/kdeprint/slave/printdb.protocol
new file mode 100644
index 000000000..539edd596
--- /dev/null
+++ b/kdeprint/slave/printdb.protocol
@@ -0,0 +1,14 @@
+[Protocol]
+exec=kio_print
+protocol=printdb
+input=none
+output=filesystem
+listing=Name,Type,Access
+reading=true
+writing=false
+makedir=false
+deleting=false
+moving=false
+linking=false
+Icon=postscript
+defaultMimetype=application/octet-stream
diff --git a/kdeprint/slave/templates/Makefile.am b/kdeprint/slave/templates/Makefile.am
new file mode 100644
index 000000000..7fde236a2
--- /dev/null
+++ b/kdeprint/slave/templates/Makefile.am
@@ -0,0 +1,31 @@
+template_DATA = class.template \
+ printer.template \
+ pseudo.template \
+ jobs.template \
+ driver.template \
+ bar-bottom-left.png \
+ bar-top-middle.png \
+ box-bottom-middle.png \
+ box-top-middle.png \
+ bar-bottom-middle.png \
+ bar-top-right.png \
+ box-bottom-right.png \
+ box-top-right.png \
+ bar-bottom-right.png \
+ bottom-left.png \
+ box-centre-kdeprint.png \
+ top-left.png \
+ bar-middle-left.png \
+ bottom-middle.png \
+ box-middle-left.png \
+ top-middle.png \
+ bar-middle-right.png \
+ bottom-right.png \
+ box-middle-right.png \
+ top-right-kdeprint.png \
+ bar-top-left.png \
+ box-bottom-left.png \
+ box-top-left.png \
+ htmlstyles.css
+
+templatedir = $(kde_datadir)/kdeprint/template
diff --git a/kdeprint/slave/templates/bar-bottom-left.png b/kdeprint/slave/templates/bar-bottom-left.png
new file mode 100644
index 000000000..30a323592
--- /dev/null
+++ b/kdeprint/slave/templates/bar-bottom-left.png
Binary files differ
diff --git a/kdeprint/slave/templates/bar-bottom-middle.png b/kdeprint/slave/templates/bar-bottom-middle.png
new file mode 100644
index 000000000..b2ebbbed5
--- /dev/null
+++ b/kdeprint/slave/templates/bar-bottom-middle.png
Binary files differ
diff --git a/kdeprint/slave/templates/bar-bottom-right.png b/kdeprint/slave/templates/bar-bottom-right.png
new file mode 100644
index 000000000..e664e1511
--- /dev/null
+++ b/kdeprint/slave/templates/bar-bottom-right.png
Binary files differ
diff --git a/kdeprint/slave/templates/bar-middle-left.png b/kdeprint/slave/templates/bar-middle-left.png
new file mode 100644
index 000000000..72fda9ec2
--- /dev/null
+++ b/kdeprint/slave/templates/bar-middle-left.png
Binary files differ
diff --git a/kdeprint/slave/templates/bar-middle-right.png b/kdeprint/slave/templates/bar-middle-right.png
new file mode 100644
index 000000000..eb8d3201c
--- /dev/null
+++ b/kdeprint/slave/templates/bar-middle-right.png
Binary files differ
diff --git a/kdeprint/slave/templates/bar-top-left.png b/kdeprint/slave/templates/bar-top-left.png
new file mode 100644
index 000000000..b05fd216c
--- /dev/null
+++ b/kdeprint/slave/templates/bar-top-left.png
Binary files differ
diff --git a/kdeprint/slave/templates/bar-top-middle.png b/kdeprint/slave/templates/bar-top-middle.png
new file mode 100644
index 000000000..387f81017
--- /dev/null
+++ b/kdeprint/slave/templates/bar-top-middle.png
Binary files differ
diff --git a/kdeprint/slave/templates/bar-top-right.png b/kdeprint/slave/templates/bar-top-right.png
new file mode 100644
index 000000000..a552ff91d
--- /dev/null
+++ b/kdeprint/slave/templates/bar-top-right.png
Binary files differ
diff --git a/kdeprint/slave/templates/bottom-left.png b/kdeprint/slave/templates/bottom-left.png
new file mode 100644
index 000000000..78c9fece3
--- /dev/null
+++ b/kdeprint/slave/templates/bottom-left.png
Binary files differ
diff --git a/kdeprint/slave/templates/bottom-middle.png b/kdeprint/slave/templates/bottom-middle.png
new file mode 100644
index 000000000..41e52dd8a
--- /dev/null
+++ b/kdeprint/slave/templates/bottom-middle.png
Binary files differ
diff --git a/kdeprint/slave/templates/bottom-right.png b/kdeprint/slave/templates/bottom-right.png
new file mode 100644
index 000000000..ef81b04a8
--- /dev/null
+++ b/kdeprint/slave/templates/bottom-right.png
Binary files differ
diff --git a/kdeprint/slave/templates/box-bottom-left.png b/kdeprint/slave/templates/box-bottom-left.png
new file mode 100644
index 000000000..650fa5743
--- /dev/null
+++ b/kdeprint/slave/templates/box-bottom-left.png
Binary files differ
diff --git a/kdeprint/slave/templates/box-bottom-middle.png b/kdeprint/slave/templates/box-bottom-middle.png
new file mode 100644
index 000000000..2bcd3ea03
--- /dev/null
+++ b/kdeprint/slave/templates/box-bottom-middle.png
Binary files differ
diff --git a/kdeprint/slave/templates/box-bottom-right.png b/kdeprint/slave/templates/box-bottom-right.png
new file mode 100644
index 000000000..975aaeed7
--- /dev/null
+++ b/kdeprint/slave/templates/box-bottom-right.png
Binary files differ
diff --git a/kdeprint/slave/templates/box-centre-kdeprint.png b/kdeprint/slave/templates/box-centre-kdeprint.png
new file mode 100644
index 000000000..97da1910e
--- /dev/null
+++ b/kdeprint/slave/templates/box-centre-kdeprint.png
Binary files differ
diff --git a/kdeprint/slave/templates/box-middle-left.png b/kdeprint/slave/templates/box-middle-left.png
new file mode 100644
index 000000000..62a720178
--- /dev/null
+++ b/kdeprint/slave/templates/box-middle-left.png
Binary files differ
diff --git a/kdeprint/slave/templates/box-middle-right.png b/kdeprint/slave/templates/box-middle-right.png
new file mode 100644
index 000000000..aa94c0c90
--- /dev/null
+++ b/kdeprint/slave/templates/box-middle-right.png
Binary files differ
diff --git a/kdeprint/slave/templates/box-top-left.png b/kdeprint/slave/templates/box-top-left.png
new file mode 100644
index 000000000..34aba9195
--- /dev/null
+++ b/kdeprint/slave/templates/box-top-left.png
Binary files differ
diff --git a/kdeprint/slave/templates/box-top-middle.png b/kdeprint/slave/templates/box-top-middle.png
new file mode 100644
index 000000000..7ee2a0738
--- /dev/null
+++ b/kdeprint/slave/templates/box-top-middle.png
Binary files differ
diff --git a/kdeprint/slave/templates/box-top-right.png b/kdeprint/slave/templates/box-top-right.png
new file mode 100644
index 000000000..26d16d313
--- /dev/null
+++ b/kdeprint/slave/templates/box-top-right.png
Binary files differ
diff --git a/kdeprint/slave/templates/class.template b/kdeprint/slave/templates/class.template
new file mode 100644
index 000000000..4cbc075ab
--- /dev/null
+++ b/kdeprint/slave/templates/class.template
@@ -0,0 +1,188 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <meta name="generator" content=
+ "HTML Tidy for Linux/x86 (vers 1st August 2004), see www.w3.org" />
+
+ <title>%1</title>
+<style type="text/css">
+/*<![CDATA[*/
+img {margin: 0px; padding: 0px}
+body {margin: 0px; padding: 0px; background-color: #418ade;}
+.bar_text a {color: #008;};
+/*]]>*/
+</style>
+<link rel="stylesheet" href="htmlstyles.css" type="text/css" />
+</head>
+
+<body>
+ <div style=
+ "background-image: url(top-middle.png); width: 100%; height: 131px;">
+ <div style="position: absolute; right: 0px;">
+ <img src="top-right-kdeprint.png" style="margin: 0px" alt="" />
+ </div>
+
+ <div style="position: absolute; left: 0px;">
+ <img src="top-left.png" style="margin: 0px" alt="" />
+ </div>
+
+ <div style=
+ "position: absolute; top: 25px; right: 100px; text-align: right; font-size: xx-large; font-weight: bold; text-shadow: #fff 0px 0px 5px; color: #444">
+ %1 <!-- Konqueror -->
+ </div>
+
+ <div style=
+ "position: absolute; top: 70px; right: 100px; text-align: right; font-size: large; font-weight: bold; text-shadow: #fff 0px 0px 5px; color: #444">
+ %1 <!-- Conquer your Desktop -->
+ </div>
+ </div><!-- the bar -->
+
+ <div style=
+ "width: 100%; background-image: url(bar-middle-right.png); background-repeat: repeat-y; background-position: right; background-color: #57a1d8;">
+ <div style=
+ "width: 100%; height: 19px; background-image: url(bar-top-middle.png);">
+ <div style="width: 22px; height: 19px; float: left;">
+ <img src="bar-top-left.png" style="margin: 0px" alt="" />
+ </div>
+
+ <div style="width: 22px; height: 19px; float: right;">
+ <img src="bar-top-right.png" style="margin: 0px" alt="" />
+ </div>
+ </div>
+
+ <div style=
+ "width: 100%; background-image: url(bar-middle-left.png); background-repeat: repeat-y; text-align: center; color: white;"
+ class="bar_text">
+ %1 <!-- Menu -->
+ </div>
+
+ <div style=
+ "width: 100%; height: 25px; background-image: url(bar-bottom-middle.png);">
+ <div style="width: 22px; height: 25px; float: left;">
+ <img src="bar-bottom-left.png" style="margin: 0px" alt="" />
+ </div>
+
+ <div style="width: 22px; height: 25px; float: right;">
+ <img src="bar-bottom-right.png" style="margin: 0px" alt="" />
+ </div>
+ </div>
+ </div><!-- the main text box -->
+
+ <div align="center">
+ <div style=
+ "width: 90%; background-image: url(box-middle-right.png); background-repeat: repeat-y; background-position: right;">
+ <div style=
+ "width: 100%; height: 35px; background-image: url(box-top-middle.png);">
+ <div style="width: 20px; height: 35px; float: left;">
+ <img src="box-top-left.png" style="margin: 0px" alt="" />
+ </div>
+
+ <div style="width: 20px; height: 35px; float: right;">
+ <img src="box-top-right.png" style="margin: 0px" alt="" />
+ </div>
+ </div>
+
+ <div style=
+ "width: 100%; background-image: url(box-middle-left.png); background-repeat: repeat-y; text-align: center">
+ <div style=
+ "background-image: url(box-centre-kdeprint.png); background-repeat: no-repeat; background-color: #dfe7f3; background-position: top right; margin-left: 20px; margin-right: 20px;">
+ <h2 style="margin-top: 0px;"><img src="%1" width="32" height="32"/>&nbsp;%1<!--Title--></h2>
+
+ <table border="1" cellspacing="0" cellpadding="1" width="100%">
+ <tr class="top" align="left" valign="middle">
+ <td>&nbsp;%1
+ <!-- Printer Name --> </td>
+ </tr>
+
+ <tr>
+ <td>
+ <table border="1" cellspacing="0" cellpadding="2" width="100%">
+ <tr class="contentyellow">
+ <td width="40%">%1 </td>
+
+ <td width="58%">%1 <!--Type--></td>
+ </tr>
+
+ <tr class="contentwhite">
+ <td>%1 </td>
+
+ <td>%1 <!-- State--></td>
+ </tr>
+
+ <tr class="contentyellow">
+ <td>%1 </td>
+
+ <td>%1 <!-- Location --></td>
+ </tr>
+
+ <tr class="contentwhite">
+ <td>%1 </td>
+
+ <td>%1 <!-- Description --></td>
+ </tr>
+
+ <tr class="contentyellow">
+ <td>%1 </td>
+
+ <td>%1 <!-- URI --></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+ </table>
+
+ </p>
+
+ <p>
+
+ <table border="1" cellspacing="0" cellpadding="2" width="100%">
+ <tr class="top" align="left" valign="middle">
+ <td>&nbsp;%1
+ <!-- Members --></td>
+ </tr>
+
+ <tr>
+ <td>
+ <table border="1" cellspacing="0" cellpadding="2" width="100%">
+ <tr class="contentyellow">
+ <td width="100%">%1</td>
+
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+ </table>
+
+ </div>
+ </div>
+
+ <div style=
+ "width: 100%; height: 22px; background-image: url(box-bottom-middle.png);">
+ <div style="width: 25px; height: 22px; float: left;">
+ <img src="box-bottom-left.png" style="margin: 0px" alt="" />
+ </div>
+
+ <div style="width: 25px; height: 22px; float: right;">
+ <img src="box-bottom-right.png" style="margin: 0px" alt="" />
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <div style=
+ "background-image: url(bottom-middle.png); width: 100%; height: 100px;">
+ <div style="position: absolute; right: 0px;">
+ <img src="bottom-right.png" style="margin: 0px" alt="" />
+ </div>
+
+ <div style="position: absolute; left: 0px;">
+ <img src="bottom-left.png" style="margin: 0px" alt="" />
+ </div>
+ </div>
+</body>
+</html>
diff --git a/kdeprint/slave/templates/driver.template b/kdeprint/slave/templates/driver.template
new file mode 100644
index 000000000..d5c8af111
--- /dev/null
+++ b/kdeprint/slave/templates/driver.template
@@ -0,0 +1,133 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <meta name="generator" content=
+ "HTML Tidy for Linux/x86 (vers 1st August 2004), see www.w3.org" />
+
+ <title>%1</title>
+<style type="text/css">
+/*<![CDATA[*/
+img {margin: 0px; padding: 0px}
+body {margin: 0px; padding: 0px; background-color: #418ade;}
+.bar_text a {color: #008;};
+/*]]>*/
+</style>
+<link rel="stylesheet" href="htmlstyles.css" type="text/css" />
+</head>
+
+<body>
+ <div style=
+ "background-image: url(top-middle.png); width: 100%; height: 131px;">
+ <div style="position: absolute; right: 0px;">
+ <img src="top-right-kdeprint.png" style="margin: 0px" alt="" />
+ </div>
+
+ <div style="position: absolute; left: 0px;">
+ <img src="top-left.png" style="margin: 0px" alt="" />
+ </div>
+
+ <div style=
+ "position: absolute; top: 25px; right: 100px; text-align: right; font-size: xx-large; font-weight: bold; text-shadow: #fff 0px 0px 5px; color: #444">
+ %1 <!-- Konqueror -->
+ </div>
+
+ <div style=
+ "position: absolute; top: 70px; right: 100px; text-align: right; font-size: large; font-weight: bold; text-shadow: #fff 0px 0px 5px; color: #444">
+ %1 <!-- Conquer your Desktop -->
+ </div>
+ </div><!-- the bar -->
+
+ <div style=
+ "width: 100%; background-image: url(bar-middle-right.png); background-repeat: repeat-y; background-position: right; background-color: #57a1d8;">
+ <div style=
+ "width: 100%; height: 19px; background-image: url(bar-top-middle.png);">
+ <div style="width: 22px; height: 19px; float: left;">
+ <img src="bar-top-left.png" style="margin: 0px" alt="" />
+ </div>
+
+ <div style="width: 22px; height: 19px; float: right;">
+ <img src="bar-top-right.png" style="margin: 0px" alt="" />
+ </div>
+ </div>
+
+ <div style=
+ "width: 100%; background-image: url(bar-middle-left.png); background-repeat: repeat-y; text-align: center; color: white;"
+ class="bar_text">
+ %1 <!-- Menu -->
+ </div>
+
+ <div style=
+ "width: 100%; height: 25px; background-image: url(bar-bottom-middle.png);">
+ <div style="width: 22px; height: 25px; float: left;">
+ <img src="bar-bottom-left.png" style="margin: 0px" alt="" />
+ </div>
+
+ <div style="width: 22px; height: 25px; float: right;">
+ <img src="bar-bottom-right.png" style="margin: 0px" alt="" />
+ </div>
+ </div>
+ </div><!-- the main text box -->
+
+ <div align="center">
+ <div style=
+ "width: 90%; background-image: url(box-middle-right.png); background-repeat: repeat-y; background-position: right;">
+ <div style=
+ "width: 100%; height: 35px; background-image: url(box-top-middle.png);">
+ <div style="width: 20px; height: 35px; float: left;">
+ <img src="box-top-left.png" style="margin: 0px" alt="" />
+ </div>
+
+ <div style="width: 20px; height: 35px; float: right;">
+ <img src="box-top-right.png" style="margin: 0px" alt="" />
+ </div>
+ </div>
+
+ <div style=
+ "width: 100%; background-image: url(box-middle-left.png); background-repeat: repeat-y; text-align: center">
+ <div style=
+ "background-image: url(box-centre-kdeprint.png); background-repeat: no-repeat; background-color: #dfe7f3; background-position: top right; margin-left: 20px; margin-right: 20px;">
+ <h2 style="margin-top: 0px;"><img src="%1" width="32" height="32"/>&nbsp;%1<!--Title--></h2>
+
+ <table border="1" cellspacing="0" cellpadding="1" width="100%">
+ <tr>
+ <td>
+ <table border="1" cellspacing="0" cellpadding="2" width="100%">
+
+ %1
+
+ </table>
+ </td>
+ </tr>
+ </table>
+
+ </div>
+ </div>
+
+ <div style=
+ "width: 100%; height: 22px; background-image: url(box-bottom-middle.png);">
+ <div style="width: 25px; height: 22px; float: left;">
+ <img src="box-bottom-left.png" style="margin: 0px" alt="" />
+ </div>
+
+ <div style="width: 25px; height: 22px; float: right;">
+ <img src="box-bottom-right.png" style="margin: 0px" alt="" />
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <div style=
+ "background-image: url(bottom-middle.png); width: 100%; height: 100px;">
+ <div style="position: absolute; right: 0px;">
+ <img src="bottom-right.png" style="margin: 0px" alt="" />
+ </div>
+
+ <div style="position: absolute; left: 0px;">
+ <img src="bottom-left.png" style="margin: 0px" alt="" />
+ </div>
+ </div>
+</body>
+</html>
diff --git a/kdeprint/slave/templates/htmlstyles.css b/kdeprint/slave/templates/htmlstyles.css
new file mode 100644
index 000000000..650ed76db
--- /dev/null
+++ b/kdeprint/slave/templates/htmlstyles.css
@@ -0,0 +1,38 @@
+td.main { background-color: #505050;}
+td.logo { background-color: #DDDDDD;}
+td.lines { background-color: #DDDDDD;
+ background-image: url(lines.png);}
+td.trans { background-repeat: no-repeat;}
+td.end { background-image: url(lines2.png);
+ background-repeat: x-repeat;}
+td.shadow1 { background-image: url(shadow1.png);
+ background-repeat: x-repeat;}
+tr.top { font-family: sans-serif;
+ color: #ffffff;
+ background-color: #505050}
+tr.contentyellow { font-family: sans-serif;
+ color: #000000;
+ background-color: #fff4c9}
+tr.contentwhite { font-family: sans-serif;
+ color: #000000;
+ background-color: #FFFFFF}
+tr.menurow {background-color: #505050;
+ color: #000000;
+ vertical-align: middle;}
+td.deco {color: #ffffff;
+ background-color: #505050;
+ font-family: sans-serif;
+ font-size: small;}
+td.menuactive {color: #ffcc00;
+ background-color: #777777;
+ font-family: sans-serif;
+ font-size: small;}
+td.menu {color: #ffffff;
+ background-color: #505050;
+ font-family: sans-serif;}
+a.menu {color: #eeeeee;
+ font-family: sans-serif;
+ font-size: small;}
+a.menu:hover {color: #ffffff;
+ text-decoration: none;}
+
diff --git a/kdeprint/slave/templates/jobs.template b/kdeprint/slave/templates/jobs.template
new file mode 100644
index 000000000..6c326feec
--- /dev/null
+++ b/kdeprint/slave/templates/jobs.template
@@ -0,0 +1,140 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <meta name="generator" content=
+ "HTML Tidy for Linux/x86 (vers 1st August 2004), see www.w3.org" />
+
+ <title>%1</title>
+<style type="text/css">
+/*<![CDATA[*/
+img {margin: 0px; padding: 0px}
+body {margin: 0px; padding: 0px; background-color: #418ade;}
+.bar_text a {color: #008;};
+/*]]>*/
+</style>
+<link rel="stylesheet" href="htmlstyles.css" type="text/css" />
+</head>
+
+<body>
+ <div style=
+ "background-image: url(top-middle.png); width: 100%; height: 131px;">
+ <div style="position: absolute; right: 0px;">
+ <img src="top-right-kdeprint.png" style="margin: 0px" alt="" />
+ </div>
+
+ <div style="position: absolute; left: 0px;">
+ <img src="top-left.png" style="margin: 0px" alt="" />
+ </div>
+
+ <div style=
+ "position: absolute; top: 25px; right: 100px; text-align: right; font-size: xx-large; font-weight: bold; text-shadow: #fff 0px 0px 5px; color: #444">
+ %1 <!-- Konqueror -->
+ </div>
+
+ <div style=
+ "position: absolute; top: 70px; right: 100px; text-align: right; font-size: large; font-weight: bold; text-shadow: #fff 0px 0px 5px; color: #444">
+ %1 <!-- Conquer your Desktop -->
+ </div>
+ </div><!-- the bar -->
+
+ <div style=
+ "width: 100%; background-image: url(bar-middle-right.png); background-repeat: repeat-y; background-position: right; background-color: #57a1d8;">
+ <div style=
+ "width: 100%; height: 19px; background-image: url(bar-top-middle.png);">
+ <div style="width: 22px; height: 19px; float: left;">
+ <img src="bar-top-left.png" style="margin: 0px" alt="" />
+ </div>
+
+ <div style="width: 22px; height: 19px; float: right;">
+ <img src="bar-top-right.png" style="margin: 0px" alt="" />
+ </div>
+ </div>
+
+ <div style=
+ "width: 100%; background-image: url(bar-middle-left.png); background-repeat: repeat-y; text-align: center; color: white;"
+ class="bar_text">
+ %1 <!-- Menu -->
+ </div>
+
+ <div style=
+ "width: 100%; height: 25px; background-image: url(bar-bottom-middle.png);">
+ <div style="width: 22px; height: 25px; float: left;">
+ <img src="bar-bottom-left.png" style="margin: 0px" alt="" />
+ </div>
+
+ <div style="width: 22px; height: 25px; float: right;">
+ <img src="bar-bottom-right.png" style="margin: 0px" alt="" />
+ </div>
+ </div>
+ </div><!-- the main text box -->
+
+ <div align="center">
+ <div style=
+ "width: 90%; background-image: url(box-middle-right.png); background-repeat: repeat-y; background-position: right;">
+ <div style=
+ "width: 100%; height: 35px; background-image: url(box-top-middle.png);">
+ <div style="width: 20px; height: 35px; float: left;">
+ <img src="box-top-left.png" style="margin: 0px" alt="" />
+ </div>
+
+ <div style="width: 20px; height: 35px; float: right;">
+ <img src="box-top-right.png" style="margin: 0px" alt="" />
+ </div>
+ </div>
+
+ <div style=
+ "width: 100%; background-image: url(box-middle-left.png); background-repeat: repeat-y; text-align: center">
+ <div style=
+ "background-image: url(box-centre-kdeprint.png); background-repeat: no-repeat; background-color: #dfe7f3; background-position: top right; margin-left: 20px; margin-right: 20px;">
+ <h2 style="margin-top: 0px;"><img src="%1" width="32" height="32"/>&nbsp;%1<!--Title--></h2>
+
+ <table border="1" cellspacing="0" cellpadding="1" width="100%">
+ <tr>
+ <td>
+ <table border="1" cellspacing="0" cellpadding="2" width="100%">
+ <tr class="top">
+ <td width="10%">%1</td>
+ <td width="15%">%1</td>
+ <td width="20%">%1</td>
+ <td width="40%">%1</td>
+ <td width="15%">%1</td>
+ </tr>
+
+ %1
+
+ </table>
+ </td>
+ </tr>
+ </table>
+
+ </div>
+ </div>
+
+ <div style=
+ "width: 100%; height: 22px; background-image: url(box-bottom-middle.png);">
+ <div style="width: 25px; height: 22px; float: left;">
+ <img src="box-bottom-left.png" style="margin: 0px" alt="" />
+ </div>
+
+ <div style="width: 25px; height: 22px; float: right;">
+ <img src="box-bottom-right.png" style="margin: 0px" alt="" />
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <div style=
+ "background-image: url(bottom-middle.png); width: 100%; height: 100px;">
+ <div style="position: absolute; right: 0px;">
+ <img src="bottom-right.png" style="margin: 0px" alt="" />
+ </div>
+
+ <div style="position: absolute; left: 0px;">
+ <img src="bottom-left.png" style="margin: 0px" alt="" />
+ </div>
+ </div>
+</body>
+</html>
diff --git a/kdeprint/slave/templates/printer.template b/kdeprint/slave/templates/printer.template
new file mode 100644
index 000000000..44d6ba82b
--- /dev/null
+++ b/kdeprint/slave/templates/printer.template
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <meta name="generator" content=
+ "HTML Tidy for Linux/x86 (vers 1st August 2004), see www.w3.org" />
+
+ <title>%1</title>
+<style type="text/css">
+/*<![CDATA[*/
+img {margin: 0px; padding: 0px}
+body {margin: 0px; padding: 0px; background-color: #418ade;}
+.bar_text a {color: #008;};
+/*]]>*/
+</style>
+<link rel="stylesheet" href="htmlstyles.css" type="text/css" />
+</head>
+
+<body>
+ <div style=
+ "background-image: url(top-middle.png); width: 100%; height: 131px;">
+ <div style="position: absolute; right: 0px;">
+ <img src="top-right-kdeprint.png" style="margin: 0px" alt="" />
+ </div>
+
+ <div style="position: absolute; left: 0px;">
+ <img src="top-left.png" style="margin: 0px" alt="" />
+ </div>
+
+ <div style=
+ "position: absolute; top: 25px; right: 100px; text-align: right; font-size: xx-large; font-weight: bold; text-shadow: #fff 0px 0px 5px; color: #444">
+ %1 <!-- Konqueror -->
+ </div>
+
+ <div style=
+ "position: absolute; top: 70px; right: 100px; text-align: right; font-size: large; font-weight: bold; text-shadow: #fff 0px 0px 5px; color: #444">
+ %1 <!-- Conquer your Desktop -->
+ </div>
+ </div><!-- the bar -->
+
+ <div style=
+ "width: 100%; background-image: url(bar-middle-right.png); background-repeat: repeat-y; background-position: right; background-color: #57a1d8;">
+ <div style=
+ "width: 100%; height: 19px; background-image: url(bar-top-middle.png);">
+ <div style="width: 22px; height: 19px; float: left;">
+ <img src="bar-top-left.png" style="margin: 0px" alt="" />
+ </div>
+
+ <div style="width: 22px; height: 19px; float: right;">
+ <img src="bar-top-right.png" style="margin: 0px" alt="" />
+ </div>
+ </div>
+
+ <div style=
+ "width: 100%; background-image: url(bar-middle-left.png); background-repeat: repeat-y; text-align: center; color: white;"
+ class="bar_text">
+ %1 <!-- Menu -->
+ </div>
+
+ <div style=
+ "width: 100%; height: 25px; background-image: url(bar-bottom-middle.png);">
+ <div style="width: 22px; height: 25px; float: left;">
+ <img src="bar-bottom-left.png" style="margin: 0px" alt="" />
+ </div>
+
+ <div style="width: 22px; height: 25px; float: right;">
+ <img src="bar-bottom-right.png" style="margin: 0px" alt="" />
+ </div>
+ </div>
+ </div><!-- the main text box -->
+
+ <div align="center">
+ <div style=
+ "width: 90%; background-image: url(box-middle-right.png); background-repeat: repeat-y; background-position: right;">
+ <div style=
+ "width: 100%; height: 35px; background-image: url(box-top-middle.png);">
+ <div style="width: 20px; height: 35px; float: left;">
+ <img src="box-top-left.png" style="margin: 0px" alt="" />
+ </div>
+
+ <div style="width: 20px; height: 35px; float: right;">
+ <img src="box-top-right.png" style="margin: 0px" alt="" />
+ </div>
+ </div>
+
+ <div style=
+ "width: 100%; background-image: url(box-middle-left.png); background-repeat: repeat-y; text-align: center">
+ <div style=
+ "background-image: url(box-centre-kdeprint.png); background-repeat: no-repeat; background-color: #dfe7f3; background-position: top right; margin-left: 20px; margin-right: 20px;">
+ <h2 style="margin-top: 0px;"><img src="%1" width="32" height="32"/>&nbsp;%1<!--Title--></h2>
+
+ <table border="1" cellspacing="0" cellpadding="1" width="100%">
+ <tr class="top" align="left" valign="middle">
+ <td>&nbsp;%1
+ <!-- Printer Name --> </td>
+ </tr>
+
+ <tr>
+ <td>
+ <table border="1" cellspacing="0" cellpadding="2" width="100%">
+ <tr class="contentyellow">
+ <td width="41%">%1 </td>
+
+ <td width="59%">%1 <!--Type--></td>
+ </tr>
+
+ <tr class="contentwhite">
+ <td>%1 </td>
+
+ <td>%1 <!-- State--></td>
+ </tr>
+
+ <tr class="contentyellow">
+ <td>%1 </td>
+
+ <td>%1 <!-- Location --></td>
+ </tr>
+
+ <tr class="contentwhite">
+ <td>%1 </td>
+
+ <td>%1 <!-- Description --></td>
+ </tr>
+
+ <tr class="contentyellow">
+ <td>%1 </td>
+
+ <td>%1 <!-- URI --></td>
+ </tr>
+
+ <tr class="contentwhite">
+ <td>%1 </td>
+
+ <td>%1 <!-- Interface --></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+
+ </p>
+
+ <p>
+
+ <table border="1" cellspacing="0" cellpadding="2" width="100%">
+ <tr class="top" align="left" valign="middle">
+ <td>&nbsp;%1 <!-- Driver --></td>
+ </tr>
+
+ <tr>
+ <td>
+ <table border="1" cellspacing="0" cellpadding="2" width="100%">
+ <tr class="contentyellow">
+ <td width="41%">%1 </td>
+
+ <td width="59%">%1
+ <!--Manufacturer--></td>
+ </tr>
+
+ <tr class="contentwhite">
+ <td>%1 </td>
+
+ <td>%1 <!-- Model--></td>
+ </tr>
+
+ <tr class="contentyellow">
+ <td>%1 </td>
+
+ <td>%1 <!-- Driver Informaton --></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+
+ </div>
+ </div>
+
+ <div style=
+ "width: 100%; height: 22px; background-image: url(box-bottom-middle.png);">
+ <div style="width: 25px; height: 22px; float: left;">
+ <img src="box-bottom-left.png" style="margin: 0px" alt="" />
+ </div>
+
+ <div style="width: 25px; height: 22px; float: right;">
+ <img src="box-bottom-right.png" style="margin: 0px" alt="" />
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <div style=
+ "background-image: url(bottom-middle.png); width: 100%; height: 100px;">
+ <div style="position: absolute; right: 0px;">
+ <img src="bottom-right.png" style="margin: 0px" alt="" />
+ </div>
+
+ <div style="position: absolute; left: 0px;">
+ <img src="bottom-left.png" style="margin: 0px" alt="" />
+ </div>
+ </div>
+</body>
+</html>
diff --git a/kdeprint/slave/templates/pseudo.template b/kdeprint/slave/templates/pseudo.template
new file mode 100644
index 000000000..d6dec46df
--- /dev/null
+++ b/kdeprint/slave/templates/pseudo.template
@@ -0,0 +1,188 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <meta name="generator" content=
+ "HTML Tidy for Linux/x86 (vers 1st August 2004), see www.w3.org" />
+
+ <title>%1</title>
+<style type="text/css">
+/*<![CDATA[*/
+img {margin: 0px; padding: 0px}
+body {margin: 0px; padding: 0px; background-color: #418ade;}
+.bar_text a {color: #008;};
+/*]]>*/
+</style>
+<link rel="stylesheet" href="htmlstyles.css" type="text/css" />
+</head>
+
+<body>
+ <div style=
+ "background-image: url(top-middle.png); width: 100%; height: 131px;">
+ <div style="position: absolute; right: 0px;">
+ <img src="top-right-kdeprint.png" style="margin: 0px" alt="" />
+ </div>
+
+ <div style="position: absolute; left: 0px;">
+ <img src="top-left.png" style="margin: 0px" alt="" />
+ </div>
+
+ <div style=
+ "position: absolute; top: 25px; right: 100px; text-align: right; font-size: xx-large; font-weight: bold; text-shadow: #fff 0px 0px 5px; color: #444">
+ %1 <!-- Konqueror -->
+ </div>
+
+ <div style=
+ "position: absolute; top: 70px; right: 100px; text-align: right; font-size: large; font-weight: bold; text-shadow: #fff 0px 0px 5px; color: #444">
+ %1 <!-- Conquer your Desktop -->
+ </div>
+ </div><!-- the bar -->
+
+ <div style=
+ "width: 100%; background-image: url(bar-middle-right.png); background-repeat: repeat-y; background-position: right; background-color: #57a1d8;">
+ <div style=
+ "width: 100%; height: 19px; background-image: url(bar-top-middle.png);">
+ <div style="width: 22px; height: 19px; float: left;">
+ <img src="bar-top-left.png" style="margin: 0px" alt="" />
+ </div>
+
+ <div style="width: 22px; height: 19px; float: right;">
+ <img src="bar-top-right.png" style="margin: 0px" alt="" />
+ </div>
+ </div>
+
+ <div style=
+ "width: 100%; background-image: url(bar-middle-left.png); background-repeat: repeat-y; text-align: center; color: white;"
+ class="bar_text">
+ %1 <!-- Menu -->
+ </div>
+
+ <div style=
+ "width: 100%; height: 25px; background-image: url(bar-bottom-middle.png);">
+ <div style="width: 22px; height: 25px; float: left;">
+ <img src="bar-bottom-left.png" style="margin: 0px" alt="" />
+ </div>
+
+ <div style="width: 22px; height: 25px; float: right;">
+ <img src="bar-bottom-right.png" style="margin: 0px" alt="" />
+ </div>
+ </div>
+ </div><!-- the main text box -->
+
+ <div align="center">
+ <div style=
+ "width: 90%; background-image: url(box-middle-right.png); background-repeat: repeat-y; background-position: right;">
+ <div style=
+ "width: 100%; height: 35px; background-image: url(box-top-middle.png);">
+ <div style="width: 20px; height: 35px; float: left;">
+ <img src="box-top-left.png" style="margin: 0px" alt="" />
+ </div>
+
+ <div style="width: 20px; height: 35px; float: right;">
+ <img src="box-top-right.png" style="margin: 0px" alt="" />
+ </div>
+ </div>
+
+ <div style=
+ "width: 100%; background-image: url(box-middle-left.png); background-repeat: repeat-y; text-align: center">
+ <div style=
+ "background-image: url(box-centre-kdeprint.png); background-repeat: no-repeat; background-color: #dfe7f3; background-position: top right; margin-left: 20px; margin-right: 20px;">
+ <h2 style="margin-top: 0px;"><img src="%1" width="32" height="32"/>&nbsp;%1<!--Title--></h2>
+
+ <table border="1" cellspacing="0" cellpadding="1" width="100%">
+ <tr class="top" align="left" valign="middle">
+ <td>&nbsp;%1
+ <!-- Printer Name --> </td>
+ </tr>
+
+ <tr>
+ <td>
+ <table border="1" cellspacing="0" cellpadding="2" width="100%">
+ <tr class="contentyellow">
+ <td width="41%">%1 </td>
+
+ <td width="59%">%1 <!--Type--></td>
+ </tr>
+
+ <tr class="contentwhite">
+ <td>%1 </td>
+
+ <td>%1 <!-- State--></td>
+ </tr>
+
+ <tr class="contentyellow">
+ <td>%1 </td>
+
+ <td>%1 <!-- Location --></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+ </table>
+
+ </p>
+
+ <p>
+
+ <table border="1" cellspacing="0" cellpadding="2" width="100%">
+ <tr class="top" align="left" valign="middle">
+ <td>&nbsp;%1 <!-- Command Properties --></td>
+ </tr>
+
+ <tr>
+ <td>
+ <table border="1" cellspacing="0" cellpadding="2" width="100%">
+ <tr class="contentyellow">
+ <td width="40%">%1 </td>
+
+ <td width="58%">%1
+ <!--Command--></td>
+ </tr>
+
+ <tr class="contentwhite">
+ <td>%1 </td>
+
+ <td>%1 <!-- Use Output File --></td>
+ </tr>
+
+ <tr class="contentyellow">
+ <td>%1 </td>
+
+ <td>%1 <!-- Default Extension --></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+
+ </div>
+ </div>
+
+ <div style=
+ "width: 100%; height: 22px; background-image: url(box-bottom-middle.png);">
+ <div style="width: 25px; height: 22px; float: left;">
+ <img src="box-bottom-left.png" style="margin: 0px" alt="" />
+ </div>
+
+ <div style="width: 25px; height: 22px; float: right;">
+ <img src="box-bottom-right.png" style="margin: 0px" alt="" />
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <div style=
+ "background-image: url(bottom-middle.png); width: 100%; height: 100px;">
+ <div style="position: absolute; right: 0px;">
+ <img src="bottom-right.png" style="margin: 0px" alt="" />
+ </div>
+
+ <div style="position: absolute; left: 0px;">
+ <img src="bottom-left.png" style="margin: 0px" alt="" />
+ </div>
+ </div>
+</body>
+</html>
diff --git a/kdeprint/slave/templates/top-left.png b/kdeprint/slave/templates/top-left.png
new file mode 100644
index 000000000..d7551c0d5
--- /dev/null
+++ b/kdeprint/slave/templates/top-left.png
Binary files differ
diff --git a/kdeprint/slave/templates/top-middle.png b/kdeprint/slave/templates/top-middle.png
new file mode 100644
index 000000000..bb3fe7428
--- /dev/null
+++ b/kdeprint/slave/templates/top-middle.png
Binary files differ
diff --git a/kdeprint/slave/templates/top-right-kdeprint.png b/kdeprint/slave/templates/top-right-kdeprint.png
new file mode 100644
index 000000000..56717342c
--- /dev/null
+++ b/kdeprint/slave/templates/top-right-kdeprint.png
Binary files differ