[mythtv] mythvideo+mythui: get statetype "watchedstate" working for DLG_TREE

John P Poet jppoet at gmail.com
Mon Nov 28 23:58:24 UTC 2011


On Thu, Nov 24, 2011 at 4:17 PM, Markus Schulz <msc at antzsystem.de> wrote:
> 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


I have noticed the exact problem you are describing, so I am glad you
are looking into it.

I would suggest creating a ticket for the issue and attaching your
patch to the ticket.

Also, you may want to pop into the myth IRC development channel, and
discuss the issue there.  Stuart Morgan is the king of MythUI stuff
(IRC nic stuartm), and he probably the best person to ask about this
stuff.  The IRC channel is on irc.freenode.net and the channel name is
mythtv


John
-- 
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?


More information about the mythtv-dev mailing list