From 9fc0b33cdf07832ab6f9ad30b3c7d5ce87b016ba Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Wed, 28 Sep 2011 19:51:18 +0000 Subject: [PATCH] Add opened audio files to the audio mru list Originally committed to SVN as r5657. --- aegisub/src/audio_controller.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/aegisub/src/audio_controller.cpp b/aegisub/src/audio_controller.cpp index f558d65da..b44410b6c 100644 --- a/aegisub/src/audio_controller.cpp +++ b/aegisub/src/audio_controller.cpp @@ -51,6 +51,7 @@ #include "compat.h" #include "include/aegisub/audio_player.h" #include "include/aegisub/audio_provider.h" +#include "main.h" #include "selection_controller.h" #include "video_context.h" @@ -264,6 +265,7 @@ void AudioController::OpenAudio(const wxString &url) wxFileName fn(url); if (!fn.FileExists()) { + config::mru->Remove("Audio", STD_STR(url)); agi::FileNotFoundError fnf(STD_STR(url)); throw agi::AudioOpenError( "Failed opening audio file (parsing as plain filename)", @@ -289,6 +291,8 @@ void AudioController::OpenAudio(const wxString &url) audio_url = url; + config::mru->Add("Audio", STD_STR(url)); + // Tell listeners about this. AnnounceAudioOpen(provider); }