Add opened audio files to the audio mru list

Originally committed to SVN as r5657.
This commit is contained in:
Thomas Goyne 2011-09-28 19:51:18 +00:00
parent d863d4379b
commit 9fc0b33cdf
1 changed files with 4 additions and 0 deletions

View File

@ -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);
}