From 9e73f45160b3885df87f9ee192cc83f0059a55d8 Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Wed, 16 Dec 2009 18:35:04 +0000 Subject: [PATCH] support setting the icon from the package svn path=/trunk/KDE/kdelibs/; revision=1063021 --- popupapplet.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/popupapplet.cpp b/popupapplet.cpp index 1720a091e..d6d0274af 100644 --- a/popupapplet.cpp +++ b/popupapplet.cpp @@ -45,6 +45,7 @@ #include "plasma/dialog.h" #include "plasma/extenders/extender.h" #include "plasma/extenders/extenderitem.h" +#include "plasma/package.h" #include "plasma/tooltipmanager.h" #include "plasma/widgets/iconwidget.h" @@ -109,6 +110,14 @@ void PopupApplet::setPopupIcon(const QIcon &icon) void PopupApplet::setPopupIcon(const QString &iconName) { + if (package()) { + const QString file = package()->filePath("images", iconName); + if (!file.isEmpty()) { + setPopupIcon(KIcon(file)); + return; + } + } + setPopupIcon(KIcon(iconName)); }