add parent parameter to wxAboutBox() (closes #9952)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60389 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2009-04-26 13:41:21 +00:00
parent 6418ad5ec8
commit c173e541b8
8 changed files with 25 additions and 26 deletions

View File

@@ -113,10 +113,9 @@ wxString wxAboutDialogInfo::GetCopyrightToDisplay() const
// 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;
@@ -196,7 +195,7 @@ bool wxGenericAboutDialog::Create(const wxAboutDialogInfo& info)
SetSizerAndFit(sizerTop);
CentreOnScreen();
CentreOnParent();
return true;
}
@@ -240,10 +239,10 @@ void wxGenericAboutDialog::AddCollapsiblePane(const wxString& title,
// 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);
@@ -255,9 +254,9 @@ void wxGenericAboutBox(const wxAboutDialogInfo& info)
// 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