diff options
author | Dimitri van Heesch <doxygen@gmail.com> | 2020-11-05 20:51:54 (GMT) |
---|---|---|
committer | Dimitri van Heesch <doxygen@gmail.com> | 2020-11-05 20:51:54 (GMT) |
commit | 62d80023d73afaf117a7ce55aaecdf84889fb723 (patch) | |
tree | 031fd1dc4903cc2efee409f0cb0a4d3e94959638 /addon | |
parent | 67c4b97fd341fbe30b243f6959935a0e8595c7ad (diff) | |
parent | 1d8ce1a94fe9ad665ca0ef73ec88a3c5726cfec5 (diff) | |
download | Doxygen-62d80023d73afaf117a7ce55aaecdf84889fb723.zip Doxygen-62d80023d73afaf117a7ce55aaecdf84889fb723.tar.gz Doxygen-62d80023d73afaf117a7ce55aaecdf84889fb723.tar.bz2 |
Merge branch 'master' of github.com:doxygen/doxygen
Diffstat (limited to 'addon')
-rwxr-xr-x | addon/doxywizard/doxywizard.cpp | 15 | ||||
-rwxr-xr-x | addon/doxywizard/doxywizard.h | 2 |
2 files changed, 15 insertions, 2 deletions
diff --git a/addon/doxywizard/doxywizard.cpp b/addon/doxywizard/doxywizard.cpp index fe8e60c..dc54d09 100755 --- a/addon/doxywizard/doxywizard.cpp +++ b/addon/doxywizard/doxywizard.cpp @@ -69,11 +69,11 @@ MainWindow::MainWindow() this, SLOT(quit()), Qt::CTRL+Qt::Key_Q); QMenu *settings = menuBar()->addMenu(tr("Settings")); - settings->addAction(tr("Reset to factory defaults"), + m_resetDefault = settings->addAction(tr("Reset to factory defaults"), this,SLOT(resetToDefaults())); settings->addAction(tr("Use current settings at startup"), this,SLOT(makeDefaults())); - settings->addAction(tr("Clear recent list"), + m_clearRecent = settings->addAction(tr("Clear recent list"), this,SLOT(clearRecent())); QMenu *help = menuBar()->addMenu(tr("Help")); @@ -379,6 +379,8 @@ void MainWindow::clearRecent() { m_settings.setValue(QString::fromLatin1("recent/config%1").arg(i++),QString::fromLatin1("")); } + m_clearRecent->setEnabled(false); + m_recentMenu->setEnabled(false); m_settings.sync(); } @@ -396,6 +398,8 @@ void MainWindow::resetToDefaults() m_expert->resetToDefaults(); m_settings.setValue(QString::fromLatin1("wizard/loadsettings"), false); m_settings.sync(); + m_modified = false; + updateTitle(); m_wizard->refresh(); } } @@ -474,6 +478,9 @@ void MainWindow::addRecentFileList(const QString &fileName) m_recentFiles.removeLast(); m_recentFiles.prepend(fileName); } + m_clearRecent->setEnabled(m_recentFiles.count()>0); + m_recentMenu->setEnabled(m_recentFiles.count()>0); + m_settings.sync(); } void MainWindow::updateRecentFile(void) { @@ -488,6 +495,9 @@ void MainWindow::updateRecentFile(void) { m_settings.setValue(QString::fromLatin1("recent/config%1").arg(i),QString::fromLatin1("")); } + m_clearRecent->setEnabled(m_recentFiles.count()>0); + m_recentMenu->setEnabled(m_recentFiles.count()>0); + m_settings.sync(); } void MainWindow::openRecent(QAction *action) @@ -685,6 +695,7 @@ void MainWindow::configChanged() void MainWindow::updateTitle() { QString title = tr("Doxygen GUI frontend"); + m_resetDefault->setEnabled(m_modified); if (m_modified) { title+=QString::fromLatin1(" +"); diff --git a/addon/doxywizard/doxywizard.h b/addon/doxywizard/doxywizard.h index 3fc2b65..48dc5d3 100755 --- a/addon/doxywizard/doxywizard.h +++ b/addon/doxywizard/doxywizard.h @@ -94,6 +94,8 @@ class MainWindow : public QMainWindow QSettings m_settings; QMenu *m_recentMenu; QStringList m_recentFiles; + QAction *m_resetDefault; + QAction *m_clearRecent; QProcess *m_runProcess; QTimer *m_timer; QTabWidget *m_tabs; |