support setting the icon from the package
svn path=/trunk/KDE/kdelibs/; revision=1063021
This commit is contained in:
parent
8e967abc2d
commit
9e73f45160
@ -45,6 +45,7 @@
|
|||||||
#include "plasma/dialog.h"
|
#include "plasma/dialog.h"
|
||||||
#include "plasma/extenders/extender.h"
|
#include "plasma/extenders/extender.h"
|
||||||
#include "plasma/extenders/extenderitem.h"
|
#include "plasma/extenders/extenderitem.h"
|
||||||
|
#include "plasma/package.h"
|
||||||
#include "plasma/tooltipmanager.h"
|
#include "plasma/tooltipmanager.h"
|
||||||
#include "plasma/widgets/iconwidget.h"
|
#include "plasma/widgets/iconwidget.h"
|
||||||
|
|
||||||
@ -109,6 +110,14 @@ void PopupApplet::setPopupIcon(const QIcon &icon)
|
|||||||
|
|
||||||
void PopupApplet::setPopupIcon(const QString &iconName)
|
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));
|
setPopupIcon(KIcon(iconName));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user