[mythtv-theming] New MythTV notification center and theme...

Jean-Yves Avenard jyavenard at gmail.com
Mon Jul 15 03:50:57 UTC 2013


Ok.

I've made the error display themeable.
Also added a new state "noartwork", which is set when a
MythMediaNotification is displayed and there's no artwork provided (or
it's empty)

to implement this I add to extend MythUI capabilities slightly.
Now you can set a dependency on a statetype object. If the statetype
object isn't visible, or none of its children are visible, then the
dependency will resolved as false, otherwise true.

The templates are now usable inside all group objets (statetype,
group, screentype).

So you can do something like:

        <statetype name="mediastate">
            <area>0,0,100%,100%</area>
            <state name="ok"/>
            <state name="noartwork">
                <area>0,0,100%,100%</area>
                <textarea name="mytext">
                    <template>%DESCRIPTION%</template>
                    <area>18,18,144,144</area>
                </textarea>
            </state>
        </statetype>

The text of "mytext" will be set to the value of description, so you
could really re-defined entirely how a screen will appear and still
access the text values.

Finally, you can now have an object depends on more than one object.
Two logical arithmetic operations are supported: & (AND) and | (OR).
Expressions are evaluated from left to right.

So you can do something like so:

        <statetype name="mediastate">
            <area>0,0,100%,100%</area>
            <state name="ok"/>
            <state name="noartwork">
                <area>0,0,100%,100%</area>
                <imagetype name="imageartwork">
                    <!-- Artist: Vargas21
http://www.iconarchive.com/show/aquave-metal-icons-by-vargas21/Music-icon.html
-->
                    <filename>noartwork.png</filename>
                    <area>18,18,144,144</area>
                </imagetype>
            </state>
        </statetype>

        <statetype name="errorstate">
            <area>0,0,100%,100%</area>
            <state name="ok"/>
            <state name="error">
                <area>0,0,100%,100%</area>
                <imagetype name="imageerror">
                    <!-- Artist: Kyo-Tux -->
                    <filename>error.png</filename>
                    <area>18,18,144,144</area>
                </imagetype>
            </state>
        </statetype>

        <imagetype name="image" depends="!mediastate&amp;!errorstate">
            <filename>damaged.png</filename>
            <area>18,18,144,144</area>
        </imagetype>

...

So here, our image "image" widget, will only be displayed if neither
mediastate nor errorstate are visible.

I think those three new extensions can greatly enhance the
possibilities on what can be done with a theme.

Good theming !


More information about the mythtv-theming mailing list