<div dir="ltr"><span style="font-family:arial,sans-serif;font-size:13px">&gt; And for what it&#39;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">&gt; found the childcount widget there, which isn&#39;t in the wiki. I&#39;ll add</span><br style="font-family:arial,sans-serif;font-size:13px">
<span style="font-family:arial,sans-serif;font-size:13px">&gt; 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 &quot;studiostate&quot; in there? I&#39;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">&lt;<a href="mailto:rjmorris.list@zoho.com" target="_blank">rjmorris.list@zoho.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Paul Harrison &lt;<a href="mailto:mythtv@sky.com">mythtv@sky.com</a>&gt; wrote on Thu, Jul 11, 2013 at 05:50:25PM +0100:<br>

<div><div class="h5">&gt; On 11/07/13 13:09, Joey Morris wrote:<br>
&gt; &gt;Is there a way to get a full list of the widgets available on a<br>
&gt; &gt;window, such as the &quot;tree&quot; window in video-ui.xml? The wiki page is<br>
&gt; &gt;the obvious place to look, but it&#39;s out of date in some cases. For<br>
&gt; &gt;example, I wanted a way to distinguish directories from videos in the<br>
&gt; &gt;tree window, but I didn&#39;t see anything in the wiki related to that.<br>
&gt; &gt;Then I was looking at another theme and noticed it used the &quot;nodetype&quot;<br>
&gt; &gt;statetype with states &quot;subfolder&quot; and &quot;upfolder&quot;. Perhaps it also<br>
&gt; &gt;defines a &quot;file&quot; or &quot;video&quot; state, but I&#39;m not sure.<br>
&gt; &gt;<br>
&gt; &gt;I don&#39;t mind looking in the source code to find the widget names if<br>
&gt; &gt;that&#39;s the best solution, but could someone give me a hint on where to<br>
&gt; &gt;look? I do plan to update the wiki with the new widgets I find.<br>
&gt; &gt;<br>
&gt;<br>
&gt; If the info is not on the wiki page then looking at the source is<br>
&gt; the only way I think.<br>
&gt;<br>
&gt; Clone the source using git then you can use the git tools to help<br>
&gt; find what you want.<br>
&gt;<br>
&gt; git grep video-ui.xml  - will tell you which file or files to look<br>
&gt; in. videodlg.cpp looks promising.<br>
&gt;<br>
&gt; git log --grep nodetype - will tell you the commits that mention<br>
&gt; nodetype in the log<br>
&gt;<br>
&gt; commit a7b6c2a34b98 from Stuart M. looks relevant but unfortunately<br>
&gt; not much info in the commit log :( so looking at what changed might<br>
&gt; show more info<br>
&gt;<br>
&gt; git show a7b6c2a34b98 - would show you what was changed.<br>
&gt;<br>
&gt; There are many other tools in git to help you find what you want.<br>
&gt;<br>
&gt; Most of the time simply looking for a function called Create() you<br>
&gt; tell you what widgets a screen is looking for. The one for the<br>
&gt; MythVideo browser screens looks like this<br>
&gt;<br>
&gt;     if (m_d-&gt;m_type == DLG_TREE)<br>
&gt;         UIUtilE::Assign(this, m_videoButtonTree, &quot;videos&quot;, &amp;err);<br>
&gt;     else<br>
&gt;         UIUtilE::Assign(this, m_videoButtonList, &quot;videos&quot;, &amp;err);<br>
&gt;<br>
&gt;     UIUtilW::Assign(this, m_titleText, &quot;title&quot;);<br>
&gt;     UIUtilW::Assign(this, m_novideoText, &quot;novideos&quot;);<br>
&gt;     UIUtilW::Assign(this, m_positionText, &quot;position&quot;);<br>
&gt;     UIUtilW::Assign(this, m_crumbText, &quot;breadcrumbs&quot;);<br>
&gt;<br>
&gt;     UIUtilW::Assign(this, m_coverImage, &quot;coverart&quot;);<br>
&gt;     UIUtilW::Assign(this, m_screenshot, &quot;screenshot&quot;);<br>
&gt;     UIUtilW::Assign(this, m_banner, &quot;banner&quot;);<br>
&gt;     UIUtilW::Assign(this, m_fanart, &quot;fanart&quot;);<br>
&gt;<br>
&gt;     UIUtilW::Assign(this, m_trailerState, &quot;trailerstate&quot;);<br>
&gt;     UIUtilW::Assign(this, m_parentalLevelState, &quot;parentallevel&quot;);<br>
&gt;     UIUtilW::Assign(this, m_watchedState, &quot;watchedstate&quot;);<br>
&gt;     UIUtilW::Assign(this, m_studioState, &quot;studiostate&quot;);<br>
&gt;<br>
&gt; So you can see the names of the widgets &quot;videos&quot;, &quot;title,<br>
&gt; &quot;&quot;novideos&quot;, &quot;position&quot; etc and also you can work out the type of<br>
&gt; widget from the variable names usually. UIUtilE means it&#39;s a<br>
&gt; compulsory widget (throws an error if not found) and UIUtilW means<br>
&gt; it&#39;s optional (just shows a warning) so only the &quot;video&quot; buttontree<br>
&gt; or buttonlist is compulsory all the others are optional.<br>
&gt;<br>
&gt; Also looking for functions called something like toMap() can be<br>
&gt; useful like the one in metadatacommon.cpp will show you the names of<br>
&gt; text areas or names that can be used in tempates etc.<br>
&gt;<br>
&gt; 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&#39;t have helped me in this case, because nodetype<br>
isn&#39;t referenced in Create() and isn&#39;t in the metadata map. (Here, I&#39;m<br>
imagining the scenario where I know I want something that<br>
distinguishes files from directories, but I don&#39;t know whether it<br>
exists or what it&#39;s named. This would have been my situation if I<br>
hadn&#39;t stumbled across nodetype in another theme.) UpdateItem() is<br>
where I would have found nodetype. And for what it&#39;s worth, I also<br>
found the childcount widget there, which isn&#39;t in the wiki. I&#39;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&#39;t see anything, although I&#39;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>