[mythtv] [PATCH] add repeat to EPG
Frank Riley
fhriley at yahoo.com
Thu Sep 16 01:41:59 EDT 2004
This patch will add "(Repeat)" to shows in the EPG that have been marked as
a repeat in the database.
-------------- next part --------------
Index: libs/libmyth/uitypes.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythtv/libs/libmyth/uitypes.cpp,v
retrieving revision 1.84
diff -u -r1.84 uitypes.cpp
--- libs/libmyth/uitypes.cpp 10 Sep 2004 12:10:47 -0000 1.84
+++ libs/libmyth/uitypes.cpp 16 Sep 2004 05:30:44 -0000
@@ -805,6 +805,9 @@
if (drawCategoryText && data->category.length() > 0)
msg += " (" + data->category + ")";
+ if (data->repeat)
+ msg += " (" + tr("Repeat") + ")";
+
QRect area = data->drawArea;
area.addCoords(textoffset.x(), textoffset.y(),
-textoffset.x(), -textoffset.y());
@@ -837,11 +840,12 @@
void UIGuideType::SetProgramInfo(int row, int col, const QRect &area,
const QString &title, const QString &genre,
- int arrow, int recType, int recStat,
- bool selected)
+ bool repeat, int arrow, int recType,
+ int recStat, bool selected)
{
(void)col;
- UIGTCon *data = new UIGTCon(area, title, genre, arrow, recType, recStat);
+ UIGTCon *data = new UIGTCon(area, title, genre, repeat,
+ arrow, recType, recStat);
allData[row].append(data);
Index: libs/libmyth/uitypes.h
===================================================================
RCS file: /var/lib/mythcvs/mythtv/libs/libmyth/uitypes.h,v
retrieving revision 1.59
diff -u -r1.59 uitypes.h
--- libs/libmyth/uitypes.h 6 Sep 2004 22:58:05 -0000 1.59
+++ libs/libmyth/uitypes.h 16 Sep 2004 05:30:45 -0000
@@ -251,7 +251,8 @@
void LoadImage(int, const QString &file);
void SetProgramInfo(int row, int col, const QRect &area,
const QString &title, const QString &category,
- int arrow, int recType, int recStat, bool selected);
+ bool repeat, int arrow, int recType, int recStat,
+ bool selected);
void ResetData();
void ResetRow(int row);
void SetProgPast(int ppast);
@@ -263,11 +264,13 @@
public:
UIGTCon() { arrow = recType = recStat = 0; };
UIGTCon(const QRect &drawArea, const QString &title,
- const QString &category, int arrow, int recType, int recStat)
+ const QString &category, bool repeat, int arrow,
+ int recType, int recStat)
{
this->drawArea = drawArea;
this->title = title;
this->category = category.stripWhiteSpace();
+ this->repeat = repeat;
this->arrow = arrow;
this->recType = recType;
this->recStat = recStat;
@@ -278,6 +281,7 @@
drawArea = o.drawArea;
title = o.title;
category = o.category;
+ repeat = o.repeat;
categoryColor = o.categoryColor;
arrow = o.arrow;
recType = o.recType;
@@ -287,6 +291,7 @@
QRect drawArea;
QString title;
QString category;
+ bool repeat;
QColor categoryColor;
int arrow;
int recType;
Index: libs/libmythtv/guidegrid.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythtv/libs/libmythtv/guidegrid.cpp,v
retrieving revision 1.167
diff -u -r1.167 guidegrid.cpp
--- libs/libmythtv/guidegrid.cpp 9 Sep 2004 21:52:35 -0000 1.167
+++ libs/libmythtv/guidegrid.cpp 16 Sep 2004 05:30:45 -0000
@@ -865,7 +895,8 @@
recStat = 0;
type->SetProgramInfo(row, cnt, tempRect, proginfo->title,
- proginfo->category, arrow, recFlag,
+ proginfo->category, proginfo->repeat,
+ arrow, recFlag,
recStat, isCurrent);
cnt++;
More information about the mythtv-dev
mailing list