From 8365ac26470737205424d7cc3eb1ff8ec2fe0fb8 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 10 Jan 2017 00:46:29 +0300 Subject: [PATCH] Revert "groups tree tooltips and info panels - add last post date info" This reverts commit 2bb7c8d0104fe6371a3f55e997ef7ad9c52a3d9c. --- .../src/gui/common/GroupTreeWidget.cpp | 6 +- .../gui/gxschannels/GxsChannelPostsWidget.cpp | 5 -- .../gui/gxschannels/GxsChannelPostsWidget.ui | 75 ++++++++++--------- .../gui/gxsforums/GxsForumThreadWidget.cpp | 1 - 4 files changed, 40 insertions(+), 47 deletions(-) diff --git a/retroshare-gui/src/gui/common/GroupTreeWidget.cpp b/retroshare-gui/src/gui/common/GroupTreeWidget.cpp index c3d0ad479..2009d55a5 100644 --- a/retroshare-gui/src/gui/common/GroupTreeWidget.cpp +++ b/retroshare-gui/src/gui/common/GroupTreeWidget.cpp @@ -36,7 +36,6 @@ #include "gui/common/ElidedLabel.h" #include "gui/settings/rsharesettings.h" #include "util/QtVersion.h" -#include "util/DateTime.h" #include @@ -478,11 +477,10 @@ void GroupTreeWidget::fillGroupItems(QTreeWidgetItem *categoryItem, const QList< tooltip += "\n" + tr("You have been granted as publisher (you can post here!)"); if(!IS_GROUP_SUBSCRIBED(itemInfo.subscribeFlags)) + { 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 - tooltip += "\n" + tr("Last Post") + ": " + DateTime::formatLongDateTime(itemInfo.lastpost) ; - if(!IS_GROUP_SUBSCRIBED(itemInfo.subscribeFlags)) tooltip += "\n" + tr("Subscribe to download and read messages") ; + } item->setToolTip(COLUMN_NAME, tooltip); item->setToolTip(COLUMN_UNREAD, tooltip); diff --git a/retroshare-gui/src/gui/gxschannels/GxsChannelPostsWidget.cpp b/retroshare-gui/src/gui/gxschannels/GxsChannelPostsWidget.cpp index 109ab942a..dd5c39b50 100644 --- a/retroshare-gui/src/gui/gxschannels/GxsChannelPostsWidget.cpp +++ b/retroshare-gui/src/gui/gxschannels/GxsChannelPostsWidget.cpp @@ -33,7 +33,6 @@ #include "gui/feeds/SubFileItem.h" #include "gui/notifyqt.h" #include -#include "util/DateTime.h" #define CHAN_DEFAULT_IMAGE ":/images/channels.png" @@ -267,10 +266,6 @@ void GxsChannelPostsWidget::insertChannelDetails(const RsGxsChannelGroup &group) ui->infoDescription->clear(); } else { ui->infoPosts->setText(QString::number(group.mMeta.mVisibleMsgCount)); - - ui->infoLastPost->setText(DateTime::formatLongDateTime(group.mMeta.mLastPost)); - - ui->infoDescription->setText(QString::fromUtf8(group.mDescription.c_str())); ui->infoAdministrator->setId(group.mMeta.mAuthorId) ; diff --git a/retroshare-gui/src/gui/gxschannels/GxsChannelPostsWidget.ui b/retroshare-gui/src/gui/gxschannels/GxsChannelPostsWidget.ui index 2317157fb..bdb6ca5d2 100644 --- a/retroshare-gui/src/gui/gxschannels/GxsChannelPostsWidget.ui +++ b/retroshare-gui/src/gui/gxschannels/GxsChannelPostsWidget.ui @@ -14,7 +14,16 @@ 4 - + + 0 + + + 0 + + + 0 + + 0 @@ -26,7 +35,16 @@ QFrame::Sunken - + + 4 + + + 4 + + + 4 + + 4 @@ -289,7 +307,16 @@ - + + 3 + + + 3 + + + 3 + + 3 @@ -370,7 +397,7 @@ - + @@ -402,33 +429,14 @@ - - - - - 0 - 0 - - - - - 75 - true - - - - Last Post: - - - - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Description</span></p></body></html> +</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">Description</span></p></body></html> Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse @@ -438,7 +446,7 @@ p, li { white-space: pre-wrap; } - + @@ -451,7 +459,7 @@ p, li { white-space: pre-wrap; } - + unknown @@ -465,14 +473,7 @@ p, li { white-space: pre-wrap; } - - - - unknown - - - - + @@ -485,7 +486,7 @@ p, li { white-space: pre-wrap; } - + unknown diff --git a/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.cpp b/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.cpp index 113cc8ecb..cc0890077 100644 --- a/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.cpp +++ b/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.cpp @@ -879,7 +879,6 @@ static QString getDurationString(uint32_t days) tw->mForumDescription = QString("%1: \t%2
").arg(tr("Forum name"), QString::fromUtf8( group.mMeta.mGroupName.c_str())); tw->mForumDescription += QString("%1: \t%2
").arg(tr("Subscribers")).arg(group.mMeta.mPop); tw->mForumDescription += QString("%1: \t%2
").arg(tr("Posts (at neighbor nodes)")).arg(group.mMeta.mVisibleMsgCount); - tw->mForumDescription += QString("%1: \t%2
").arg(tr("Last post")).arg(DateTime::formatLongDateTime(group.mMeta.mLastPost)); tw->mForumDescription += QString("%1: \t%2
").arg(tr("Synchronization")).arg(getDurationString( rsGxsForums->getSyncPeriod(group.mMeta.mGroupId)/86400 )) ; tw->mForumDescription += QString("%1: \t%2
").arg(tr("Storage")).arg(getDurationString( rsGxsForums->getStoragePeriod(group.mMeta.mGroupId)/86400));