[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: Re: [kmix/kmix-improvements] src/gui2: Add tray icon
From: Lukáš Tinkl <ltinkl () redhat ! com>
Date: 2012-09-26 7:37:35
Message-ID: 5062B0BF.5030608 () redhat ! com
[Download RAW message or body]
Dne 26.9.2012 03:35, Trever Fischer napsal(a):
> 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");
Some i18n() wouldn't hurt :)
--
Lukáš Tinkl <ltinkl@redhat.com>
Software Engineer - Base Operating Systems Brno
KDE developer <lukas@kde.org>
Red Hat Inc. http://cz.redhat.com
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic