don't show licence pane if there is no licence text

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42299 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2006-10-23 20:19:44 +00:00
parent f2b79dadee
commit 886b7d745c

View File

@ -134,13 +134,17 @@ bool wxGenericAboutDialog::Create(const wxAboutDialogInfo& info)
}
// add licence
wxCollapsiblePane *licensepnl = new wxCollapsiblePane(this, wxID_ANY, wxT("License"));
if ( info.HasLicence() )
{
wxCollapsiblePane *
licensepnl = new wxCollapsiblePane(this, wxID_ANY, wxT("License"));
new wxStaticText(licensepnl->GetPane(), wxID_ANY, info.GetLicence(),
wxDefaultPosition, wxDefaultSize,
wxALIGN_CENTRE);
new wxStaticText(licensepnl->GetPane(), wxID_ANY, info.GetLicence(),
wxDefaultPosition, wxDefaultSize,
wxALIGN_CENTRE);
m_sizerText->Add(licensepnl, wxSizerFlags(1).Expand().Border(wxBOTTOM));
m_sizerText->Add(licensepnl, wxSizerFlags(1).Expand().Border(wxBOTTOM));
}
// TODO: add credits (developers, artists, doc writers, translators)