Commit 15c5d37e authored by Adrien Maglo's avatar Adrien Maglo Committed by Jean-Baptiste Kempf

Qt/EPG: Try to display intelligently the short and long event description with...

Qt/EPG: Try to display intelligently the short and long event description with the dedicated widgets.

It depends of the channels. Some use only the short one, others only the long one and others both.
(cherry picked from commit ec1859e9)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 145ca78f
......@@ -94,14 +94,22 @@ void EpgDialog::showEvent( EPGEvent *event )
{
if( !event ) return;
QString titleDescription, textDescription;
if( event->description.isEmpty() )
textDescription = event->shortDescription;
else
{
textDescription = event->description;
if( !event->shortDescription.isEmpty() )
titleDescription = " - " + event->shortDescription;
}
QDateTime end = event->start.addSecs( event->duration );
title->setText( event->start.toString( "hh:mm" ) + " - "
+ end.toString( "hh:mm" ) + " : "
+ event->name
+ ( event->shortDescription.isEmpty()
? "" : " - " + event->shortDescription ) );
+ event->name + titleDescription );
description->setText( event->description );
description->setText( textDescription );
}
void EpgDialog::updateInfos()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment