Merge pull request #1209 from PhenomRetroShare/Add_DescriptionGxsGroupToolTip

Add description in GroupTreeWidget tooltip.
This commit is contained in:
csoler 2018-03-14 20:34:52 +01:00 committed by GitHub
commit 11cfa7b098
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -481,12 +481,14 @@ void GroupTreeWidget::fillGroupItems(QTreeWidgetItem *categoryItem, const QList<
tooltip += "\n" + QString::number(itemInfo.max_visible_posts) + " messages available" ;
// if(itemInfo.max_visible_posts) // wtf? this=0 when there are some posts definitely exist - lastpost is recent
if(itemInfo.lastpost == QDateTime::fromTime_t(0))
tooltip += "\n" + tr("Last Post") + ": " + tr("Never") ;
tooltip += "\n" + tr("Last Post") + ": " + tr("Never") ;
else
tooltip += "\n" + tr("Last Post") + ": " + DateTime::formatLongDateTime(itemInfo.lastpost) ;
if(!IS_GROUP_SUBSCRIBED(itemInfo.subscribeFlags))
tooltip += "\n" + tr("Subscribe to download and read messages") ;
tooltip += "\n" + tr("Description") + ": " + itemInfo.description;
item->setToolTip(COLUMN_NAME, tooltip);
item->setToolTip(COLUMN_UNREAD, tooltip);
item->setToolTip(COLUMN_POPULARITY, tooltip);