Fixed a number of Wiki GUI bugs.

- clear GxsIdChooser - so they don't accumulate.
 - Enable / Disable the New Page / Republish buttons.
 - Allow No Signatures for New Page / Republished pages.
 - clear Parent and Thread Id for new Page Submission.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6163 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
drbob 2013-02-27 23:52:27 +00:00
parent ea8d71ee71
commit 2d74a3012a
4 changed files with 15 additions and 8 deletions

View File

@ -596,6 +596,10 @@ void WikiDialog::wikiGroupChanged(const QString &groupId)
groupIds.push_back(mGroupId);
requestPages(groupIds);
int subscribeFlags = ui.groupTreeWidget->subscribeFlags(QString::fromStdString(mGroupId));
ui.toolButton_NewPage->setEnabled(IS_GROUP_ADMIN(subscribeFlags));
ui.toolButton_Republish->setEnabled(IS_GROUP_ADMIN(subscribeFlags));
}

View File

@ -127,17 +127,17 @@
<widget class="QTreeWidget" name="treeWidget_Pages">
<column>
<property name="text">
<string>Wiki Group</string>
<string>Page Name</string>
</property>
</column>
<column>
<property name="text">
<string>Page</string>
<string>Page Id</string>
</property>
</column>
<column>
<property name="text">
<string>Id</string>
<string>Orig Id</string>
</property>
</column>
</widget>

View File

@ -421,8 +421,8 @@ void WikiEditDialog::setNewPage()
ui.headerFrame->setHeaderText(tr("Create New Wiki Page"));
setWindowTitle(tr("Create New Wiki Page"));
/* fill in the available OwnIds for signing */
ui.comboBox_IdChooser->loadIds(IDCHOOSER_ID_REQUIRED, "");
/* no need for for REQUIRED ID */
ui.comboBox_IdChooser->loadIds(0, "");
textReset();
}
@ -433,6 +433,8 @@ void WikiEditDialog::setRepublishMode(RsGxsMessageId &origMsgId)
mRepublishMode = true;
mRepublishOrigId = origMsgId;
ui.pushButton_Submit->setText(tr("Republish"));
/* no need for for REQUIRED ID */
ui.comboBox_IdChooser->loadIds(0, "");
}
@ -469,9 +471,9 @@ void WikiEditDialog::submitEdit()
mWikiSnapshot.mMeta.mGroupId = mWikiCollection.mMeta.mGroupId;
mWikiSnapshot.mMeta.mOrigMsgId = "";
mWikiSnapshot.mMeta.mMsgId = "";
#if 0
mWikiSnapshot.mPrevId = "";
#endif
mWikiSnapshot.mMeta.mParentId = "";
mWikiSnapshot.mMeta.mThreadId = "";
std::cerr << "WikiEditDialog::submitEdit() Is New Page";
std::cerr << std::endl;
}

View File

@ -38,6 +38,7 @@ void GxsIdChooser::loadIds(uint32_t chooserFlags, RsGxsId defId)
{
mFlags = chooserFlags;
mDefaultId = defId;
clear();
loadPrivateIds();
}