Notification-ui.xml

From MythTV Official Wiki
Revision as of 23:20, 20 July 2013 by Jyavenard (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The notification-ui.xml file governs the layout and behavior of the notification center cards. It consists of the following windows and named attributes:

Notification Windows

Window Name Type Description
notification Window The simplest notification card view type.
notification-image Window Notification with image view type
notification-full Window Full scree notification card


Generic Attributes Used in all windows

Important.png Note: The following widgets can be used in any of the notification views. In addition, all textual elements can be combined however the themer likes using the <template> element. To combine the title, origin, and description into a single textarea, the theme author might use a template like:

<template>%TITLE% (%ORIGIN%) - %DESCRIPTION%</template>


Widget Name Widget Type Description Required?
title textarea The 'title' of the notification card. N
origin textarea The origin element of the notification card. N
description textarea The 'description' element of the notification card. N
extra textarea The 'extra' element of the notification card. N
progress_text textarea The 'progress_text' element of the notification card. N
progress progressbar The progression bar N
image imagetype The image element of the notification card. N
mediastate statetype A statetype to indicate if the media had an artwork or not. Values are ok and noartwork N
errorstate statetype A statetype to indicate the type of notification. Values are ok, error, warning and check N

Each of the textarea values are available for all textarea widgets' templates defined in a notification card, regardless of their name or their location in the widget tree.

  • title
  • image (image path of the image)
  • origin
  • description
  • extra
  • progress_text
  • progress (percentage value between 0 and 100 of the progressbar)

Example:

       <statetype name="mediastate">
           <area>0,0,100%,100%</area>
           <state name="ok"/>
           <state name="noartwork">
               <area>0,0,100%,100%</area>
               <imagetype name="imageartwork">
                   <filename>noartwork.png</filename>
                   <area>18,18,144,144</area>
               </imagetype>
               <textarea name="noartworktitle" from="basetextarea">
                   <area>170,10,-10,35</area>
                   <template>%TITLE%</template>
                   baselarge
                </textarea>
               <textarea name="noartworkorigin" from="basetextarea">
                   <area>170,45,-10,30</area>
                   <template>%ORIGIN%</template>
                   basesmall
               </textarea>
            </state>
       </statetype>


Note: The image widget should be made dependent on both mediastate and errorstate not being displayed so it's not displayed when either of those states are set; like so

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