Specifying action summary text

Forum rules

This is a legacy forum which is locked for new topics. New topics should be started in one of the other forums under Extending Indigo

Posted on
Sun Mar 10, 2013 2:11 am
Perry The Cynic offline
Posts: 836
Joined: Apr 07, 2008

Specifying action summary text

When I edit an Action Group in "Show All" view, each action is represented by a single line of text. That's pretty concise, but for plugin actions all it shows is the name of the action - no arguments, and no indication of which plugin this is for. Is there a way for a plugin to specify this description? For example, instead of send text, show send text "IRCODE PAUSE"?

This also applies to editing individual actions, where the space below the "Edit Action Settings..." button just repeats the name of the action, without any disclosure of what those settings currently are.

Cheers
-- perry

Posted on
Sun Mar 10, 2013 12:38 pm
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: Specifying action summary text

Try the following:

1) Add a new textfield to your action ConfigUI XML with the id "description" and set hidden attribute to true.

2) Inside your validateActionConfigUi() callback set the "description" property to the caption text you want to display:

Code: Select all
valuesDict[u"description"] = u"send IR command to device foovious"

Note I'm not thrilled about the technique above and I've seen a few cases where the label doesn't get updated/shown. But it is the best approach we currently have, and we use it in some of our plugins.

Image

Posted on
Sun Mar 10, 2013 5:41 pm
Perry The Cynic offline
Posts: 836
Joined: Apr 07, 2008

Re: Specifying action summary text

Will do. I'm already abusing the "address" property similarly to show a nice readable address in the device list, so I suppose I shouldn't be squeamish now. :-)

Cheers
-- perry

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 3 guests