mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-20 21:29:01 -04:00
saving GxsId for forum post creation
This commit is contained in:
parent
4b4b69de50
commit
646d07887c
2 changed files with 28 additions and 1 deletions
|
@ -127,14 +127,40 @@ CreateGxsForumMsg::CreateGxsForumMsg(const RsGxsGroupId &fId, const RsGxsMessage
|
|||
ui.generateCheckBox->hide();
|
||||
ui.generateSpinBox->hide();
|
||||
#endif
|
||||
processSettings(true);
|
||||
}
|
||||
|
||||
CreateGxsForumMsg::~CreateGxsForumMsg()
|
||||
{
|
||||
processSettings(false);
|
||||
delete(mForumQueue);
|
||||
delete(mCirclesQueue);
|
||||
}
|
||||
|
||||
void CreateGxsForumMsg::processSettings(bool load)
|
||||
{
|
||||
Settings->beginGroup(QString("ForumPostsWidget"));
|
||||
|
||||
if (load)
|
||||
{
|
||||
// state of ID Chooser combobox
|
||||
RsGxsId gxs_id(Settings->value("IDChooser", QString::fromStdString(RsGxsId().toStdString())).toString().toStdString());
|
||||
|
||||
if(!gxs_id.isNull() && rsIdentity->isOwnId(gxs_id))
|
||||
ui.idChooser->setChosenId(gxs_id);
|
||||
}
|
||||
else
|
||||
{
|
||||
// state of ID Chooser combobox
|
||||
RsGxsId id;
|
||||
|
||||
if(ui.idChooser->getChosenId(id))
|
||||
Settings->setValue("IDChooser", QString::fromStdString(id.toStdString()));
|
||||
}
|
||||
|
||||
Settings->endGroup();
|
||||
}
|
||||
|
||||
void CreateGxsForumMsg::newMsg()
|
||||
{
|
||||
/* clear all */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue