From 2d74a3012a0254c689cdef5084e094360af2b62d Mon Sep 17 00:00:00 2001 From: drbob Date: Wed, 27 Feb 2013 23:52:27 +0000 Subject: [PATCH] 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 --- retroshare-gui/src/gui/WikiPoos/WikiDialog.cpp | 4 ++++ retroshare-gui/src/gui/WikiPoos/WikiDialog.ui | 6 +++--- retroshare-gui/src/gui/WikiPoos/WikiEditDialog.cpp | 12 +++++++----- retroshare-gui/src/gui/gxs/GxsIdChooser.cpp | 1 + 4 files changed, 15 insertions(+), 8 deletions(-) diff --git a/retroshare-gui/src/gui/WikiPoos/WikiDialog.cpp b/retroshare-gui/src/gui/WikiPoos/WikiDialog.cpp index 07632249d..b780f9e21 100644 --- a/retroshare-gui/src/gui/WikiPoos/WikiDialog.cpp +++ b/retroshare-gui/src/gui/WikiPoos/WikiDialog.cpp @@ -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)); + } diff --git a/retroshare-gui/src/gui/WikiPoos/WikiDialog.ui b/retroshare-gui/src/gui/WikiPoos/WikiDialog.ui index 005ed0a16..10edf25ea 100644 --- a/retroshare-gui/src/gui/WikiPoos/WikiDialog.ui +++ b/retroshare-gui/src/gui/WikiPoos/WikiDialog.ui @@ -127,17 +127,17 @@ - Wiki Group + Page Name - Page + Page Id - Id + Orig Id diff --git a/retroshare-gui/src/gui/WikiPoos/WikiEditDialog.cpp b/retroshare-gui/src/gui/WikiPoos/WikiEditDialog.cpp index 29bcb20e9..7e19176cb 100644 --- a/retroshare-gui/src/gui/WikiPoos/WikiEditDialog.cpp +++ b/retroshare-gui/src/gui/WikiPoos/WikiEditDialog.cpp @@ -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; } diff --git a/retroshare-gui/src/gui/gxs/GxsIdChooser.cpp b/retroshare-gui/src/gui/gxs/GxsIdChooser.cpp index 0b1fadb48..05edd8f4e 100644 --- a/retroshare-gui/src/gui/gxs/GxsIdChooser.cpp +++ b/retroshare-gui/src/gui/gxs/GxsIdChooser.cpp @@ -38,6 +38,7 @@ void GxsIdChooser::loadIds(uint32_t chooserFlags, RsGxsId defId) { mFlags = chooserFlags; mDefaultId = defId; + clear(); loadPrivateIds(); }