mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04: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()));
|
||||
ui.groupTreeWidget->addToolButton(newGroupButton);
|
||||
|
||||
//QTimer *timer = new QTimer(this);
|
||||
//timer->connect(timer, SIGNAL(timeout()), this, SLOT(insertWikiGroups()));
|
||||
//timer->start(5000);
|
||||
|
||||
// load settings
|
||||
processSettings(true);
|
||||
updateDisplay(true);
|
||||
}
|
||||
|
||||
WikiDialog::~WikiDialog()
|
||||
@ -316,7 +321,7 @@ void WikiDialog::clearWikiPage()
|
||||
ui.textBrowser->setPlainText("");
|
||||
}
|
||||
|
||||
void WikiDialog::clearGroupTree()
|
||||
void WikiDialog::clearGroupTree()
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
void WikiDialog::loadWikiPage(const uint32_t &token)
|
||||
{
|
||||
std::cerr << "WikiDialog::loadWikiPage()";
|
||||
@ -565,6 +569,8 @@ void WikiDialog::wikiSubscribe(bool subscribe)
|
||||
|
||||
uint32_t token;
|
||||
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 todo();
|
||||
void insertWikiGroups();
|
||||
|
||||
private:
|
||||
|
||||
|
@ -71,11 +71,11 @@ WikiEditDialog::WikiEditDialog(QWidget *parent)
|
||||
|
||||
mWikiQueue = new TokenQueue(rsWiki->getTokenService(), this);
|
||||
|
||||
mThreadCompareRole = new RSTreeWidgetItemCompareRole;
|
||||
mThreadCompareRole->setRole(WET_COL_DATE, WET_ROLE_SORT);
|
||||
mThreadCompareRole = new RSTreeWidgetItemCompareRole;
|
||||
mThreadCompareRole->setRole(WET_COL_DATE, WET_ROLE_SORT);
|
||||
|
||||
mRepublishMode = false;
|
||||
mPreviewMode = false;
|
||||
mRepublishMode = false;
|
||||
mPreviewMode = false;
|
||||
mPageLoading = false;
|
||||
|
||||
mIgnoreTextChange = false;
|
||||
@ -85,6 +85,10 @@ WikiEditDialog::WikiEditDialog(QWidget *parent)
|
||||
mHistoryLoaded = 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);
|
||||
mOldHistoryEnabled = false;
|
||||
ui.groupBox_History->hide();
|
||||
@ -93,7 +97,7 @@ WikiEditDialog::WikiEditDialog(QWidget *parent)
|
||||
|
||||
WikiEditDialog::~WikiEditDialog()
|
||||
{
|
||||
delete (mThreadCompareRole);
|
||||
delete (mThreadCompareRole);
|
||||
delete(mWikiQueue);
|
||||
}
|
||||
|
||||
@ -309,6 +313,7 @@ void WikiEditDialog::previewToggle()
|
||||
{
|
||||
mPreviewMode = false;
|
||||
ui.pushButton_Preview->setText(tr("Preview"));
|
||||
ui.pushButton_Preview->setIcon(FilesDefs::getIconFromQtResourcePath(QString(":/icons/png/search.png")));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -316,6 +321,7 @@ void WikiEditDialog::previewToggle()
|
||||
mCurrentText = ui.textEdit->toPlainText();
|
||||
mPreviewMode = true;
|
||||
ui.pushButton_Preview->setText(tr("Edit Page"));
|
||||
ui.pushButton_Preview->setIcon(FilesDefs::getIconFromQtResourcePath(QString(":/icons/png/pencil-edit-button.png")));
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user