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
What have you tried?
<defaultcontrol always="true"> or <onload>SetFocus(ID)>
I've try defaultcontrol, onload setfocus and hidden fake button. None of them is working
Before Gotham i was opening the subtitles search results list and you could press left/right to bring up the subtitles services so you can choose another service. Now it loads the
subtitles services options first and if i change the animation order so to show the
subtitles search results first the results list shows fine but the focus is still goes on the
subtitles services options.
Here is my code if anyone wants to take a look and in case that i am doing something wrong...
http://pastebin.com/NdcNZKh9
Cheers
Nessus
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.
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
If i hide id=150 (available subtitle services) then id="120" the available subtitles gets focus when it gets filled.
Code:
<defaultcontrol>120</defaultcontrol>
<control type="list" id="150"><!-- subtitle services list -->
<visible>!IsEmpty(Container(120).ListItem.Label)</visible>
</control>
You could also try to open a custom dialog onload to re-apply focus.
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
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.
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
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
Sweet
Looking forward for RC/beta 5 then.
Cheers
Nessus
I'd suggest you all start complaining on github if not merged
(2014-04-23, 12:53)nessus Wrote: [ -> ]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
Yeah, works for me on beta 4 on Windows.
https://github.com/MassIV/skin.metroid/b...titles.xml
Looks like (thanks to JM) this has made it to Gotham after all
Thanks a lot guys.
Cheers
Nessus