Base for wxMessageDialog with common checks for style.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32757 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: msgdlgg.cpp
|
||||
// Name: src/generic/msgdlgg.cpp
|
||||
// Purpose: wxGenericMessageDialog
|
||||
// Author: Julian Smart, Robert Roebling
|
||||
// Modified by:
|
||||
@@ -65,7 +65,7 @@ wxGenericMessageDialog::wxGenericMessageDialog( wxWindow *parent,
|
||||
const wxPoint& pos)
|
||||
: wxDialog( parent, wxID_ANY, caption, pos, wxDefaultSize, wxDEFAULT_DIALOG_STYLE )
|
||||
{
|
||||
m_dialogStyle = style;
|
||||
SetMessageDialogStyle(style);
|
||||
|
||||
bool is_pda = (wxSystemSettings::GetScreenType() <= wxSYS_SCREEN_PDA);
|
||||
|
||||
@@ -151,7 +151,8 @@ void wxGenericMessageDialog::OnCancel(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
// Allow cancellation via ESC/Close button except if
|
||||
// only YES and NO are specified.
|
||||
if ( (m_dialogStyle & wxYES_NO) != wxYES_NO || (m_dialogStyle & wxCANCEL) )
|
||||
const long style = GetMessageDialogStyle();
|
||||
if ( (style & wxYES_NO) != wxYES_NO || (style & wxCANCEL) )
|
||||
{
|
||||
EndModal( wxID_CANCEL );
|
||||
}
|
||||
|
Reference in New Issue
Block a user