[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kmix/kmix-improvements] src/gui2: Add tray icon
From: Trever Fischer <tdfischer () fedoraproject ! org>
Date: 2012-09-26 1:35:51
Message-ID: 20120926013551.5BF2BA63A2 () git ! kde ! org
[Download RAW message or body]
Git commit 25bb51a8813ddf6bab2efe91dff7fd7418e6411c by Trever Fischer.
Committed on 26/09/2012 at 01:47.
Pushed by tdfischer into branch 'kmix-improvements'.
Add tray icon
M +9 -0 src/gui2/KMixApp.cpp
M +2 -0 src/gui2/KMixApp.h
http://commits.kde.org/kmix/25bb51a8813ddf6bab2efe91dff7fd7418e6411c
diff --git a/src/gui2/KMixApp.cpp b/src/gui2/KMixApp.cpp
index 07a2012..798f4f4 100644
--- a/src/gui2/KMixApp.cpp
+++ b/src/gui2/KMixApp.cpp
@@ -22,6 +22,7 @@
#include "KMixApp.h"
#include "KMixWindow.h"
#include <kdebug.h>
+#include <KDE/KStatusNotifierItem>
KMixApp::KMixApp()
@@ -50,6 +51,14 @@ KMixApp::newInstance()
m_kmix->show();
} else {
m_kmix = new KMixWindow(NULL);
+ m_icon = new KStatusNotifierItem("kmix");
+ m_icon->setAssociatedWidget(m_kmix);
+ m_icon->setCategory(KStatusNotifierItem::Hardware);
+ m_icon->setIconByName("kmix");
+ m_icon->setStandardActionsEnabled(true);
+ m_icon->setStatus(KStatusNotifierItem::Passive);
+ m_icon->setTitle("KMix");
+ m_icon->setToolTip("kmix", "KMix", "Volume");
}
return 0;
}
diff --git a/src/gui2/KMixApp.h b/src/gui2/KMixApp.h
index 08560e6..a6dac94 100644
--- a/src/gui2/KMixApp.h
+++ b/src/gui2/KMixApp.h
@@ -24,6 +24,7 @@
#include <kuniqueapplication.h>
class KMixWindow;
+class KStatusNotifierItem;
class KMixApp : public KUniqueApplication
{
@@ -34,6 +35,7 @@ Q_OBJECT
int newInstance ();
private:
KMixWindow *m_kmix;
+ KStatusNotifierItem *m_icon;
};
#endif
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic