kdelibs-3.5.5 with working kdeprint

git-svn-id: http://svn.sabayonlinux.org/overlay@261 d7aec97c-591d-0410-af39-a8856400b30a
This commit is contained in:
lxnay
2006-11-09 14:27:56 +00:00
parent 4fbb3c1995
commit dde4318955
11 changed files with 1349 additions and 0 deletions
+41
View File
@@ -0,0 +1,41 @@
AUX kdelibs-3.5.5-fix-newer-cups.patch 6226 RMD160 95b603588e56d0134245d80d28bf49124a36a0ca SHA1 871e08769af1b9c7b3b7193382f4b9586b3ad03d SHA256 f5aa011c920bbaf57a0d818c6c39b819d98d79911a1bc4123440815873c3e3f9
MD5 53a56bdfe1ffc3d07188a3ea4fe402d7 files/kdelibs-3.5.5-fix-newer-cups.patch 6226
RMD160 95b603588e56d0134245d80d28bf49124a36a0ca files/kdelibs-3.5.5-fix-newer-cups.patch 6226
SHA256 f5aa011c920bbaf57a0d818c6c39b819d98d79911a1bc4123440815873c3e3f9 files/kdelibs-3.5.5-fix-newer-cups.patch 6226
AUX kdelibs-3.5.5-kate-cstyle-indenter-fix.diff 1544 RMD160 cb5fea95022dd92b448a8bf2b8e7ea49e9f3225d SHA1 5689ec3ca0c562663bc64b4458dcd1eafade8a38 SHA256 b4364d77149ef699b7724c1102a08a0240df5e19c2b0b1202459b8f97cf8268b
MD5 1f60e79966e99e68401ce1b0cf3609d9 files/kdelibs-3.5.5-kate-cstyle-indenter-fix.diff 1544
RMD160 cb5fea95022dd92b448a8bf2b8e7ea49e9f3225d files/kdelibs-3.5.5-kate-cstyle-indenter-fix.diff 1544
SHA256 b4364d77149ef699b7724c1102a08a0240df5e19c2b0b1202459b8f97cf8268b files/kdelibs-3.5.5-kate-cstyle-indenter-fix.diff 1544
AUX kdelibs-3.5.5-kdeprint.patch 8665 RMD160 8753bbcc16d99ca8f822f047bf5461923dcfc46b SHA1 b6e4a8b6d6fb493314d95e7e28b186fec1da580b SHA256 39d7e639da52abd020503becc126dd820245806ec704c4172dd93e676dec17d0
MD5 3df29464263a83f73c252e643e137f18 files/kdelibs-3.5.5-kdeprint.patch 8665
RMD160 8753bbcc16d99ca8f822f047bf5461923dcfc46b files/kdelibs-3.5.5-kdeprint.patch 8665
SHA256 39d7e639da52abd020503becc126dd820245806ec704c4172dd93e676dec17d0 files/kdelibs-3.5.5-kdeprint.patch 8665
AUX kdelibs-3.5.5-khtml.patch 727 RMD160 a0561d99c25b734c5d1d807598640c3805c4cb7b SHA1 388efae927604bb6ae239280117ec0d9d3574f4e SHA256 47f05ea61ccf773c6beb3e902330bfed05fd11f63aae6d38c1145ee6b5057d59
MD5 1cb9f9a47fc317e35ff88154a72de925 files/kdelibs-3.5.5-khtml.patch 727
RMD160 a0561d99c25b734c5d1d807598640c3805c4cb7b files/kdelibs-3.5.5-khtml.patch 727
SHA256 47f05ea61ccf773c6beb3e902330bfed05fd11f63aae6d38c1145ee6b5057d59 files/kdelibs-3.5.5-khtml.patch 727
AUX kdelibs-3.5.5-noarts-2.patch 1686 RMD160 d4585c288a4f0e13f1dd1ace2bb06299fc4866d0 SHA1 eb0ed2976487de6c7397c335368dfc618c547d12 SHA256 5acb44b260619eeedc8ceb07b9cb2bd607b04a9db74c07d7e48cc8ad7fd6483b
MD5 3fca0ccb769512d145e7e1f05e6b3629 files/kdelibs-3.5.5-noarts-2.patch 1686
RMD160 d4585c288a4f0e13f1dd1ace2bb06299fc4866d0 files/kdelibs-3.5.5-noarts-2.patch 1686
SHA256 5acb44b260619eeedc8ceb07b9cb2bd607b04a9db74c07d7e48cc8ad7fd6483b files/kdelibs-3.5.5-noarts-2.patch 1686
AUX kdelibs-3.5.5-noarts.patch 5474 RMD160 cab567315dbe7b18ccbf9718c98ab2d93786f1d7 SHA1 49a68721a27dfbf66a205e0608458bf4b5ddd788 SHA256 baf1ea16eed48f8a64e0ee25408161b130981e93f0fee718bb7cf71513a64420
MD5 30d5ee2beb41b46cb3f46c3211d36c96 files/kdelibs-3.5.5-noarts.patch 5474
RMD160 cab567315dbe7b18ccbf9718c98ab2d93786f1d7 files/kdelibs-3.5.5-noarts.patch 5474
SHA256 baf1ea16eed48f8a64e0ee25408161b130981e93f0fee718bb7cf71513a64420 files/kdelibs-3.5.5-noarts.patch 5474
AUX kdelibs-3.5.5-rounded-selection-box.patch 7464 RMD160 e26ab0defc3a3986e31b0be486305df6141e859c SHA1 a0eda69805547ce387f40dd1950f9e4168075cab SHA256 767bd77b2ec403f996d8d8e8f67b1730de05ac3abb75106fbf66f20badf64c70
MD5 cc897a2acb347f7f8dc2d3a6702e348e files/kdelibs-3.5.5-rounded-selection-box.patch 7464
RMD160 e26ab0defc3a3986e31b0be486305df6141e859c files/kdelibs-3.5.5-rounded-selection-box.patch 7464
SHA256 767bd77b2ec403f996d8d8e8f67b1730de05ac3abb75106fbf66f20badf64c70 files/kdelibs-3.5.5-rounded-selection-box.patch 7464
AUX kdelibs-3.5.5-rubberband.patch 2522 RMD160 42160db85a4c64ca3630efe659c07c4ab3389ee3 SHA1 6ef04d0eec32297596c0cd5215d0226606b3326a SHA256 2314da931a56835133e782755867dcf7c77989415ee0c1fd8509c57405048e29
MD5 1e330a83cfaf239e77611711597fa839 files/kdelibs-3.5.5-rubberband.patch 2522
RMD160 42160db85a4c64ca3630efe659c07c4ab3389ee3 files/kdelibs-3.5.5-rubberband.patch 2522
SHA256 2314da931a56835133e782755867dcf7c77989415ee0c1fd8509c57405048e29 files/kdelibs-3.5.5-rubberband.patch 2522
DIST kdelibs-3.5-patchset-05.tar.bz2 36423 RMD160 684bb235f3b5b3cb900632e11aa912670f641b96 SHA1 138232cf05ab131a51f3b3febfdd8a3cbc42d45f SHA256 f237ccd3a35c629740355fbcf69b0d706690acac832a4d35db5c0d3a30235e0a
DIST kdelibs-3.5.5.tar.bz2 15486690 RMD160 8e389869f9a53445754c76a0f7535ef2fffc6d03 SHA1 7961818e41e22cce7c58219c4eb63ed5fbb94307 SHA256 e487cdd56aa14eec3e100501a5e14658c6329fac30ea0ce812c860e3564c31e3
EBUILD kdelibs-3.5.5-r5.ebuild 5690 RMD160 893ba227c367aa60b39e8fa45dc26e61f105c3aa SHA1 4e84744ff03044a09270058bbe4d61d6068a9c73 SHA256 4bf0a2ad7bda662cffda94f106294b0be5d97d431c84f6466361695fc0f42540
MD5 5db5022bdbe2b275f8f3b55921e44f1c kdelibs-3.5.5-r5.ebuild 5690
RMD160 893ba227c367aa60b39e8fa45dc26e61f105c3aa kdelibs-3.5.5-r5.ebuild 5690
SHA256 4bf0a2ad7bda662cffda94f106294b0be5d97d431c84f6466361695fc0f42540 kdelibs-3.5.5-r5.ebuild 5690
MD5 4e084c981a53be48eb4df82f46649e60 files/digest-kdelibs-3.5.5-r5 521
RMD160 b35a8ed3374893328cf91746946b98d833051692 files/digest-kdelibs-3.5.5-r5 521
SHA256 8c59629509a40001ff71b42db7096bb8c7a4f78bb8e43b60baf2e205cd843c81 files/digest-kdelibs-3.5.5-r5 521
@@ -0,0 +1,6 @@
MD5 6f8254317dd43af7aea2a347656f552a kdelibs-3.5-patchset-05.tar.bz2 36423
RMD160 684bb235f3b5b3cb900632e11aa912670f641b96 kdelibs-3.5-patchset-05.tar.bz2 36423
SHA256 f237ccd3a35c629740355fbcf69b0d706690acac832a4d35db5c0d3a30235e0a kdelibs-3.5-patchset-05.tar.bz2 36423
MD5 2cba792e3b0a766431b837c8ef924117 kdelibs-3.5.5.tar.bz2 15486690
RMD160 8e389869f9a53445754c76a0f7535ef2fffc6d03 kdelibs-3.5.5.tar.bz2 15486690
SHA256 e487cdd56aa14eec3e100501a5e14658c6329fac30ea0ce812c860e3564c31e3 kdelibs-3.5.5.tar.bz2 15486690
@@ -0,0 +1,185 @@
--- kdelibs-3.5.5.orig/kdeprint/cups/kmcupsmanager.h
+++ kdelibs-3.5.5/kdeprint/cups/kmcupsmanager.h
@@ -25,10 +25,7 @@
class IppRequest;
class KLibrary;
class KExtendedSocket;
-
-namespace KNetwork {
- class KStreamSocket;
-}
+class QSocket;
class KMCupsManager : public KMManager
{
@@ -98,7 +95,7 @@
private:
KLibrary *m_cupsdconf;
KMPrinter *m_currentprinter;
- KNetwork::KStreamSocket *m_socket;
+ QSocket *m_socket;
bool m_hostSuccess;
bool m_lookupDone;
};
--- kdelibs-3.5.5.orig/kdeprint/cups/kmcupsuimanager.cpp
+++ kdelibs-3.5.5/kdeprint/cups/kmcupsuimanager.cpp
@@ -135,7 +135,7 @@
QString uri;
req.setOperation(CUPS_GET_DEVICES);
- uri = QString::fromLocal8Bit("ipp://%1/printers/").arg(CupsInfos::self()->hostaddr());
+ uri = QString::fromLocal8Bit("ipp://%1:%2/printers/").arg(CupsInfos::self()->host()).arg(CupsInfos::self()->port());
req.addURI(IPP_TAG_OPERATION,"printer-uri",uri);
if (req.doRequest("/"))
--- kdelibs-3.5.5.orig/kdeprint/cups/kmcupsmanager.cpp
+++ kdelibs-3.5.5/kdeprint/cups/kmcupsmanager.cpp
@@ -45,14 +45,12 @@
#include <klocale.h>
#include <kconfig.h>
#include <kstandarddirs.h>
-#include <ksocketbase.h>
#include <klibloader.h>
#include <kmessagebox.h>
#include <kaction.h>
#include <kdialogbase.h>
#include <kextendedsocket.h>
#include <kprocess.h>
-#include <kbufferedsocket.h>
#include <kfilterdev.h>
#include <cups/cups.h>
#include <cups/ppd.h>
@@ -90,7 +88,7 @@
KMCupsManager::~KMCupsManager()
{
- delete m_socket;
+ //delete m_socket;
}
QString KMCupsManager::driverDbCreationProgram()
@@ -137,8 +135,7 @@
{
req.setOperation(CUPS_ADD_CLASS);
QStringList members = p->members(), uris;
- QString s;
- s = QString::fromLocal8Bit("ipp://%1/printers/").arg(CupsInfos::self()->hostaddr());
+ QString s = QString::fromLocal8Bit("ipp://%1:%2/printers/").arg(CupsInfos::self()->host()).arg(CupsInfos::self()->port());
for (QStringList::ConstIterator it=members.begin(); it!=members.end(); ++it)
uris.append(s+(*it));
req.addURI(IPP_TAG_PRINTER,"member-uris",uris);
@@ -910,23 +907,25 @@
QString KMCupsManager::stateInformation()
{
- return QString("%1: %2")
+ return QString("%1: %2:%3")
.arg(i18n("Server"))
- .arg(CupsInfos::self()->hostaddr());
+ .arg(CupsInfos::self()->host())
+ .arg(CupsInfos::self()->port());
}
void KMCupsManager::checkUpdatePossibleInternal()
{
kdDebug(500) << "Checking for update possible" << endl;
delete m_socket;
- m_socket = new KNetwork::KBufferedSocket;
- m_socket->setTimeout( 1 );
- connect( m_socket, SIGNAL( connected(const KResolverEntry&) ),
- SLOT( slotConnectionSuccess() ) );
- connect( m_socket, SIGNAL( gotError( int ) ), SLOT( slotConnectionFailed( int ) ) );
-
- trials = 5;
- QTimer::singleShot( 1, this, SLOT( slotAsyncConnect() ) );
+ /*m_socket = new KExtendedSocket( CupsInfos::self()->host(), CupsInfos::self()->port() );
+ connect( m_socket, SIGNAL( connectionSuccess() ), SLOT( slotConnectionSuccess() ) );
+ connect( m_socket, SIGNAL( connectionFailed( int ) ), SLOT( slotConnectionFailed( int ) ) );
+ m_socket->setTimeout( 1 );*/
+ m_socket = new QSocket( this );
+ connect( m_socket, SIGNAL( connected() ), SLOT( slotConnectionSuccess() ) );
+ connect( m_socket, SIGNAL( error( int ) ), SLOT( slotConnectionFailed( int ) ) );
+ trials = 5;
+ QTimer::singleShot( 1, this, SLOT( slotAsyncConnect() ) );
}
void KMCupsManager::slotConnectionSuccess()
@@ -960,10 +959,7 @@
{
kdDebug(500) << "Starting async connect" << endl;
//m_socket->startAsyncConnect();
- if (CupsInfos::self()->host().startsWith("/"))
- m_socket->connect( QString(), CupsInfos::self()->host());
- else
- m_socket->connectToHost( CupsInfos::self()->host(), CupsInfos::self()->port() );
+ m_socket->connectToHost( CupsInfos::self()->host(), CupsInfos::self()->port() );
}
void KMCupsManager::slotConnectionFailed( int errcode )
@@ -979,25 +975,9 @@
return;
}
- QString einfo;
-
- switch (errcode) {
- case KNetwork::KSocketBase::ConnectionRefused:
- case KNetwork::KSocketBase::ConnectionTimedOut:
- einfo = i18n("connection refused") + QString(" (%1)").arg(errcode);
- break;
- case KNetwork::KSocketBase::LookupFailure:
- einfo = i18n("host not found") + QString(" (%1)").arg(errcode);
- break;
- case KNetwork::KSocketBase::WouldBlock:
- default:
- einfo = i18n("read failed (%1)").arg(errcode);
- break;
- }
-
- setErrorMsg( i18n( "Connection to CUPS server failed. Check that the CUPS server is correctly installed and running. "
- "Error: %2: %1." ).arg( einfo, CupsInfos::self()->host()));
- setUpdatePossible( false );
+ setErrorMsg( i18n( "Connection to CUPS server failed. Check that the CUPS server is correctly installed and running. "
+ "Error: %1." ).arg( errcode == QSocket::ErrConnectionRefused ? i18n( "connection refused" ) : i18n( "host not found" ) ) );
+ setUpdatePossible( false );
}
void KMCupsManager::hostPingSlot() {
@@ -1034,7 +1014,7 @@
if (use && !p->uri().isEmpty())
uri = p->uri().prettyURL();
else
- uri = QString("ipp://%1/%3/%2").arg(CupsInfos::self()->hostaddr()).arg(p->printerName()).arg((p->isClass(false) ? "classes" : "printers"));
+ uri = QString("ipp://%1:%2/%4/%3").arg(CupsInfos::self()->host()).arg(CupsInfos::self()->port()).arg(p->printerName()).arg((p->isClass(false) ? "classes" : "printers"));
return uri;
}
--- kdelibs-3.5.5.orig/kdeprint/cups/cupsdoprint.c
+++ kdelibs-3.5.5/kdeprint/cups/cupsdoprint.c
@@ -41,7 +41,7 @@
#endif
/* utility functions */
-static void error(const char* msg)
+void error(const char* msg)
{
fprintf(stderr, "%s\n", msg);
#if USE_LOG
@@ -50,7 +50,7 @@
exit(-1);
}
-static void usage()
+void usage()
{
error("usage: cupsdoprint [-H host[:port]][-P dest][-J name][-o opt=value[,...]][-U login[:password]] files...");
}
@@ -81,7 +81,7 @@
return result;
}
-static const char* getPasswordCB(const char* prompt)
+const char* getPasswordCB(const char* prompt)
{
char buf[ 256 ] = {0}, *c;
char *_user = shell_quote( cupsUser() ), *_passwd = NULL;
@@ -0,0 +1,45 @@
diff -U 4 -H -b -w -B -E -d -i -r kdelibs-3.5.5-orig/kate/part/kateautoindent.cpp kdelibs-3.5.5/kate/part/kateautoindent.cpp
--- kdelibs-3.5.5-orig/kate/part/kateautoindent.cpp 2006-10-11 11:44:37.000000000 +0200
+++ kdelibs-3.5.5/kate/part/kateautoindent.cpp 2006-10-11 11:47:38.000000000 +0200
@@ -713,8 +713,9 @@
int anchorPos = 0;
int parenCount = 0; // Possibly in a multiline for stmt. Used to skip ';' ...
bool found = false;
bool isSpecial = false;
+ bool potentialAnchorSeen = false;
//kdDebug(13030) << "calcIndent begin line:" << begin.line() << " col:" << begin.col() << endl;
// Find Indent Anchor Point
@@ -732,18 +733,18 @@
if (textLine->attribute(pos) == symbolAttrib)
{
QChar tc = textLine->getChar (pos);
if ((tc == ';' || tc == ':' || tc == ',') && otherAnchor == -1 && parenCount <= 0)
- otherAnchor = pos;
+ otherAnchor = pos, potentialAnchorSeen = true;
else if (tc == ')')
parenCount++;
else if (tc == '(')
parenCount--;
else if (tc == '}')
openCount--;
else if (tc == '{')
{
- openCount++;
+ openCount++, potentialAnchorSeen = true;
if (openCount == 1)
break;
}
}
@@ -825,9 +826,9 @@
}
}
// treat beginning of document as anchor position
- if (cur.line() == 0 && cur.col() == 0)
+ if (cur.line() == 0 && cur.col() == 0 && potentialAnchorSeen)
found = true;
if (!found)
return 0;
@@ -0,0 +1,269 @@
--- kdelibs-3.5.5.orig/kdeprint/cups/kmcupsmanager.h
+++ kdelibs-3.5.5/kdeprint/cups/kmcupsmanager.h
@@ -25,10 +25,7 @@
class IppRequest;
class KLibrary;
class KExtendedSocket;
-
-namespace KNetwork {
- class KStreamSocket;
-}
+class QSocket;
class KMCupsManager : public KMManager
{
@@ -98,7 +95,7 @@
private:
KLibrary *m_cupsdconf;
KMPrinter *m_currentprinter;
- KNetwork::KStreamSocket *m_socket;
+ QSocket *m_socket;
bool m_hostSuccess;
bool m_lookupDone;
};
--- kdelibs-3.5.5.orig/kdeprint/cups/kmcupsuimanager.cpp
+++ kdelibs-3.5.5/kdeprint/cups/kmcupsuimanager.cpp
@@ -135,7 +135,7 @@
QString uri;
req.setOperation(CUPS_GET_DEVICES);
- uri = QString::fromLocal8Bit("ipp://%1/printers/").arg(CupsInfos::self()->hostaddr());
+ uri = QString::fromLocal8Bit("ipp://%1:%2/printers/").arg(CupsInfos::self()->host()).arg(CupsInfos::self()->port());
req.addURI(IPP_TAG_OPERATION,"printer-uri",uri);
if (req.doRequest("/"))
--- kdelibs-3.5.5.orig/kdeprint/cups/kmcupsmanager.cpp
+++ kdelibs-3.5.5/kdeprint/cups/kmcupsmanager.cpp
@@ -45,14 +45,12 @@
#include <klocale.h>
#include <kconfig.h>
#include <kstandarddirs.h>
-#include <ksocketbase.h>
#include <klibloader.h>
#include <kmessagebox.h>
#include <kaction.h>
#include <kdialogbase.h>
#include <kextendedsocket.h>
#include <kprocess.h>
-#include <kbufferedsocket.h>
#include <kfilterdev.h>
#include <cups/cups.h>
#include <cups/ppd.h>
@@ -90,7 +88,7 @@
KMCupsManager::~KMCupsManager()
{
- delete m_socket;
+ //delete m_socket;
}
QString KMCupsManager::driverDbCreationProgram()
@@ -137,8 +135,7 @@
{
req.setOperation(CUPS_ADD_CLASS);
QStringList members = p->members(), uris;
- QString s;
- s = QString::fromLocal8Bit("ipp://%1/printers/").arg(CupsInfos::self()->hostaddr());
+ QString s = QString::fromLocal8Bit("ipp://%1:%2/printers/").arg(CupsInfos::self()->host()).arg(CupsInfos::self()->port());
for (QStringList::ConstIterator it=members.begin(); it!=members.end(); ++it)
uris.append(s+(*it));
req.addURI(IPP_TAG_PRINTER,"member-uris",uris);
@@ -910,23 +907,25 @@
QString KMCupsManager::stateInformation()
{
- return QString("%1: %2")
+ return QString("%1: %2:%3")
.arg(i18n("Server"))
- .arg(CupsInfos::self()->hostaddr());
+ .arg(CupsInfos::self()->host())
+ .arg(CupsInfos::self()->port());
}
void KMCupsManager::checkUpdatePossibleInternal()
{
kdDebug(500) << "Checking for update possible" << endl;
delete m_socket;
- m_socket = new KNetwork::KBufferedSocket;
- m_socket->setTimeout( 1 );
- connect( m_socket, SIGNAL( connected(const KResolverEntry&) ),
- SLOT( slotConnectionSuccess() ) );
- connect( m_socket, SIGNAL( gotError( int ) ), SLOT( slotConnectionFailed( int ) ) );
-
- trials = 5;
- QTimer::singleShot( 1, this, SLOT( slotAsyncConnect() ) );
+ /*m_socket = new KExtendedSocket( CupsInfos::self()->host(), CupsInfos::self()->port() );
+ connect( m_socket, SIGNAL( connectionSuccess() ), SLOT( slotConnectionSuccess() ) );
+ connect( m_socket, SIGNAL( connectionFailed( int ) ), SLOT( slotConnectionFailed( int ) ) );
+ m_socket->setTimeout( 1 );*/
+ m_socket = new QSocket( this );
+ connect( m_socket, SIGNAL( connected() ), SLOT( slotConnectionSuccess() ) );
+ connect( m_socket, SIGNAL( error( int ) ), SLOT( slotConnectionFailed( int ) ) );
+ trials = 5;
+ QTimer::singleShot( 1, this, SLOT( slotAsyncConnect() ) );
}
void KMCupsManager::slotConnectionSuccess()
@@ -960,10 +959,7 @@
{
kdDebug(500) << "Starting async connect" << endl;
//m_socket->startAsyncConnect();
- if (CupsInfos::self()->host().startsWith("/"))
- m_socket->connect( QString(), CupsInfos::self()->host());
- else
- m_socket->connectToHost( CupsInfos::self()->host(), CupsInfos::self()->port() );
+ m_socket->connectToHost( CupsInfos::self()->host(), CupsInfos::self()->port() );
}
void KMCupsManager::slotConnectionFailed( int errcode )
@@ -979,25 +975,9 @@
return;
}
- QString einfo;
-
- switch (errcode) {
- case KNetwork::KSocketBase::ConnectionRefused:
- case KNetwork::KSocketBase::ConnectionTimedOut:
- einfo = i18n("connection refused") + QString(" (%1)").arg(errcode);
- break;
- case KNetwork::KSocketBase::LookupFailure:
- einfo = i18n("host not found") + QString(" (%1)").arg(errcode);
- break;
- case KNetwork::KSocketBase::WouldBlock:
- default:
- einfo = i18n("read failed (%1)").arg(errcode);
- break;
- }
-
- setErrorMsg( i18n( "Connection to CUPS server failed. Check that the CUPS server is correctly installed and running. "
- "Error: %2: %1." ).arg( einfo, CupsInfos::self()->host()));
- setUpdatePossible( false );
+ setErrorMsg( i18n( "Connection to CUPS server failed. Check that the CUPS server is correctly installed and running. "
+ "Error: %1." ).arg( errcode == QSocket::ErrConnectionRefused ? i18n( "connection refused" ) : i18n( "host not found" ) ) );
+ setUpdatePossible( false );
}
void KMCupsManager::hostPingSlot() {
@@ -1034,7 +1014,7 @@
if (use && !p->uri().isEmpty())
uri = p->uri().prettyURL();
else
- uri = QString("ipp://%1/%3/%2").arg(CupsInfos::self()->hostaddr()).arg(p->printerName()).arg((p->isClass(false) ? "classes" : "printers"));
+ uri = QString("ipp://%1:%2/%4/%3").arg(CupsInfos::self()->host()).arg(CupsInfos::self()->port()).arg(p->printerName()).arg((p->isClass(false) ? "classes" : "printers"));
return uri;
}
--- kdelibs-3.5.5.orig/kdeprint/cups/cupsdoprint.c
+++ kdelibs-3.5.5/kdeprint/cups/cupsdoprint.c
@@ -41,7 +41,7 @@
#endif
/* utility functions */
-static void error(const char* msg)
+void error(const char* msg)
{
fprintf(stderr, "%s\n", msg);
#if USE_LOG
@@ -50,7 +50,7 @@
exit(-1);
}
-static void usage()
+void usage()
{
error("usage: cupsdoprint [-H host[:port]][-P dest][-J name][-o opt=value[,...]][-U login[:password]] files...");
}
@@ -81,7 +81,7 @@
return result;
}
-static const char* getPasswordCB(const char* prompt)
+const char* getPasswordCB(const char* prompt)
{
char buf[ 256 ] = {0}, *c;
char *_user = shell_quote( cupsUser() ), *_passwd = NULL;
--- kdelibs-3.5.5.orig/kdeprint/cups/cupsdconf2/cups-util.c
+++ kdelibs-3.5.5/kdeprint/cups/cupsdconf2/cups-util.c
@@ -14,7 +14,7 @@
static int cups_local_auth(http_t *http);
const char * /* O - Filename for PPD file */
-cupsGetConf(void)
+cupsGetConf()
{
int fd; /* PPD file */
int bytes; /* Number of bytes read */
@@ -142,11 +142,7 @@
*/
snprintf(plain, sizeof(plain), "%s:%s", cupsUser(), pwdstring);
-#if CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR >= 2
- httpEncode64_2(encode, sizeof(encode), plain, sizeof(plain));
-#else
- httpEncode64(encode, plain);
-#endif
+ httpEncode64(encode, plain);
snprintf(authstring, sizeof(authstring), "Basic %s", encode);
}
else
@@ -368,11 +364,7 @@
*/
snprintf(plain, sizeof(plain), "%s:%s", cupsUser(), pwdstring);
-#if CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR >= 2
- httpEncode64_2(encode, sizeof(encode), plain, sizeof(plain));
-#else
- httpEncode64(encode, plain);
-#endif
+ httpEncode64(encode, plain);
snprintf(authstring, sizeof(authstring), "Basic %s", encode);
}
else
@@ -451,7 +443,8 @@
the struct has changed in newer versions - PiggZ (adam@piggz.co.uk)
*/
#if CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR >= 2
- if (!httpAddrLocalhost(http))
+ if (ntohl(*(int*)&http->_hostaddr.sin_addr) != 0x7f000001 &&
+ strcasecmp(http->hostname, "localhost") != 0)
#else
if (ntohl(*(int*)&http->hostaddr.sin_addr) != 0x7f000001 &&
strcasecmp(http->hostname, "localhost") != 0)
--- kdelibs-3.5.5.orig/kdeprint/cups/cupsdconf2/cups-util.h
+++ kdelibs-3.5.5/kdeprint/cups/cupsdconf2/cups-util.h
@@ -20,7 +20,7 @@
#ifndef CUPS_UTIL_H
#define CUPS_UTIL_H
-const char* cupsGetConf(void);
+const char* cupsGetConf();
int cupsPutConf(const char *filename);
#endif
--- kdelibs-3.5.5.orig/kdeprint/cups/cupsinfos.h
+++ kdelibs-3.5.5/kdeprint/cups/cupsinfos.h
@@ -32,7 +32,6 @@
~CupsInfos();
const QString& host() const;
- QString hostaddr() const;
int port() const;
const QString& login() const;
const QString& password() const;
--- kdelibs-3.5.5.orig/kdeprint/cups/cupsinfos.cpp
+++ kdelibs-3.5.5/kdeprint/cups/cupsinfos.cpp
@@ -69,13 +69,6 @@
{
}
-QString CupsInfos::hostaddr() const
-{
- if (host_[0] != '/')
- return host_ + ":" + QString::number(port_);
- return host_;
-}
-
void CupsInfos::setHost(const QString& s)
{
host_ = s;
@@ -0,0 +1,13 @@
Index: khtml/rendering/render_block.cpp
===================================================================
--- khtml/rendering/render_block.cpp (revision 595831)
+++ khtml/rendering/render_block.cpp (revision 595832)
@@ -711,7 +711,7 @@
int toAdd = borderBottom() + paddingBottom();
if (m_layer && style()->scrollsOverflow() && style()->height().isVariable())
toAdd += m_layer->horizontalScrollbarHeight();
- if ( hasOverhangingFloats() && !style()->scrollsOverflow() && (isFloatingOrPositioned() || flowAroundFloats()) )
+ if ( hasOverhangingFloats() && (isFloatingOrPositioned() || flowAroundFloats()) )
m_overflowHeight = m_height = floatBottom() + toAdd;
int oldHeight = m_height;
@@ -0,0 +1,53 @@
Index: kdelibs-3.5.5/arts/configure.in.in
===================================================================
--- kdelibs-3.5.5.orig/arts/configure.in.in
+++ kdelibs-3.5.5/arts/configure.in.in
@@ -22,7 +22,6 @@ AC_MSG_CHECKING(for aRts-$ARTS_WANT_VERS
ARTS_OK=no
if test "$build_arts" != "yes"; then
- DO_NOT_COMPILE="$DO_NOT_COMPILE arts"
AC_MSG_RESULT(disabled)
else
Index: kdelibs-3.5.5/arts/knotify/Makefile.am
===================================================================
--- kdelibs-3.5.5.orig/arts/knotify/Makefile.am
+++ kdelibs-3.5.5/arts/knotify/Makefile.am
@@ -6,7 +6,9 @@ INCLUDES= -I$(top_srcdir)/arts/kde -I$(i
kde_module_LTLIBRARIES = knotify.la
knotify_la_SOURCES = knotify.cpp knotify.skel
+if include_ARTS
knotify_la_LIBADD = -lsoundserver_idl -lqtmcop $(LIB_KDEUI) $(top_builddir)/arts/kde/libartskde.la
+endif
knotify_la_LDFLAGS = $(all_libraries) -module -avoid-version
knotify_la_METASOURCES = AUTO
Index: kdelibs-3.5.5/arts/Makefile.am
===================================================================
--- kdelibs-3.5.5.orig/arts/Makefile.am
+++ kdelibs-3.5.5/arts/Makefile.am
@@ -1,4 +1,8 @@
+if include_ARTS
SUBDIRS = kde knotify message
+else
+SUBDIRS = knotify
+endif
DOXYGEN_REFERENCES = kio kdecore kdeui
include ../admin/Doxyfile.am
Index: kdelibs-3.5.5/arts/knotify/knotify.h
===================================================================
--- kdelibs-3.5.5.orig/arts/knotify/knotify.h
+++ kdelibs-3.5.5/arts/knotify/knotify.h
@@ -23,9 +23,6 @@
#include <qobject.h>
#include <knotifyclient.h>
#include <dcopobject.h>
-#ifndef WITHOUT_ARTS
-#include <soundserver.h>
-#endif
class KNotifyPrivate;
class KProcess;
@@ -0,0 +1,227 @@
Index: arts/knotify/knotify.cpp
===================================================================
--- arts/knotify/knotify.cpp (revision 596923)
+++ arts/knotify/knotify.cpp (revision 596924)
@@ -26,24 +26,29 @@
#include <sys/types.h>
#include <sys/stat.h>
+#include <config.h>
+#ifndef WITHOUT_ARTS
// aRts headers
#include <connect.h>
#include <dispatcher.h>
#include <flowsystem.h>
+#include <qiomanager.h>
#include <soundserver.h>
+#endif
// QT headers
#include <qfile.h>
#include <qfileinfo.h>
-#include <qiomanager.h>
#include <qstringlist.h>
#include <qtextstream.h>
// KDE headers
#include <dcopclient.h>
#include <kaboutdata.h>
+#ifndef WITHOUT_ARTS
#include <kartsdispatcher.h>
#include <kartsserver.h>
+#endif
#include <kcmdlineargs.h>
#include <kconfig.h>
#include <kdebug.h>
@@ -53,8 +58,10 @@
#include <kpassivepopup.h>
#include <kiconloader.h>
#include <kmacroexpander.h>
+#ifndef WITHOUT_ARTS
#include <kplayobjectfactory.h>
#include <kaudiomanagerplay.h>
+#endif
#include <kprocess.h>
#include <kstandarddirs.h>
#include <kuniqueapplication.h>
@@ -73,22 +80,26 @@
QString externalPlayer;
KProcess *externalPlayerProc;
+#ifndef WITHOUT_ARTS
QPtrList<KDE::PlayObject> playObjects;
QMap<KDE::PlayObject*,int> playObjectEventMap;
+ KAudioManagerPlay *audioManager;
+#endif
int externalPlayerEventId;
bool useExternal;
bool useArts;
int volume;
QTimer *playTimer;
- KAudioManagerPlay *audioManager;
bool inStartup;
QString startupEvents;
};
// Yes, it's ugly to put this here, but this facilitates the cautious startup
// procedure.
+#ifndef WITHOUT_ARTS
KArtsServer *soundServer = 0;
+#endif
extern "C"{
@@ -124,6 +135,7 @@
// We try to prevent this by tracking our startup and offer options to
// abort this.
+#ifndef WITHOUT_ARTS
KConfigGroup config( KGlobal::config(), "StartProgress" );
KConfig artsKCMConfig( "kcmartsrc" );
artsKCMConfig.setGroup( "Arts" );
@@ -208,14 +220,23 @@
config.writeEntry( "KNotify Init", true );
config.sync();
+#else
+
+ // start notify service, without aRts
+ KNotify *notify = new KNotify( false );
+
+#endif
+
app.dcopClient()->setDefaultObject( "Notify" );
app.dcopClient()->setDaemonMode( true );
// kdDebug() << "knotify starting" << endl;
int ret = app.exec();
delete notify;
+#ifndef WITHOUT_ARTS
delete soundServer;
delete dispatcher;
+#endif
return ret;
}
}// end extern "C"
@@ -228,14 +249,16 @@
d->globalConfig = new KConfig("knotify.eventsrc", true, false);
d->externalPlayerProc = 0;
d->useArts = useArts;
+ d->inStartup = true;
+#ifndef WITHOUT_ARTS
d->playObjects.setAutoDelete(true);
d->audioManager = 0;
- d->inStartup = true;
if( useArts )
{
connect( soundServer, SIGNAL( restartedServer() ), this, SLOT( restartedArtsd() ) );
restartedArtsd(); //started allready need to initialize d->audioManager
}
+#endif
d->volume = 100;
@@ -248,12 +271,14 @@
{
reconfigure();
+#ifndef WITHOUT_ARTS
d->playObjects.clear();
delete d->globalEvents;
delete d->globalConfig;
delete d->externalPlayerProc;
delete d->audioManager;
+#endif
delete d;
}
@@ -449,6 +474,7 @@
return false;
}
+#ifndef WITHOUT_ARTS
// play sound finally
while( d->playObjects.count()>5 )
abortFirstPlayObject();
@@ -506,7 +532,7 @@
}
if ( !d->playTimer->isActive() )
d->playTimer->start( 1000 );
-
+#endif
return true;
} else if(!d->externalPlayer.isEmpty()) {
@@ -661,6 +687,7 @@
void KNotify::playTimeout()
{
+#ifndef WITHOUT_ARTS
for ( QPtrListIterator< KDE::PlayObject > it(d->playObjects); *it;)
{
QPtrListIterator< KDE::PlayObject > current = it;
@@ -678,16 +705,18 @@
}
if ( !d->playObjects.count() )
d->playTimer->stop();
+#endif
}
bool KNotify::isPlaying( const QString& soundFile ) const
{
+#ifndef WITHOUT_ARTS
for ( QPtrListIterator< KDE::PlayObject > it(d->playObjects); *it; ++it)
{
if ( (*it)->mediaName() == soundFile )
return true;
}
-
+#endif
return false;
}
@@ -699,6 +728,7 @@
void KNotify::abortFirstPlayObject()
{
+#ifndef WITHOUT_ARTS
QMap<KDE::PlayObject*,int>::Iterator it = d->playObjectEventMap.find( d->playObjects.getFirst() );
if ( it != d->playObjectEventMap.end() )
{
@@ -706,6 +736,7 @@
d->playObjectEventMap.remove( it );
}
d->playObjects.removeFirst();
+#endif
}
void KNotify::soundFinished( int eventId, PlayingFinishedStatus reason )
@@ -750,10 +781,12 @@
void KNotify::restartedArtsd()
{
+#ifndef WITHOUT_ARTS
delete d->audioManager;
d->audioManager = new KAudioManagerPlay( soundServer );
d->audioManager->setTitle( i18n( "KDE System Notifications" ) );
d->audioManager->setAutoRestoreID( "KNotify Aman Play" );
+#endif
}
void KNotify::sessionReady()
Index: arts/knotify/knotify.h
===================================================================
--- arts/knotify/knotify.h (revision 596923)
+++ arts/knotify/knotify.h (revision 596924)
@@ -23,7 +23,9 @@
#include <qobject.h>
#include <knotifyclient.h>
#include <dcopobject.h>
+#ifndef WITHOUT_ARTS
#include <soundserver.h>
+#endif
class KNotifyPrivate;
class KProcess;
@@ -0,0 +1,245 @@
diff -purN kdelibs-3.5.3.orig/kdeui/kiconview.cpp kdelibs-3.5.3.pertty/kdeui/kiconview.cpp
--- kdelibs-3.5.3.orig/kdeui/kiconview.cpp 2005-10-10 10:06:38.000000000 -0500
+++ kdelibs-3.5.3.pertty/kdeui/kiconview.cpp 2006-06-03 13:40:40.000000000 -0500
@@ -548,7 +548,7 @@ void KIconViewItem::calcRect( const QStr
r = m_wordWrap->boundingRect();
int realWidth = QMAX( QMIN( r.width() + 4, tw ), fm->width( "X" ) );
- itemTextRect.setWidth( realWidth );
+ itemTextRect.setWidth( realWidth + 4 );
itemTextRect.setHeight( r.height() );
int w = 0; int h = 0; int y = 0;
@@ -699,11 +699,13 @@ void KIconViewItem::paintPixmap( QPainte
void KIconViewItem::paintText( QPainter *p, const QColorGroup &cg )
{
- int textX = textRect( false ).x() + 2;
+ int textX = textRect( false ).x() + 4;
int textY = textRect( false ).y();
if ( isSelected() ) {
- p->fillRect( textRect( false ), cg.highlight() );
+ p->setBrush(QBrush(cg.highlight()));
+ p->setPen(QPen(cg.highlight()));
+ p->drawRoundRect( textRect( false ) ,1000/textRect(false).width(),1000/textRect(false).height() );
p->setPen( QPen( cg.highlightedText() ) );
} else {
if ( iconView()->itemTextBackground() != NoBrush )
diff -purN kdelibs-3.5.3.orig/kdeui/kjanuswidget.cpp kdelibs-3.5.3.pertty/kdeui/kjanuswidget.cpp
--- kdelibs-3.5.3.orig/kdeui/kjanuswidget.cpp 2005-11-08 16:38:47.000000000 -0600
+++ kdelibs-3.5.3.pertty/kdeui/kjanuswidget.cpp 2006-06-03 13:40:40.000000000 -0500
@@ -53,12 +53,14 @@ class KJanusWidget::IconListItem : publi
virtual int height( const QListBox *lb ) const;
virtual int width( const QListBox *lb ) const;
int expandMinimumWidth( int width );
+ void highlight( bool erase );
protected:
const QPixmap &defaultPixmap();
void paint( QPainter *painter );
private:
+ void paintContents( QPainter *painter );
QPixmap mPixmap;
int mMinimumWidth;
};
@@ -141,6 +143,8 @@ KJanusWidget::KJanusWidget( QWidget *par
mIconList->verticalScrollBar()->installEventFilter( this );
connect( mIconList, SIGNAL(selectionChanged()), SLOT(slotShowPage()));
+ connect( mIconList, SIGNAL(onItem(QListBoxItem *)), SLOT(slotOnItem(QListBoxItem *)));
+
hbox->addSpacing( KDialog::marginHint() );
page = new QFrame( this );
hbox->addWidget( page, 10 );
@@ -721,6 +725,12 @@ void KJanusWidget::slotItemClicked(QList
it->setOpen(!it->isOpen());
}
+// hack because qt does not support Q_OBJECT in nested classes
+void KJanusWidget::slotOnItem(QListBoxItem *qitem)
+{
+ mIconList->slotOnItem( qitem );
+}
+
void KJanusWidget::setFocus()
{
if( !mValid ) { return; }
@@ -929,11 +939,11 @@ bool KJanusWidget::eventFilter( QObject
KJanusWidget::IconListBox::IconListBox( QWidget *parent, const char *name,
WFlags f )
:KListBox( parent, name, f ), mShowAll(false), mHeightValid(false),
- mWidthValid(false)
+ mWidthValid(false),
+ mOldItem(0)
{
}
-
void KJanusWidget::IconListBox::updateMinimumHeight()
{
if( mShowAll && !mHeightValid )
@@ -995,6 +1005,45 @@ void KJanusWidget::IconListBox::setShowA
}
+void KJanusWidget::IconListBox::leaveEvent( QEvent *ev )
+{
+ KListBox::leaveEvent( ev );
+
+ if ( mOldItem && !mOldItem->isSelected() )
+ {
+ ((KJanusWidget::IconListItem *) mOldItem)->highlight( true );
+ mOldItem = 0;
+ }
+}
+
+// hack because qt does not support Q_OBJECT in nested classes
+void KJanusWidget::IconListBox::slotOnItem(QListBoxItem *qitem)
+{
+ KListBox::slotOnItem( qitem );
+
+ if ( qitem == mOldItem )
+ {
+ return;
+ }
+
+ if ( mOldItem && !mOldItem->isSelected() )
+ {
+ ((KJanusWidget::IconListItem *) mOldItem)->highlight( true );
+ }
+
+ KJanusWidget::IconListItem *item = dynamic_cast< KJanusWidget::IconListItem * >( qitem );
+ if ( item && !item->isSelected() )
+ {
+ item->highlight( false );
+ mOldItem = item;
+ }
+ else
+ {
+ mOldItem = 0;
+ }
+}
+
+
KJanusWidget::IconListItem::IconListItem( QListBox *listbox, const QPixmap &pixmap,
const QString &text )
@@ -1006,6 +1055,7 @@ KJanusWidget::IconListItem::IconListItem
mPixmap = defaultPixmap();
}
setText( text );
+ setCustomHighlighting( true );
mMinimumWidth = 0;
}
@@ -1017,6 +1067,36 @@ int KJanusWidget::IconListItem::expandMi
}
+void KJanusWidget::IconListItem::highlight( bool erase )
+{
+ QRect r = listBox()->itemRect( this );
+ r.addCoords( 1, 1, -1, -1 );
+
+ QPainter p( listBox()->viewport() );
+ p.setClipRegion( r );
+
+ const QColorGroup &cg = listBox()->colorGroup();
+ if ( erase )
+ {
+ p.setPen( cg.base() );
+ p.setBrush( cg.base() );
+ p.drawRect( r );
+ }
+ else
+ {
+ p.setBrush( cg.highlight().light( 120 ) );
+ p.drawRect( r );
+
+ p.setPen( cg.highlight().dark( 140 ) );
+ p.drawRect( r );
+ }
+
+ p.setPen( cg.foreground() );
+ p.translate( r.x() - 1, r.y() - 1 );
+ paintContents( &p );
+}
+
+
const QPixmap &KJanusWidget::IconListItem::defaultPixmap()
{
static QPixmap *pix=0;
@@ -1044,6 +1124,25 @@ const QPixmap &KJanusWidget::IconListIte
void KJanusWidget::IconListItem::paint( QPainter *painter )
{
+ QRect itemPaintRegion( listBox()->itemRect( this ) );
+ QRect r( 1, 1, itemPaintRegion.width() - 2, itemPaintRegion.height() - 2);
+
+ if ( isSelected() )
+ {
+ painter->eraseRect( r );
+
+ painter->save();
+ painter->setPen( listBox()->colorGroup().highlight().dark( 160 ) );
+ painter->drawRect( r );
+ painter->restore();
+ }
+
+ paintContents( painter );
+}
+
+
+void KJanusWidget::IconListItem::paintContents( QPainter *painter )
+{
QFontMetrics fm = painter->fontMetrics();
int ht = fm.boundingRect( 0, 0, 0, 0, Qt::AlignCenter, text() ).height();
int wp = mPixmap.width();
@@ -1052,7 +1151,7 @@ void KJanusWidget::IconListItem::paint(
painter->drawPixmap( (mMinimumWidth-wp)/2, 5, mPixmap );
if( !text().isEmpty() )
{
- painter->drawText( 0, hp+7, mMinimumWidth, ht, Qt::AlignCenter, text() );
+ painter->drawText( 1, hp + 7, mMinimumWidth - 2, ht, Qt::AlignCenter, text() );
}
}
diff -purN kdelibs-3.5.3.orig/kdeui/kjanuswidget.h kdelibs-3.5.3.pertty/kdeui/kjanuswidget.h
--- kdelibs-3.5.3.orig/kdeui/kjanuswidget.h 2005-10-10 10:06:38.000000000 -0500
+++ kdelibs-3.5.3.pertty/kdeui/kjanuswidget.h 2006-06-03 13:40:40.000000000 -0500
@@ -71,6 +71,8 @@ class KDEUI_EXPORT KJanusWidget : public
private:
class IconListBox : public KListBox
{
+ friend class KJanusWidget;
+
public:
IconListBox( QWidget *parent=0, const char *name=0, WFlags f=0 );
void updateMinimumHeight();
@@ -79,10 +81,15 @@ class KDEUI_EXPORT KJanusWidget : public
void invalidateWidth();
void setShowAll( bool showAll );
+ protected:
+ void slotOnItem( QListBoxItem *item );
+ virtual void leaveEvent( QEvent * );
+
private:
bool mShowAll;
bool mHeightValid;
bool mWidthValid;
+ QListBoxItem *mOldItem;
};
public:
@@ -558,6 +565,8 @@ class KDEUI_EXPORT KJanusWidget : public
private slots:
bool slotShowPage();
void slotFontChanged();
+
+ void slotOnItem(QListBoxItem *item);
void slotItemClicked(QListViewItem *it);
void pageGone(QObject *obj); // signal from the added page's "destroyed" signal
void slotReopen(QListViewItem *item);
@@ -0,0 +1,73 @@
diff -purN kdelibs-3.5.3.orig/kdefx/kstyle.cpp kdelibs-3.5.3.pertty/kdefx/kstyle.cpp
--- kdelibs-3.5.3.orig/kdefx/kstyle.cpp 2005-10-10 10:05:27.000000000 -0500
+++ kdelibs-3.5.3.pertty/kdefx/kstyle.cpp 2006-06-03 13:40:40.000000000 -0500
@@ -154,6 +154,7 @@ struct KStylePrivate
bool menuAltKeyNavigation : 1;
bool menuDropShadow : 1;
bool sloppySubMenus : 1;
+ bool semiTransparentRubberband : 1;
int popupMenuDelay;
float menuOpacity;
@@ -187,6 +188,7 @@ KStyle::KStyle( KStyleFlags flags, KStyl
d->menuAltKeyNavigation = settings.readBoolEntry("/KStyle/Settings/MenuAltKeyNavigation", true);
d->scrollablePopupmenus = settings.readBoolEntry("/KStyle/Settings/ScrollablePopupMenus", false);
d->menuDropShadow = settings.readBoolEntry("/KStyle/Settings/MenuDropShadow", false);
+ d->semiTransparentRubberband = settings.readBoolEntry("/KStyle/Settings/SemiTransparentRubberband", true);
d->menuHandler = NULL;
if (useMenuTransparency) {
@@ -553,7 +555,53 @@ void KStyle::drawPrimitive( PrimitiveEle
else
// General handle, probably a kicker applet handle.
drawKStylePrimitive( KPE_GeneralHandle, p, widget, r, cg, flags, opt );
+} else if ( d->semiTransparentRubberband && pe == QStyle::PE_RubberBand ) {
+ QRect rect = r.normalize();
+ QPoint point;
+ point = p->xForm( point );
+
+ static XRenderColor clr = { 0, 0, 0, 0 };
+ static unsigned long fillColor = 0;
+ if ( fillColor != cg.highlight().rgb() ) {
+ fillColor = cg.highlight().rgb();
+
+ unsigned long color = fillColor << 8 | 0x40;
+ int red = (color >> 24) & 0xff;
+ int green = (color >> 16) & 0xff;
+ int blue = (color >> 8) & 0xff;
+ int alpha = (color >> 0) & 0xff;
+
+ red = red * alpha / 255;
+ green = green * alpha / 255;
+ blue = blue * alpha / 255;
+
+ clr.red = (red << 8) + red;
+ clr.green = (green << 8) + green;
+ clr.blue = (blue << 8) + blue;
+ clr.alpha = (alpha << 8) + alpha;
+ }
+
+ XRenderFillRectangle(
+ p->device()->x11Display(),
+ PictOpOver,
+ p->device()->x11RenderHandle(),
+ &clr,
+ rect.x() + point.x(),
+ rect.y() + point.y(),
+ rect.width(),
+ rect.height() );
+
+ p->save();
+ p->setRasterOp( Qt::CopyROP );
+ p->setPen( QPen( cg.highlight().dark( 160 ), 1 ) );
+ p->setBrush( NoBrush );
+ p->drawRect(
+ rect.x() + point.x(),
+ rect.y() + point.y(),
+ rect.width(),
+ rect.height() );
+ p->restore();
} else
QCommonStyle::drawPrimitive( pe, p, r, cg, flags, opt );
}
+192
View File
@@ -0,0 +1,192 @@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/kde-base/kdelibs/kdelibs-3.5.5-r5.ebuild,v 1.1 2006/10/25 20:29:22 flameeyes Exp $
inherit kde flag-o-matic eutils multilib
set-kdedir 3.5
DESCRIPTION="KDE libraries needed by all KDE programs."
HOMEPAGE="http://www.kde.org/"
SRC_URI="mirror://kde/stable/${PV}/src/${P}.tar.bz2
mirror://gentoo/kdelibs-3.5-patchset-05.tar.bz2"
LICENSE="GPL-2 LGPL-2"
SLOT="3.5"
KEYWORDS="~alpha ~ppc ~x86"
IUSE="acl alsa arts cups doc jpeg2k kerberos legacyssl utempter openexr pertty spell ssl tiff
zeroconf kernel_linux fam lua linguas_he"
# kde.eclass has kdelibs in DEPEND, and we can't have that in here.
# so we recreate the entire DEPEND from scratch.
# Added aspell-en as dependency to work around bug 131512.
RDEPEND="$(qt_min_version 3.3.3)
arts? ( ~kde-base/arts-${PV} )
app-arch/bzip2
>=media-libs/freetype-2
media-libs/fontconfig
>=dev-libs/libxslt-1.1.15
>=dev-libs/libxml2-2.6.6
>=dev-libs/libpcre-4.2
media-libs/libart_lgpl
net-dns/libidn
acl? ( kernel_linux? ( sys-apps/acl ) )
ssl? ( >=dev-libs/openssl-0.9.7d )
alsa? ( media-libs/alsa-lib )
cups? ( >=net-print/cups-1.1.19 )
tiff? ( media-libs/tiff )
kerberos? ( virtual/krb5 )
jpeg2k? ( media-libs/jasper )
openexr? ( >=media-libs/openexr-1.2.2-r2 )
zeroconf? ( net-misc/mDNSResponder )
fam? ( virtual/fam )
virtual/ghostscript
utempter? ( sys-libs/libutempter )
!kde-base/kde-env
lua? ( dev-lang/lua )
spell? ( app-text/aspell app-dicts/aspell-en
linguas_he? ( >=app-text/hspell-1.0 ) )"
DEPEND="${RDEPEND}
doc? ( app-doc/doxygen )
sys-devel/gettext"
RDEPEND="${RDEPEND}
|| ( ( x11-apps/rgb x11-apps/iceauth ) <virtual/x11-7 ) "
# Testing code is rather broken and merely for developer purposes, so disable it.
RESTRICT="test"
PATCHES="${FILESDIR}/ksystemtray-xgl.patch"
if use pertty;
then
PATCHES="${PATCHES}
${FILESDIR}/$P-rubberband.patch
${FILESDIR}/$P-rounded-selection-box.patch"
fi
pkg_setup() {
if use legacyssl ; then
echo ""
elog "You have the legacyssl use flag enabled, which fixes issues with some broken"
elog "sites, but breaks others instead. It is strongly discouraged to use it."
elog "For more information, see bug #128922."
echo ""
fi
if ! use utempter ; then
echo ""
elog "On some setups that relies on the correct update of utmp records, not using"
elog "utempter might not update them correctly. If you experience unexpected"
elog "behaviour, try to rebuild kde-base/kdelibs with utempter use-flag enabled."
echo ""
fi
}
src_unpack() {
kde_src_unpack
if use legacyssl ; then
# This patch won't be included upstream, see bug #128922
epatch "${WORKDIR}/patches/kdelibs_3.5.4-kssl-3des.patch" || die "Patch did not apply."
fi
# Apply the following patch on the next revision of kdelibs-3.5.5 (fixes kde
# bug #135409), which corrects a nasty regression in the cstyle indenter.
epatch "${FILESDIR}/${P}-kate-cstyle-indenter-fix.diff"
# Fix kdeprint timeout when trying to connect to cupsd. Bug #151261.
# THIS DOES NOT SOLVE THE PROBLEM
# epatch "${FILESDIR}/${P}-kdeprint-cupsd-timeout-fix.patch"
epatch "${FILESDIR}/${P}-kdeprint.patch"
# Fix rendering (see upstream bug #135639).
epatch "${FILESDIR}/${P}-khtml.patch"
# Allow notification with arts disabled
epatch "${FILESDIR}/${P}-noarts.patch"
epatch "${FILESDIR}/${P}-noarts-2.patch"
}
src_compile() {
rm -f "${S}/configure"
myconf="--with-distribution=Gentoo --disable-fast-malloc
$(use_enable fam libfam) $(use_enable kernel_linux dnotify)
--with-libart --with-libidn
$(use_with acl) $(use_with ssl)
$(use_with alsa) $(use_with arts)
$(use_with kerberos gssapi) $(use_with tiff)
$(use_with jpeg2k jasper) $(use_with openexr)
$(use_enable cups) $(use_enable zeroconf dnssd)
$(use_with utempter) $(use_with lua)
$(use_enable kernel_linux sendfile) --enable-mitshm
$(use_with spell aspell)"
if use spell; then
myconf="${myconf} $(use_with linguas_he hspell)"
else
myconf="${myconf} --without-hspell"
fi
if has_version x11-apps/rgb; then
myconf="${myconf} --with-rgbfile=/usr/share/X11/rgb.txt"
fi
# fix bug 58179, bug 85593
# kdelibs-3.4.0 needed -fno-gcse; 3.4.1 needs -mminimal-toc; this needs a
# closer look... - corsair
use ppc64 && append-flags "-mminimal-toc"
# work around bug #120858, gcc 3.4.x -Os miscompilation
use x86 && replace-flags "-Os" "-O2" # see bug #120858
export BINDNOW_FLAGS="$(bindnow-flags)"
kde_src_compile
if use doc; then
make apidox || die
fi
}
src_install() {
kde_src_install
if use doc; then
make DESTDIR="${D}" install-apidox || die
fi
# Needed to create lib -> lib64 symlink for amd64 2005.0 profile
if [ "${SYMLINK_LIB}" = "yes" ]; then
dosym $(get_abi_LIBDIR ${DEFAULT_ABI}) ${KDEDIR}/lib
fi
dodir /etc/env.d
# List all the multilib libdirs
local libdirs
for libdir in $(get_all_libdirs); do
libdirs="${libdirs}:${PREFIX}/${libdir}"
done
cat <<EOF > "${D}"/etc/env.d/45kdepaths-${SLOT} # number goes down with version upgrade
PATH=${PREFIX}/bin
ROOTPATH=${PREFIX}/sbin:${PREFIX}/bin
LDPATH=${libdirs:1}
CONFIG_PROTECT="${PREFIX}/share/config ${PREFIX}/env ${PREFIX}/shutdown /usr/share/config"
KDEDIRS="${PREFIX}:/usr:/usr/local"
#KDE_IS_PRELINKED=1
EOF
}
pkg_postinst() {
if use zeroconf; then
echo
elog "To make zeroconf support available in KDE make sure that the 'mdnsd' daemon"
elog "is running. Make sure also that multicast dns lookups are enabled by editing"
elog "the 'hosts:' line in /etc/nsswitch.conf to include 'mdns', e.g.:"
elog " hosts: files mdns dns"
echo
fi
}