X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9eddec696f06d65a80e7339b2fae14fcb55f8383..71cf399ff0f1ddb966b48e512b0fb4e690f5c440:/src/generic/tipdlg.cpp?ds=inline diff --git a/src/generic/tipdlg.cpp b/src/generic/tipdlg.cpp index 599d310fe9..491a0ba700 100644 --- a/src/generic/tipdlg.cpp +++ b/src/generic/tipdlg.cpp @@ -210,13 +210,12 @@ wxString wxFileTipProvider::GetTip() BEGIN_EVENT_TABLE(wxTipDialog, wxDialog) EVT_BUTTON(wxID_NEXT_TIP, wxTipDialog::OnNextTip) - EVT_BUTTON(wxID_CLOSE, wxTipDialog::OnCancel) END_EVENT_TABLE() wxTipDialog::wxTipDialog(wxWindow *parent, wxTipProvider *tipProvider, bool showAtStartup) - : wxDialog(parent, wxID_ANY, _("Tip of the Day"), + : wxDialog(GetParentForModalDialog(parent), wxID_ANY, _("Tip of the Day"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER ) @@ -229,6 +228,7 @@ wxTipDialog::wxTipDialog(wxWindow *parent, // smart phones does not support or do not waste space for wxButtons #ifndef __SMARTPHONE__ wxButton *btnClose = new wxButton(this, wxID_CLOSE); + SetAffirmativeId(wxID_CLOSE); #endif m_checkbox = new wxCheckBox(this, wxID_ANY, _("&Show tips at startup"));