[Differential] [Changed Subscribers] D4220: Add a basic SNI for keyboard layout

David Edmundson noreply at phabricator.kde.org
Fri Jan 20 11:20:25 UTC 2017


davidedmundson added inline comments.

INLINE COMMENTS

> keyboard_layout.cpp:165
> +        [this] {
> +            // TODO: introduce helper function to start kcmshell5
> +            QProcess *p = new Process(this);

so KToolInvocation::startServiceByName()?

> keyboard_layout.cpp:182
> +
> +    m_notifierItem->setContextMenu(menu);
> +}

You probably don't want to be doing this.

SNI has two two code paths for menus.

addAction() which works the way you'd expect creating a DBus menu and sending that

setContextMenu is a more legacy version that gets a signal from Plasma to show a menu, then kwin's process does the actual showing of it. (and generally speaking doing that won't work on wayland..it might be an exception here)

Given you want a flat list, use m_notifierItem->addAction(..)  even for the separator.

REPOSITORY
  R108 KWin

REVISION DETAIL
  https://phabricator.kde.org/D4220

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: graesslin, #kwin, #plasma_on_wayland
Cc: davidedmundson, luebking, plasma-devel, kwin, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, eliasp, sebas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20170120/15efe581/attachment-0001.html>


More information about the Plasma-devel mailing list