Made esc work with attachments, automation and spell checker dialogs, and jfs's suggested changes to dsound code
Originally committed to SVN as r1105.
This commit is contained in:
parent
b91f1a0511
commit
be0cedb475
4 changed files with 5 additions and 0 deletions
|
@ -356,6 +356,7 @@ wxThread::ExitCode DirectSoundPlayerThread::Entry() {
|
|||
if (FAILED(res)) break;
|
||||
res = parent->buffer->Lock(parent->offset, (playpos-parent->offset)%parent->bufSize, &buf1, &size1, &buf2, &size2, 0);
|
||||
if (FAILED(res)) break;
|
||||
parent->offset = (parent->offset + size1 + size2) % parent->bufSize;
|
||||
if (size1) memset(buf1, 0, size1);
|
||||
if (size2) memset(buf2, 0, size2);
|
||||
bytesFilled += size1 + size2;
|
||||
|
@ -366,6 +367,7 @@ wxThread::ExitCode DirectSoundPlayerThread::Entry() {
|
|||
wxLogDebug(_T("DS thread dead"));
|
||||
|
||||
parent->playing = false;
|
||||
WaitForSingleObject(stopnotify, 1500);
|
||||
parent->buffer->Stop();
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -69,6 +69,7 @@ DialogAttachments::DialogAttachments(wxWindow *parent)
|
|||
buttonSizer->Add(extractButton,1,0,0);
|
||||
buttonSizer->Add(deleteButton,1,0,0);
|
||||
buttonSizer->Add(new wxButton(this,BUTTON_CLOSE,_("&Close")),1,wxLEFT,5);
|
||||
SetEscapeId(BUTTON_CLOSE);
|
||||
|
||||
// Main sizer
|
||||
wxSizer *mainSizer = new wxBoxSizer(wxVERTICAL);
|
||||
|
|
|
@ -75,6 +75,7 @@ DialogAutomation::DialogAutomation(wxWindow *parent, Automation4::ScriptManager
|
|||
button_box->AddSpacer(10);
|
||||
button_box->Add(close_button, 0);
|
||||
button_box->AddStretchSpacer(2);
|
||||
SetEscapeId(wxID_CLOSE);
|
||||
|
||||
// main layout
|
||||
wxSizer *main_box = new wxBoxSizer(wxVERTICAL);
|
||||
|
|
|
@ -126,6 +126,7 @@ DialogSpellChecker::DialogSpellChecker(wxFrame *parent)
|
|||
botSizer->Add(language,1,wxEXPAND);
|
||||
botSizer->Add(new wxButton(this,wxID_CLOSE),0,wxEXPAND);
|
||||
botSizer->AddGrowableCol(0,1);
|
||||
SetEscapeId(wxID_CLOSE);
|
||||
|
||||
// Main sizer
|
||||
wxSizer *mainSizer = new wxBoxSizer(wxVERTICAL);
|
||||
|
|
Loading…
Reference in a new issue