Using DBusMenu in KStatusNotifierItem

Aurélien Gâteau aurelien.gateau at canonical.com
Mon Dec 7 18:12:28 CET 2009


Hi,

I have been talking with Marco and Aaron recently on a new way to define
context menus for KStatusNotifierItem.

Right now what is done is that when the user right click on a
KStatusNotifierItem in the systemtray Plasma applet, a DBus signal is
sent from the applet to the application, asking it to show its menu at
the appropriate position.

The idea behind DBusMenu is that the application passes its menu
definition to the systemtray applet through DBus. It is then up to the
applet to show the menu and notify the application when the user
triggers an action.

The advantage of this method is that you can have Plasma-themed menus,
whether the application is a KDE or GNOME app (my colleagues are working
on the GNOME side of the project).

Work on this has begun. Since it's not the right time for this in trunk,
I created kdelibs and kdebase branches, which you can find in KDE svn there:

branches/work/~agateau/dbusmenu/kdelibs
branches/work/~agateau/dbusmenu/kdebase

It is starting to work: the applet is able to show the menu application
in an ugly treeview.

Next step is now to implement proper Plasma-like rendering of the menu
and I would like to have your opinion on this: what would be the best
way to implement menus in Plasma?
So far applets I know which present menu-like ui are the Kickoff, Device
Notifier and Quick Access applets. Should I base my widget on code from
any of these applets? Would you prefer a brand new implementation?

Aurélien


More information about the Plasma-devel mailing list