diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-08-04 18:49:06 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-08-04 23:34:57 +0200 |
commit | 0cbfa8f97d0c6abdec829718eaf97486447a96cf (patch) | |
tree | b059cb2f3ad10b5de197ddd0eaffcae1899ea97b /vcl | |
parent | 22ce3a423adee9f4471f196d7cb8fce02ff04c55 (diff) |
set default buttons for various messagebox button combinations
Change-Id: I4d6fc4313014a2478d0838766e09df743212991d
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/window/layout.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx index 513dab4dd977..dfdef8f9407d 100644 --- a/vcl/source/window/layout.cxx +++ b/vcl/source/window/layout.cxx @@ -1871,18 +1871,21 @@ short MessageDialog::Execute() break; case VCL_BUTTONS_OK: pBtn = new OKButton(pButtonBox); + pBtn->SetStyle(pBtn->GetStyle() & WB_DEFBUTTON); pBtn->Show(); m_aOwnedButtons.push_back(pBtn); m_aResponses[pBtn] = RET_OK; break; case VCL_BUTTONS_CLOSE: pBtn = new CloseButton(pButtonBox); + pBtn->SetStyle(pBtn->GetStyle() & WB_DEFBUTTON); pBtn->Show(); m_aOwnedButtons.push_back(pBtn); m_aResponses[pBtn] = RET_CLOSE; break; case VCL_BUTTONS_CANCEL: pBtn = new CancelButton(pButtonBox); + pBtn->SetStyle(pBtn->GetStyle() & WB_DEFBUTTON); m_aOwnedButtons.push_back(pBtn); m_aResponses[pBtn] = RET_CANCEL; break; @@ -1894,6 +1897,7 @@ short MessageDialog::Execute() m_aResponses[pBtn] = RET_YES; pBtn = new PushButton(pButtonBox); + pBtn->SetStyle(pBtn->GetStyle() & WB_DEFBUTTON); pBtn->SetText(Button::GetStandardText(BUTTON_NO)); pBtn->Show(); m_aOwnedButtons.push_back(pBtn); @@ -1906,6 +1910,7 @@ short MessageDialog::Execute() m_aResponses[pBtn] = RET_OK; pBtn = new CancelButton(pButtonBox); + pBtn->SetStyle(pBtn->GetStyle() & WB_DEFBUTTON); pBtn->Show(); m_aOwnedButtons.push_back(pBtn); m_aResponses[pBtn] = RET_CANCEL; |