]> git.saurik.com Git - wxWidgets.git/commitdiff
don't show licence pane if there is no licence text
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 23 Oct 2006 20:19:44 +0000 (20:19 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 23 Oct 2006 20:19:44 +0000 (20:19 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42299 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/aboutdlgg.cpp

index 61f0db4470fe6e2a8943bb1ebca3931e3fa8d5ce..506662d6c73f76146e213dd927364ca787b7062e 100644 (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)