mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-02-17 13:24:15 -05:00
Merge pull request #2209 from defnax/wiki-fixes
Added temporary solution to update the Wiki tree
This commit is contained in:
commit
0345bac168
@ -121,8 +121,13 @@ WikiDialog::WikiDialog(QWidget *parent) : RsGxsUpdateBroadcastPage(rsWiki, paren
|
|||||||
connect(newGroupButton, SIGNAL(clicked()), this, SLOT(OpenOrShowAddGroupDialog()));
|
connect(newGroupButton, SIGNAL(clicked()), this, SLOT(OpenOrShowAddGroupDialog()));
|
||||||
ui.groupTreeWidget->addToolButton(newGroupButton);
|
ui.groupTreeWidget->addToolButton(newGroupButton);
|
||||||
|
|
||||||
|
//QTimer *timer = new QTimer(this);
|
||||||
|
//timer->connect(timer, SIGNAL(timeout()), this, SLOT(insertWikiGroups()));
|
||||||
|
//timer->start(5000);
|
||||||
|
|
||||||
// load settings
|
// load settings
|
||||||
processSettings(true);
|
processSettings(true);
|
||||||
|
updateDisplay(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
WikiDialog::~WikiDialog()
|
WikiDialog::~WikiDialog()
|
||||||
@ -316,7 +321,7 @@ void WikiDialog::clearWikiPage()
|
|||||||
ui.textBrowser->setPlainText("");
|
ui.textBrowser->setPlainText("");
|
||||||
}
|
}
|
||||||
|
|
||||||
void WikiDialog::clearGroupTree()
|
void WikiDialog::clearGroupTree()
|
||||||
{
|
{
|
||||||
ui.treeWidget_Pages->clear();
|
ui.treeWidget_Pages->clear();
|
||||||
}
|
}
|
||||||
@ -474,7 +479,6 @@ void WikiDialog::requestWikiPage(const RsGxsGrpMsgIdPair &msgId)
|
|||||||
mWikiQueue->requestMsgInfo(token, RS_TOKREQ_ANSTYPE_DATA, opts, msgIds, WIKIDIALOG_WIKI_PAGE);
|
mWikiQueue->requestMsgInfo(token, RS_TOKREQ_ANSTYPE_DATA, opts, msgIds, WIKIDIALOG_WIKI_PAGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void WikiDialog::loadWikiPage(const uint32_t &token)
|
void WikiDialog::loadWikiPage(const uint32_t &token)
|
||||||
{
|
{
|
||||||
std::cerr << "WikiDialog::loadWikiPage()";
|
std::cerr << "WikiDialog::loadWikiPage()";
|
||||||
@ -565,6 +569,8 @@ void WikiDialog::wikiSubscribe(bool subscribe)
|
|||||||
|
|
||||||
uint32_t token;
|
uint32_t token;
|
||||||
rsWiki->subscribeToGroup(token, mGroupId, subscribe);
|
rsWiki->subscribeToGroup(token, mGroupId, subscribe);
|
||||||
|
|
||||||
|
insertWikiGroups();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -739,3 +745,8 @@ void WikiDialog::updateDisplay(bool complete)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void WikiDialog::insertWikiGroups()
|
||||||
|
{
|
||||||
|
updateDisplay(true);
|
||||||
|
}
|
||||||
|
@ -74,6 +74,7 @@ private slots:
|
|||||||
void wikiGroupChanged(const QString &groupId);
|
void wikiGroupChanged(const QString &groupId);
|
||||||
|
|
||||||
void todo();
|
void todo();
|
||||||
|
void insertWikiGroups();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
@ -71,11 +71,11 @@ WikiEditDialog::WikiEditDialog(QWidget *parent)
|
|||||||
|
|
||||||
mWikiQueue = new TokenQueue(rsWiki->getTokenService(), this);
|
mWikiQueue = new TokenQueue(rsWiki->getTokenService(), this);
|
||||||
|
|
||||||
mThreadCompareRole = new RSTreeWidgetItemCompareRole;
|
mThreadCompareRole = new RSTreeWidgetItemCompareRole;
|
||||||
mThreadCompareRole->setRole(WET_COL_DATE, WET_ROLE_SORT);
|
mThreadCompareRole->setRole(WET_COL_DATE, WET_ROLE_SORT);
|
||||||
|
|
||||||
mRepublishMode = false;
|
mRepublishMode = false;
|
||||||
mPreviewMode = false;
|
mPreviewMode = false;
|
||||||
mPageLoading = false;
|
mPageLoading = false;
|
||||||
|
|
||||||
mIgnoreTextChange = false;
|
mIgnoreTextChange = false;
|
||||||
@ -85,6 +85,10 @@ WikiEditDialog::WikiEditDialog(QWidget *parent)
|
|||||||
mHistoryLoaded = false;
|
mHistoryLoaded = false;
|
||||||
mHistoryMergeMode = false;
|
mHistoryMergeMode = false;
|
||||||
|
|
||||||
|
ui.toolButton_Show->setIcon(FilesDefs::getIconFromQtResourcePath(QString(":/icons/png/down-arrow.png")));
|
||||||
|
ui.toolButton_Hide->setIcon(FilesDefs::getIconFromQtResourcePath(QString(":/icons/png/up-arrow.png")));
|
||||||
|
ui.pushButton_Preview->setIcon(FilesDefs::getIconFromQtResourcePath(QString(":/icons/png/search.png")));
|
||||||
|
|
||||||
ui.checkBox_OldHistory->setChecked(false);
|
ui.checkBox_OldHistory->setChecked(false);
|
||||||
mOldHistoryEnabled = false;
|
mOldHistoryEnabled = false;
|
||||||
ui.groupBox_History->hide();
|
ui.groupBox_History->hide();
|
||||||
@ -93,7 +97,7 @@ WikiEditDialog::WikiEditDialog(QWidget *parent)
|
|||||||
|
|
||||||
WikiEditDialog::~WikiEditDialog()
|
WikiEditDialog::~WikiEditDialog()
|
||||||
{
|
{
|
||||||
delete (mThreadCompareRole);
|
delete (mThreadCompareRole);
|
||||||
delete(mWikiQueue);
|
delete(mWikiQueue);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -309,6 +313,7 @@ void WikiEditDialog::previewToggle()
|
|||||||
{
|
{
|
||||||
mPreviewMode = false;
|
mPreviewMode = false;
|
||||||
ui.pushButton_Preview->setText(tr("Preview"));
|
ui.pushButton_Preview->setText(tr("Preview"));
|
||||||
|
ui.pushButton_Preview->setIcon(FilesDefs::getIconFromQtResourcePath(QString(":/icons/png/search.png")));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -316,6 +321,7 @@ void WikiEditDialog::previewToggle()
|
|||||||
mCurrentText = ui.textEdit->toPlainText();
|
mCurrentText = ui.textEdit->toPlainText();
|
||||||
mPreviewMode = true;
|
mPreviewMode = true;
|
||||||
ui.pushButton_Preview->setText(tr("Edit Page"));
|
ui.pushButton_Preview->setText(tr("Edit Page"));
|
||||||
|
ui.pushButton_Preview->setIcon(FilesDefs::getIconFromQtResourcePath(QString(":/icons/png/pencil-edit-button.png")));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user