Opened 14 years ago

Closed 14 years ago

#260 closed patch (fixed)

Patch to centralize categories/colors

Reported by: Marcelo Toledo <marcelo@…> Owned by: Isaac Richards
Priority: minor Milestone: unknown
Component: mythtv Version: head
Severity: medium Keywords: category, colors, epg
Cc: Ticket locked: no

Description

The problem

Today the EPG colorization is done by inserting lines in the ui.xml file available in a theme (i.e. G.A.N.T. or blue). The problem is that for each theme you must copy each entry twice in diferent regions of the xml. If one day we have 10 themes we will have 20 copies of the same lines, which is really bad for maintainance, today we have 5 ui.xml's to maintain (2 in mythtv and 3 in myththemes).

The solution

All category/color entries in ui.xml were synced and moved to the file mythtv/themes/categories.xml which is parsed by a new function called 'parseDefaultCategoryColors' (mythtv/libs/libmyth/xmlparse.cpp), this way the categories are stored in only one file (mythtv/themes/categories.txt), which is much better for maintainence. Also a particular theme may override a default category/color in it's ui.xml.

Attached goes 2 patches:

epg-categories.patch

  • themes/G.A.N.T./ui.xml and themes/blue/ui.xml had the same entries so it was all moved to categories.xml.
  • Creates themes/categories.xml
  • Added support to install/uninstall categories.xml in themes/themes.pro
  • Declares the function 'parseDefaultCategoryColors' in libs/libmyth/xmlparse.h
  • Defines the function 'parseDefaultCategoryColors' in libs/libmyth/xmlparse.cpp, calls the new function before ui.xml is loaded.

remove-catcolor.patch

  • Modified Titivillus/ui.xml, Iulius/ui.xml and Minimalist-wide/ui.xml to contain only distincted categories/colors.
  • NOTE: this patch is for myththemes component.

Attachments (2)

epg-categories.patch (61.2 KB) - added by Marcelo Toledo <marcelo@…> 14 years ago.
remove-catcolor.patch (54.2 KB) - added by Marcelo Toledo <marcelo@…> 14 years ago.

Download all attachments as: .zip

Change History (3)

Changed 14 years ago by Marcelo Toledo <marcelo@…>

Attachment: epg-categories.patch added

Changed 14 years ago by Marcelo Toledo <marcelo@…>

Attachment: remove-catcolor.patch added

comment:1 Changed 14 years ago by Isaac Richards

Resolution: fixed
Status: newclosed

(In [7142]) Patch from Marcelo Toledo to centralize the epg category colors.

Closes #260.

Note: See TracTickets for help on using tickets.