added GTK+ 2.6 implementation of wxAboutBox

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41700 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2006-10-08 13:08:51 +00:00
parent 1deb3af2fd
commit a11a0ead4a
4 changed files with 130 additions and 10 deletions

View File

@@ -80,6 +80,20 @@ wxString wxAboutDialogInfo::GetDescriptionAndCredits() const
return s;
}
wxIcon wxAboutDialogInfo::GetIcon() const
{
wxIcon icon = m_icon;
if ( !icon.Ok() && wxTheApp )
{
const wxTopLevelWindow * const
tlw = wxDynamicCast(wxTheApp->GetTopWindow(), wxTopLevelWindow);
if ( tlw )
icon = tlw->GetIcon();
}
return icon;
}
// ----------------------------------------------------------------------------
// wxAboutDialog
// ----------------------------------------------------------------------------
@@ -125,14 +139,6 @@ bool wxAboutDialog::Create(const wxAboutDialogInfo& info)
wxSizer *sizerIconAndText = new wxBoxSizer(wxHORIZONTAL);
#if wxUSE_STATBMP
wxIcon icon = info.GetIcon();
if ( !icon.Ok() && wxTheApp )
{
const wxTopLevelWindow * const
tlw = wxDynamicCast(wxTheApp->GetTopWindow(), wxTopLevelWindow);
if ( tlw )
icon = tlw->GetIcon();
}
if ( icon.Ok() )
{
sizerIconAndText->Add(new wxStaticBitmap(this, wxID_ANY, icon),
@@ -176,7 +182,7 @@ void wxGenericAboutBox(const wxAboutDialogInfo& info)
// currently wxAboutBox is implemented natively only under these platforms, for
// the others we provide a generic fallback here
#if !defined(__WXMSW__) && !defined(__WXMAC__)
#if !defined(__WXMSW__) && !defined(__WXMAC__) && !defined(__WXGTK26__)
void wxAboutBox(const wxAboutDialogInfo& info)
{