]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/widgets/statbmp.cpp
Support using GetTextExtent() with empty string to get descent in wxOSX.
[wxWidgets.git] / samples / widgets / statbmp.cpp
index 5305c650486a1b810639e3a3966444ee20355f97..12ec4704b852e9ad4251e578c55e4bc6117cbcaf 100644 (file)
@@ -6,7 +6,7 @@
 // Created:     2008-06-19
 // Id:          $Id$
 // Copyright:   (c) 2008 Marcin Wojdyr
-// License:     wxWindows license
+// Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 // ============================================================================
@@ -104,9 +104,9 @@ void StatBmpWidgetsPage::CreateContent()
 
     wxInitAllImageHandlers();
 
-    Connect(wxEVT_COMMAND_FILEPICKER_CHANGED,
+    Connect(wxEVT_FILEPICKER_CHANGED,
             wxFileDirPickerEventHandler(StatBmpWidgetsPage::OnFileChange));
-    Connect(wxEVT_COMMAND_RADIOBOX_SELECTED,
+    Connect(wxEVT_RADIOBOX,
             wxCommandEventHandler(StatBmpWidgetsPage::OnRadioChange));
 
     m_statbmp = NULL;
@@ -115,15 +115,14 @@ void StatBmpWidgetsPage::CreateContent()
 
 void StatBmpWidgetsPage::RecreateWidget()
 {
-    delete m_statbmp;
-    m_statbmp = NULL;
+    wxDELETE(m_statbmp);
 
     wxString filepath = m_filepicker->GetPath();
     if ( filepath.empty() )
         return;
 
     wxImage image(filepath);
-    if (! image.Ok() )
+    if (! image.IsOk() )
     {
         wxLogMessage("Reading image from file '%s' failed.", filepath.c_str());
         return;