added selection boxes to add forum moderators

This commit is contained in:
csoler 2018-08-09 21:18:37 +02:00
parent b20bd0a454
commit ded9c21617
No known key found for this signature in database
GPG key ID: 7BCA522266C0804C
8 changed files with 146 additions and 156 deletions

View file

@ -43,7 +43,7 @@ class RsGxsForumGroup
public: public:
RsGroupMetaData mMeta; RsGroupMetaData mMeta;
std::string mDescription; std::string mDescription;
RsTlvGxsIdSet admin_list; // this is optional, and handled by the serialiser RsTlvGxsIdSet mAdminList; // this is optional, and handled by the serialiser
}; };
class RsGxsForumMsg class RsGxsForumMsg

View file

@ -58,7 +58,7 @@ void RsGxsForumGroupItem::serial_process(RsGenericSerializer::SerializeJob j,RsG
if(j == RsGenericSerializer::DESERIALIZE && ctx.mOffset == ctx.mSize) if(j == RsGenericSerializer::DESERIALIZE && ctx.mOffset == ctx.mSize)
return ; return ;
RsTypeSerializer::serial_process<RsTlvItem>(j,ctx,mGroup.admin_list,"admin_list") ; RsTypeSerializer::serial_process<RsTlvItem>(j,ctx,mGroup.mAdminList,"admin_list") ;
} }
void RsGxsForumMsgItem::clear() void RsGxsForumMsgItem::clear()

View file

@ -32,7 +32,7 @@ const uint32_t PostedCreateEnabledFlags = (
GXS_GROUP_FLAGS_DESCRIPTION | GXS_GROUP_FLAGS_DESCRIPTION |
GXS_GROUP_FLAGS_DISTRIBUTION | GXS_GROUP_FLAGS_DISTRIBUTION |
// GXS_GROUP_FLAGS_PUBLISHSIGN | // GXS_GROUP_FLAGS_PUBLISHSIGN |
GXS_GROUP_FLAGS_SHAREKEYS | // GXS_GROUP_FLAGS_SHAREKEYS | // disabled because the UI doesn't handle it yet.
// GXS_GROUP_FLAGS_PERSONALSIGN | // GXS_GROUP_FLAGS_PERSONALSIGN |
// GXS_GROUP_FLAGS_COMMENTS | // GXS_GROUP_FLAGS_COMMENTS |
0); 0);
@ -84,7 +84,7 @@ void PostedGroupDialog::initUi()
break; break;
} }
setUiText(UITYPE_KEY_SHARE_CHECKBOX, tr("Add Topic Admins")); setUiText(UITYPE_ADD_ADMINS_CHECKBOX, tr("Add Topic Admins"));
setUiText(UITYPE_CONTACTS_DOCK, tr("Select Topic Admins")); setUiText(UITYPE_CONTACTS_DOCK, tr("Select Topic Admins"));
} }

View file

