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 ec1859e9991185b43b3b05815654e8326dd6728c)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 145ca78f
...@@ -94,14 +94,22 @@ void EpgDialog::showEvent( EPGEvent *event ) ...@@ -94,14 +94,22 @@ void EpgDialog::showEvent( EPGEvent *event )
{ {
if( !event ) return; 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 ); QDateTime end = event->start.addSecs( event->duration );
title->setText( event->start.toString( "hh:mm" ) + " - " title->setText( event->start.toString( "hh:mm" ) + " - "
+ end.toString( "hh:mm" ) + " : " + end.toString( "hh:mm" ) + " : "
+ event->name + event->name + titleDescription );
+ ( event->shortDescription.isEmpty()
? "" : " - " + event->shortDescription ) );
description->setText( event->description ); description->setText( textDescription );
} }
void EpgDialog::updateInfos() 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