mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-02-09 03:18:41 -05:00
Show forum description as post text when no thread is selected.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6480 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
c1dddadb91
commit
393e799e5f
@ -1111,7 +1111,7 @@ QString ForumsDialog::messageFromInfo(ForumMsgInfo &msgInfo)
|
|||||||
|
|
||||||
void ForumsDialog::insertPost()
|
void ForumsDialog::insertPost()
|
||||||
{
|
{
|
||||||
if ((mCurrForumId == "") || (mCurrThreadId == ""))
|
if (mCurrForumId.empty())
|
||||||
{
|
{
|
||||||
ui.postText->setText("");
|
ui.postText->setText("");
|
||||||
ui.threadTitle->setText("");
|
ui.threadTitle->setText("");
|
||||||
@ -1121,6 +1121,23 @@ void ForumsDialog::insertPost()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mCurrThreadId.empty())
|
||||||
|
{
|
||||||
|
ui.previousButton->setEnabled(false);
|
||||||
|
ui.nextButton->setEnabled(false);
|
||||||
|
ui.newmessageButton->setEnabled (false);
|
||||||
|
|
||||||
|
ForumInfo fi;
|
||||||
|
if (!rsForums->getForumInfo(mCurrForumId, fi)) {
|
||||||
|
ui.postText->setText("");
|
||||||
|
ui.threadTitle->setText("");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
ui.threadTitle->setText(tr("Forum Description"));
|
||||||
|
ui.postText->setText(QString::fromStdWString(fi.forumDesc));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
QTreeWidgetItem *curr = ui.threadTreeWidget->currentItem();
|
QTreeWidgetItem *curr = ui.threadTreeWidget->currentItem();
|
||||||
if (curr) {
|
if (curr) {
|
||||||
QTreeWidgetItem *Parent = curr->parent ();
|
QTreeWidgetItem *Parent = curr->parent ();
|
||||||
|
@ -903,6 +903,7 @@ void GxsForumThreadWidget::insertThreads()
|
|||||||
}
|
}
|
||||||
|
|
||||||
mSubscribeFlags = 0;
|
mSubscribeFlags = 0;
|
||||||
|
mForumDescription.clear();
|
||||||
|
|
||||||
ui->newmessageButton->setEnabled(false);
|
ui->newmessageButton->setEnabled(false);
|
||||||
ui->newthreadButton->setEnabled(false);
|
ui->newthreadButton->setEnabled(false);
|
||||||
@ -938,6 +939,7 @@ void GxsForumThreadWidget::insertForumThreads(const RsGroupMetaData &fi)
|
|||||||
{
|
{
|
||||||
mSubscribeFlags = fi.mSubscribeFlags;
|
mSubscribeFlags = fi.mSubscribeFlags;
|
||||||
ui->forumName->setText(QString::fromUtf8(fi.mGroupName.c_str()));
|
ui->forumName->setText(QString::fromUtf8(fi.mGroupName.c_str()));
|
||||||
|
// mForumDescription = QString::fromUtf8(fi.mDescription); // not available
|
||||||
|
|
||||||
ui->progressBarLayout->setEnabled(true);
|
ui->progressBarLayout->setEnabled(true);
|
||||||
|
|
||||||
@ -1156,7 +1158,7 @@ void GxsForumThreadWidget::fillChildren(QTreeWidgetItem *parentItem, QTreeWidget
|
|||||||
|
|
||||||
void GxsForumThreadWidget::insertPost()
|
void GxsForumThreadWidget::insertPost()
|
||||||
{
|
{
|
||||||
if (mForumId.empty() || mThreadId.empty())
|
if (mForumId.empty())
|
||||||
{
|
{
|
||||||
ui->postText->setText("");
|
ui->postText->setText("");
|
||||||
ui->threadTitle->setText("");
|
ui->threadTitle->setText("");
|
||||||
@ -1166,6 +1168,17 @@ void GxsForumThreadWidget::insertPost()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mThreadId.empty())
|
||||||
|
{
|
||||||
|
ui->previousButton->setEnabled(false);
|
||||||
|
ui->nextButton->setEnabled(false);
|
||||||
|
ui->newmessageButton->setEnabled (false);
|
||||||
|
|
||||||
|
ui->threadTitle->setText(tr("Forum Description"));
|
||||||
|
ui->postText->setText(mForumDescription);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
QTreeWidgetItem *item = ui->threadTreeWidget->currentItem();
|
QTreeWidgetItem *item = ui->threadTreeWidget->currentItem();
|
||||||
if (item) {
|
if (item) {
|
||||||
QTreeWidgetItem *parentItem = item->parent();
|
QTreeWidgetItem *parentItem = item->parent();
|
||||||
|
@ -137,6 +137,7 @@ private:
|
|||||||
std::string mForumId;
|
std::string mForumId;
|
||||||
std::string mLastForumID;
|
std::string mLastForumID;
|
||||||
std::string mThreadId;
|
std::string mThreadId;
|
||||||
|
QString mForumDescription;
|
||||||
int mSubscribeFlags;
|
int mSubscribeFlags;
|
||||||
bool mInProcessSettings;
|
bool mInProcessSettings;
|
||||||
bool mInMsgAsReadUnread;
|
bool mInMsgAsReadUnread;
|
||||||
|
@ -4969,6 +4969,10 @@ p, li { white-space: pre-wrap; }
|
|||||||
<source>You can't reply an Anonymous Author</source>
|
<source>You can't reply an Anonymous Author</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Forum Description</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>ForumsFillThread</name>
|
<name>ForumsFillThread</name>
|
||||||
@ -5207,6 +5211,18 @@ p, li { white-space: pre-wrap; }
|
|||||||
<source>Sort by</source>
|
<source>Sort by</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>IP</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Sort by IP</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Show IP Column</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>FriendRecommendDialog</name>
|
<name>FriendRecommendDialog</name>
|
||||||
@ -6767,6 +6783,10 @@ before you can comment</source>
|
|||||||
<source>You cant reply to an Anonymous Author</source>
|
<source>You cant reply to an Anonymous Author</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Forum Description</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>GxsForumsDialog</name>
|
<name>GxsForumsDialog</name>
|
||||||
@ -12761,6 +12781,19 @@ Try to be patient!</source>
|
|||||||
<source>Please enter a new--and valid--filename</source>
|
<source>Please enter a new--and valid--filename</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Last Time Seen</source>
|
||||||
|
<comment>i.e: Last Time Receiced Data</comment>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>UserID</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>File Never Seen</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>TreeStyle_RDM</name>
|
<name>TreeStyle_RDM</name>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user