@ -101,6 +101,7 @@ void GxsGroupDialog::init()
connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(submitGroup())); connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(submitGroup()));
connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(cancelDialog())); connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(cancelDialog()));
connect(ui.pubKeyShare_cb, SIGNAL(clicked()), this, SLOT(setShareList())); connect(ui.pubKeyShare_cb, SIGNAL(clicked()), this, SLOT(setShareList()));
connect(ui.addAdmins_cb, SIGNAL(clicked()), this, SLOT(setAdminsList()));
connect(ui.groupLogo, SIGNAL(clicked() ), this , SLOT(addGroupLogo())); connect(ui.groupLogo, SIGNAL(clicked() ), this , SLOT(addGroupLogo()));
connect(ui.addLogoButton, SIGNAL(clicked() ), this , SLOT(addGroupLogo())); connect(ui.addLogoButton, SIGNAL(clicked() ), this , SLOT(addGroupLogo()));
@ -115,14 +116,25 @@ void GxsGroupDialog::init()
if (!ui.pubKeyShare_cb->isChecked()) if (!ui.pubKeyShare_cb->isChecked())
{ {
ui.contactsdockWidget->hide(); ui.shareKeyList->hide();
this->resize(this->size().width() - ui.contactsdockWidget->size().width(), this->size().height()); //this->resize(this->size().width() - ui.contactsdockWidget->size().width(), this->size().height());
}
if (!ui.addAdmins_cb->isChecked())
{
ui.adminsList->hide();
//this->resize(this->size().width() - ui.contactsdockWidget->size().width(), this->size().height());
} }
/* initialize key share list */ /* initialize key share list */
ui.keyShareList->setHeaderText(tr("Contacts:")); ui.shareKeyList->setHeaderText(tr("Contacts:"));
ui.keyShareList->setModus(FriendSelectionWidget::MODUS_CHECK); ui.shareKeyList->setModus(FriendSelectionWidget::MODUS_CHECK);
ui.keyShareList->start(); ui.shareKeyList->start();
/* initialize key share list */
ui.adminsList->setHeaderText(tr("Moderators:"));
ui.adminsList->setModus(FriendSelectionWidget::MODUS_CHECK);
ui.adminsList->setShowType(FriendSelectionWidget::SHOW_GXS);
ui.adminsList->start();
/* Setup Reasonable Defaults */ /* Setup Reasonable Defaults */
@ -165,7 +177,8 @@ void GxsGroupDialog::setUiText(UiType uiType, const QString &text)
ui.pubKeyShare_cb->setText(text); ui.pubKeyShare_cb->setText(text);
break; break;
case UITYPE_CONTACTS_DOCK: case UITYPE_CONTACTS_DOCK:
ui.contactsdockWidget->setWindowTitle(text); case UITYPE_ADD_ADMINS_CHECKBOX:
//ui.contactsdockWidget->setWindowTitle(text);
break; break;
case UITYPE_BUTTONBOX_OK: case UITYPE_BUTTONBOX_OK:
ui.buttonBox->button(QDialogButtonBox::Ok)->setText(text); ui.buttonBox->button(QDialogButtonBox::Ok)->setText(text);
@ -173,6 +186,23 @@ void GxsGroupDialog::setUiText(UiType uiType, const QString &text)
} }
} }
void GxsGroupDialog::setUiToolTip(UiType uiType, const QString &text)
{
switch (uiType)
{
case UITYPE_KEY_SHARE_CHECKBOX:
ui.pubKeyShare_cb->setToolTip(text);
break;
case UITYPE_ADD_ADMINS_CHECKBOX:
ui.addAdmins_cb->setToolTip(text);
break;
case UITYPE_BUTTONBOX_OK:
ui.buttonBox->button(QDialogButtonBox::Ok)->setToolTip(text);
default:
break;
}
}
void GxsGroupDialog::initMode() void GxsGroupDialog::initMode()
{ {
setAllReadonly(); setAllReadonly();
@ -345,6 +375,7 @@ void GxsGroupDialog::setupVisibility()
ui.publishGroupBox->setVisible(mEnabledFlags & GXS_GROUP_FLAGS_PUBLISHSIGN); ui.publishGroupBox->setVisible(mEnabledFlags & GXS_GROUP_FLAGS_PUBLISHSIGN);
ui.pubKeyShare_cb->setVisible(mEnabledFlags & GXS_GROUP_FLAGS_SHAREKEYS); ui.pubKeyShare_cb->setVisible(mEnabledFlags & GXS_GROUP_FLAGS_SHAREKEYS);
ui.addAdmins_cb->setVisible(mEnabledFlags & GXS_GROUP_FLAGS_ADDADMINS);
ui.personalGroupBox->setVisible(mEnabledFlags & GXS_GROUP_FLAGS_PERSONALSIGN); ui.personalGroupBox->setVisible(mEnabledFlags & GXS_GROUP_FLAGS_PERSONALSIGN);
@ -828,6 +859,11 @@ QString GxsGroupDialog::getDescription()
return ui.groupDesc->toPlainText(); return ui.groupDesc->toPlainText();
} }
void GxsGroupDialog::getSelectedModerators(std::set<RsGxsId>& ids)
{
ui.adminsList->selectedIds<RsGxsId,FriendSelectionWidget::IDTYPE_GXS>(ids, true);
}
/*********************************************************************************** /***********************************************************************************
Share Lists. Share Lists.
***********************************************************************************/ ***********************************************************************************/
@ -837,6 +873,20 @@ void GxsGroupDialog::sendShareList(std::string /*groupId*/)
close(); close();
} }
void GxsGroupDialog::setAdminsList()
{
if (ui.addAdmins_cb->isChecked())
{
//this->resize(this->size().width() + ui.contactsdockWidget->size().width(), this->size().height());
ui.adminsList->show();
}
else
{ // hide share widget
ui.adminsList->hide();
//this->resize(this->size().width() - ui.contactsdockWidget->size().width(), this->size().height());
}
}
void GxsGroupDialog::setShareList() void GxsGroupDialog::setShareList()
{ {
if (ui.pubKeyShare_cb->isChecked()) { if (ui.pubKeyShare_cb->isChecked()) {

View file

@ -55,44 +55,45 @@ public:
/*** Group flags affect what is visually enabled that gets input into the grpMeta ***/ /*** Group flags affect what is visually enabled that gets input into the grpMeta ***/
#define GXS_GROUP_FLAGS_NAME 0x00000001 #define GXS_GROUP_FLAGS_NAME 0x00000001
#define GXS_GROUP_FLAGS_ICON 0x00000002 #define GXS_GROUP_FLAGS_ICON 0x00000002
#define GXS_GROUP_FLAGS_DESCRIPTION 0x00000004 #define GXS_GROUP_FLAGS_DESCRIPTION 0x00000004
#define GXS_GROUP_FLAGS_DISTRIBUTION 0x00000008 #define GXS_GROUP_FLAGS_DISTRIBUTION 0x00000008
#define GXS_GROUP_FLAGS_PUBLISHSIGN 0x00000010 #define GXS_GROUP_FLAGS_PUBLISHSIGN 0x00000010
#define GXS_GROUP_FLAGS_SHAREKEYS 0x00000020 #define GXS_GROUP_FLAGS_SHAREKEYS 0x00000020
#define GXS_GROUP_FLAGS_PERSONALSIGN 0x00000040 #define GXS_GROUP_FLAGS_PERSONALSIGN 0x00000040
#define GXS_GROUP_FLAGS_COMMENTS 0x00000080 #define GXS_GROUP_FLAGS_COMMENTS 0x00000080
#define GXS_GROUP_FLAGS_EXTRA 0x00000100 #define GXS_GROUP_FLAGS_EXTRA 0x00000100
#define GXS_GROUP_FLAGS_ANTI_SPAM 0x00000200 #define GXS_GROUP_FLAGS_ANTI_SPAM 0x00000200
#define GXS_GROUP_FLAGS_ADDADMINS 0x00000400
/*** Default flags are used to determine privacy of group, signatures required *** /*** Default flags are used to determine privacy of group, signatures required ***
*** whether publish or id and whether comments are allowed or not ***/ *** whether publish or id and whether comments are allowed or not ***/
#define GXS_GROUP_DEFAULTS_DISTRIB_MASK 0x0000000f #define GXS_GROUP_DEFAULTS_DISTRIB_MASK 0x0000000f
#define GXS_GROUP_DEFAULTS_PUBLISH_MASK 0x000000f0 #define GXS_GROUP_DEFAULTS_PUBLISH_MASK 0x000000f0
#define GXS_GROUP_DEFAULTS_PERSONAL_MASK 0x00000f00 #define GXS_GROUP_DEFAULTS_PERSONAL_MASK 0x00000f00
#define GXS_GROUP_DEFAULTS_COMMENTS_MASK 0x0000f000 #define GXS_GROUP_DEFAULTS_COMMENTS_MASK 0x0000f000
#define GXS_GROUP_DEFAULTS_DISTRIB_PUBLIC 0x00000001 #define GXS_GROUP_DEFAULTS_DISTRIB_PUBLIC 0x00000001
#define GXS_GROUP_DEFAULTS_DISTRIB_GROUP 0x00000002 #define GXS_GROUP_DEFAULTS_DISTRIB_GROUP 0x00000002
#define GXS_GROUP_DEFAULTS_DISTRIB_LOCAL 0x00000004 #define GXS_GROUP_DEFAULTS_DISTRIB_LOCAL 0x00000004
#define GXS_GROUP_DEFAULTS_PUBLISH_OPEN 0x00000010 #define GXS_GROUP_DEFAULTS_PUBLISH_OPEN 0x00000010
#define GXS_GROUP_DEFAULTS_PUBLISH_THREADS 0x00000020 #define GXS_GROUP_DEFAULTS_PUBLISH_THREADS 0x00000020
#define GXS_GROUP_DEFAULTS_PUBLISH_REQUIRED 0x00000040 #define GXS_GROUP_DEFAULTS_PUBLISH_REQUIRED 0x00000040
#define GXS_GROUP_DEFAULTS_PUBLISH_ENCRYPTED 0x00000080 #define GXS_GROUP_DEFAULTS_PUBLISH_ENCRYPTED 0x00000080
#define GXS_GROUP_DEFAULTS_PERSONAL_PGP 0x00000100 #define GXS_GROUP_DEFAULTS_PERSONAL_PGP 0x00000100
#define GXS_GROUP_DEFAULTS_PERSONAL_REQUIRED 0x00000200 #define GXS_GROUP_DEFAULTS_PERSONAL_REQUIRED 0x00000200
#define GXS_GROUP_DEFAULTS_PERSONAL_IFNOPUB 0x00000400 #define GXS_GROUP_DEFAULTS_PERSONAL_IFNOPUB 0x00000400
#define GXS_GROUP_DEFAULTS_COMMENTS_YES 0x00001000 #define GXS_GROUP_DEFAULTS_COMMENTS_YES 0x00001000
#define GXS_GROUP_DEFAULTS_COMMENTS_NO 0x00002000 #define GXS_GROUP_DEFAULTS_COMMENTS_NO 0x00002000
#define GXS_GROUP_DEFAULTS_ANTISPAM_FAVOR_PGP 0x00100000 #define GXS_GROUP_DEFAULTS_ANTISPAM_FAVOR_PGP 0x00100000
#define GXS_GROUP_DEFAULTS_ANTISPAM_TRACK 0x00200000 #define GXS_GROUP_DEFAULTS_ANTISPAM_TRACK 0x00200000
#define GXS_GROUP_DEFAULTS_ANTISPAM_FAVOR_PGP_KNOWN 0x00400000 #define GXS_GROUP_DEFAULTS_ANTISPAM_FAVOR_PGP_KNOWN 0x00400000
/*! /*!
* The aim of this dialog is to be convenient to encapsulate group * The aim of this dialog is to be convenient to encapsulate group
@ -121,6 +122,7 @@ public:
enum UiType { enum UiType {
UITYPE_SERVICE_HEADER, UITYPE_SERVICE_HEADER,
UITYPE_KEY_SHARE_CHECKBOX, UITYPE_KEY_SHARE_CHECKBOX,
UITYPE_ADD_ADMINS_CHECKBOX,
UITYPE_CONTACTS_DOCK, UITYPE_CONTACTS_DOCK,
UITYPE_BUTTONBOX_OK UITYPE_BUTTONBOX_OK
}; };
@ -172,7 +174,14 @@ protected:
virtual QPixmap serviceImage() = 0; virtual QPixmap serviceImage() = 0;
virtual QIcon serviceWindowIcon(); virtual QIcon serviceWindowIcon();
void setUiText(UiType uiType, const QString &text); /*!
* \brief setUiToolTip/setUiText
* Sets the text and tooltip of some parts of the UI
* \param uiType widget to set
* \param text text to set
*/
void setUiToolTip(UiType uiType, const QString &text);
void setUiText (UiType uiType, const QString &text);
/*! /*!
* It is up to the service to do the actual group creation * It is up to the service to do the actual group creation
@ -219,12 +228,19 @@ protected:
*/ */
QString getDescription(); QString getDescription();
/*!
* \brief getSelectedModerators
* Returns the set of ids that hve been selected as moderators.
*/
void getSelectedModerators(std::set<RsGxsId>& ids);
private slots: private slots:
/* actions to take.... */ /* actions to take.... */
void cancelDialog(); void cancelDialog();
// set private forum key share list // set private forum key share list
void setShareList(); void setShareList();
void setAdminsList();
void updateCircleOptions(); void updateCircleOptions();

View file

@ -172,13 +172,23 @@
<string>Will be used to send feedback</string> <string>Will be used to send feedback</string>
</property> </property>
<property name="text"> <property name="text">
<string>Owner:</string> <string>Contact:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="GxsIdChooser" name="idChooser"/> <widget class="GxsIdChooser" name="idChooser"/>
</item> </item>
<item>
<widget class="QCheckBox" name="addAdmins_cb">
<property name="toolTip">
<string/>
</property>
<property name="text">
<string>Add moderators</string>
</property>
</widget>
</item>
<item> <item>
<widget class="QCheckBox" name="pubKeyShare_cb"> <widget class="QCheckBox" name="pubKeyShare_cb">
<property name="toolTip"> <property name="toolTip">
@ -196,102 +206,6 @@
</layout> </layout>
</widget> </widget>
</item> </item>
<item row="0" column="1">
<widget class="QDockWidget" name="contactsdockWidget">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>300</width>
<height>524287</height>
</size>
</property>
<property name="sizeIncrement">
<size>
<width>220</width>
<height>0</height>
</size>
</property>
<property name="baseSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>check peers you would like to share private publish key with</string>
</property>
<property name="floating">
<bool>false</bool>
</property>
<property name="features">
<set>QDockWidget::NoDockWidgetFeatures</set>
</property>
<property name="windowTitle">
<string>Share Key With</string>
</property>
<widget class="QWidget" name="dockWidgetContents">
<layout class="QGridLayout" name="_2">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<property name="spacing">
<number>0</number>
</property>
<item row="0" column="0">
<widget class="FriendSelectionWidget" name="keyShareList" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>4</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>20</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>300</width>
<height>16777215</height>
</size>
</property>
<property name="sizeIncrement">
<size>
<width>220</width>
<height>0</height>
</size>
</property>
<property name="baseSize">
<size>
<width>200</width>
<height>0</height>
</size>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
<item row="1" column="0"> <item row="1" column="0">
<widget class="QGroupBox" name="distribGroupBox"> <widget class="QGroupBox" name="distribGroupBox">
<property name="sizePolicy"> <property name="sizePolicy">
@ -435,7 +349,7 @@
</layout> </layout>
</widget> </widget>
</item> </item>
<item row="2" column="0"> <item row="4" column="0">
<widget class="QGroupBox" name="groupBox"> <widget class="QGroupBox" name="groupBox">
<property name="title"> <property name="title">
<string>Description</string> <string>Description</string>
@ -447,7 +361,7 @@
</layout> </layout>
</widget> </widget>
</item> </item>
<item row="3" column="0"> <item row="5" column="0">
<widget class="QGroupBox" name="publishGroupBox"> <widget class="QGroupBox" name="publishGroupBox">
<property name="title"> <property name="title">
<string>Publish Signatures</string> <string>Publish Signatures</string>
@ -512,7 +426,7 @@
</layout> </layout>
</widget> </widget>
</item> </item>
<item row="4" column="0"> <item row="6" column="0">
<widget class="QGroupBox" name="personalGroupBox"> <widget class="QGroupBox" name="personalGroupBox">
<property name="title"> <property name="title">
<string>Personal Signatures</string> <string>Personal Signatures</string>
@ -555,7 +469,7 @@
</layout> </layout>
</widget> </widget>
</item> </item>
<item row="5" column="0"> <item row="7" column="0">
<widget class="QGroupBox" name="commentGroupBox"> <widget class="QGroupBox" name="commentGroupBox">
<property name="title"> <property name="title">
<string>Comments</string> <string>Comments</string>
@ -606,7 +520,7 @@
</layout> </layout>
</widget> </widget>
</item> </item>
<item row="6" column="0"> <item row="8" column="0">
<widget class="QGroupBox" name="spamProtection_GB"> <widget class="QGroupBox" name="spamProtection_GB">
<property name="title"> <property name="title">
<string>Spam-protection</string> <string>Spam-protection</string>
@ -657,7 +571,7 @@
</layout> </layout>
</widget> </widget>
</item> </item>
<item row="7" column="0" colspan="2"> <item row="9" column="0" colspan="2">
<widget class="QFrame" name="extraFrame"> <widget class="QFrame" name="extraFrame">
<property name="frameShape"> <property name="frameShape">
<enum>QFrame::StyledPanel</enum> <enum>QFrame::StyledPanel</enum>
@ -667,6 +581,12 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="0">
<widget class="FriendSelectionWidget" name="adminsList" native="true"/>
</item>
<item row="3" column="0">
<widget class="FriendSelectionWidget" name="shareKeyList" native="true"/>
</item>
</layout> </layout>
</widget> </widget>
<widget class="QWidget" name="showmode"> <widget class="QWidget" name="showmode">

View file

@ -34,7 +34,7 @@ const uint32_t ChannelCreateEnabledFlags = (
GXS_GROUP_FLAGS_DESCRIPTION | GXS_GROUP_FLAGS_DESCRIPTION |
GXS_GROUP_FLAGS_DISTRIBUTION | GXS_GROUP_FLAGS_DISTRIBUTION |
// GXS_GROUP_FLAGS_PUBLISHSIGN | // GXS_GROUP_FLAGS_PUBLISHSIGN |
GXS_GROUP_FLAGS_SHAREKEYS | // GXS_GROUP_FLAGS_SHAREKEYS | // disabled because the UI doesn't handle it, so no need to show the disabled button. The user can do it in a second step from the channel menu.
// GXS_GROUP_FLAGS_PERSONALSIGN | // GXS_GROUP_FLAGS_PERSONALSIGN |
GXS_GROUP_FLAGS_COMMENTS | GXS_GROUP_FLAGS_COMMENTS |
0); 0);
@ -75,19 +75,19 @@ void GxsChannelGroupDialog::initUi()
{ {
case MODE_CREATE: case MODE_CREATE:
setUiText(UITYPE_SERVICE_HEADER, tr("Create New Channel")); setUiText(UITYPE_SERVICE_HEADER, tr("Create New Channel"));
setUiText(UITYPE_BUTTONBOX_OK, tr("Create")); setUiText(UITYPE_BUTTONBOX_OK, tr("Create"));
break; break;
case MODE_SHOW: case MODE_SHOW:
setUiText(UITYPE_SERVICE_HEADER, tr("Channel")); setUiText(UITYPE_SERVICE_HEADER, tr("Channel"));
break; break;
case MODE_EDIT: case MODE_EDIT:
setUiText(UITYPE_SERVICE_HEADER, tr("Edit Channel")); setUiText(UITYPE_SERVICE_HEADER, tr("Edit Channel"));
setUiText(UITYPE_BUTTONBOX_OK, tr("Update Channel")); setUiText(UITYPE_BUTTONBOX_OK, tr("Update Channel"));
break; break;
} }
setUiText(UITYPE_KEY_SHARE_CHECKBOX, tr("Add Channel Admins")); setUiText(UITYPE_KEY_SHARE_CHECKBOX, tr("Add Channel Admins"));
setUiText(UITYPE_CONTACTS_DOCK, tr("Select Channel Admins")); setUiText(UITYPE_CONTACTS_DOCK, tr("Select Channel Admins"));
} }
QPixmap GxsChannelGroupDialog::serviceImage() QPixmap GxsChannelGroupDialog::serviceImage()

View file

@ -27,12 +27,13 @@
// To start with we only have open forums - with distribution controls. // To start with we only have open forums - with distribution controls.
const uint32_t ForumCreateEnabledFlags = ( const uint32_t ForumCreateEnabledFlags = (
GXS_GROUP_FLAGS_NAME | GXS_GROUP_FLAGS_NAME |
// GXS_GROUP_FLAGS_ICON | // GXS_GROUP_FLAGS_ICON |
GXS_GROUP_FLAGS_DESCRIPTION | GXS_GROUP_FLAGS_DESCRIPTION |
GXS_GROUP_FLAGS_DISTRIBUTION | GXS_GROUP_FLAGS_DISTRIBUTION |
// GXS_GROUP_FLAGS_PUBLISHSIGN | // GXS_GROUP_FLAGS_PUBLISHSIGN|
GXS_GROUP_FLAGS_SHAREKEYS | // GXS_GROUP_FLAGS_SHAREKEYS |
GXS_GROUP_FLAGS_ADDADMINS |
GXS_GROUP_FLAGS_ANTI_SPAM | GXS_GROUP_FLAGS_ANTI_SPAM |
// GXS_GROUP_FLAGS_PERSONALSIGN | // GXS_GROUP_FLAGS_PERSONALSIGN |
// GXS_GROUP_FLAGS_COMMENTS | // GXS_GROUP_FLAGS_COMMENTS |
@ -42,17 +43,17 @@ const uint32_t ForumCreateDefaultsFlags = ( GXS_GROUP_DEFAULTS_DISTRIB_PUBLIC
//GXS_GROUP_DEFAULTS_DISTRIB_GROUP | //GXS_GROUP_DEFAULTS_DISTRIB_GROUP |
//GXS_GROUP_DEFAULTS_DISTRIB_LOCAL | //GXS_GROUP_DEFAULTS_DISTRIB_LOCAL |
GXS_GROUP_DEFAULTS_PUBLISH_OPEN | GXS_GROUP_DEFAULTS_PUBLISH_OPEN |
//GXS_GROUP_DEFAULTS_PUBLISH_THREADS | //GXS_GROUP_DEFAULTS_PUBLISH_THREADS |
//GXS_GROUP_DEFAULTS_PUBLISH_REQUIRED | //GXS_GROUP_DEFAULTS_PUBLISH_REQUIRED |
//GXS_GROUP_DEFAULTS_PUBLISH_ENCRYPTED | //GXS_GROUP_DEFAULTS_PUBLISH_ENCRYPTED |
//GXS_GROUP_DEFAULTS_PERSONAL_PGP | //GXS_GROUP_DEFAULTS_PERSONAL_PGP |
GXS_GROUP_DEFAULTS_PERSONAL_REQUIRED | GXS_GROUP_DEFAULTS_PERSONAL_REQUIRED |
//GXS_GROUP_DEFAULTS_PERSONAL_IFNOPUB | //GXS_GROUP_DEFAULTS_PERSONAL_IFNOPUB |
//GXS_GROUP_DEFAULTS_COMMENTS_YES | //GXS_GROUP_DEFAULTS_COMMENTS_YES |
GXS_GROUP_DEFAULTS_COMMENTS_NO | GXS_GROUP_DEFAULTS_COMMENTS_NO |
0); 0);
const uint32_t ForumEditEnabledFlags = ForumCreateEnabledFlags; const uint32_t ForumEditEnabledFlags = ForumCreateEnabledFlags;
@ -87,8 +88,10 @@ void GxsForumGroupDialog::initUi()
break; break;
} }
setUiText(UITYPE_KEY_SHARE_CHECKBOX, tr("Add Forum Admins")); setUiToolTip(UITYPE_ADD_ADMINS_CHECKBOX,tr("Forum moderators can edit/delete/pinup others posts"));
setUiText(UITYPE_CONTACTS_DOCK, tr("Select Forum Admins"));
//setUiText(UITYPE_KEY_SHARE_CHECKBOX, tr("Add Forum Admins"));
//setUiText(UITYPE_CONTACTS_DOCK, tr("Select Forum Admins"));
} }
QPixmap GxsForumGroupDialog::serviceImage() QPixmap GxsForumGroupDialog::serviceImage()
@ -102,6 +105,7 @@ bool GxsForumGroupDialog::service_CreateGroup(uint32_t &token, const RsGroupMeta
RsGxsForumGroup grp; RsGxsForumGroup grp;
grp.mMeta = meta; grp.mMeta = meta;
grp.mDescription = getDescription().toUtf8().constData(); grp.mDescription = getDescription().toUtf8().constData();
getSelectedModerators(grp.mAdminList.ids);
rsGxsForums->createGroup(token, grp); rsGxsForums->createGroup(token, grp);
return true; return true;