Mailing List Archive

using nodetype outside a buttonlist
In the video library, I'm unable to get the nodetype statetype to work
outside the buttonlist. By "not working", I mean the content
associated with the subfolder state isn't displayed when a subfolder
is selected. When I turn on widget borders and widget names, I can see
nodetype's border but not subfolder's border. This is my nodetype
definition:

<statetype name="nodetype">
<position>0,100</position>
<state name="subfolder">
<imagetype name="icon">
<area>0,0,50,50</area>
<filename>images/mv_gallery-folder-reg.png</filename>
<preserveaspect>yes</preserveaspect>
</imagetype>
</state>
</statetype>

This is defined inside a group widget, in case that's important.

A few notes:

- I'm running 0.26-fixes.

- I'm using the list (tree) view with browse library enabled. I see
the same behavior when I switch to gallery view and/or browse filesystem.

- The same nodetype definition works *inside* the buttonlist.

- Other statetypes, such as trailerstate or videolevel, do work
outside the buttonlist.

Ultimately, what I'm trying to do is display different information in
an area outside the buttonlist depending on whether the selected item
is a folder or a video. For example, I want to display the director
and cast list for a video, but I want to display the number of child
items for a subfolder. As a workaround, I've tried setting
dependencies on widgets that are guaranteed to be present for videos
and absent for subfolders (or vice versa), but I haven't had any luck
with that approach.

Does anyone have thoughts on whether I'm doing something wrong or if
this is a bug? Are there better workarounds than what I tried?

_______________________________________________
mythtv-theming mailing list
mythtv-theming@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-theming
Re: using nodetype outside a buttonlist [ In reply to ]
Hi

On Monday, 12 August 2013, Joey Morris wrote:

> In the video library, I'm unable to get the nodetype statetype to work
> outside the buttonlist. By "not working", I mean the content
> associated with the subfolder state isn't displayed when a subfolder
> is selected. When I turn on widget borders and widget names, I can see
> nodetype's border but not subfolder's border. This is my nodetype
> definition:


A state really only exists for the object it's assigned to. It's not
available to all elements, not event to sub-children.

So if the code set a state to the child XX of an object YY, that statetype
is only available for XX as child of YY.


> Does anyone have thoughts on whether I'm doing something wrong or if
> this is a bug? Are there better workarounds than what I tried?
>
>
It's not a bug ; that's just not how statetype works... Personally I think
that it could be improved and a statetype should be available at list to
all children (including children of children) but at this stage it's not.

What is new in 0.27 however, is that templates are available to *all*
children of a composite object; so you could use templates for the text...
it would still have to be within the buttonlist however.
Re: using nodetype outside a buttonlist [ In reply to ]
Jean-Yves Avenard <jyavenard@gmail.com> wrote on Mon, Aug 12, 2013 at 09:23:25AM +1000:
> On Monday, 12 August 2013, Joey Morris wrote:
>
> > In the video library, I'm unable to get the nodetype statetype to work
> > outside the buttonlist. By "not working", I mean the content
> > associated with the subfolder state isn't displayed when a subfolder
> > is selected. When I turn on widget borders and widget names, I can see
> > nodetype's border but not subfolder's border. This is my nodetype
> > definition:
>
>
> A state really only exists for the object it's assigned to. It's not
> available to all elements, not event to sub-children.
>
> So if the code set a state to the child XX of an object YY, that statetype
> is only available for XX as child of YY.
>
>
> > Does anyone have thoughts on whether I'm doing something wrong or if
> > this is a bug? Are there better workarounds than what I tried?
> >
> >
> It's not a bug ; that's just not how statetype works... Personally I think
> that it could be improved and a statetype should be available at list to
> all children (including children of children) but at this stage it's not.

Is the nodetype statetype different from other statetypes in this
regard? The videolevel and trailerstate statetypes do both work
outside the buttonlist, so it seems natural that nodetype would behave
the same way.

_______________________________________________
mythtv-theming mailing list
mythtv-theming@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-theming
Re: using nodetype outside a buttonlist [ In reply to ]
Joey Morris <rjmorris.list@zoho.com> wrote on Sun, Aug 11, 2013 at 12:25:44PM -0400:
> Ultimately, what I'm trying to do is display different information in
> an area outside the buttonlist depending on whether the selected item
> is a folder or a video. For example, I want to display the director
> and cast list for a video, but I want to display the number of child
> items for a subfolder. As a workaround, I've tried setting
> dependencies on widgets that are guaranteed to be present for videos
> and absent for subfolders (or vice versa), but I haven't had any luck
> with that approach.
>
> Does anyone have thoughts on whether I'm doing something wrong or if
> this is a bug? Are there better workarounds than what I tried?

Here are a couple of screenshots illustrating what I'm trying to
accomplish.

http://s24.postimg.org/6wxat959h/selected_video.png
http://s24.postimg.org/cwl1wwq1x/selected_folder.png

The first one shows what my video library screen looks like when a
video is selected. As you can see, the buttontree is on the right, and
the left is filled with the video metadata.

The second one shows what it looks like when a folder is selected.
Most of the left side is blank, because the video metadata isn't
defined for folders. Instead of all that blank space, though, I'd like
to have a childcount textarea to display the number of items in the
folder and then fill the remaining space with a large coverart image
(replacing the episode screenshot).

Any suggestions for how to do this? Is it even possible? If not, I
don't want to spend any more time messing with it. Instead I'll try to
redesign the page to work within Myth's capabilities.

_______________________________________________
mythtv-theming mailing list
mythtv-theming@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-theming