Global commands/touch change mode: look up the new touch mode label from touch handler's labels dictionary #4699

Closed
nvaccessAuto opened this Issue Dec 16, 2014 · 8 comments

2 participants

@nvaccessAuto

Reported by nvdakor on 2014-12-16 00:31
Hi,
In touch handler, there exist two containers for touch modes: a list of available touch modes and a dictionary that maps touch mode to human-readable touch mode labels. This labels map is used not only for storing touch modes, but also used to look up gestures and such.
Second, current global commands/touch_change mode script pulls the new touch mode label straight from touch handler's touch modes list. Although this is fine for built-ion scripts, an add-on that may wish to add custom touch modes will find itself not presenting human-readable labels.
Thus to better utilize the labels map so it can serve as a single lookup source for touch modes (even when the mode changes), I'd like to suggest slightly modifying the change mode script to pull the touch mode labels from the actual labels map. This allows already translated labels to be presented to the user, as well as for add-ons which adds custom touch modes (such as enhanced touch gestures add-on) to present human-readable labels for custom touch modes (unless the touch mode concept is destined to die someday).
Thanks.

@nvaccessAuto

Comment 1 by Joseph Lee <joseph.lee22590@... on 2014-12-16 00:53
In [9f48eb4]:
```CommitTicketReference repository="" revision="9f48eb4763a161605efaf89d3282bcf2de55cc1a"
Global Commands: look up touch labels map for the new touch mode before resorting to presenting the label from the touch modes list. re #4699.

@nvaccessAuto

Comment 2 by jteh on 2014-12-16 02:09
I think touch modes may well die some day, but there's probably no harm in taking this in the meantime.

@nvaccessAuto

Comment 3 by Michael Curran <mick@... on 2015-03-18 03:42
In [0d800c2]:
```CommitTicketReference repository="" revision="0d800c21756d1a4c9df9604306f0f1b9a2d84e82"
Merge branch 't4699' into next. Incubates #4699

Changes:
Added labels: incubating
@nvaccessAuto

Comment 4 by mdcurran on 2015-03-18 03:43
Thanks. Looks fine. Incubating as is.

@nvaccessAuto

Comment 6 by Michael Curran <mick@... on 2015-03-31 06:06
In [cdcc20c]:
```CommitTicketReference repository="" revision="cdcc20c86ccfa366b378dab2d3d7b11690fcc358"
Merge branch 't4699'. Fixes #4699

Changes:
Removed labels: incubating
State: closed
@nvaccessAuto

Comment 7 by Michael Curran <mick@... on 2015-03-31 06:09
In [d08c9d6]:
```CommitTicketReference repository="" revision="d08c9d6f371027997233ac7f61ff232f18646fcc"
Global Commands: look up touch labels map for the new touch mode before resorting to presenting the label from the touch modes list. re #4699.

@nvaccessAuto

Comment 8 by mdcurran on 2015-03-31 06:11
Changes:
Milestone changed from None to 2015.2

@nvaccessAuto

Comment 9 by jteh on 2015-04-10 02:27
The correct commit in master is d08c9d6.

@nvaccessAuto nvaccessAuto added this to the 2015.2 milestone Nov 10, 2015
@josephsl josephsl added a commit that referenced this issue Nov 23, 2015
@josephsl josephsl Global Commands: look up touch labels map for the new touch mode befo…
…re resorting to presenting the label from the touch modes list. re #4699.
d08c9d6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment