
robert.mcnamara at gmail
Nov 17, 2009, 11:53 AM
Post #2 of 13
(2266 views)
Permalink
|
|
Re: Help with theme writing (porting Retro)
[In reply to]
|
|
On Tue, Nov 17, 2009 at 11:46 AM, Christopher X. Candreva <chris [at] westnet> 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 [at] mythtv http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-theming
|