mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-30 09:48:59 -04:00
added GUI support for non anon forums. Changed serialisation of GxsGroupMetaData so that mSignFlags is serialised in place of mAuthenFlag, which is not used anyway
This commit is contained in:
parent
a6851b63dc
commit
febd348d24
9 changed files with 34 additions and 20 deletions
|
@ -129,6 +129,10 @@ void GxsGroupDialog::init()
|
|||
|
||||
ui.groupDesc->setPlaceholderText(tr("Set a descriptive description here"));
|
||||
|
||||
ui.personal_ifnopub->hide() ;
|
||||
ui.personal_required->hide() ;
|
||||
ui.personal_required->setChecked(true) ; // this is always true
|
||||
|
||||
initMode();
|
||||
}
|
||||
|
||||
|
@ -592,15 +596,15 @@ uint32_t GxsGroupDialog::getGroupSignFlags()
|
|||
}
|
||||
|
||||
// Author Signature.
|
||||
if (ui.personal_pgp->isChecked()) {
|
||||
if (ui.personal_pgp->isChecked())
|
||||
signFlags |= GXS_SERV::FLAG_AUTHOR_AUTHENTICATION_GPG;
|
||||
} else if (ui.personal_required->isChecked()) {
|
||||
|
||||
if (ui.personal_required->isChecked())
|
||||
signFlags |= GXS_SERV::FLAG_AUTHOR_AUTHENTICATION_REQUIRED;
|
||||
} else if (ui.personal_ifnopub->isChecked()) {
|
||||
|
||||
if (ui.personal_ifnopub->isChecked())
|
||||
signFlags |= GXS_SERV::FLAG_AUTHOR_AUTHENTICATION_IFNOPUBSIGN;
|
||||
} else { // shouldn't allow this one.
|
||||
signFlags |= GXS_SERV::FLAG_AUTHOR_AUTHENTICATION_NONE;
|
||||
}
|
||||
|
||||
return signFlags;
|
||||
}
|
||||
|
||||
|
@ -616,17 +620,15 @@ void GxsGroupDialog::setGroupSignFlags(uint32_t signFlags)
|
|||
ui.publish_open->setChecked(true);
|
||||
}
|
||||
|
||||
if (signFlags & GXS_SERV::FLAG_AUTHOR_AUTHENTICATION_GPG) {
|
||||
if (signFlags & GXS_SERV::FLAG_AUTHOR_AUTHENTICATION_GPG)
|
||||
ui.personal_pgp->setChecked(true);
|
||||
} else if (signFlags & GXS_SERV::FLAG_AUTHOR_AUTHENTICATION_REQUIRED) {
|
||||
|
||||
if (signFlags & GXS_SERV::FLAG_AUTHOR_AUTHENTICATION_REQUIRED)
|
||||
ui.personal_required->setChecked(true);
|
||||
} else if (signFlags & GXS_SERV::FLAG_AUTHOR_AUTHENTICATION_IFNOPUBSIGN) {
|
||||
|
||||
if (signFlags & GXS_SERV::FLAG_AUTHOR_AUTHENTICATION_IFNOPUBSIGN)
|
||||
ui.personal_ifnopub->setChecked(true);
|
||||
} else if (signFlags & GXS_SERV::FLAG_AUTHOR_AUTHENTICATION_NONE) {
|
||||
// Its the same... but not quite.
|
||||
//ui.personal_noifpub->setChecked();
|
||||
}
|
||||
|
||||
|
||||
/* guess at comments */
|
||||
if ((signFlags & GXS_SERV::FLAG_GROUP_SIGN_PUBLISH_THREADHEAD) &&
|
||||
(signFlags & GXS_SERV::FLAG_AUTHOR_AUTHENTICATION_IFNOPUBSIGN))
|
||||
|
|
|
@ -733,12 +733,16 @@ void GxsForumThreadWidget::insertGroupData()
|
|||
const RsGxsForumGroup& group = tw->mForumGroup;
|
||||
|
||||
tw->mSubscribeFlags = group.mMeta.mSubscribeFlags;
|
||||
tw->mSignFlags = group.mMeta.mSignFlags;
|
||||
tw->ui->forumName->setText(QString::fromUtf8(group.mMeta.mGroupName.c_str()));
|
||||
|
||||
QString anon_allowed_str = (IS_GROUP_PGP_AUTHED(tw->mSignFlags))?tr("No"):tr("Yes") ;
|
||||
|
||||
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("Posts (at neighbor nodes)")).arg(group.mMeta.mVisibleMsgCount);
|
||||
tw->mForumDescription += QString("<b>%1: \t</b>%2<br/>").arg(tr("Author"), author);
|
||||
tw->mForumDescription += QString("<b>%1: \t</b>%2<br/>").arg(tr("Anonymous post allowed")).arg(anon_allowed_str);
|
||||
tw->mForumDescription += QString("<b>%1: </b><br/><br/>%2").arg(tr("Description"), QString::fromUtf8(group.mDescription.c_str()));
|
||||
|
||||
tw->ui->subscribeToolButton->setSubscribed(IS_GROUP_SUBSCRIBED(tw->mSubscribeFlags));
|
||||
|
@ -1800,6 +1804,7 @@ bool GxsForumThreadWidget::filterItem(QTreeWidgetItem *item, const QString &text
|
|||
void GxsForumThreadWidget::requestGroupData()
|
||||
{
|
||||
mSubscribeFlags = 0;
|
||||
mSignFlags = 0;
|
||||
mForumDescription.clear();
|
||||
|
||||
mTokenQueue->cancelActiveRequestTokens(mTokenTypeGroupData);
|
||||
|
|
|
@ -147,6 +147,7 @@ private:
|
|||
RsGxsForumGroup mForumGroup;
|
||||
QString mForumDescription;
|
||||
int mSubscribeFlags;
|
||||
int mSignFlags;
|
||||
bool mInProcessSettings;
|
||||
bool mInMsgAsReadUnread;
|
||||
int mLastViewType;
|
||||
|
|
|
@ -178,8 +178,9 @@ void GxsForumsDialog::groupInfoToGroupItemInfo(const RsGroupMetaData &groupInfo,
|
|||
groupItemInfo.description = descriptionIt.value();
|
||||
}
|
||||
|
||||
if (IS_GROUP_ADMIN(groupInfo.mSubscribeFlags)) {
|
||||
groupItemInfo.icon = QIcon(":images/konv_message2.png");
|
||||
}
|
||||
if (IS_GROUP_ADMIN(groupInfo.mSubscribeFlags))
|
||||
groupItemInfo.icon = QIcon(":images/konv_message2.png");
|
||||
else if (IS_GROUP_PGP_AUTHED(groupInfo.mSignFlags))
|
||||
groupItemInfo.icon = QIcon(":images/konv_message3.png");
|
||||
|
||||
}
|
||||
|
|
|
@ -316,6 +316,7 @@
|
|||
<file>images/konversation16.png</file>
|
||||
<file>images/konversation128.png</file>
|
||||
<file>images/konv_message2.png</file>
|
||||
<file>images/konv_message3.png</file>
|
||||
<file>images/konv_message64.png</file>
|
||||
<file>images/konversation64.png</file>
|
||||
<file>images/forums_new.png</file>
|
||||
|
|
BIN
retroshare-gui/src/gui/images/konv_message3.png
Normal file
BIN
retroshare-gui/src/gui/images/konv_message3.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.6 KiB |
Loading…
Add table
Add a link
Reference in a new issue