Commit 3c5bdd61 authored by Dominik Haumann's avatar Dominik Haumann

Update *all* XmlGuiClients whenever toolbar config changes

parent 10a6c00d
......@@ -516,9 +516,23 @@ void KateMainWindow::slotEditToolbars()
dlg.exec();
}
void KateMainWindow::reloadXmlGui()
{
for (KTextEditor::Document* doc : KateApp::self()->documentManager()->documentList()) {
doc->reloadXML();
for (KTextEditor::View* view : doc->views()) {
view->reloadXML();
}
}
}
void KateMainWindow::slotNewToolbarConfig()
{
applyMainWindowSettings(KConfigGroup(KSharedConfig::openConfig(), "MainWindow"));
// we neeed to relod all View's XML Gui from disk to ensure toolbar
// changes are applied to all views.
reloadXmlGui();
}
void KateMainWindow::slotFileQuit()
......@@ -742,16 +756,8 @@ void KateMainWindow::editKeys()
}
dlg.configure();
QList<KTextEditor::Document *> l = KateApp::self()->documentManager()->documentList();
for (int i = 0; i < l.count(); i++) {
// qCDebug(LOG_KATE)<<"reloading Keysettings for document "<<i;
l.at(i)->reloadXML();
QList<KTextEditor::View *> l1 = l.at(i)->views();
for (int i1 = 0; i1 < l1.count(); i1++) {
l1.at(i1)->reloadXML();
// qCDebug(LOG_KATE)<<"reloading Keysettings for view "<<i<<"/"<<i1;
}
}
// reloadXML gui clients, to ensure all clients are up-to-date
reloadXmlGui();
}
void KateMainWindow::openUrl(const QString &name)
......
......@@ -195,6 +195,7 @@ private Q_SLOTS:
void slotDropEvent(QDropEvent *);
void editKeys();
void mSlotFixOpenWithMenu();
void reloadXmlGui();
/* to update the caption */
void slotDocumentCreated(KTextEditor::Document *doc);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment