Order QML plasmoid context menu
Francesco
francesco.nwokeka at gmail.com
Tue Sep 27 16:05:28 UTC 2011
On Sunday 18 September 2011 22:04:21 Viranch Mehta wrote:
> On Sun, Sep 18, 2011 at 5:21 AM, Francesco Nwokeka <
>
> francesco.nwokeka at gmail.com> wrote:
> > Hi guys,
> >
> > wanted to notify about an issue. Currently it's possible to add
> >
> > actions to a QML plasmoid's context menu. But this menu is not ordered
> > in any way. Nor by "insertion" and nor alphabetically.
> > So I wanted to know, is there some hidden function to do this (order
> > the list of actions) or does it still have to be implemented?
Sorry for the late reply, I've been quite busy.
> Actions are added in the order of plasmoid.setAction function
> calls, followed by the standard entries.
>
> Eg:
> plasmoid.setAction("act1", "myAction1", "icon1");
> plasmoid.setAction("act2", "myAction2", "icon2");
>
> would look like:
>
> myAction1
> myAction2
> Plasmoid's settings
> Desktop settings >
> ----------------------
> Remove this plasmoid
No, that's why I wrote this mail. Actions are added randomly.
This is the code used:
plasmoid.setAction("contextOnline", i18n("Online"), "user-online");
plasmoid.setAction("contextBusy", i18n("Busy"), "user-busy");
plasmoid.setAction("contextAway", i18n("Away"), "user-away");
plasmoid.setAction("contextInvisible", i18n("Invisible"), "user-
invisible");
plasmoid.setAction("contextOffline", i18n("Offline"), "user-offline");
and attached to the mail is the result of the code written above.
> As far as re-ordering is concerned, I don't think there is any way to do
> such
> a thing, but I might be missing something too.
I don't want to do this.
>
> Cheers,
> Viranch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: unorderedContextMenu.png
Type: image/png
Size: 11620 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20110927/d599b59c/attachment.png>
More information about the Plasma-devel
mailing list