diff options
author | Robert Xu <robxu9@gmail.com> | 2011-08-13 12:58:51 -0400 |
---|---|---|
committer | Robert Xu <robxu9@gmail.com> | 2011-08-13 12:58:51 -0400 |
commit | 46130378aea5fff80803409c2573e2ea31472cb9 (patch) | |
tree | cb5da908105e6577da7676f84ba9c7fbaba4fb52 /opensuse/tdelibs/ktip-icon-hack.diff | |
parent | 53f2819f9af035a38ca08df1ede9e6cd24aa79ef (diff) | |
download | tde-packaging-46130378aea5fff80803409c2573e2ea31472cb9.tar.gz tde-packaging-46130378aea5fff80803409c2573e2ea31472cb9.zip |
add dbus-1-tqt and libdbus-1-tqt-0; add unmodified tdelibs from kdelibs3
Diffstat (limited to 'opensuse/tdelibs/ktip-icon-hack.diff')
-rw-r--r-- | opensuse/tdelibs/ktip-icon-hack.diff | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/opensuse/tdelibs/ktip-icon-hack.diff b/opensuse/tdelibs/ktip-icon-hack.diff new file mode 100644 index 000000000..4812646d1 --- /dev/null +++ b/opensuse/tdelibs/ktip-icon-hack.diff @@ -0,0 +1,56 @@ +Index: kdeui/ktip.cpp +=================================================================== +--- kdeui/ktip.cpp.orig ++++ kdeui/ktip.cpp +@@ -367,24 +367,47 @@ void KTipDialog::showMultiTip(QWidget *p + mInstance->raise(); + } + ++static QString fixTip(QString tip) ++{ ++ QRegExp iconRegExp("<img src=\"(.*)\">"); ++ iconRegExp.setMinimal(true); ++ if (iconRegExp.search(tip)>-1) { ++ QString iconName = iconRegExp.cap(1); ++ if (!iconName.isEmpty()) ++ if (KGlobal::dirs()->findResource("icon", iconName).isEmpty()) ++ tip.replace("crystalsvg","hicolor"); ++ } ++ ++ return tip; ++} ++ + void KTipDialog::prevTip() + { + mDatabase->prevTip(); +- mTipText->setText(QString::fromLatin1( ++ QString currentTip = QString::fromLatin1( + "<qt text=\"%1\" bgcolor=\"%2\">%3</qt>") + .arg(mTextColor.name()) + .arg(mBaseColor.name()) +- .arg(i18n(mDatabase->tip().utf8()))); ++ .arg(i18n(mDatabase->tip().utf8())); ++ ++ ++ currentTip = fixTip(currentTip); ++ mTipText->setText(currentTip); + mTipText->setContentsPos(0, 0); + } + + void KTipDialog::nextTip() + { + mDatabase->nextTip(); +- mTipText->setText(QString::fromLatin1("<qt text=\"%1\" bgcolor=\"%2\">%3</qt>") ++ QString currentTip = QString::fromLatin1( ++ "<qt text=\"%1\" bgcolor=\"%2\">%3</qt>") + .arg(mTextColor.name()) + .arg(mBaseColor.name()) +- .arg(i18n(mDatabase->tip().utf8()))); ++ .arg(i18n(mDatabase->tip().utf8())); ++ ++ ++ currentTip = fixTip(currentTip); ++ mTipText->setText(currentTip); + mTipText->setContentsPos(0, 0); + } + |