Close the detached video dialog when video is closed

This commit is contained in:
Thomas Goyne 2014-06-15 07:03:51 -07:00
parent 7780fadfc6
commit 23f6addf35
2 changed files with 4 additions and 3 deletions

View File

@ -129,8 +129,8 @@ void DialogDetachedVideo::OnKeyDown(wxKeyEvent &evt) {
hotkey::check("Video Display", context, evt); hotkey::check("Video Display", context, evt);
} }
void DialogDetachedVideo::OnVideoOpen() { void DialogDetachedVideo::OnVideoOpen(AsyncVideoProvider *new_provider) {
if (context->project->VideoProvider()) if (new_provider)
SetTitle(fmt_tl("Video: %s", context->project->VideoName().filename())); SetTitle(fmt_tl("Video: %s", context->project->VideoName().filename()));
else { else {
Close(); Close();

View File

@ -38,6 +38,7 @@
#include <libaegisub/signal.h> #include <libaegisub/signal.h>
namespace agi { struct Context; } namespace agi { struct Context; }
class AsyncVideoProvider;
class PersistLocation; class PersistLocation;
class VideoBox; class VideoBox;
class VideoDisplay; class VideoDisplay;
@ -53,7 +54,7 @@ class DialogDetachedVideo final : public wxDialog {
/// Minimize event handler to hack around a wx bug /// Minimize event handler to hack around a wx bug
void OnMinimize(wxIconizeEvent &evt); void OnMinimize(wxIconizeEvent &evt);
void OnKeyDown(wxKeyEvent &evt); void OnKeyDown(wxKeyEvent &evt);
void OnVideoOpen(); void OnVideoOpen(AsyncVideoProvider *new_provider);
public: public:
/// @brief Constructor /// @brief Constructor