]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/radiocmn.cpp
Moved more code from wxDataViewCtrl to wxDataViewCtrlInternal.
[wxWidgets.git] / src / common / radiocmn.cpp
index f1fec65ad577df584d5e0eccf73c7a672c3b88aa..9993161620eb5e1a06840d586f9c4906a0d7824d 100644 (file)
@@ -6,7 +6,7 @@
 // Created:     03.06.01
 // RCS-ID:      $Id$
 // Copyright:   (c) 2001 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
-// License:     wxWindows licence
+// Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
 
 // ============================================================================
@@ -44,7 +44,7 @@
 
 void wxRadioBoxBase::SetMajorDim(unsigned int majorDim, long style)
 {
-    wxCHECK_RET( majorDim != 0, _T("major radiobox dimension can't be 0") );
+    wxCHECK_RET( majorDim != 0, wxT("major radiobox dimension can't be 0") );
 
     m_majorDim = majorDim;
 
@@ -125,7 +125,7 @@ int wxRadioBoxBase::GetNextItem(int item, wxDirection dir, long style) const
                 break;
 
             default:
-                wxFAIL_MSG( _T("unexpected wxDirection value") );
+                wxFAIL_MSG( wxT("unexpected wxDirection value") );
                 return wxNOT_FOUND;
         }
 
@@ -158,7 +158,7 @@ int wxRadioBoxBase::GetNextItem(int item, wxDirection dir, long style) const
         }
 
         wxASSERT_MSG( item < count && item >= 0,
-                      _T("logic error in wxRadioBox::GetNextItem()") );
+                      wxT("logic error in wxRadioBox::GetNextItem()") );
     }
     // we shouldn't select the non-active items, continue looking for a
     // visible and shown one unless we came back to the item we started from in
@@ -172,7 +172,7 @@ int wxRadioBoxBase::GetNextItem(int item, wxDirection dir, long style) const
 
 void wxRadioBoxBase::SetItemToolTip(unsigned int item, const wxString& text)
 {
-    wxASSERT_MSG( item < GetCount(), _T("Invalid item index") );
+    wxASSERT_MSG( item < GetCount(), wxT("Invalid item index") );
 
     // extend the array to have entries for all our items on first use
     if ( !m_itemsTooltips )
@@ -189,8 +189,7 @@ void wxRadioBoxBase::SetItemToolTip(unsigned int item, const wxString& text)
         if ( tooltip )
         {
             // delete the tooltip
-            delete tooltip;
-            tooltip = NULL;
+            wxDELETE(tooltip);
         }
         else // nothing to do
         {
@@ -247,7 +246,7 @@ wxRadioBoxBase::~wxRadioBoxBase()
 // set helptext for a particular item
 void wxRadioBoxBase::SetItemHelpText(unsigned int n, const wxString& helpText)
 {
-    wxCHECK_RET( n < GetCount(), _T("Invalid item index") );
+    wxCHECK_RET( n < GetCount(), wxT("Invalid item index") );
 
     if ( m_itemsHelpTexts.empty() )
     {
@@ -261,7 +260,7 @@ void wxRadioBoxBase::SetItemHelpText(unsigned int n, const wxString& helpText)
 // retrieve helptext for a particular item
 wxString wxRadioBoxBase::GetItemHelpText( unsigned int n ) const
 {
-    wxCHECK_MSG( n < GetCount(), wxEmptyString, _T("Invalid item index") );
+    wxCHECK_MSG( n < GetCount(), wxEmptyString, wxT("Invalid item index") );
 
     return m_itemsHelpTexts.empty() ? wxString() : m_itemsHelpTexts[n];
 }