mirror of https://github.com/odrling/Aegisub
Close the detached video dialog when video is closed
This commit is contained in:
parent
7780fadfc6
commit
23f6addf35
|
@ -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();
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue