mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-24 02:42:50 +00:00
plasma: do not require icons path for notifier items
the only requirement, by the spec, is that the icon name is Freedesktop-compliant which means it can in $HOME/.icons or any other compliant path Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
This commit is contained in:
parent
a4edab463c
commit
ceba21c739
2 changed files with 2 additions and 4 deletions
|
@ -325,9 +325,8 @@ void DBusSystemTrayTask::syncIcons(const Plasma::DataEngine::Data &properties)
|
||||||
}
|
}
|
||||||
const QString path = m_iconThemePath;
|
const QString path = m_iconThemePath;
|
||||||
if (!path.isEmpty()) {
|
if (!path.isEmpty()) {
|
||||||
// FIXME: If last part of path is not "icons", this won't work!
|
|
||||||
QStringList tokens = path.split('/', QString::SkipEmptyParts);
|
QStringList tokens = path.split('/', QString::SkipEmptyParts);
|
||||||
if (tokens.length() >= 3 && tokens.takeLast() == QLatin1String("icons")) {
|
if (tokens.length() >= 3) {
|
||||||
QString appName = tokens.takeLast();
|
QString appName = tokens.takeLast();
|
||||||
QString prefix = QChar('/') + tokens.join("/");
|
QString prefix = QChar('/') + tokens.join("/");
|
||||||
// FIXME: Fix KIconLoader and KIconTheme so that we can use
|
// FIXME: Fix KIconLoader and KIconTheme so that we can use
|
||||||
|
|
|
@ -214,9 +214,8 @@ void StatusNotifierItemSource::refreshCallback(QDBusPendingCallWatcher *call)
|
||||||
if (!m_customIconLoader) {
|
if (!m_customIconLoader) {
|
||||||
QString path = properties["IconThemePath"].toString();
|
QString path = properties["IconThemePath"].toString();
|
||||||
if (!path.isEmpty()) {
|
if (!path.isEmpty()) {
|
||||||
// FIXME: If last part of path is not "icons", this won't work!
|
|
||||||
QStringList tokens = path.split('/', QString::SkipEmptyParts);
|
QStringList tokens = path.split('/', QString::SkipEmptyParts);
|
||||||
if (tokens.length() >= 3 && tokens.takeLast() == "icons") {
|
if (tokens.length() >= 3) {
|
||||||
QString appName = tokens.takeLast();
|
QString appName = tokens.takeLast();
|
||||||
QString prefix = '/' + tokens.join("/");
|
QString prefix = '/' + tokens.join("/");
|
||||||
// FIXME: Fix KIconLoader and KIconTheme so that we can use
|
// FIXME: Fix KIconLoader and KIconTheme so that we can use
|
||||||
|
|
Loading…
Add table
Reference in a new issue