forked from mia/Aegisub
Add opened audio files to the audio mru list
Originally committed to SVN as r5657.
This commit is contained in:
parent
d863d4379b
commit
9fc0b33cdf
1 changed files with 4 additions and 0 deletions
|
@ -51,6 +51,7 @@
|
||||||
#include "compat.h"
|
#include "compat.h"
|
||||||
#include "include/aegisub/audio_player.h"
|
#include "include/aegisub/audio_player.h"
|
||||||
#include "include/aegisub/audio_provider.h"
|
#include "include/aegisub/audio_provider.h"
|
||||||
|
#include "main.h"
|
||||||
#include "selection_controller.h"
|
#include "selection_controller.h"
|
||||||
#include "video_context.h"
|
#include "video_context.h"
|
||||||
|
|
||||||
|
@ -264,6 +265,7 @@ void AudioController::OpenAudio(const wxString &url)
|
||||||
wxFileName fn(url);
|
wxFileName fn(url);
|
||||||
if (!fn.FileExists())
|
if (!fn.FileExists())
|
||||||
{
|
{
|
||||||
|
config::mru->Remove("Audio", STD_STR(url));
|
||||||
agi::FileNotFoundError fnf(STD_STR(url));
|
agi::FileNotFoundError fnf(STD_STR(url));
|
||||||
throw agi::AudioOpenError(
|
throw agi::AudioOpenError(
|
||||||
"Failed opening audio file (parsing as plain filename)",
|
"Failed opening audio file (parsing as plain filename)",
|
||||||
|
@ -289,6 +291,8 @@ void AudioController::OpenAudio(const wxString &url)
|
||||||
|
|
||||||
audio_url = url;
|
audio_url = url;
|
||||||
|
|
||||||
|
config::mru->Add("Audio", STD_STR(url));
|
||||||
|
|
||||||
// Tell listeners about this.
|
// Tell listeners about this.
|
||||||
AnnounceAudioOpen(provider);
|
AnnounceAudioOpen(provider);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue