Distinguish "Presenter" and "Presenters" (instead of "Presenter(s)").
authorgregor herrmann <gregoa@debian.org>
Thu, 14 Jul 2011 23:25:44 +0000 (23:25 +0000)
committergregor herrmann <gregoa@debian.org>
Thu, 14 Jul 2011 23:25:44 +0000 (23:25 +0000)
Closes: Ticket #17

src/mvc/delegate.cpp

index 1178a4f..51cf9e5 100644 (file)
@@ -184,7 +184,8 @@ void Delegate::paint(QPainter *painter, const QStyleOptionViewItem &option, cons
         // persons
         titlePointF.setY(titlePointF.y()+fmSmall.height()-fmSmall.descent());
         painter->setFont(fontSmall);
-        painter->drawText(titlePointF,"Presenter(s): " + event->persons().join(" and "));
+        QString presenterPrefix = event->persons().count() < 2 ? "Presenter" : "Presenters";
+        painter->drawText(titlePointF,presenterPrefix + ": " + event->persons().join(" and "));
         // track
         titlePointF.setY(titlePointF.y()+fmSmall.height()-fmSmall.descent());
         painter->drawText(titlePointF,"Track: " + Track::retrieveTrackName(event->trackId()));