Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#250 closed patch (invalid)

Patch to centralize categories/colors

Reported by: Marcelo Toledo <marcelo@…> Owned by: Isaac Richards
Priority: minor Milestone: unknown
Component: mythtv Version: head
Severity: high 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 moved to the file mythtv/themes/categories.xml which is parsed by a new function called 'parseCategoryColors' (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.

Attached goes 2 patches:

epg-categories.patch

  • Removes all catcolor entries in themes/G.A.N.T./ui.xml and themes/blue/ui.xml
  • Creates themes/categories.xml with merged content from all ui.xml
  • Added support to install/uninstall categories.xml in themes/themes.pro
  • Declares the function 'parseCategoryColors' in libs/libmyth/xmlparse.h
  • Defines the function 'parseCategoryColors' in libs/libmyth/xmlparse.cpp, removes the code that was used to parse catcolor entries in the function 'parseGuideGrid', instead calls the new function

remove-catcolor.patch

  • Removes all catcolor entries in tTitivillus/ui.xml, Iulius/ui.xml and Minimalist-wide/ui.xml
  • NOTE: this patch is for myththemes component.

Attachments (2)

epg-categories.patch (60.9 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 (4)

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 Marcelo Toledo <marcelo@…>

Resolution: invalid
Status: newclosed

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

Severity: mediumhigh

this entry is now #260 due to changes.

Note: See TracTickets for help on using tickets.