Mailing List Archive

Help with theme writing (porting Retro)
OK, Thank you to Robert McNamara for directing me here, and a recap of a
question I just posted on the users list:


Full theme I'm working on:
http://www.westnet.com/~chris/Mythtv/Retro-wide.tar.gz
Just the file in question:
http://www.westnet.com/~chris/Mythtv/recordings-ui.xml

I'm working on themeing the recordings-ui.xml file. Starting from the
default theme, I wanted to replace the rounded area used to select a
subtitle with an image. I replaced this:

<state name="selected" from="active">
<shape name="selectbar">
<area>25,0,857,30</area>
</shape>
</state>

With this:
<state name="selected" from="active">
<imagetype name="selectbar">
<filename>rk-selectbar.png</filename>
<crop>0,0,880,29</crop>
</imagetype>
</state>

This 'works', however, mythfrontend now displays an error about a duplicate
object "selectbar".


Robert McNamara responds:

> It is being defined-- in the "active" state. "<state name="selected"
> from="active">" means *everything* in the active state is inherited,
> and everything in selected is an override. If you don't directly
> address the items defined in the active state, they will show up
> exactly as defined there. The shape and the image both show up
> because they're different objects. One inherited from Active and one
> newly defined.

Except it's not defined in any of my files. grep shows it only appears in my
recordings-ui.xml, and the first appearance is on line 79 -- where I get my
error. The other appearance is in a different window.

The only place this would be defined is in default-wide/base.xml

I have my own Retro-wide/base.xml that doesn't define it, and the console
output of mythfrontend doesn't show Retro-wide/base.xml being loaded. (At
least my notes from last night don't show it.)

Should I expect the default-wide/base.xml to be loaded, even if I have my
own ?



==========================================================
Chris Candreva -- chris@westnet.com -- (914) 948-3162
WestNet Internet Services of Westchester
http://www.westnet.com/
_______________________________________________
mythtv-theming mailing list
mythtv-theming@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-theming
Re: Help with theme writing (porting Retro) [ In reply to ]
On Tue, Nov 17, 2009 at 11:46 AM, Christopher X. Candreva
<chris@westnet.com> wrote:
>
> OK, Thank you to Robert McNamara for directing me here, and a recap of a
> question I just posted on the users list:
>
>
> Full theme I'm working on:
> http://www.westnet.com/~chris/Mythtv/Retro-wide.tar.gz
> Just the file in question:
> http://www.westnet.com/~chris/Mythtv/recordings-ui.xml
>
> I'm working on themeing the recordings-ui.xml file. Starting from the
> default theme, I wanted to replace the rounded area used to select a
> subtitle with an image.  I replaced this:
>
>                <state name="selected" from="active">
>                    <shape name="selectbar">
>                        <area>25,0,857,30</area>
>                    </shape>
>                </state>
>
> With this:
>                <state name="selected" from="active">
>                    <imagetype name="selectbar">
>                        <filename>rk-selectbar.png</filename>
>                        <crop>0,0,880,29</crop>
>                    </imagetype>
>                </state>
>
> This 'works', however, mythfrontend now displays an error about a duplicate
> object "selectbar".
>
>
> Robert McNamara responds:
>
>> It is being defined-- in the "active" state.  "<state name="selected"
>> from="active">" means *everything* in the active state is inherited,
>> and everything in selected is an override.  If you don't directly
>> address the items defined in the active state, they will show up
>> exactly as defined there.  The shape and the image both show up
>> because they're different objects.  One inherited from Active and one
>> newly defined.
>
> Except it's not defined in any of my files. grep shows it only appears in my
> recordings-ui.xml, and the first appearance is on line 79 -- where I get my
> error. The other appearance is in a different window.
>

I would need to look deeper at your XML to have any idea where it was
occurring, but the symptom you are describing is an inheritance XML
issue.

Which I just did.


<buttonlist name="recordings" from="basebuttonlist2">


So your recording buttonlist is inheriting from basebuttonlist2, which
is in base.xml for the default themes. So the inheritance is going
like this:

basebuttonlist2(in base.xml)->the recordings buttonlist in
recordings-ui.xml->the selected state in that buttonlist.

The active state is being inherited all the way through.

> The only place this would be defined is in default-wide/base.xml
>
> I have my own Retro-wide/base.xml that doesn't define it, and the console
> output of mythfrontend doesn't show Retro-wide/base.xml being loaded. (At
> least my notes from last night don't show it.)
>

Your theme wouldn't load without a base.xml, so it is being loaded.
It would occur at frontend startup.

> Should I expect the default-wide/base.xml to be loaded, even if I have my
> own ?
>

Yes. The default (or default-wide for wide themes) base.xml is always
loaded at frontend startup to facilitate falling back to the various
default screens. Thus the inheritance path above.

Robert
_______________________________________________
mythtv-theming mailing list
mythtv-theming@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-theming
Re: Help with theme writing (porting Retro) [ In reply to ]
On Tue, 17 Nov 2009, Robert McNamara wrote:

> > Should I expect the default-wide/base.xml to be loaded, even if I have my
> > own ?
>
> Yes. The default (or default-wide for wide themes) base.xml is always
> loaded at frontend startup to facilitate falling back to the various
> default screens. Thus the inheritance path above.

That explains it then - I thought I had replaced base.xml with mine.

Thank you. That probably explains a lot of my problems.



==========================================================
Chris Candreva -- chris@westnet.com -- (914) 948-3162
WestNet Internet Services of Westchester
http://www.westnet.com/
_______________________________________________
mythtv-theming mailing list
mythtv-theming@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-theming
Re: Help with theme writing (porting Retro) [ In reply to ]
On Tue, Nov 17, 2009 at 12:02 PM, Christopher X. Candreva
<chris@westnet.com> wrote:
> On Tue, 17 Nov 2009, Robert McNamara wrote:
>
>> > Should I expect the default-wide/base.xml to be loaded, even if I have my
>> > own ?
>>
>> Yes.  The default (or default-wide for wide themes) base.xml is always
>> loaded at frontend startup to facilitate falling back to the various
>> default screens.  Thus the inheritance path above.
>
> That explains it then - I thought I had replaced base.xml with mine.
>
> Thank you. That probably explains a lot of my problems.
>

No problem, good luck. :) Hopefully you're still having fun with it.

Robert
_______________________________________________
mythtv-theming mailing list
mythtv-theming@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-theming
Re: Help with theme writing (porting Retro) [ In reply to ]
On Tue, 17 Nov 2009, Robert McNamara wrote:

> No problem, good luck. :) Hopefully you're still having fun with it.

I am. I've hit another snag though that seems like it should be obivous,
just can't figure out what I'm missing.

For recordings, I'm trying to mimic the old behavior of, when the focus is
in the grouplist, the font dims in the list of titles.

The obvious answer would be to use the state "disabled", but from the docs
that only applies to buttons, not buttonlists. If the buttonlist derives
from some button definition, I haven't been able to find it.

"Disabled" is defined as "an unselected button in an inactive button list"
-- but how do you reference a button in a buttonlist ?


==========================================================
Chris Candreva -- chris@westnet.com -- (914) 948-3162
WestNet Internet Services of Westchester
http://www.westnet.com/
_______________________________________________
mythtv-theming mailing list
mythtv-theming@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-theming
Re: Help with theme writing (porting Retro) [ In reply to ]
On Tue, Nov 17, 2009 at 8:23 PM, Christopher X. Candreva
<chris@westnet.com> wrote:
> On Tue, 17 Nov 2009, Robert McNamara wrote:
>
>> No problem, good luck.  :)  Hopefully you're still having fun with it.
>
> I am. I've hit another snag though that seems like it should be obivous,
> just can't figure out what I'm missing.
>
> For recordings, I'm trying to mimic the old behavior of, when the focus is
> in the grouplist, the font dims in the list of titles.
>
> The obvious answer would be to use the state "disabled", but from the docs
> that only applies to buttons, not buttonlists. If the buttonlist derives
> from some button definition, I haven't been able to find it.
>
> "Disabled" is defined as "an unselected button in an inactive button list"
> -- but how do you reference a button in a buttonlist ?
>

Active, selected, and inactive are the states in buttonlists.
"inactive" is the state you want.

Robert
_______________________________________________
mythtv-theming mailing list
mythtv-theming@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-theming
Re: Help with theme writing (porting Retro) [ In reply to ]
On Tue, 17 Nov 2009, Robert McNamara wrote:

> > "Disabled" is defined as "an unselected button in an inactive button list"
> > -- but how do you reference a button in a buttonlist ?
> >
>
> Active, selected, and inactive are the states in buttonlists.
> "inactive" is the state you want.

That's what I thought, but that only changes the currently selected item in
the recordings list, not the entire list.

==========================================================
Chris Candreva -- chris@westnet.com -- (914) 948-3162
WestNet Internet Services of Westchester
http://www.westnet.com/
_______________________________________________
mythtv-theming mailing list
mythtv-theming@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-theming
Re: Help with theme writing (porting Retro) [ In reply to ]
On Tue, Nov 17, 2009 at 8:44 PM, Christopher X. Candreva
<chris@westnet.com> wrote:
> On Tue, 17 Nov 2009, Robert McNamara wrote:
>
>> > "Disabled" is defined as "an unselected button in an inactive button list"
>> > -- but how do you reference a button in a buttonlist ?
>> >
>>
>> Active, selected, and inactive are the states in buttonlists.
>> "inactive" is the state you want.
>
> That's what I thought, but that only changes the currently selected item in
> the recordings list, not the entire list.

That's correct, inactive is the unselected items, regardless of the
focus status of the buttonlist.

Robert
_______________________________________________
mythtv-theming mailing list
mythtv-theming@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-theming
Re: Help with theme writing (porting Retro) [ In reply to ]
On Tue, 17 Nov 2009, Robert McNamara wrote:

> That's correct, inactive is the unselected items, regardless of the
> focus status of the buttonlist.

OK, so is there any way to change the state of the entire list when it does
not have focus ?


==========================================================
Chris Candreva -- chris@westnet.com -- (914) 948-3162
WestNet Internet Services of Westchester
http://www.westnet.com/
_______________________________________________
mythtv-theming mailing list
mythtv-theming@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-theming
Re: Help with theme writing (porting Retro) [ In reply to ]
On Tue, Nov 17, 2009 at 8:50 PM, Christopher X. Candreva
<chris@westnet.com> wrote:
> On Tue, 17 Nov 2009, Robert McNamara wrote:
>
>> That's correct, inactive is the unselected items, regardless of the
>> focus status of the buttonlist.
>
> OK, so is there any way to change the state of the entire list when it does
> not have focus ?
>

No, not at present.

Robert
_______________________________________________
mythtv-theming mailing list
mythtv-theming@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-theming
Re: Help with theme writing (porting Retro) [ In reply to ]
On Tue, 17 Nov 2009, Robert McNamara wrote:

> > OK, so is there any way to change the state of the entire list when it does
> > not have focus ?
> >
>
> No, not at present.

Bugger.

OK, one last thing. The "MythUI Theme Development" section on "The button
widget" defines the active, selected, and disabled buttons in terms of "a
button in an active/inactive buttonlist".

Is this correct ? From the rest of the document and what you said earlier,
buttons are buttons and buttonlists are buttonlists, and never the twain
shall meet.

If I can't put a <button > tag inside a <buttonlist >, then talking about
the state of a button in "an active/inactive buttonlist" doesn't make sense.
Unless through some sort of inheritance you can style the buttons in a list.




==========================================================
Chris Candreva -- chris@westnet.com -- (914) 948-3162
WestNet Internet Services of Westchester
http://www.westnet.com/
_______________________________________________
mythtv-theming mailing list
mythtv-theming@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-theming
Re: Help with theme writing (porting Retro) [ In reply to ]
On Tue, Nov 17, 2009 at 8:59 PM, Christopher X. Candreva
<chris@westnet.com> wrote:
> On Tue, 17 Nov 2009, Robert McNamara wrote:
>
>> > OK, so is there any way to change the state of the entire list when it does
>> > not have focus ?
>> >
>>
>> No, not at present.
>
> Bugger.
>
> OK, one last thing. The "MythUI Theme Development" section on "The button
> widget" defines the active, selected, and disabled buttons in terms of "a
> button in an active/inactive buttonlist".
>
> Is this correct ? From the rest of the document and what you said earlier,
> buttons are buttons and buttonlists are buttonlists, and never the twain
> shall meet.
>
> If I can't put a <button > tag inside a <buttonlist >, then talking about
> the state of a button in "an active/inactive buttonlist" doesn't make sense.
> Unless through some sort of inheritance you can style the buttons in a list.
>

You're correct, I'll make the corrections.

Robert
_______________________________________________
mythtv-theming mailing list
mythtv-theming@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-theming
Re: Help with theme writing (porting Retro) [ In reply to ]
On Tue, 17 Nov 2009, Robert McNamara wrote:

> > If I can't put a <button > tag inside a <buttonlist >, then talking about
> > the state of a button in "an active/inactive buttonlist" doesn't make sense.
> > Unless through some sort of inheritance you can style the buttons in a list.
>
> You're correct, I'll make the corrections.

That's too bad, because being able to style the disabled state on the
buttons in the list would have done exactly what I wanted.

I'll have to sleep on how best to indicate the active list.

==========================================================
Chris Candreva -- chris@westnet.com -- (914) 948-3162
WestNet Internet Services of Westchester
http://www.westnet.com/
_______________________________________________
mythtv-theming mailing list
mythtv-theming@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-theming