Merge pull request #2209 from defnax/wiki-fixes

Added temporary solution to update the Wiki tree
This commit is contained in:
defnax 2021-01-06 19:09:06 +01:00 committed by GitHub
commit 0345bac168
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 25 additions and 7 deletions

View File

@ -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()
@ -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);
}

View File

@ -74,6 +74,7 @@ private slots:
void wikiGroupChanged(const QString &groupId);
void todo();
void insertWikiGroups();
private:

View File

@ -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();
@ -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")));
}