summaryrefslogtreecommitdiffstats
path: root/tdeprint/cups/kmwippselect.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tdeprint/cups/kmwippselect.cpp')
-rw-r--r--tdeprint/cups/kmwippselect.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/tdeprint/cups/kmwippselect.cpp b/tdeprint/cups/kmwippselect.cpp
index b5e6c0405..a10a14ba5 100644
--- a/tdeprint/cups/kmwippselect.cpp
+++ b/tdeprint/cups/kmwippselect.cpp
@@ -29,6 +29,8 @@
#include <kdebug.h>
#include <kiconloader.h>
+#include "config.h"
+
KMWIppSelect::KMWIppSelect(TQWidget *parent, const char *name)
: KMWizardPage(parent,name)
{
@@ -83,9 +85,15 @@ void KMWIppSelect::initPrinter(KMPrinter *p)
ipp_attribute_t *attr = req.first();
while (attr)
{
+#ifdef HAVE_CUPS_1_6
+ if (ippGetName(attr) && strcmp(ippGetName(attr),"printer-name") == 0)
+ m_list->insertItem(SmallIcon("tdeprint_printer"),TQString::fromLatin1(ippGetString(attr, 0, NULL)));
+ attr = ippNextAttribute(req.request());
+#else // HAVE_CUPS_1_6
if (attr->name && strcmp(attr->name,"printer-name") == 0)
m_list->insertItem(SmallIcon("tdeprint_printer"),TQString::fromLatin1(attr->values[0].string.text));
attr = attr->next;
+#endif // HAVE_CUPS_1_6
}
m_list->sort();
}