summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kdocker.desktop2
-rw-r--r--src/customtraylabel.cpp5
-rw-r--r--src/qtraylabel.cpp4
3 files changed, 5 insertions, 6 deletions
diff --git a/kdocker.desktop b/kdocker.desktop
index bd05989..692966f 100644
--- a/kdocker.desktop
+++ b/kdocker.desktop
@@ -4,7 +4,7 @@ GenericName=Docking utility
Comment=Docks any application into system tray
Exec=kdocker
TryExec=kdocker
-Icon=/usr/local/share/kdocker/icons/kdocker.png
+Icon=kdocker.png
Terminal=false
Type=Application
Categories=Application;Utility;
diff --git a/src/customtraylabel.cpp b/src/customtraylabel.cpp
index 8683c96..684a098 100644
--- a/src/customtraylabel.cpp
+++ b/src/customtraylabel.cpp
@@ -29,6 +29,7 @@
#include <qsize.h>
#include <stdlib.h>
+#include <kiconloader.h>
#include <kglobal.h>
#include <klocale.h>
@@ -55,9 +56,7 @@ CustomTrayLabel::CustomTrayLabel(const QStringList& argv, pid_t pid,
*/
void CustomTrayLabel::installMenu()
{
- QPixmap kdocker_png(QString(ICONS_PATH) + "/kdocker.png");
- if (kdocker_png.isNull())
- kdocker_png.load(qApp->applicationDirPath() + "/icons/kdocker.png");
+ QPixmap kdocker_png(KGlobal::iconLoader()->loadIcon("kdocker", KIcon::NoGroup, KIcon::SizeSmall));
setIcon(kdocker_png);
TrayLabelMgr *tlMgr = TrayLabelMgr::instance();
diff --git a/src/qtraylabel.cpp b/src/qtraylabel.cpp
index a29e442..34284bd 100644
--- a/src/qtraylabel.cpp
+++ b/src/qtraylabel.cpp
@@ -32,6 +32,7 @@
#include "trace.h"
#include "qtraylabel.h"
+#include <kiconloader.h>
#include <kglobal.h>
#include <X11/cursorfont.h>
@@ -620,8 +621,7 @@ void QTrayLabel::handleIconChange(void)
QImage image;
if (!window_icon)
{
- if (!image.load(QString(ICONS_PATH) + "/question.png"))
- image.load(qApp->applicationDirPath() + "/icons/question.png");
+ image = KGlobal::iconLoader()->loadIcon("question", KIcon::NoGroup, KIcon::SizeMedium);
}
else image = QPixmap((const char **) window_icon).convertToImage();
if (window_icon) XpmFree(window_icon);