Qt: Add recent game list clearing (closes #1380)

This commit is contained in:
Vicki Pfau 2019-08-25 19:29:18 -07:00
parent 4cf401c391
commit 3976f8f273
3 changed files with 10 additions and 0 deletions

View File

@ -19,6 +19,7 @@ Features:
- GBA Cheats: Add support for loading EZ Flash-style cht files
- Support for unlicensed Wisdom Tree Game Boy mapper
- Qt: Add export button for tile view (closes mgba.io/i/1507)
- Qt: Add recent game list clearing (closes mgba.io/i/1380)
Emulation fixes:
- GBA: All IRQs have 7 cycle delay (fixes mgba.io/i/539, mgba.io/i/1208)
- GBA: Reset now reloads multiboot ROMs

View File

@ -1702,6 +1702,11 @@ void Window::appendMRU(const QString& fname) {
updateMRU();
}
void Window::clearMRU() {
m_mruFiles.clear();
updateMRU();
}
void Window::updateMRU() {
m_actions.clearMenu("mru");
int i = 0;
@ -1714,6 +1719,9 @@ void Window::updateMRU() {
}
m_config->setMRU(m_mruFiles);
m_config->write();
m_actions.addSeparator("mru");
m_actions.addAction(tr("Clear"), "resetMru", this, &Window::clearMRU, "mru");
m_actions.rebuildMenu(menuBar(), this, *m_shortcutController);
}

View File

@ -154,6 +154,7 @@ private:
void detachWidget(QWidget* widget);
void appendMRU(const QString& fname);
void clearMRU();
void updateMRU();
void openView(QWidget* widget);