Skip to content

Commit

Permalink
Optionally display the current channel group when browsing LiveTV
Browse files Browse the repository at this point in the history
This patch add a new "channelgroup" text area for the OSD, displaying the
current channel group if used for live TV. Fixes #10460

Signed-off-by: Paul Harrison <pharrison@mythtv.org>
  • Loading branch information
xavierh authored and Paul Harrison committed Sep 6, 2015
1 parent 97aface commit 74eef7b
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 3 deletions.
10 changes: 10 additions & 0 deletions mythtv/libs/libmythtv/osd.cpp
Expand Up @@ -461,6 +461,16 @@ void OSD::SetText(const QString &window, const InfoMap &map,
}
}
}

if (map.contains("channelgroup"))
{
MythUIText *textArea = dynamic_cast<MythUIText *> (win->GetChild("channelgroup"));
if (textArea)
{
textArea->SetText(map["channelgroup"]);
}
}

if (map.contains("inetref"))
{
MythUIImage *cover = dynamic_cast<MythUIImage *> (win->GetChild("coverart"));
Expand Down
5 changes: 5 additions & 0 deletions mythtv/libs/libmythtv/tvbrowsehelper.cpp
Expand Up @@ -577,6 +577,11 @@ void TVBrowseHelper::run()
m_lock.unlock();

// pull in additional data from the DB...
if (m_tv->channelGroupId > -1 && db_use_channel_groups)
infoMap["channelgroup"] = ChannelGroup::GetChannelGroupName(m_tv->channelGroupId);
else
infoMap["channelgroup"] = QObject::tr("All channels");

QDateTime startts = MythDate::fromString(m_starttime);
RecordingInfo recinfo(m_chanid, startts, false);
recinfo.ToMap(infoMap);
Expand Down
11 changes: 8 additions & 3 deletions mythtv/themes/default-wide/osd.xml
Expand Up @@ -360,17 +360,22 @@
<template>%TIME%</template>
<align>right,top</align>
</clock>
<textarea name="channum">
<textarea name="channelgroup">
<font>small</font>
<area>20,100,150,30</area>
<align>hcenter,vcenter</align>
</textarea>
<textarea name="channum">
<font>small</font>
<area>20,125,150,30</area>
<align>hcenter,vcenter</align>
</textarea>
<imagetype name="iconpath">
<area>30,140,130,100</area>
<area>30,160,130,100</area>
</imagetype>
<textarea name="callsign">
<font>smaller</font>
<area>20,250,150,30</area>
<area>20,265,150,30</area>
<align>hcenter,vcenter</align>
</textarea>
<textarea name="description">
Expand Down

0 comments on commit 74eef7b

Please sign in to comment.