Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Better handle display of high-numbered cards.

If a card's number was greater than 9, only the first digit was
displayed in some situations and caused confusion with some users.
Change toQChar(RecStatusType recstatus, uint cardid) to
toString(RecStatusType recstatus, uint cardid) and return a string to
allow display of the full number.

Also, tweak some themes where card numbers are displayed.
  • Loading branch information...
commit 95b4d9283cba9a8ec902b0f2080cd35778967eb5 1 parent 132c2dc
David Engel gigem authored
2  mythtv/libs/libmyth/programinfo.cpp
View
@@ -1428,7 +1428,7 @@ void ProgramInfo::ToMap(InfoMap &progMap,
}
progMap["rectypestatus"] = tmp_rec;
- progMap["card"] = toQChar(GetRecordingStatus(), cardid);
+ progMap["card"] = ::toString(GetRecordingStatus(), cardid);
progMap["recpriority"] = recpriority;
progMap["recpriority2"] = recpriority2;
11 mythtv/libs/libmyth/programtypes.cpp
View
@@ -69,8 +69,8 @@ QString toUIState(RecStatusType recstatus)
return "warning";
}
-/// \brief Converts "recstatus" into a human readable character.
-QChar toQChar(RecStatusType recstatus, uint cardid)
+/// \brief Converts "recstatus" into a human readable string.
+QString toString(RecStatusType recstatus, uint cardid)
{
QString ret = "-";
switch (recstatus)
@@ -82,10 +82,7 @@ QChar toQChar(RecStatusType recstatus, uint cardid)
ret = QObject::tr("R", "RecStatusChar rsRecorded");
break;
case rsRecording:
- if (0 < cardid && cardid < 10)
- ret = QString::number(cardid);
- else
- ret = QObject::tr("R", "RecStatusChar rsCurrentRecording");
+ ret = QString::number(cardid);
break;
case rsTuning:
ret = QObject::tr("t", "RecStatusChar rsTuning");
@@ -152,7 +149,7 @@ QChar toQChar(RecStatusType recstatus, uint cardid)
break;
}
- return (ret.isEmpty()) ? QChar('-') : ret[0];
+ return (ret.isEmpty()) ? QString("-") : ret;
}
/// \brief Converts "recstatus" into a short human readable description.
2  mythtv/libs/libmyth/programtypes.h
View
@@ -213,7 +213,7 @@ typedef enum RecStatusTypes {
rsOtherShowing = 13
} RecStatusType; // note stored in int8_t in ProgramInfo
MPUBLIC QString toUIState(RecStatusType);
-MPUBLIC QChar toQChar(RecStatusType, uint cardid);
+MPUBLIC QString toString(RecStatusType, uint cardid);
MPUBLIC QString toString(RecStatusType, RecordingType);
MPUBLIC QString toDescription(RecStatusType, const QDateTime &recstartts);
2  mythtv/programs/mythbackend/scheduler.cpp
View
@@ -523,7 +523,7 @@ void Scheduler::PrintRec(const RecordingInfo *p, const char *prefix)
.arg(p->GetInputID());
outstr += QString("%1 %2 %3")
.arg(toQChar(p->GetRecordingRuleType()))
- .arg(toQChar(p->GetRecordingStatus(), p->GetCardID()))
+ .arg(toString(p->GetRecordingStatus(), p->GetCardID()))
.arg(p->GetRecordingPriority());
if (p->GetRecordingPriority2())
outstr += QString("/%1").arg(p->GetRecordingPriority2());
8 mythtv/programs/mythfrontend/viewschedulediff.cpp
View
@@ -305,14 +305,14 @@ void ViewScheduleDiff::updateUIList(void)
item->SetTextFromMap(infoMap, state);
if (s.before)
- item->SetText(toQChar(s.before->GetRecordingStatus(),
- s.before->GetCardID()), "statusbefore");
+ item->SetText(toString(s.before->GetRecordingStatus(),
+ s.before->GetCardID()), "statusbefore");
else
item->SetText("-", "statusbefore");
if (s.after)
- item->SetText(toQChar(s.after->GetRecordingStatus(),
- s.after->GetCardID()), "statusafter");
+ item->SetText(toString(s.after->GetRecordingStatus(),
+ s.after->GetCardID()), "statusafter");
else
item->SetText("-", "statusafter");
}
20 mythtv/themes/MythCenter-wide/schedule-ui.xml
View
@@ -513,10 +513,10 @@
<area>240,2,230,24</area>
</textarea>
<textarea name="title" from="shortstarttimedate">
- <area>480,2,650,24</area>
+ <area>480,2,660,24</area>
</textarea>
<textarea name="card" from="shortstarttimedate">
- <area>1140,2,40,24</area>
+ <area>1150,2,30,24</area>
<align>right,vcenter</align>
</textarea>
</state>
@@ -534,11 +534,11 @@
<area>240,2,230,24</area>
</textarea>
<textarea name="title" from="shortstarttimedate">
- <area>480,2,650,24</area>
+ <area>480,2,660,24</area>
</textarea>
<textarea name="card" from="shortstarttimedate">
- <area>1140,2,40,24</area>
- <align>right,vcenter</align>
+ <area>1150,2,30,24</area>
+ <align>right,vcenter</align>
</textarea>
<shape name="selectbar">
<area>8,0,1180,28</area>
@@ -1175,10 +1175,11 @@
<area>240,2,230,24</area>
</textarea>
<textarea name="titlesubtitle" from="shortstarttimedate">
- <area>480,2,675,24</area>
+ <area>480,2,660,24</area>
</textarea>
<textarea name="card" from="shortstarttimedate">
- <area>1165,2,30,24</area>
+ <area>1150,2,30,24</area>
+ <align>right,vcenter</align>
</textarea>
</state>
<state name="selectedactive" from="active">
@@ -1195,10 +1196,11 @@
<area>240,2,230,24</area>
</textarea>
<textarea name="titlesubtitle" from="shortstarttimedate">
- <area>480,2,675,24</area>
+ <area>480,2,660,24</area>
</textarea>
<textarea name="card" from="shortstarttimedate">
- <area>1165,2,30,24</area>
+ <area>1150,2,30,24</area>
+ <align>right,vcenter</align>
</textarea>
<shape name="selectbar">
<area>8,0,1180,28</area>
15 mythtv/themes/MythCenter/schedule-ui.xml
View
@@ -496,10 +496,11 @@
<area>180,1,155,24</area>
</textarea>
<textarea name="title" from="shortstarttimedate">
- <area>345,1,370,24</area>
+ <area>345,1,365,24</area>
</textarea>
<textarea name="card" from="shortstarttimedate">
- <area>730,1,30,24</area>
+ <area>720,1,30,24</area>
+ <align>right,vcenter</align>
</textarea>
</state>
<state name="selectedactive" from="active">
@@ -511,10 +512,11 @@
<area>180,1,155,24</area>
</textarea>
<textarea name="title" from="shortstarttimedate">
- <area>345,1,370,24</area>
+ <area>345,1,365,24</area>
</textarea>
<textarea name="card" from="shortstarttimedate">
- <area>730,1,30,24</area>
+ <area>720,1,30,24</area>
+ <align>right,vcenter</align>
</textarea>
<shape name="selectbar">
<area>5,-3,751,30</area>
@@ -1255,12 +1257,13 @@
<font>basesmallwhite</font>
</textarea>
<textarea name="titlesubtitle" from="shortstarttimedate">
- <area>340,1,380,24</area>
+ <area>340,1,370,24</area>
<font>basesmallboldblue</font>
</textarea>
<textarea name="card" from="shortstarttimedate">
- <area>730,1,30,24</area>
+ <area>720,1,30,24</area>
<font>basesmallboldblue</font>
+ <align>right,vcenter</align>
</textarea>
</state>
<state name="selectedactive" from="active">
18 mythtv/themes/default-wide/schedule-ui.xml
View
@@ -561,10 +561,11 @@
<area>240,1,190,24</area>
</textarea>
<textarea name="titlesubtitle" from="shortstarttimedate">
- <area>440,1,690,24</area>
+ <area>440,1,700,24</area>
</textarea>
<textarea name="card" from="shortstarttimedate">
- <area>1145,1,35,24</area>
+ <area>1150,1,30,24</area>
+ <align>right,vcenter</align>
</textarea>
</state>
<state name="selectedactive" from="active" />
@@ -1151,10 +1152,11 @@
<area>240,1,190,24</area>
</textarea>
<textarea name="titlesubtitle" from="shortstarttimedate">
- <area>440,1,640,24</area>
+ <area>440,1,700,24</area>
</textarea>
<textarea name="card" from="shortstarttimedate">
- <area>1160,1,30,24</area>
+ <area>1150,1,30,24</area>
+ <align>right,vcenter</align>
</textarea>
</state>
<state name="selectedactive" from="active" />
@@ -2093,13 +2095,15 @@
<area>260,1,170,24</area>
</textarea>
<textarea name="titlesubtitle" from="shortstarttimedate">
- <area>440,1,640,24</area>
+ <area>440,1,645,24</area>
</textarea>
<textarea name="statusbefore" from="shortstarttimedate">
- <area>1125,1,30,24</area>
+ <area>1095,1,30,24</area>
+ <align>right,vcenter</align>
</textarea>
<textarea name="statusafter" from="shortstarttimedate">
- <area>1160,1,30,24</area>
+ <area>1135,1,30,24</area>
+ <align>right,vcenter</align>
</textarea>
</state>
<state name="selectedactive" from="active" />
18 mythtv/themes/default/schedule-ui.xml
View
@@ -494,10 +494,11 @@
<area>190,1,140,24</area>
</textarea>
<textarea name="title" from="shortstarttimedate">
- <area>340,1,380,24</area>
+ <area>340,1,370,24</area>
</textarea>
<textarea name="card" from="shortstarttimedate">
- <area>730,1,30,24</area>
+ <area>720,1,30,24</area>
+ <align>right,vcenter</align>
</textarea>
</state>
<state name="selectedactive" from="active" />
@@ -1218,10 +1219,11 @@
<area>190,1,140,24</area>
</textarea>
<textarea name="titlesubtitle" from="shortstarttimedate">
- <area>340,1,380,24</area>
+ <area>340,1,370,24</area>
</textarea>
<textarea name="card" from="shortstarttimedate">
- <area>730,1,30,24</area>
+ <area>720,1,30,24</area>
+ <align>right,vcenter</align>
</textarea>
</state>
<state name="selectedactive" from="active" />
@@ -2018,13 +2020,15 @@
<area>190,1,140,24</area>
</textarea>
<textarea name="titlesubtitle" from="shortstarttimedate">
- <area>340,1,350,24</area>
+ <area>340,1,330,24</area>
</textarea>
<textarea name="statusbefore" from="shortstarttimedate">
- <area>700,1,30,24</area>
+ <area>680,1,30,24</area>
+ <align>right,vcenter</align>
</textarea>
<textarea name="statusafter" from="shortstarttimedate">
- <area>730,1,30,24</area>
+ <area>720,1,30,24</area>
+ <align>right,vcenter</align>
</textarea>
</state>
<state name="selectedactive" from="active" />
Please sign in to comment.
Something went wrong with that request. Please try again.