support setting the icon from the package

svn path=/trunk/KDE/kdelibs/; revision=1063021
This commit is contained in:
Aaron J. Seigo 2009-12-16 18:35:04 +00:00
parent 8e967abc2d
commit 9e73f45160

View File

@ -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));
}