// wxGenericAboutDialog
// ----------------------------------------------------------------------------
-bool wxGenericAboutDialog::Create(const wxAboutDialogInfo& info)
+bool wxGenericAboutDialog::Create(const wxAboutDialogInfo& info, wxWindow* parent)
{
- // this is a modal dialog thus we'll use GetParentForModalDialog:
- if ( !wxDialog::Create(GetParentForModalDialog(), wxID_ANY, _("About ") + info.GetName(),
+ if ( !wxDialog::Create(parent, wxID_ANY, _("About ") + info.GetName(),
wxDefaultPosition, wxDefaultSize, wxRESIZE_BORDER|wxDEFAULT_DIALOG_STYLE) )
return false;
SetSizerAndFit(sizerTop);
- CentreOnScreen();
+ CentreOnParent();
return true;
}
// public functions
// ----------------------------------------------------------------------------
-void wxGenericAboutBox(const wxAboutDialogInfo& info)
+void wxGenericAboutBox(const wxAboutDialogInfo& info, wxWindow* parent)
{
#if !defined(__WXGTK__) && !defined(__WXMAC__)
- wxGenericAboutDialog dlg(info);
+ wxGenericAboutDialog dlg(info, parent);
dlg.ShowModal();
#else
- wxGenericAboutDialog* dlg = new wxGenericAboutDialog(info);
+ wxGenericAboutDialog* dlg = new wxGenericAboutDialog(info, parent);
dlg->Show();
#endif
}
// the others we provide a generic fallback here
#if !defined(__WXMSW__) && !defined(__WXMAC__) && !defined(__WXGTK26__)
-void wxAboutBox(const wxAboutDialogInfo& info)
+void wxAboutBox(const wxAboutDialogInfo& info, wxWindow* parent)
{
- wxGenericAboutBox(info);
+ wxGenericAboutBox(info, parent);
}
#endif // platforms without native about dialog