[mythtv] Patch to add icons to UIManagedTreeList

Paul Volkaerts paul.volkaerts at lineone.net
Sat Nov 6 13:01:12 UTC 2004


I have patched UIManagedTreeList to support icons to the left of the text
fields in the rightmost bin.  Anyone own this code and want to see the
change before I commit it?  I added it to show presence status of users in
MythPhone but it could equally apply to MythMusic or MythVideo.

Usage is:-

Call UIManagedTreeList function "iconSelector(i)" passing the attribute
within the GenericTree structure that holds the icon identifier. If you
don't call this new function the class behaves as before. If you do call
this class, the text is shifted right to make room for the icon.

Then within the XML page defining the layout of the screen add something

  <image function="icon" number="1"
  <image function="icon" number="2"
  <image function="icon" number="3" filename="mp_presence_away.png"></image>

So for example, calling "iconSelector(3)" then setting attribute[3]=1 will
show icon number 1 against that tree item.

It restricts the icon display to the final bin; but no real reason for this
restriction except it is what I wanted to acheive. Would be easy to make
iconSelector take a "bin" argument as well.


More information about the mythtv-dev mailing list