mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
show in people - enabled for yourself; Votes in tooltip; lastpost 1970 to Never
This commit is contained in:
parent
0dd63b3ba6
commit
36dbdee409
@ -239,7 +239,7 @@ void ChatLobbyDialog::participantsTreeWidgetCustomPopupMenu(QPoint)
|
|||||||
votePositiveAct->setEnabled(false);
|
votePositiveAct->setEnabled(false);
|
||||||
voteNeutralAct->setEnabled(false);
|
voteNeutralAct->setEnabled(false);
|
||||||
banAct->setEnabled(false);
|
banAct->setEnabled(false);
|
||||||
showinpeopleAct->setEnabled(false);
|
showinpeopleAct->setEnabled(true);
|
||||||
|
|
||||||
if (selectedItems.size())
|
if (selectedItems.size())
|
||||||
{
|
{
|
||||||
@ -252,7 +252,6 @@ void ChatLobbyDialog::participantsTreeWidgetCustomPopupMenu(QPoint)
|
|||||||
votePositiveAct->setEnabled(true);
|
votePositiveAct->setEnabled(true);
|
||||||
voteNeutralAct->setEnabled(true);
|
voteNeutralAct->setEnabled(true);
|
||||||
banAct->setEnabled(true);
|
banAct->setEnabled(true);
|
||||||
showinpeopleAct->setEnabled(true);
|
|
||||||
|
|
||||||
QList<QTreeWidgetItem*>::iterator item;
|
QList<QTreeWidgetItem*>::iterator item;
|
||||||
for (item = selectedItems.begin(); item != selectedItems.end(); ++item) {
|
for (item = selectedItems.begin(); item != selectedItems.end(); ++item) {
|
||||||
@ -312,12 +311,8 @@ void ChatLobbyDialog::showInPeopleTab()
|
|||||||
QList<QTreeWidgetItem*> selectedItems = ui.participantsList->selectedItems();
|
QList<QTreeWidgetItem*> selectedItems = ui.participantsList->selectedItems();
|
||||||
if (selectedItems.count()!=1)
|
if (selectedItems.count()!=1)
|
||||||
return;
|
return;
|
||||||
QList<QTreeWidgetItem*>::iterator item;
|
|
||||||
RsGxsId nickname;
|
RsGxsId nickname;
|
||||||
for (item = selectedItems.begin(); item != selectedItems.end(); ++item)
|
dynamic_cast<GxsIdRSTreeWidgetItem*>(*selectedItems.begin())->getId(nickname);
|
||||||
{
|
|
||||||
dynamic_cast<GxsIdRSTreeWidgetItem*>(*item)->getId(nickname) ;
|
|
||||||
}
|
|
||||||
IdDialog *idDialog = dynamic_cast<IdDialog*>(MainWindow::getPage(MainWindow::People));
|
IdDialog *idDialog = dynamic_cast<IdDialog*>(MainWindow::getPage(MainWindow::People));
|
||||||
if (!idDialog)
|
if (!idDialog)
|
||||||
return ;
|
return ;
|
||||||
|
@ -480,6 +480,9 @@ void GroupTreeWidget::fillGroupItems(QTreeWidgetItem *categoryItem, const QList<
|
|||||||
if(!IS_GROUP_SUBSCRIBED(itemInfo.subscribeFlags))
|
if(!IS_GROUP_SUBSCRIBED(itemInfo.subscribeFlags))
|
||||||
tooltip += "\n" + QString::number(itemInfo.max_visible_posts) + " messages available" ;
|
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.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") ;
|
||||||
|
else
|
||||||
tooltip += "\n" + tr("Last Post") + ": " + DateTime::formatLongDateTime(itemInfo.lastpost) ;
|
tooltip += "\n" + tr("Last Post") + ": " + DateTime::formatLongDateTime(itemInfo.lastpost) ;
|
||||||
if(!IS_GROUP_SUBSCRIBED(itemInfo.subscribeFlags))
|
if(!IS_GROUP_SUBSCRIBED(itemInfo.subscribeFlags))
|
||||||
tooltip += "\n" + tr("Subscribe to download and read messages") ;
|
tooltip += "\n" + tr("Subscribe to download and read messages") ;
|
||||||
|
@ -416,6 +416,9 @@ void GxsGroupDialog::updateFromExistingMeta(const QString &description)
|
|||||||
ui.nameline->setText(QString::fromUtf8(mGrpMeta.mGroupName.c_str()));
|
ui.nameline->setText(QString::fromUtf8(mGrpMeta.mGroupName.c_str()));
|
||||||
ui.popline->setText(QString::number( mGrpMeta.mPop)) ;
|
ui.popline->setText(QString::number( mGrpMeta.mPop)) ;
|
||||||
ui.postsline->setText(QString::number(mGrpMeta.mVisibleMsgCount));
|
ui.postsline->setText(QString::number(mGrpMeta.mVisibleMsgCount));
|
||||||
|
if(mGrpMeta.mLastPost==0)
|
||||||
|
ui.lastpostline->setText(tr("Never"));
|
||||||
|
else
|
||||||
ui.lastpostline->setText(DateTime::formatLongDateTime(mGrpMeta.mLastPost));
|
ui.lastpostline->setText(DateTime::formatLongDateTime(mGrpMeta.mLastPost));
|
||||||
ui.authorLabel->setId(mGrpMeta.mAuthorId);
|
ui.authorLabel->setId(mGrpMeta.mAuthorId);
|
||||||
ui.IDline->setText(QString::fromStdString(mGrpMeta.mGroupId.toStdString()));
|
ui.IDline->setText(QString::fromStdString(mGrpMeta.mGroupId.toStdString()));
|
||||||
|
@ -991,9 +991,12 @@ QString nickname ;
|
|||||||
else
|
else
|
||||||
comment += QString("<br/>%1: %2").arg(QApplication::translate("GxsIdDetails", "Authentication"), QApplication::translate("GxsIdDetails", "anonymous"));
|
comment += QString("<br/>%1: %2").arg(QApplication::translate("GxsIdDetails", "Authentication"), QApplication::translate("GxsIdDetails", "anonymous"));
|
||||||
|
|
||||||
if(details.mReputation.mFriendsPositiveVotes > 0) comment += "<br/><b>+" + QString::number(details.mReputation.mFriendsPositiveVotes) + "</b>";
|
if(details.mReputation.mFriendsPositiveVotes || details.mReputation.mFriendsNegativeVotes)
|
||||||
if(details.mReputation.mFriendsNegativeVotes > 0) comment += "<br/><b>-" + QString::number(details.mReputation.mFriendsNegativeVotes) + "</b>";
|
{
|
||||||
|
comment += "<br/>Votes:";
|
||||||
|
if(details.mReputation.mFriendsPositiveVotes > 0) comment += " <b>+" + QString::number(details.mReputation.mFriendsPositiveVotes) + "</b>";
|
||||||
|
if(details.mReputation.mFriendsNegativeVotes > 0) comment += " <b>-" + QString::number(details.mReputation.mFriendsNegativeVotes) + "</b>";
|
||||||
|
}
|
||||||
return comment;
|
return comment;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -267,10 +267,10 @@ void GxsChannelPostsWidget::insertChannelDetails(const RsGxsChannelGroup &group)
|
|||||||
ui->infoDescription->clear();
|
ui->infoDescription->clear();
|
||||||
} else {
|
} else {
|
||||||
ui->infoPosts->setText(QString::number(group.mMeta.mVisibleMsgCount));
|
ui->infoPosts->setText(QString::number(group.mMeta.mVisibleMsgCount));
|
||||||
|
if(group.mMeta.mLastPost==0)
|
||||||
|
ui->infoLastPost->setText(tr("Never"));
|
||||||
|
else
|
||||||
ui->infoLastPost->setText(DateTime::formatLongDateTime(group.mMeta.mLastPost));
|
ui->infoLastPost->setText(DateTime::formatLongDateTime(group.mMeta.mLastPost));
|
||||||
|
|
||||||
|
|
||||||
ui->infoDescription->setText(QString::fromUtf8(group.mDescription.c_str()));
|
ui->infoDescription->setText(QString::fromUtf8(group.mDescription.c_str()));
|
||||||
|
|
||||||
ui->infoAdministrator->setId(group.mMeta.mAuthorId) ;
|
ui->infoAdministrator->setId(group.mMeta.mAuthorId) ;
|
||||||
|
@ -879,6 +879,9 @@ static QString getDurationString(uint32_t days)
|
|||||||
tw->mForumDescription = QString("<b>%1: \t</b>%2<br/>").arg(tr("Forum name"), QString::fromUtf8( group.mMeta.mGroupName.c_str()));
|
tw->mForumDescription = QString("<b>%1: \t</b>%2<br/>").arg(tr("Forum name"), QString::fromUtf8( group.mMeta.mGroupName.c_str()));
|
||||||
tw->mForumDescription += QString("<b>%1: \t</b>%2<br/>").arg(tr("Subscribers")).arg(group.mMeta.mPop);
|
tw->mForumDescription += QString("<b>%1: \t</b>%2<br/>").arg(tr("Subscribers")).arg(group.mMeta.mPop);
|
||||||
tw->mForumDescription += QString("<b>%1: \t</b>%2<br/>").arg(tr("Posts (at neighbor nodes)")).arg(group.mMeta.mVisibleMsgCount);
|
tw->mForumDescription += QString("<b>%1: \t</b>%2<br/>").arg(tr("Posts (at neighbor nodes)")).arg(group.mMeta.mVisibleMsgCount);
|
||||||
|
if(group.mMeta.mLastPost==0)
|
||||||
|
tw->mForumDescription += QString("<b>%1: \t</b>%2<br/>").arg(tr("Last post")).arg(tr("Never"));
|
||||||
|
else
|
||||||
tw->mForumDescription += QString("<b>%1: \t</b>%2<br/>").arg(tr("Last post")).arg(DateTime::formatLongDateTime(group.mMeta.mLastPost));
|
tw->mForumDescription += QString("<b>%1: \t</b>%2<br/>").arg(tr("Last post")).arg(DateTime::formatLongDateTime(group.mMeta.mLastPost));
|
||||||
tw->mForumDescription += QString("<b>%1: \t</b>%2<br/>").arg(tr("Synchronization")).arg(getDurationString( rsGxsForums->getSyncPeriod(group.mMeta.mGroupId)/86400 )) ;
|
tw->mForumDescription += QString("<b>%1: \t</b>%2<br/>").arg(tr("Synchronization")).arg(getDurationString( rsGxsForums->getSyncPeriod(group.mMeta.mGroupId)/86400 )) ;
|
||||||
tw->mForumDescription += QString("<b>%1: \t</b>%2<br/>").arg(tr("Storage")).arg(getDurationString( rsGxsForums->getStoragePeriod(group.mMeta.mGroupId)/86400));
|
tw->mForumDescription += QString("<b>%1: \t</b>%2<br/>").arg(tr("Storage")).arg(getDurationString( rsGxsForums->getStoragePeriod(group.mMeta.mGroupId)/86400));
|
||||||
|
Loading…
Reference in New Issue
Block a user