<div dir="ltr"><span style="font-family:arial,sans-serif;font-size:13px">> And for what it's worth, I also</span><br style="font-family:arial,sans-serif;font-size:13px"><span style="font-family:arial,sans-serif;font-size:13px">> found the childcount widget there, which isn't in the wiki. I'll add</span><br style="font-family:arial,sans-serif;font-size:13px">
<span style="font-family:arial,sans-serif;font-size:13px">> both of these to the wiki.</span><br><div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><font face="arial, sans-serif">Could you also add "studiostate" in there? I'm not sure which values it will take but I guess it would look into the database for any value as the studio is collected as part of the metadata. (anyone who can confirm?)</font></div>
<div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">Thanks! Ted.</font></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jul 29, 2013 at 12:02 AM, Joey Morris <span dir="ltr"><<a href="mailto:rjmorris.list@zoho.com" target="_blank">rjmorris.list@zoho.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Paul Harrison <<a href="mailto:mythtv@sky.com">mythtv@sky.com</a>> wrote on Thu, Jul 11, 2013 at 05:50:25PM +0100:<br>
<div><div class="h5">> On 11/07/13 13:09, Joey Morris wrote:<br>
> >Is there a way to get a full list of the widgets available on a<br>
> >window, such as the "tree" window in video-ui.xml? The wiki page is<br>
> >the obvious place to look, but it's out of date in some cases. For<br>
> >example, I wanted a way to distinguish directories from videos in the<br>
> >tree window, but I didn't see anything in the wiki related to that.<br>
> >Then I was looking at another theme and noticed it used the "nodetype"<br>
> >statetype with states "subfolder" and "upfolder". Perhaps it also<br>
> >defines a "file" or "video" state, but I'm not sure.<br>
> ><br>
> >I don't mind looking in the source code to find the widget names if<br>
> >that's the best solution, but could someone give me a hint on where to<br>
> >look? I do plan to update the wiki with the new widgets I find.<br>
> ><br>
><br>
> If the info is not on the wiki page then looking at the source is<br>
> the only way I think.<br>
><br>
> Clone the source using git then you can use the git tools to help<br>
> find what you want.<br>
><br>
> git grep video-ui.xml - will tell you which file or files to look<br>
> in. videodlg.cpp looks promising.<br>
><br>
> git log --grep nodetype - will tell you the commits that mention<br>
> nodetype in the log<br>
><br>
> commit a7b6c2a34b98 from Stuart M. looks relevant but unfortunately<br>
> not much info in the commit log :( so looking at what changed might<br>
> show more info<br>
><br>
> git show a7b6c2a34b98 - would show you what was changed.<br>
><br>
> There are many other tools in git to help you find what you want.<br>
><br>
> Most of the time simply looking for a function called Create() you<br>
> tell you what widgets a screen is looking for. The one for the<br>
> MythVideo browser screens looks like this<br>
><br>
> if (m_d->m_type == DLG_TREE)<br>
> UIUtilE::Assign(this, m_videoButtonTree, "videos", &err);<br>
> else<br>
> UIUtilE::Assign(this, m_videoButtonList, "videos", &err);<br>
><br>
> UIUtilW::Assign(this, m_titleText, "title");<br>
> UIUtilW::Assign(this, m_novideoText, "novideos");<br>
> UIUtilW::Assign(this, m_positionText, "position");<br>
> UIUtilW::Assign(this, m_crumbText, "breadcrumbs");<br>
><br>
> UIUtilW::Assign(this, m_coverImage, "coverart");<br>
> UIUtilW::Assign(this, m_screenshot, "screenshot");<br>
> UIUtilW::Assign(this, m_banner, "banner");<br>
> UIUtilW::Assign(this, m_fanart, "fanart");<br>
><br>
> UIUtilW::Assign(this, m_trailerState, "trailerstate");<br>
> UIUtilW::Assign(this, m_parentalLevelState, "parentallevel");<br>
> UIUtilW::Assign(this, m_watchedState, "watchedstate");<br>
> UIUtilW::Assign(this, m_studioState, "studiostate");<br>
><br>
> So you can see the names of the widgets "videos", "title,<br>
> ""novideos", "position" etc and also you can work out the type of<br>
> widget from the variable names usually. UIUtilE means it's a<br>
> compulsory widget (throws an error if not found) and UIUtilW means<br>
> it's optional (just shows a warning) so only the "video" buttontree<br>
> or buttonlist is compulsory all the others are optional.<br>
><br>
> Also looking for functions called something like toMap() can be<br>
> useful like the one in metadatacommon.cpp will show you the names of<br>
> text areas or names that can be used in tempates etc.<br>
><br>
> If in doubt you can always ask here :)<br>
<br>
</div></div>Thanks for the thorough response, Paul! Sorry for taking so long to<br>
respond.<br>
<br>
Looking through Create() and finding toMap() calls is good advice.<br>
However, it wouldn't have helped me in this case, because nodetype<br>
isn't referenced in Create() and isn't in the metadata map. (Here, I'm<br>
imagining the scenario where I know I want something that<br>
distinguishes files from directories, but I don't know whether it<br>
exists or what it's named. This would have been my situation if I<br>
hadn't stumbled across nodetype in another theme.) UpdateItem() is<br>
where I would have found nodetype. And for what it's worth, I also<br>
found the childcount widget there, which isn't in the wiki. I'll add<br>
both of these to the wiki.<br>
<br>
I was thinking the complete set of widgets for a page might be stored<br>
in some sort of collection, and I could add debugging code to iterate<br>
over it and print them out. I looked for something like that but<br>
didn't see anything, although I'm not very familiar with the codebase<br>
and easily could have missed it.<br>
<br>
Maybe just asking on the list is the most efficient way. :-)<br>
<div class="HOEnZb"><div class="h5"><br>
_______________________________________________<br>
mythtv-theming mailing list<br>
<a href="mailto:mythtv-theming@mythtv.org">mythtv-theming@mythtv.org</a><br>
<a href="http://www.mythtv.org/mailman/listinfo/mythtv-theming" target="_blank">http://www.mythtv.org/mailman/listinfo/mythtv-theming</a><br>
</div></div></blockquote></div><br></div>