Library to use KDE's StatusNotifierItem via GObject
C Shell
Latest commit 846a7ad Jun 11, 2014 @jjk-jacky README: Fix markdown
Permalink
Failed to load latest commit information.
docs/reference First commit Jun 9, 2014
example Add an example of use Jun 9, 2014
m4 First commit Jun 9, 2014
src First commit Jun 9, 2014
.gitignore Add an example of use Jun 9, 2014
AUTHORS First commit Jun 9, 2014
COPYING First commit Jun 9, 2014
HISTORY First commit Jun 9, 2014
LICENSE First commit Jun 9, 2014
Makefile.am Add an example of use Jun 9, 2014
README.md README: Fix markdown Jun 11, 2014
autogen.sh First commit Jun 9, 2014
configure.ac Add an example of use Jun 9, 2014
statusnotifier.pc.in First commit Jun 9, 2014

README.md

statusnotifier: GObject Status Notifier Item

Starting with Plasma Next, KDE doesn't support the XEmbed systray in favor of their own Status Notifier Specification.

This little library allows to easily create a GObject to manage a StatusNotifierItem, handling all the DBus interface and letting you simply deal with the object's properties and signals.

You can simply create a new StatusNotifier using one of the helper function, e.g. status_notifier_new_from_icon_name(), or simply creating an object as usual - you then just need to make sure to specify property id :

sn = (StatusNotifier *) g_object_new (TYPE_STATUS_NOTIFIER,
     "id",                       "app-id",
     "status",                   STATUS_NOTIFIER_STATUS_NEEDS_ATTENTION,
     "main-icon-name",           "app-icon",
     "attention-icon-pixbuf",    pixbuf,
     "tooltip-title",            "My tooltip",
     "tooltip-body",             "This is an item about <b>app</b>",
     NULL);

You can also set properties (other than id) after creation. Once ready, call status_notifier_register() to register the item on the session bus and to the StatusNotifierWatcher.

If an error occurs, signal registration-failed will be emitted. On success, property state will be STATUS_NOTIFIER_STATE_REGISTERED.

Once registered, you can change properties as needed, and the proper DBus signal will be emitted to let visualizations (hosts) know, and connect to the signals (such as context-menu) which will be emitted when the corresponding DBus method was called.

Simple as that.

Free Software

statusnotifier - Copyright (C) 2014 Olivier Brunel jjk@jjacky.com

statusnotifier is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

statusnotifier is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with statusnotifier (COPYING). If not, see http://www.gnu.org/licenses/

Want to know more?

Some useful links if you're looking for more info:

Plus, statusnotifier comes with html documentation.