From adee93d7847749877dac29ae9f66e8ef8869fd89 Mon Sep 17 00:00:00 2001 From: LittleWhite Date: Mon, 17 Aug 2015 22:50:52 +0200 Subject: Improvements for MRU avoid duplicates always put the last file loaded to top of the list --- src/citra_qt/main.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/citra_qt/main.h') diff --git a/src/citra_qt/main.h b/src/citra_qt/main.h index 4b260ae8b..6f1292295 100644 --- a/src/citra_qt/main.h +++ b/src/citra_qt/main.h @@ -60,6 +60,24 @@ private: void BootGame(const std::string& filename); void ShutdownGame(); + /** + * Stores the filename in the recently loaded files list. + * The new filename is stored at the beginning of the recently loaded files list. + * After inserting the new entry, duplicates are removed meaning that if + * this was inserted from \a OnMenuRecentFile(), the entry will be put on top + * and remove from its previous position. + * + * Finally, this function calls \a UpdateRecentFiles() to update the UI. + * + * @param filename the filename to store + */ + void StoreRecentFile(const QString& filename); + + /** + * Updates the recent files menu. + * Menu entries are rebuilt from the configuration file. + * If there is no entry in the menu, the menu is greyed out. + */ void UpdateRecentFiles(); void closeEvent(QCloseEvent* event) override; -- cgit v1.2.3