Fixed #510 (detached video closing)

Originally committed to SVN as r1686.
This commit is contained in:
Rodrigo Braz Monteiro 2008-01-11 04:48:11 +00:00
parent d3ac586ad7
commit 777f74d394
2 changed files with 12 additions and 2 deletions

View File

@ -79,8 +79,6 @@ DialogDetachedVideo::DialogDetachedVideo(FrameMain *par)
///////////// /////////////
// Destructor // Destructor
DialogDetachedVideo::~DialogDetachedVideo() { DialogDetachedVideo::~DialogDetachedVideo() {
parent->detachedVideo = NULL;
parent->SetDisplayMode(1,-1);
} }
@ -88,6 +86,7 @@ DialogDetachedVideo::~DialogDetachedVideo() {
// Event table // Event table
BEGIN_EVENT_TABLE(DialogDetachedVideo,wxDialog) BEGIN_EVENT_TABLE(DialogDetachedVideo,wxDialog)
EVT_KEY_DOWN(DialogDetachedVideo::OnKey) EVT_KEY_DOWN(DialogDetachedVideo::OnKey)
EVT_CLOSE(DialogDetachedVideo::OnClose)
END_EVENT_TABLE() END_EVENT_TABLE()
@ -98,3 +97,13 @@ void DialogDetachedVideo::OnKey(wxKeyEvent &event) {
event.Skip(); event.Skip();
GetParent()->AddPendingEvent(event); GetParent()->AddPendingEvent(event);
} }
////////////////
// Close window
void DialogDetachedVideo::OnClose(wxCloseEvent &event) {
FrameMain *par = parent;
Destroy();
par->detachedVideo = NULL;
par->SetDisplayMode(1,-1);
}

View File

@ -54,6 +54,7 @@ private:
FrameMain *parent; FrameMain *parent;
void OnKey(wxKeyEvent &event); void OnKey(wxKeyEvent &event);
void OnClose(wxCloseEvent &event);
public: public:
DialogDetachedVideo(FrameMain *parent); DialogDetachedVideo(FrameMain *parent);