|
Lines 101-111
Link Here
|
| 101 |
TQString KMCupsManager::driverDirectory() |
101 |
TQString KMCupsManager::driverDirectory() |
| 102 |
{ |
102 |
{ |
| 103 |
TQString d = cupsInstallDir(); |
103 |
TQString d = cupsInstallDir(); |
| 104 |
if (d.isEmpty()) |
104 |
if (d.isEmpty()) { |
|
|
105 |
#ifdef __OpenBSD__ |
| 106 |
d = "/usr/local"; |
| 107 |
#else |
| 105 |
d = "/usr"; |
108 |
d = "/usr"; |
|
|
109 |
#endif |
| 110 |
} |
| 106 |
d.append("/share/cups/model"); |
111 |
d.append("/share/cups/model"); |
| 107 |
// raw foomatic support |
112 |
// raw foomatic support |
|
|
113 |
#ifdef __OpenBSD__ |
| 114 |
d.append(":/usr/local/share/foomatic/db/source"); |
| 115 |
#else |
| 108 |
d.append(":/usr/share/foomatic/db/source"); |
116 |
d.append(":/usr/share/foomatic/db/source"); |
|
|
117 |
#endif |
| 109 |
return d; |
118 |
return d; |
| 110 |
} |
119 |
} |
| 111 |
|
120 |
|
|
Lines 138-144
Link Here
|
| 138 |
req.setOperation(CUPS_ADD_CLASS); |
147 |
req.setOperation(CUPS_ADD_CLASS); |
| 139 |
TQStringList members = p->members(), uris; |
148 |
TQStringList members = p->members(), uris; |
| 140 |
TQString s; |
149 |
TQString s; |
| 141 |
s = TQString::fromLocal8Bit("ipp://%1/printers/").arg(CupsInfos::self()->hostaddr()); |
150 |
s = TQString::fromLocal8Bit("ipp://%1/printers/").arg(CupsInfos::self()->hostaddr()); |
| 142 |
for (TQStringList::ConstIterator it=members.begin(); it!=members.end(); ++it) |
151 |
for (TQStringList::ConstIterator it=members.begin(); it!=members.end(); ++it) |
| 143 |
uris.append(s+(*it)); |
152 |
uris.append(s+(*it)); |
| 144 |
req.addURI(IPP_TAG_PRINTER,"member-uris",uris); |
153 |
req.addURI(IPP_TAG_PRINTER,"member-uris",uris); |
|
Lines 627-633
Link Here
|
| 627 |
{ |
636 |
{ |
| 628 |
TQStringList comps = TQStringList::split('/', drname, false); |
637 |
TQStringList comps = TQStringList::split('/', drname, false); |
| 629 |
TQString tmpFile = locateLocal("tmp", "foomatic_" + kapp->randomString(8)); |
638 |
TQString tmpFile = locateLocal("tmp", "foomatic_" + kapp->randomString(8)); |
|
|
639 |
#ifdef __OpenBSD__ |
| 640 |
TQString PATH = getenv("PATH") + TQString::fromLatin1(":/usr/local/bin:/usr/sbin:/usr/local/sbin:/opt/sbin:/opt/local/sbin"); |
| 641 |
#else |
| 630 |
TQString PATH = getenv("PATH") + TQString::fromLatin1(":/usr/sbin:/usr/local/sbin:/opt/sbin:/opt/local/sbin"); |
642 |
TQString PATH = getenv("PATH") + TQString::fromLatin1(":/usr/sbin:/usr/local/sbin:/opt/sbin:/opt/local/sbin"); |
|
|
643 |
#endif |
| 631 |
TQString exe = TDEStandardDirs::findExe("foomatic-datafile", PATH); |
644 |
TQString exe = TDEStandardDirs::findExe("foomatic-datafile", PATH); |
| 632 |
if (exe.isEmpty()) |
645 |
if (exe.isEmpty()) |
| 633 |
{ |
646 |
{ |
|
Lines 937-946
Link Here
|
| 937 |
!m_currentprinter->isClass(true) && !m_currentprinter->isSpecial()) |
950 |
!m_currentprinter->isClass(true) && !m_currentprinter->isSpecial()) |
| 938 |
{ |
951 |
{ |
| 939 |
TQString path = cupsInstallDir(); |
952 |
TQString path = cupsInstallDir(); |
| 940 |
if (path.isEmpty()) |
953 |
if (path.isEmpty()) { |
|
|
954 |
#ifdef __OpenBSD__ |
| 955 |
path = "/usr/local/share/cups"; |
| 956 |
#else |
| 941 |
path = "/usr/share/cups"; |
957 |
path = "/usr/share/cups"; |
| 942 |
else |
958 |
#endif |
|
|
959 |
} else { |
| 943 |
path += "/share/cups"; |
960 |
path += "/share/cups"; |
|
|
961 |
} |
| 944 |
CupsAddSmb::exportDest(m_currentprinter->printerName(), path); |
962 |
CupsAddSmb::exportDest(m_currentprinter->printerName(), path); |
| 945 |
} |
963 |
} |
| 946 |
} |
964 |
} |