[mythtv] mythvideo+mythui: get statetype "watchedstate" working for DLG_TREE
Markus Schulz
msc at antzsystem.de
Thu Nov 24 23:17:26 UTC 2011
hello
i'm trying to allow the statetype "watchedstate" (and all other
statetypes like userratingstate, ...) to work inside the DLG_TREE.
Currently something like:
<statetype name="watchedstate">
<state name="no">
<textarea name="uhuh">
<area>974,56,50,30</area>
<align>allcenter</align>
<font>basesmallgreen</font>
<alpha>210</alpha>
<value>New</value>
</textarea>
</state>
<state name="yes" />
</statetype>
in your video-ui buttonlist don't work if the user use the DLG_TREE.
For type != DLG_TREE it works because in VideoDialog::loadData() the
m_videoButtonList was initialized with new MythUIButtonListItem() items
and each item was passed thru UpdateItem() where the handleState() stuff
was done.
for the DLG_TREE we need a different solution.
at best by iterate thru all ButtonLists/Items from the ButtonTree and
call UpdateItem() for each ButtonListItem.
But with current API this is not possible.(please correct me if i am
wrong)
Another solution (my current choice) connects the
SIGNAL(itemVisible(MythUIButtonListItem *))
from the VideoButtonTree with a new function and do the handlestate()
stuff inside this one.(patch attached to this mail)
But this solution has the drawback, that the signal itemVisible occurs
rather often (one signal for each item currently visible on each move)
and i need it only once after building the tree.
i have attached my current version and would like to hear some comments.
regards
msc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: watched_patch.diff
Type: text/x-patch
Size: 5623 bytes
Desc: not available
Url : http://www.mythtv.org/pipermail/mythtv-dev/attachments/20111125/ee5c9e42/attachment.bin
More information about the mythtv-dev
mailing list