"Jump first press" in Channel selection doesnt start search from current position

Issue #339 new
prl created an issue

There are several bugs in

int eListboxServiceContent::getNextBeginningWithChar(char c)

that prevent it doing what its name suggests (and what I expected of the function).

  1. It does not account for hidden lines in a bouquet, so in a search in the Terrestrial TV LCN bouquet, it will return the position in the bouquet list including padding (i.e. the channel LCN). The Components.ServiceList code expects it to return an index into the list as displayed on the screen. Instead of returning 'index' it should return cursorResolve(index), as in eListboxServiceContent::getNextMarkerPos() and eListboxServiceContent::getPrevMarkerPos(). This will translate correctly to the index required by the Components.ServiceList code.
  2. It should start the search (effectively) at the entry following the current cursor position, and wrap around. For this to work as intended, bug 338 must be addressed first. The search can still be done with a single run through the service list; it just needs a couple of state variables to distinguish hits on wraparound from hits between the current cursor and the end of the channel list.
  3. It returns 0 both for a successful search that matches the first item in the list and for search failure. This makes it impossible for the Components.ServiceList to distinguish between search failure and a search that correctly returns the first list entry. This means that the uppercase/lowercase pair of searches can't function properly in Components.ServiceList.moveToChar(). It also means that the cursor will go to the list head on search failure, rather than staying in its old position.

2 can only be effectively implemented if bug 338 is fixed first,

Reproduction steps

To demonstrate 1, simply try to use the "Jump first press" function in the Terrestrial TV LCN bouquet. The search actually finds the correct entry in the service list, but then jumps to the row numbered by its LCN. For example, if you search for 's', it will match SBS, but jump to the third entry in the service list (which for me is SC 10).

To demonstrate 2, search in Last Scanned. Channels will only be matched after the current selection in the channel list.

3 can only really be checked by looking at the source code of eListboxServiceContent::getNextBeginningWithChar().

Comments (0)

  1. Log in to comment