Posts: 995
Joined: Apr 2009
Reputation:
60
nessus
Skilled Skinner
Posts: 995
I am trying to change the default focus in the DialogSubtitles service but whatever i've try the dialog keeps focusing on the subtitles services list.
Anyone has an idea ?
Why this is the default behavior ?. Would be more logical if the default focus was on the subtitles search results list ?
Cheers
Nessus
Posts: 17,390
Joined: Aug 2007
Reputation:
583
Hitcher
Team-Kodi Member
Posts: 17,390
What have you tried?
<defaultcontrol always="true"> or <onload>SetFocus(ID)>
Posts: 7,805
Joined: Feb 2013
Reputation:
1,484
2014-04-19, 07:20
(This post was last modified: 2014-04-19, 07:22 by jurialmunkey.)
Its because id=120 (subs list) doesn't have any content on window load because it has to grab the content from the subtitle add-on.
I'm guessing the difference is that before xbmc would call the subs addon/script first and the .xml was skinning the script window, whereas now xbmc loads the DialogSubtitles.xml window and only uses the subtitle addons as content providers (that's my basic understanding anyway).
As 120 doesn't exist on load, the best you could do is put the manual search button (id160) at the top of the subs list and set that as the default control and have an <ondown>120</ondown> in it so you can press down to go to the subs once they load.
Posts: 995
Joined: Apr 2009
Reputation:
60
nessus
Skilled Skinner
Posts: 995
Thanks jurialmunkey. Unfortunately that doesn't work either.
The way that this thing is working now it needs to have always visible the services (id120) list. You cannot have it hidden by default and if you do you will loose focus. This means that we have to load and fill the screen with both list's at the same time.
Not looking good and IMHO not makes any sense to have the services list always visible. The user will set the default service once and he will change it only if no subtitle is available which for me happened rare times.
Is there any chance that this can be changed for Gotham ?
Cheers
Nessus
Posts: 995
Joined: Apr 2009
Reputation:
60
nessus
Skilled Skinner
Posts: 995
MassIV... did you try to navigate up/down to the subtitles result list (id120)?. Because it looks like it has the focus (focus texture is visible) but actually the focus is on the hidden services list (id150).
If i am doing something wrong, please share your code ?
Cheers
Nessus
Posts: 4,137
Joined: Jul 2009
Reputation:
48
amet
Retired Team-Kodi Member
Posts: 4,137
I will work on this in core, we think its best to focus id 120 once we fill it in with results. so no xml mod is needed but you can always override it in skin if you dont like it.
Posts: 995
Joined: Apr 2009
Reputation:
60
nessus
Skilled Skinner
Posts: 995
Thanks Amet. I agree with you. The best behavior is to focus on the id120 (subs search results) by default. If there were no subtitles available (empty id120 list) then the focus automatically goes to the subtitles services list (id150). After all that was the default behavior of the addon before Gotham.
Cheers
Nessus
Posts: 4,137
Joined: Jul 2009
Reputation:
48
amet
Retired Team-Kodi Member
Posts: 4,137
2014-04-23, 14:43
(This post was last modified: 2014-04-23, 14:43 by amet.)
yes, and I'll add the PR for it tonight... hopefully it will make it into Gotham RC/beta 5 as it is bugfix rather than a feature
Posts: 17,859
Joined: Jul 2011
Reputation:
371
I'd suggest you all start complaining on github if not merged