summaryrefslogtreecommitdiffstats
path: root/tdeprint/cups/kmwfax.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tdeprint/cups/kmwfax.cpp')
-rw-r--r--tdeprint/cups/kmwfax.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/tdeprint/cups/kmwfax.cpp b/tdeprint/cups/kmwfax.cpp
index a9a120b6c..51ecbab73 100644
--- a/tdeprint/cups/kmwfax.cpp
+++ b/tdeprint/cups/kmwfax.cpp
@@ -30,6 +30,8 @@
#include <kiconloader.h>
#include <kurl.h>
+#include "config.h"
+
KMWFax::KMWFax(TQWidget *parent, const char *name)
: KMWizardPage(parent,name)
{
@@ -55,11 +57,19 @@ KMWFax::KMWFax(TQWidget *parent, const char *name)
ipp_attribute_t *attr = req.first();
while (attr)
{
+#ifdef HAVE_CUPS_1_6
+ if (ippGetName(attr) && strcmp(ippGetName(attr),"device-uri") == 0 && strncmp(ippGetString(attr, 0, NULL),"fax",3) == 0)
+ {
+ m_list->insertItem(SmallIcon("blockdevice"),TQString::fromLatin1(ippGetString(attr, 0, NULL)));
+ }
+ attr = ippNextAttribute(req.request());
+#else // HAVE_CUPS_1_6
if (attr->name && strcmp(attr->name,"device-uri") == 0 && strncmp(attr->values[0].string.text,"fax",3) == 0)
{
m_list->insertItem(SmallIcon("blockdevice"),TQString::fromLatin1(attr->values[0].string.text));
}
attr = attr->next;
+#endif // HAVE_CUPS_1_6
}
}
}