Replace wxT() with wxS() in wxPropertyGrid code.

This commit is contained in:
Artur Wieczorek
2015-05-31 19:12:29 +02:00
parent 5decea57f4
commit 67bfb78ace
11 changed files with 115 additions and 115 deletions

View File

@@ -521,7 +521,7 @@ public:
void SelectPage( const wxString& label ) void SelectPage( const wxString& label )
{ {
int index = GetPageByName(label); int index = GetPageByName(label);
wxCHECK_RET( index >= 0, wxT("No page with such name") ); wxCHECK_RET( index >= 0, wxS("No page with such name") );
SelectPage( index ); SelectPage( index );
} }

View File

@@ -1028,7 +1028,7 @@ public:
void SetPropertyEditor( wxPGPropArg id, const wxPGEditor* editor ) void SetPropertyEditor( wxPGPropArg id, const wxPGEditor* editor )
{ {
wxPG_PROP_ARG_CALL_PROLOG() wxPG_PROP_ARG_CALL_PROLOG()
wxCHECK_RET( editor, wxT("unknown/NULL editor") ); wxCHECK_RET( editor, wxS("unknown/NULL editor") );
p->SetEditor(editor); p->SetEditor(editor);
RefreshProperty(p); RefreshProperty(p);
} }

View File

@@ -956,14 +956,14 @@ public:
*/ */
virtual void SetDialogValue( const wxVariant& WXUNUSED(value) ) virtual void SetDialogValue( const wxVariant& WXUNUSED(value) )
{ {
wxFAIL_MSG(wxT("re-implement this member function in derived class")); wxFAIL_MSG(wxS("re-implement this member function in derived class"));
} }
/** Return value modified by dialog. /** Return value modified by dialog.
*/ */
virtual wxVariant GetDialogValue() const virtual wxVariant GetDialogValue() const
{ {
wxFAIL_MSG(wxT("re-implement this member function in derived class")); wxFAIL_MSG(wxS("re-implement this member function in derived class"));
return wxVariant(); return wxVariant();
} }

View File

@@ -402,7 +402,7 @@ bool wxPGSpinCtrlEditor::OnEvent( wxPropertyGrid* propgrid, wxPGProperty* proper
#if defined(wxLongLong_t) && wxUSE_LONGLONG #if defined(wxLongLong_t) && wxUSE_LONGLONG
s = wxLongLong(v_ll).ToString(); s = wxLongLong(v_ll).ToString();
#else #else
s = wxString::Format(wxT("%ld"), v_ll); s = wxString::Format(wxS("%ld"), v_ll);
#endif #endif
} }
else else
@@ -474,7 +474,7 @@ wxPGWindowList wxPGDatePickerCtrlEditor::CreateControls( wxPropertyGrid* propgri
{ {
wxCHECK_MSG( wxDynamicCast(property, wxDateProperty), wxCHECK_MSG( wxDynamicCast(property, wxDateProperty),
NULL, NULL,
wxT("DatePickerCtrl editor can only be used with wxDateProperty or derivative.") ); wxS("DatePickerCtrl editor can only be used with wxDateProperty or derivative.") );
wxDateProperty* prop = wxDynamicCast(property, wxDateProperty); wxDateProperty* prop = wxDynamicCast(property, wxDateProperty);
@@ -829,7 +829,7 @@ void wxFontProperty::OnCustomPaint(wxDC& dc,
dc.SetFont(wxFontInfo(oldFont.GetPointSize().Bold().FaceName(drawFace)); dc.SetFont(wxFontInfo(oldFont.GetPointSize().Bold().FaceName(drawFace));
dc.SetTextForeground( wxSystemSettings::GetColour(wxSYS_COLOUR_BTNTEXT) ); dc.SetTextForeground( wxSystemSettings::GetColour(wxSYS_COLOUR_BTNTEXT) );
dc.DrawText( wxT("Aa"), rect.x+2, rect.y+1 ); dc.DrawText( wxS("Aa"), rect.x+2, rect.y+1 );
dc.SetFont(oldFont); dc.SetFont(oldFont);
} }
@@ -1070,7 +1070,7 @@ int wxSystemColourProperty::ColToInd( const wxColour& colour ) const
if ( colour == GetColour(ind) ) if ( colour == GetColour(ind) )
{ {
/*wxLogDebug(wxT("%s(%s): Index %i for ( getcolour(%i,%i,%i), colour(%i,%i,%i))"), /*wxLogDebug(wxS("%s(%s): Index %i for ( getcolour(%i,%i,%i), colour(%i,%i,%i))"),
GetClassName(),GetLabel().c_str(), GetClassName(),GetLabel().c_str(),
(int)i,(int)GetColour(ind).Red(),(int)GetColour(ind).Green(),(int)GetColour(ind).Blue(), (int)i,(int)GetColour(ind).Red(),(int)GetColour(ind).Green(),(int)GetColour(ind).Blue(),
(int)colour.Red(),(int)colour.Green(),(int)colour.Blue());*/ (int)colour.Red(),(int)colour.Green(),(int)colour.Blue());*/
@@ -1364,7 +1364,7 @@ public:
dc.SetBrush( *wxWHITE ); dc.SetBrush( *wxWHITE );
wxRect imageRect = propertyGrid->GetImageRect(property, item); wxRect imageRect = propertyGrid->GetImageRect(property, item);
wxLogDebug(wxT("%i, %i"),imageRect.x,imageRect.y); wxLogDebug(wxS("%i, %i"),imageRect.x,imageRect.y);
dc.DrawRectangle( rect.x+imageRect.x, rect.y+imageRect.y, dc.DrawRectangle( rect.x+imageRect.x, rect.y+imageRect.y,
imageRect.width, imageRect.height ); imageRect.width, imageRect.height );
@@ -1629,7 +1629,7 @@ wxColourProperty::wxColourProperty( const wxString& label,
gs_cp_es_normcolour_values, gs_cp_es_normcolour_values,
&gs_wxColourProperty_choicesCache, value ) &gs_wxColourProperty_choicesCache, value )
{ {
wxASSERT_MSG( wxTheColourDatabase, wxT("No colour database") ); wxASSERT_MSG( wxTheColourDatabase, wxS("No colour database") );
if ( wxTheColourDatabase ) if ( wxTheColourDatabase )
{ {
// Extend colour database with PG-specific colours. // Extend colour database with PG-specific colours.
@@ -1874,14 +1874,14 @@ const wxString& wxPGGetDefaultImageWildcard()
wxString ext_up = ext_lo.Upper(); wxString ext_up = ext_lo.Upper();
str.append( ext_up ); str.append( ext_up );
str.append( wxT(" files (*.") ); str.append( wxS(" files (*.") );
str.append( ext_up ); str.append( ext_up );
str.append( wxT(")|*.") ); str.append( wxS(")|*.") );
str.append( ext_lo ); str.append( ext_lo );
str.append( wxT("|") ); str.append( wxS("|") );
} }
str.append ( wxT("All files (*.*)|*.*") ); str.append ( wxS("All files (*.*)|*.*") );
wxPGGlobalVars->m_pDefaultImageWildcard = str; wxPGGlobalVars->m_pDefaultImageWildcard = str;
} }
@@ -2043,14 +2043,14 @@ void wxMultiChoiceProperty::GenerateValueAsString( wxVariant& value,
tempStr.Empty(); tempStr.Empty();
if ( itemCount ) if ( itemCount )
tempStr.append( wxT("\"") ); tempStr.append( wxS("\"") );
for ( i = 0; i < itemCount; i++ ) for ( i = 0; i < itemCount; i++ )
{ {
tempStr.append( strings[i] ); tempStr.append( strings[i] );
tempStr.append( wxT("\"") ); tempStr.append( wxS("\"") );
if ( i < (itemCount-1) ) if ( i < (itemCount-1) )
tempStr.append ( wxT(" \"") ); tempStr.append ( wxS(" \"") );
} }
} }
@@ -2115,7 +2115,7 @@ bool wxMultiChoiceProperty::OnEvent( wxPropertyGrid* propgrid,
if ( dlg.ShowModal() == wxID_OK && choiceCount ) if ( dlg.ShowModal() == wxID_OK && choiceCount )
{ {
int userStringMode = GetAttributeAsLong(wxT("UserStringMode"), 0); int userStringMode = GetAttributeAsLong(wxS("UserStringMode"), 0);
wxArrayInt arrInt = dlg.GetSelections(); wxArrayInt arrInt = dlg.GetSelections();
@@ -2156,7 +2156,7 @@ bool wxMultiChoiceProperty::StringToValue( wxVariant& variant, const wxString& t
{ {
wxArrayString arr; wxArrayString arr;
int userStringMode = GetAttributeAsLong(wxT("UserStringMode"), 0); int userStringMode = GetAttributeAsLong(wxS("UserStringMode"), 0);
WX_PG_TOKENIZER2_BEGIN(text,wxT('"')) WX_PG_TOKENIZER2_BEGIN(text,wxT('"'))
if ( userStringMode > 0 || (m_choices.IsOk() && m_choices.Index( token ) != wxNOT_FOUND) ) if ( userStringMode > 0 || (m_choices.IsOk() && m_choices.Index( token ) != wxNOT_FOUND) )
@@ -2251,7 +2251,7 @@ wxString wxDateProperty::ValueToString( wxVariant& value,
wxDateTime dateTime = value.GetDateTime(); wxDateTime dateTime = value.GetDateTime();
if ( !dateTime.IsValid() ) if ( !dateTime.IsValid() )
return wxT("Invalid"); return wxS("Invalid");
if ( ms_defaultDateFormat.empty() ) if ( ms_defaultDateFormat.empty() )
{ {
@@ -2283,8 +2283,8 @@ wxString wxDateProperty::DetermineDefaultDateFormat( bool showCentury )
wxString format; wxString format;
wxDateTime dt; wxDateTime dt;
dt.ParseFormat(wxT("2003-10-13"), wxT("%Y-%m-%d")); dt.ParseFormat(wxS("2003-10-13"), wxS("%Y-%m-%d"));
wxString str(dt.Format(wxT("%x"))); wxString str(dt.Format(wxS("%x")));
const wxChar *p = str.c_str(); const wxChar *p = str.c_str();
while ( *p ) while ( *p )
@@ -2292,25 +2292,25 @@ wxString wxDateProperty::DetermineDefaultDateFormat( bool showCentury )
int n=wxAtoi(p); int n=wxAtoi(p);
if (n == dt.GetDay()) if (n == dt.GetDay())
{ {
format.Append(wxT("%d")); format.Append(wxS("%d"));
p += 2; p += 2;
} }
else if (n == (int)dt.GetMonth()+1) else if (n == (int)dt.GetMonth()+1)
{ {
format.Append(wxT("%m")); format.Append(wxS("%m"));
p += 2; p += 2;
} }
else if (n == dt.GetYear()) else if (n == dt.GetYear())
{ {
format.Append(wxT("%Y")); format.Append(wxS("%Y"));
p += 4; p += 4;
} }
else if (n == (dt.GetYear() % 100)) else if (n == (dt.GetYear() % 100))
{ {
if (showCentury) if (showCentury)
format.Append(wxT("%Y")); format.Append(wxS("%Y"));
else else
format.Append(wxT("%y")); format.Append(wxS("%y"));
p += 2; p += 2;
} }
else else

View File

@@ -523,7 +523,7 @@ public:
: wxEvtHandler() : wxEvtHandler()
{ {
wxASSERT_MSG( wxDynamicCast(property, wxBoolProperty), wxASSERT_MSG( wxDynamicCast(property, wxBoolProperty),
wxT("Double-click processor should be used only with wxBoolProperty") ); wxS("Double-click processor should be used only with wxBoolProperty") );
m_timeLastMouseUp = 0; m_timeLastMouseUp = 0;
m_combo = combo; m_combo = combo;
@@ -802,7 +802,7 @@ void wxPropertyGrid::OnComboItemPaint( const wxPGComboBox* pCb,
if ( (flags & wxODCB_PAINTING_CONTROL) ) if ( (flags & wxODCB_PAINTING_CONTROL) )
paintdata.m_choiceItem = -1; paintdata.m_choiceItem = -1;
wxCHECK_RET( pDc, wxT("Invalid DC") ); wxCHECK_RET( pDc, wxS("Invalid DC") );
wxDC& dc = *pDc; wxDC& dc = *pDc;
dc.SetBrush(*wxWHITE_BRUSH); dc.SetBrush(*wxWHITE_BRUSH);

View File

@@ -722,7 +722,7 @@ bool wxPropertyGridManager::DoSelectPage( int index )
wxCHECK_MSG( index >= -1 && index < (int)GetPageCount(), wxCHECK_MSG( index >= -1 && index < (int)GetPageCount(),
false, false,
wxT("invalid page index") ); wxS("invalid page index") );
if ( m_selPage == index ) if ( m_selPage == index )
return true; return true;
@@ -923,7 +923,7 @@ wxPropertyGridPage* wxPropertyGridManager::InsertPage( int index,
index = GetPageCount(); index = GetPageCount();
wxCHECK_MSG( (size_t)index == GetPageCount(), NULL, wxCHECK_MSG( (size_t)index == GetPageCount(), NULL,
wxT("wxPropertyGridManager currently only supports appending pages (due to wxToolBar limitation).")); wxS("wxPropertyGridManager currently only supports appending pages (due to wxToolBar limitation)."));
bool needInit = true; bool needInit = true;
bool isPageInserted = m_iFlags & wxPG_MAN_FL_PAGE_INSERTED ? true : false; bool isPageInserted = m_iFlags & wxPG_MAN_FL_PAGE_INSERTED ? true : false;
@@ -977,7 +977,7 @@ wxPropertyGridPage* wxPropertyGridManager::InsertPage( int index,
if ( !label.empty() ) if ( !label.empty() )
{ {
wxASSERT_MSG( pageObj->m_label.empty(), wxASSERT_MSG( pageObj->m_label.empty(),
wxT("If page label is given in constructor, empty label must be given in AddPage")); wxS("If page label is given in constructor, empty label must be given in AddPage"));
pageObj->m_label = label; pageObj->m_label = label;
} }
@@ -1117,7 +1117,7 @@ wxPGProperty* wxPropertyGridManager::GetPageRoot( int index ) const
{ {
wxCHECK_MSG( (index >= 0) && (index < (int)m_arrPages.size()), wxCHECK_MSG( (index >= 0) && (index < (int)m_arrPages.size()),
NULL, NULL,
wxT("invalid page index") ); wxS("invalid page index") );
return m_arrPages[index]->GetRoot(); return m_arrPages[index]->GetRoot();
} }
@@ -1128,7 +1128,7 @@ bool wxPropertyGridManager::RemovePage( int page )
{ {
wxCHECK_MSG( (page >= 0) && (page < (int)GetPageCount()), wxCHECK_MSG( (page >= 0) && (page < (int)GetPageCount()),
false, false,
wxT("invalid page index") ); wxS("invalid page index") );
wxPropertyGridPage* pd = m_arrPages[page]; wxPropertyGridPage* pd = m_arrPages[page];
@@ -1632,7 +1632,7 @@ void wxPropertyGridManager::RecreateControls()
{ {
m_pTxtHelpCaption = new wxStaticText(this, m_pTxtHelpCaption = new wxStaticText(this,
wxID_ANY, wxID_ANY,
wxT(""), wxS(""),
wxDefaultPosition, wxDefaultPosition,
wxDefaultSize, wxDefaultSize,
wxALIGN_LEFT|wxST_NO_AUTORESIZE); wxALIGN_LEFT|wxST_NO_AUTORESIZE);
@@ -1643,7 +1643,7 @@ void wxPropertyGridManager::RecreateControls()
{ {
m_pTxtHelpContent = new wxStaticText(this, m_pTxtHelpContent = new wxStaticText(this,
wxID_ANY, wxID_ANY,
wxT(""), wxS(""),
wxDefaultPosition, wxDefaultPosition,
wxDefaultSize, wxDefaultSize,
wxALIGN_LEFT|wxST_NO_AUTORESIZE); wxALIGN_LEFT|wxST_NO_AUTORESIZE);
@@ -1879,7 +1879,7 @@ void wxPropertyGridManager::SetSplitterLeft( bool subProps, bool allPages )
void wxPropertyGridManager::SetPageSplitterLeft(int page, bool subProps) void wxPropertyGridManager::SetPageSplitterLeft(int page, bool subProps)
{ {
wxASSERT_MSG( (page < (int) GetPageCount()), wxASSERT_MSG( (page < (int) GetPageCount()),
wxT("SetPageSplitterLeft() has no effect until pages have been added") ); wxS("SetPageSplitterLeft() has no effect until pages have been added") );
if (page < (int) GetPageCount()) if (page < (int) GetPageCount())
{ {
@@ -1900,7 +1900,7 @@ void wxPropertyGridManager::SetPageSplitterLeft(int page, bool subProps)
void wxPropertyGridManager::ReconnectEventHandlers(wxWindowID oldId, wxWindowID newId) void wxPropertyGridManager::ReconnectEventHandlers(wxWindowID oldId, wxWindowID newId)
{ {
wxCHECK_RET( oldId != newId, wxCHECK_RET( oldId != newId,
wxT("Attempting to reconnect event handlers to the same window")); wxS("Attempting to reconnect event handlers to the same window"));
if (oldId != wxID_NONE) if (oldId != wxID_NONE)
{ {
@@ -1925,7 +1925,7 @@ void wxPropertyGridManager::OnPropertyGridSelect( wxPropertyGridEvent& event )
{ {
// Check id. // Check id.
wxASSERT_MSG( GetId() == m_pPropGrid->GetId(), wxASSERT_MSG( GetId() == m_pPropGrid->GetId(),
wxT("wxPropertyGridManager id must be set with wxPropertyGridManager::SetId (not wxWindow::SetId).") ); wxS("wxPropertyGridManager id must be set with wxPropertyGridManager::SetId (not wxWindow::SetId).") );
SetDescribedProperty(event.GetProperty()); SetDescribedProperty(event.GetProperty());
event.Skip(); event.Skip();
@@ -2109,7 +2109,7 @@ void wxPropertyGridManager::OnMouseUp( wxMouseEvent &event )
void wxPropertyGridManager::SetSplitterPosition( int pos, int splitterColumn ) void wxPropertyGridManager::SetSplitterPosition( int pos, int splitterColumn )
{ {
wxASSERT_MSG( GetPageCount(), wxASSERT_MSG( GetPageCount(),
wxT("SetSplitterPosition() has no effect until pages have been added") ); wxS("SetSplitterPosition() has no effect until pages have been added") );
for ( size_t i = 0; i < GetPageCount(); i++ ) for ( size_t i = 0; i < GetPageCount(); i++ )
{ {

View File

@@ -776,7 +776,7 @@ void wxPGProperty::GetDisplayInfo( unsigned int column,
const wxPGCell** pCell ) const wxPGCell** pCell )
{ {
wxASSERT_MSG(!pCell || !(*pCell), wxASSERT_MSG(!pCell || !(*pCell),
wxT("Cell pointer is a dummy argument and shouldn't be used")); wxS("Cell pointer is a dummy argument and shouldn't be used"));
wxUnusedVar(pCell); wxUnusedVar(pCell);
GetDisplayInfo(column, choiceIndex, flags, pString, (wxPGCell*)NULL); GetDisplayInfo(column, choiceIndex, flags, pString, (wxPGCell*)NULL);
} }
@@ -789,7 +789,7 @@ void wxPGProperty::GetDisplayInfo( unsigned int column,
wxPGCell* pCell ) wxPGCell* pCell )
{ {
wxCHECK_RET( GetGrid(), wxCHECK_RET( GetGrid(),
wxT("Cannot obtain display info for detached property") ); wxS("Cannot obtain display info for detached property") );
// Get default cell // Get default cell
wxPGCell cell = GetCell(column); wxPGCell cell = GetCell(column);
@@ -1035,7 +1035,7 @@ wxString wxPGProperty::GetValueAsString( int argFlags ) const
#endif #endif
wxPropertyGrid* pg = GetGrid(); wxPropertyGrid* pg = GetGrid();
wxASSERT_MSG( pg, wxASSERT_MSG( pg,
wxT("Cannot get valid value for detached property") ); wxS("Cannot get valid value for detached property") );
if ( !pg ) if ( !pg )
{ {
return wxEmptyString; return wxEmptyString;
@@ -1112,7 +1112,7 @@ bool wxPGProperty::StringToValue( wxVariant& v, const wxString& text, int argFla
int propagatedFlags = argFlags & (wxPG_REPORT_ERROR|wxPG_PROGRAMMATIC_VALUE); int propagatedFlags = argFlags & (wxPG_REPORT_ERROR|wxPG_PROGRAMMATIC_VALUE);
wxLogTrace("propgrid", wxLogTrace("propgrid",
wxT(">> %s.StringToValue('%s')"), GetLabel(), text); wxS(">> %s.StringToValue('%s')"), GetLabel(), text);
wxString::const_iterator it = text.begin(); wxString::const_iterator it = text.begin();
wxUniChar a; wxUniChar a;
@@ -1145,7 +1145,7 @@ bool wxPGProperty::StringToValue( wxVariant& v, const wxString& text, int argFla
wxString childName = child->GetBaseName(); wxString childName = child->GetBaseName();
wxLogTrace("propgrid", wxLogTrace("propgrid",
wxT("token = '%s', child = %s"), wxS("token = '%s', child = %s"),
token, childName); token, childName);
// Add only if editable or setting programmatically // Add only if editable or setting programmatically
@@ -1345,9 +1345,9 @@ void wxPGProperty::OnCustomPaint( wxDC& dc,
{ {
wxBitmap* bmp = m_valueBitmap; wxBitmap* bmp = m_valueBitmap;
wxCHECK_RET( bmp && bmp->IsOk(), wxT("invalid bitmap") ); wxCHECK_RET( bmp && bmp->IsOk(), wxS("invalid bitmap") );
wxCHECK_RET( rect.x >= 0, wxT("unexpected measure call") ); wxCHECK_RET( rect.x >= 0, wxS("unexpected measure call") );
dc.DrawBitmap(*bmp,rect.x,rect.y); dc.DrawBitmap(*bmp,rect.x,rect.y);
} }
@@ -1395,7 +1395,7 @@ void wxPGProperty::SetValue( wxVariant value, wxVariant* pList, int flags )
wxVariant newValue; wxVariant newValue;
AdaptListToValue(value, &newValue); AdaptListToValue(value, &newValue);
value = newValue; value = newValue;
//wxLogDebug(wxT(">> %s.SetValue() adapted list value to type '%s'"),GetName().c_str(),value.GetType().c_str()); //wxLogDebug(wxS(">> %s.SetValue() adapted list value to type '%s'"),GetName().c_str(),value.GetType().c_str());
} }
if ( HasFlag( wxPG_PROP_AGGREGATE) ) if ( HasFlag( wxPG_PROP_AGGREGATE) )
@@ -1411,7 +1411,7 @@ void wxPGProperty::SetValue( wxVariant value, wxVariant* pList, int flags )
wxVariantList::iterator node; wxVariantList::iterator node;
unsigned int i = 0; unsigned int i = 0;
//wxLogDebug(wxT(">> %s.SetValue() pList parsing"),GetName().c_str()); //wxLogDebug(wxS(">> %s.SetValue() pList parsing"),GetName().c_str());
// Children in list can be in any order, but we will give hint to // Children in list can be in any order, but we will give hint to
// GetPropertyByNameWH(). This optimizes for full list parsing. // GetPropertyByNameWH(). This optimizes for full list parsing.
@@ -1421,7 +1421,7 @@ void wxPGProperty::SetValue( wxVariant value, wxVariant* pList, int flags )
wxPGProperty* child = GetPropertyByNameWH(childValue.GetName(), i); wxPGProperty* child = GetPropertyByNameWH(childValue.GetName(), i);
if ( child ) if ( child )
{ {
//wxLogDebug(wxT("%i: child = %s, childValue.GetType()=%s"),i,child->GetBaseName().c_str(),childValue.GetType().c_str()); //wxLogDebug(wxS("%i: child = %s, childValue.GetType()=%s"),i,child->GetBaseName().c_str(),childValue.GetType().c_str());
if ( childValue.IsType(wxPG_VARIANT_TYPE_LIST) ) if ( childValue.IsType(wxPG_VARIANT_TYPE_LIST) )
{ {
if ( child->HasFlag(wxPG_PROP_AGGREGATE) && !(flags & wxPG_SETVAL_AGGREGATED) ) if ( child->HasFlag(wxPG_PROP_AGGREGATE) && !(flags & wxPG_SETVAL_AGGREGATED) )
@@ -1515,7 +1515,7 @@ void wxPGProperty::SetValue( wxVariant value, wxVariant* pList, int flags )
void wxPGProperty::SetValueInEvent( wxVariant value ) const void wxPGProperty::SetValueInEvent( wxVariant value ) const
{ {
wxCHECK_RET( GetGrid(), wxCHECK_RET( GetGrid(),
wxT("Cannot store pending value for detached property")); wxS("Cannot store pending value for detached property"));
GetGrid()->ValueChangeInEvent(value); GetGrid()->ValueChangeInEvent(value);
} }
@@ -1691,7 +1691,7 @@ const wxPGCell& wxPGProperty::GetCell( unsigned int column ) const
wxPropertyGrid* pg = GetGrid(); wxPropertyGrid* pg = GetGrid();
wxASSERT_MSG( pg, wxASSERT_MSG( pg,
wxT("Cannot get cell for detached property") ); wxS("Cannot get cell for detached property") );
if ( IsCategory() ) if ( IsCategory() )
return pg->GetCategoryDefaultCell(); return pg->GetCategoryDefaultCell();
@@ -2014,9 +2014,9 @@ int wxPGProperty::GetChoiceSelection() const
void wxPGProperty::SetChoiceSelection( int newValue ) void wxPGProperty::SetChoiceSelection( int newValue )
{ {
wxCHECK_RET( m_choices.IsOk(), wxT("invalid choiceinfo") ); wxCHECK_RET( m_choices.IsOk(), wxS("invalid choiceinfo") );
wxCHECK_RET( newValue >= 0 && newValue < (int)m_choices.GetCount(), wxCHECK_RET( newValue >= 0 && newValue < (int)m_choices.GetCount(),
wxT("New index is out of range") ); wxS("New index is out of range") );
// Changes value of a property with choices, but only // Changes value of a property with choices, but only
// works if the value type is long or string. // works if the value type is long or string.
@@ -2141,7 +2141,7 @@ void wxPGProperty::SetValueImage( wxBitmap& bmp )
{ {
// We need PG to obtain default image size // We need PG to obtain default image size
wxCHECK_RET( GetGrid(), wxCHECK_RET( GetGrid(),
wxT("Cannot set image for detached property") ); wxS("Cannot set image for detached property") );
delete m_valueBitmap; delete m_valueBitmap;
@@ -2270,7 +2270,7 @@ int wxPGProperty::GetY() const
{ {
wxPropertyGrid *pg = GetGrid(); wxPropertyGrid *pg = GetGrid();
wxASSERT_MSG( pg, wxASSERT_MSG( pg,
wxT("Cannot obtain coordinates of detached property") ); wxS("Cannot obtain coordinates of detached property") );
return pg ? GetY2(pg->GetRowHeight()) : 0; return pg ? GetY2(pg->GetRowHeight()) : 0;
} }
@@ -2409,7 +2409,7 @@ void wxPGProperty::AdaptListToValue( wxVariant& list, wxVariant* value ) const
unsigned int n = 0; unsigned int n = 0;
wxVariant childValue = list[n]; wxVariant childValue = list[n];
//wxLogDebug(wxT(">> %s.AdaptListToValue()"),GetBaseName().c_str()); //wxLogDebug(wxS(">> %s.AdaptListToValue()"),GetBaseName().c_str());
for ( unsigned int i = 0; i < GetChildCount(); i++ ) for ( unsigned int i = 0; i < GetChildCount(); i++ )
{ {
@@ -2417,7 +2417,7 @@ void wxPGProperty::AdaptListToValue( wxVariant& list, wxVariant* value ) const
if ( childValue.GetName() == child->GetBaseName() ) if ( childValue.GetName() == child->GetBaseName() )
{ {
//wxLogDebug(wxT(" %s(n=%i), %s"),childValue.GetName().c_str(),n,childValue.GetType().c_str()); //wxLogDebug(wxS(" %s(n=%i), %s"),childValue.GetName().c_str(),n,childValue.GetType().c_str());
if ( childValue.IsType(wxPG_VARIANT_TYPE_LIST) ) if ( childValue.IsType(wxPG_VARIANT_TYPE_LIST) )
{ {
@@ -2591,11 +2591,11 @@ wxPGProperty* wxPGProperty::GetItemAtY( unsigned int y,
/* /*
if ( current ) if ( current )
{ {
wxLogDebug(wxT("%s::GetItemAtY(%i) -> %s"),this->GetLabel().c_str(),y,current->GetLabel().c_str()); wxLogDebug(wxS("%s::GetItemAtY(%i) -> %s"),this->GetLabel().c_str(),y,current->GetLabel().c_str());
} }
else else
{ {
wxLogDebug(wxT("%s::GetItemAtY(%i) -> NULL"),this->GetLabel().c_str(),y); wxLogDebug(wxS("%s::GetItemAtY(%i) -> NULL"),this->GetLabel().c_str(),y);
} }
*/ */
@@ -2619,7 +2619,7 @@ wxPGProperty* wxPGProperty::GetItemAtY( unsigned int y ) const
{ {
wxPropertyGrid *pg = GetGrid(); wxPropertyGrid *pg = GetGrid();
wxASSERT_MSG( pg, wxASSERT_MSG( pg,
wxT("Cannot obtain property item for detached property") ); wxS("Cannot obtain property item for detached property") );
if( !pg ) if( !pg )
{ {
return NULL; return NULL;
@@ -2973,7 +2973,7 @@ void wxPGChoices::Add( const wxArrayString& arr, const wxArrayInt& arrint )
const unsigned int itemcount = arr.size(); const unsigned int itemcount = arr.size();
const unsigned int valcount = arrint.size(); const unsigned int valcount = arrint.size();
wxASSERT_MSG( valcount >= itemcount || valcount == 0, wxASSERT_MSG( valcount >= itemcount || valcount == 0,
wxT("Insufficient number of values in the array") ); wxS("Insufficient number of values in the array") );
for ( unsigned int i = 0; i < itemcount; i++ ) for ( unsigned int i = 0; i < itemcount; i++ )
{ {

View File

@@ -982,8 +982,8 @@ void wxPropertyGrid::DoBeginLabelEdit( unsigned int colIndex,
int selFlags ) int selFlags )
{ {
wxPGProperty* selected = GetSelection(); wxPGProperty* selected = GetSelection();
wxCHECK_RET(selected, wxT("No property selected")); wxCHECK_RET(selected, wxS("No property selected"));
wxCHECK_RET(colIndex != 1, wxT("Do not use this for column 1")); wxCHECK_RET(colIndex != 1, wxS("Do not use this for column 1"));
if ( !(selFlags & wxPG_SEL_DONT_SEND_EVENT) ) if ( !(selFlags & wxPG_SEL_DONT_SEND_EVENT) )
{ {
@@ -1374,7 +1374,7 @@ static wxColour wxPGAdjustColour(const wxColour& src, int ra,
isinside++; isinside++;
wxCHECK_MSG( isinside < 3, wxCHECK_MSG( isinside < 3,
*wxBLACK, *wxBLACK,
wxT("wxPGAdjustColour should not be recursively called more than once") ); wxS("wxPGAdjustColour should not be recursively called more than once") );
wxColour dst; wxColour dst;
@@ -1704,7 +1704,7 @@ wxPoint wxPropertyGrid::GetGoodEditorDialogPosition( wxPGProperty* p,
int x = splitterX; int x = splitterX;
int y = p->GetY(); int y = p->GetY();
wxCHECK_MSG( y >= 0, wxPoint(-1,-1), wxT("invalid y?") ); wxCHECK_MSG( y >= 0, wxPoint(-1,-1), wxS("invalid y?") );
ImprovedClientToScreen( &x, &y ); ImprovedClientToScreen( &x, &y );
@@ -1831,7 +1831,7 @@ wxString& wxPropertyGrid::CreateEscapeSequences( wxString& dst_str, wxString& sr
dst_str << wxS('\t'); dst_str << wxS('\t');
else else
{ {
//wxLogDebug(wxT("WARNING: Could not create escape sequence for character #%i"),(int)a); //wxLogDebug(wxS("WARNING: Could not create escape sequence for character #%i"),(int)a);
dst_str << a; dst_str << a;
} }
} }
@@ -2648,7 +2648,7 @@ void wxPropertyGrid::DrawItemAndValueRelated( wxPGProperty* p )
void wxPropertyGrid::DrawItemAndChildren( wxPGProperty* p ) void wxPropertyGrid::DrawItemAndChildren( wxPGProperty* p )
{ {
wxCHECK_RET( p, wxT("invalid property id") ); wxCHECK_RET( p, wxS("invalid property id") );
// Do not draw if in non-visible page // Do not draw if in non-visible page
if ( p->GetParentState() != m_pState ) if ( p->GetParentState() != m_pState )
@@ -3100,7 +3100,7 @@ bool wxPropertyGrid::PerformValidation( wxPGProperty* p, wxVariant& pendingValue
} }
else else
{ {
wxLogDebug(wxT("WARNING: wxEVT_PG_CHANGING is about to happen with old value.")); wxLogDebug(wxS("WARNING: wxEVT_PG_CHANGING is about to happen with old value."));
} }
} }
} }
@@ -4049,12 +4049,12 @@ bool wxPropertyGrid::DoSelectProperty( wxPGProperty* p, unsigned int flags )
/* /*
if (p) if (p)
{ {
wxLogDebug(wxT("SelectProperty( %s (%s[%i]) )"),p->GetLabel().c_str(), wxLogDebug(wxS("SelectProperty( %s (%s[%i]) )"),p->GetLabel().c_str(),
p->m_parent->GetLabel().c_str(),p->GetIndexInParent()); p->m_parent->GetLabel().c_str(),p->GetIndexInParent());
} }
else else
{ {
wxLogDebug(wxT("SelectProperty( NULL, -1 )")); wxLogDebug(wxS("SelectProperty( NULL, -1 )"));
} }
*/ */
@@ -4205,7 +4205,7 @@ bool wxPropertyGrid::DoSelectProperty( wxPGProperty* p, unsigned int flags )
const wxPGEditor* editor = p->GetEditorClass(); const wxPGEditor* editor = p->GetEditorClass();
wxCHECK_MSG(editor, false, wxCHECK_MSG(editor, false,
wxT("NULL editor class not allowed")); wxS("NULL editor class not allowed"));
m_iFlags &= ~wxPG_FL_FIXED_WIDTH_EDITOR; m_iFlags &= ~wxPG_FL_FIXED_WIDTH_EDITOR;
@@ -4505,7 +4505,7 @@ bool wxPropertyGrid::DoCollapse( wxPGProperty* p, bool sendEvents )
bool wxPropertyGrid::DoExpand( wxPGProperty* p, bool sendEvents ) bool wxPropertyGrid::DoExpand( wxPGProperty* p, bool sendEvents )
{ {
wxCHECK_MSG( p, false, wxT("invalid property id") ); wxCHECK_MSG( p, false, wxS("invalid property id") );
wxPGProperty* pwc = (wxPGProperty*)p; wxPGProperty* pwc = (wxPGProperty*)p;
@@ -5585,7 +5585,7 @@ void wxPropertyGrid::AddActionTrigger( int action, int keycode, int modifiers )
// Can add secondary? // Can add secondary?
wxASSERT_MSG( !(it->second&~(0xFFFF)), wxASSERT_MSG( !(it->second&~(0xFFFF)),
wxT("You can only add up to two separate actions per key combination.") ); wxS("You can only add up to two separate actions per key combination.") );
action = it->second | (action<<16); action = it->second | (action<<16);
} }
@@ -5919,7 +5919,7 @@ void wxPropertyGrid::OnIdle( wxIdleEvent& WXUNUSED(event) )
cntAfter = m_deletedProperties.size(); cntAfter = m_deletedProperties.size();
wxASSERT_MSG( cntAfter <= cntBefore, wxASSERT_MSG( cntAfter <= cntBefore,
wxT("Increased number of pending items after deletion") ); wxS("Increased number of pending items after deletion") );
// Break if deletion was not done // Break if deletion was not done
if ( cntAfter >= cntBefore ) if ( cntAfter >= cntBefore )
break; break;
@@ -5933,7 +5933,7 @@ void wxPropertyGrid::OnIdle( wxIdleEvent& WXUNUSED(event) )
cntAfter = m_removedProperties.size(); cntAfter = m_removedProperties.size();
wxASSERT_MSG( cntAfter <= cntBefore, wxASSERT_MSG( cntAfter <= cntBefore,
wxT("Increased number of pending items after removal") ); wxS("Increased number of pending items after removal") );
// Break if removal was not done // Break if removal was not done
if ( cntAfter >= cntBefore ) if ( cntAfter >= cntBefore )
break; break;
@@ -6446,13 +6446,13 @@ wxPGProperty* wxPropertyGridPopulator::Add( const wxString& propClass,
if ( parent->HasFlag(wxPG_PROP_AGGREGATE) ) if ( parent->HasFlag(wxPG_PROP_AGGREGATE) )
{ {
ProcessError(wxString::Format(wxT("new children cannot be added to '%s'"),parent->GetName().c_str())); ProcessError(wxString::Format(wxS("new children cannot be added to '%s'"),parent->GetName().c_str()));
return NULL; return NULL;
} }
if ( !classInfo || !classInfo->IsKindOf(wxCLASSINFO(wxPGProperty)) ) if ( !classInfo || !classInfo->IsKindOf(wxCLASSINFO(wxPGProperty)) )
{ {
ProcessError(wxString::Format(wxT("'%s' is not valid property class"),propClass.c_str())); ProcessError(wxString::Format(wxS("'%s' is not valid property class"),propClass.c_str()));
return NULL; return NULL;
} }
@@ -6495,7 +6495,7 @@ wxPGChoices wxPropertyGridPopulator::ParseChoices( const wxString& choicesString
wxString ids = choicesString.substr(1); wxString ids = choicesString.substr(1);
wxPGHashMapS2P::iterator it = m_dictIdChoices.find(ids); wxPGHashMapS2P::iterator it = m_dictIdChoices.find(ids);
if ( it == m_dictIdChoices.end() ) if ( it == m_dictIdChoices.end() )
ProcessError(wxString::Format(wxT("No choices defined for id '%s'"),ids.c_str())); ProcessError(wxString::Format(wxS("No choices defined for id '%s'"),ids.c_str()));
else else
choices.AssignData((wxPGChoicesData*)it->second); choices.AssignData((wxPGChoicesData*)it->second);
} }
@@ -6536,7 +6536,7 @@ wxPGChoices wxPropertyGridPopulator::ParseChoices( const wxString& choicesString
choices.Add(label, l); choices.Add(label, l);
} }
labelValid = false; labelValid = false;
//wxLogDebug(wxT("%s, %s"),label.c_str(),value.c_str()); //wxLogDebug(wxS("%s, %s"),label.c_str(),value.c_str());
value.clear(); value.clear();
label.clear(); label.clear();
state = 1; state = 1;
@@ -6624,9 +6624,9 @@ bool wxPropertyGridPopulator::AddAttribute( const wxString& name,
long v; long v;
// Auto-detect type // Auto-detect type
if ( valuel == wxT("true") || valuel == wxT("yes") || valuel == wxT("1") ) if ( valuel == wxS("true") || valuel == wxS("yes") || valuel == wxS("1") )
variant = true; variant = true;
else if ( valuel == wxT("false") || valuel == wxT("no") || valuel == wxT("0") ) else if ( valuel == wxS("false") || valuel == wxS("no") || valuel == wxS("0") )
variant = false; variant = false;
else if ( value.ToLong(&v, 0) ) else if ( value.ToLong(&v, 0) )
variant = v; variant = v;
@@ -6635,26 +6635,26 @@ bool wxPropertyGridPopulator::AddAttribute( const wxString& name,
} }
else else
{ {
if ( type == wxT("string") ) if ( type == wxS("string") )
{ {
variant = value; variant = value;
} }
else if ( type == wxT("int") ) else if ( type == wxS("int") )
{ {
long v = 0; long v = 0;
value.ToLong(&v, 0); value.ToLong(&v, 0);
variant = v; variant = v;
} }
else if ( type == wxT("bool") ) else if ( type == wxS("bool") )
{ {
if ( valuel == wxT("true") || valuel == wxT("yes") || valuel == wxT("1") ) if ( valuel == wxS("true") || valuel == wxS("yes") || valuel == wxS("1") )
variant = true; variant = true;
else else
variant = false; variant = false;
} }
else else
{ {
ProcessError(wxString::Format(wxT("Invalid attribute type '%s'"),type.c_str())); ProcessError(wxString::Format(wxS("Invalid attribute type '%s'"),type.c_str()));
return false; return false;
} }
} }

View File

@@ -56,7 +56,7 @@ wxPGProperty* wxPGPropArgCls::GetPtr( wxPropertyGridInterface* iface ) const
{ {
if ( m_flags == IsProperty ) if ( m_flags == IsProperty )
{ {
wxASSERT_MSG( m_ptr.property, wxT("invalid property ptr") ); wxASSERT_MSG( m_ptr.property, wxS("invalid property ptr") );
return m_ptr.property; return m_ptr.property;
} }
else if ( m_flags & IsWxString ) else if ( m_flags & IsWxString )
@@ -168,13 +168,13 @@ wxPGProperty* wxPropertyGridInterface::ReplaceProperty( wxPGPropArg id, wxPGProp
wxPGProperty* replaced = p; wxPGProperty* replaced = p;
wxCHECK_MSG( replaced && property, wxCHECK_MSG( replaced && property,
wxNullProperty, wxNullProperty,
wxT("NULL property") ); wxS("NULL property") );
wxCHECK_MSG( !replaced->IsCategory(), wxCHECK_MSG( !replaced->IsCategory(),
wxNullProperty, wxNullProperty,
wxT("cannot replace this type of property") ); wxS("cannot replace this type of property") );
wxCHECK_MSG( !m_pState->IsInNonCatMode(), wxCHECK_MSG( !m_pState->IsInNonCatMode(),
wxNullProperty, wxNullProperty,
wxT("cannot replace properties in alphabetic mode") ); wxS("cannot replace properties in alphabetic mode") );
// Get address to the slot // Get address to the slot
wxPGProperty* parent = replaced->GetParent(); wxPGProperty* parent = replaced->GetParent();
@@ -424,7 +424,7 @@ void wxPropertyGridInterface::SetValidationFailureBehavior( int vfbFlags )
wxPGProperty* wxPropertyGridInterface::GetPropertyByNameA( const wxString& name ) const wxPGProperty* wxPropertyGridInterface::GetPropertyByNameA( const wxString& name ) const
{ {
wxPGProperty* p = GetPropertyByName(name); wxPGProperty* p = GetPropertyByName(name);
wxASSERT_MSG(p,wxString::Format(wxT("no property with name '%s'"),name.c_str())); wxASSERT_MSG(p,wxString::Format(wxS("no property with name '%s'"),name.c_str()));
return p; return p;
} }
@@ -777,7 +777,7 @@ bool wxPropertyGridInterface::ChangePropertyValue( wxPGPropArg id, wxVariant new
void wxPropertyGridInterface::BeginAddChildren( wxPGPropArg id ) void wxPropertyGridInterface::BeginAddChildren( wxPGPropArg id )
{ {
wxPG_PROP_ARG_CALL_PROLOG() wxPG_PROP_ARG_CALL_PROLOG()
wxCHECK_RET( p->HasFlag(wxPG_PROP_AGGREGATE), wxT("only call on properties with fixed children") ); wxCHECK_RET( p->HasFlag(wxPG_PROP_AGGREGATE), wxS("only call on properties with fixed children") );
p->ClearFlag(wxPG_PROP_AGGREGATE); p->ClearFlag(wxPG_PROP_AGGREGATE);
p->SetFlag(wxPG_PROP_MISC_PARENT); p->SetFlag(wxPG_PROP_MISC_PARENT);
} }
@@ -794,7 +794,7 @@ bool wxPropertyGridInterface::EditorValidate()
void wxPropertyGridInterface::EndAddChildren( wxPGPropArg id ) void wxPropertyGridInterface::EndAddChildren( wxPGPropArg id )
{ {
wxPG_PROP_ARG_CALL_PROLOG() wxPG_PROP_ARG_CALL_PROLOG()
wxCHECK_RET( p->HasFlag(wxPG_PROP_MISC_PARENT), wxT("only call on properties for which BeginAddChildren was called prior") ); wxCHECK_RET( p->HasFlag(wxPG_PROP_MISC_PARENT), wxS("only call on properties for which BeginAddChildren was called prior") );
p->ClearFlag(wxPG_PROP_MISC_PARENT); p->ClearFlag(wxPG_PROP_MISC_PARENT);
p->SetFlag(wxPG_PROP_AGGREGATE); p->SetFlag(wxPG_PROP_AGGREGATE);
} }

View File

@@ -506,7 +506,7 @@ wxPGProperty* wxPropertyGridPageState::BaseGetPropertyByName( const wxString& na
void wxPropertyGridPageState::DoSetPropertyName( wxPGProperty* p, void wxPropertyGridPageState::DoSetPropertyName( wxPGProperty* p,
const wxString& newName ) const wxString& newName )
{ {
wxCHECK_RET( p, wxT("invalid property id") ); wxCHECK_RET( p, wxS("invalid property id") );
wxPGProperty* parent = p->GetParent(); wxPGProperty* parent = p->GetParent();
@@ -1075,7 +1075,7 @@ void wxPropertyGridPageState::CheckColumnWidths( int widthChange )
if ( reduceCol != -1 ) if ( reduceCol != -1 )
{ {
wxLogTrace("propgrid", wxLogTrace("propgrid",
wxT(" Reduce column %i (by %i)"), wxS(" Reduce column %i (by %i)"),
reduceCol, -widthHigher); reduceCol, -widthHigher);
// Reduce widest column, and recheck // Reduce widest column, and recheck
@@ -1399,7 +1399,7 @@ void wxPropertyGridPageState::DoRemoveFromSelection( wxPGProperty* prop )
bool wxPropertyGridPageState::DoCollapse( wxPGProperty* p ) bool wxPropertyGridPageState::DoCollapse( wxPGProperty* p )
{ {
wxCHECK_MSG( p, false, wxT("invalid property id") ); wxCHECK_MSG( p, false, wxS("invalid property id") );
if ( !p->GetChildCount() ) return false; if ( !p->GetChildCount() ) return false;
@@ -1416,7 +1416,7 @@ bool wxPropertyGridPageState::DoCollapse( wxPGProperty* p )
bool wxPropertyGridPageState::DoExpand( wxPGProperty* p ) bool wxPropertyGridPageState::DoExpand( wxPGProperty* p )
{ {
wxCHECK_MSG( p, false, wxT("invalid property id") ); wxCHECK_MSG( p, false, wxS("invalid property id") );
if ( !p->GetChildCount() ) return false; if ( !p->GetChildCount() ) return false;
@@ -1546,7 +1546,7 @@ void wxPropertyGridPageState::DoSetPropertyValues( const wxVariantList& list, wx
// Make sure it is wxVariant. // Make sure it is wxVariant.
wxASSERT( current ); wxASSERT( current );
wxASSERT( wxStrcmp(current->GetClassInfo()->GetClassName(),wxT("wxVariant")) == 0 ); wxASSERT( wxStrcmp(current->GetClassInfo()->GetClassName(),wxS("wxVariant")) == 0 );
const wxString& name = current->GetName(); const wxString& name = current->GetName();
if ( !name.empty() ) if ( !name.empty() )
@@ -1697,7 +1697,7 @@ bool wxPropertyGridPageState::PrepareToAddItem( wxPGProperty* property,
wxASSERT_MSG( scheduledParent == NULL || wxASSERT_MSG( scheduledParent == NULL ||
scheduledParent == m_properties || scheduledParent == m_properties ||
scheduledParent->IsCategory(), scheduledParent->IsCategory(),
wxT("Parent of a category must be either root or another category.")); wxS("Parent of a category must be either root or another category."));
// If we already have category with same name, delete given property // If we already have category with same name, delete given property
// and use it instead as most recent caption item. // and use it instead as most recent caption item.
@@ -1769,7 +1769,7 @@ wxPGProperty* wxPropertyGridPageState::DoInsert( wxPGProperty* parent, int index
wxCHECK_MSG( !parent->HasFlag(wxPG_PROP_AGGREGATE), wxCHECK_MSG( !parent->HasFlag(wxPG_PROP_AGGREGATE),
wxNullProperty, wxNullProperty,
wxT("when adding properties to fixed parents, use BeginAddChildren and EndAddChildren.") ); wxS("when adding properties to fixed parents, use BeginAddChildren and EndAddChildren.") );
bool res = PrepareToAddItem( property, (wxPropertyCategory*)parent ); bool res = PrepareToAddItem( property, (wxPropertyCategory*)parent );
@@ -1908,7 +1908,7 @@ void wxPropertyGridPageState::DoInvalidatePropertyName(wxPGProperty* p)
// current code) to check whether a new name is used // current code) to check whether a new name is used
// by another property with parent (due to the child // by another property with parent (due to the child
// name notation). // name notation).
wxString newName = wxT("_&/_%$") + p->GetBaseName(); wxString newName = wxS("_&/_%$") + p->GetBaseName();
DoSetPropertyName(p, newName); DoSetPropertyName(p, newName);
} }
@@ -1958,15 +1958,15 @@ bool wxPropertyGridPageState::IsChildCategory(wxPGProperty* p,
void wxPropertyGridPageState::DoDelete( wxPGProperty* item, bool doDelete ) void wxPropertyGridPageState::DoDelete( wxPGProperty* item, bool doDelete )
{ {
wxCHECK_RET( item->GetParent(), wxCHECK_RET( item->GetParent(),
wxT("wxPropertyGrid: This property was already deleted.") ); wxS("wxPropertyGrid: This property was already deleted.") );
wxCHECK_RET( item != &m_regularArray && item != m_abcArray, wxCHECK_RET( item != &m_regularArray && item != m_abcArray,
wxT("wxPropertyGrid: Do not attempt to remove the root item.") ); wxS("wxPropertyGrid: Do not attempt to remove the root item.") );
wxPGProperty* parent = item->GetParent(); wxPGProperty* parent = item->GetParent();
wxCHECK_RET( !parent->HasFlag(wxPG_PROP_AGGREGATE), wxCHECK_RET( !parent->HasFlag(wxPG_PROP_AGGREGATE),
wxT("wxPropertyGrid: Do not attempt to remove sub-properties.") ); wxS("wxPropertyGrid: Do not attempt to remove sub-properties.") );
wxASSERT( item->GetParentState() == this ); wxASSERT( item->GetParentState() == this );
@@ -2032,10 +2032,10 @@ void wxPropertyGridPageState::DoDelete( wxPGProperty* item, bool doDelete )
// Property has to be unselected prior deleting. // Property has to be unselected prior deleting.
// Otherwise crash can happen. // Otherwise crash can happen.
wxASSERT_MSG( !DoIsPropertySelected(item) && !item->IsChildSelected(true), wxASSERT_MSG( !DoIsPropertySelected(item) && !item->IsChildSelected(true),
wxT("Failed to unselect deleted property") ); wxS("Failed to unselect deleted property") );
// Don't attempt to delete current category. // Don't attempt to delete current category.
wxASSERT_MSG( !item->IsCategory() || item != m_currentCategory, wxASSERT_MSG( !item->IsCategory() || item != m_currentCategory,
wxT("Current category cannot be deleted") ); wxS("Current category cannot be deleted") );
// Prevent property and its children from being re-selected // Prevent property and its children from being re-selected
item->SetFlag(wxPG_PROP_BEING_DELETED); item->SetFlag(wxPG_PROP_BEING_DELETED);
@@ -2123,7 +2123,7 @@ void wxPropertyGridPageState::DoDelete( wxPGProperty* item, bool doDelete )
pg->m_deletedProperties.RemoveAt(index); pg->m_deletedProperties.RemoveAt(index);
} }
wxASSERT_MSG( pg->m_deletedProperties.Index(item) == wxNOT_FOUND, wxASSERT_MSG( pg->m_deletedProperties.Index(item) == wxNOT_FOUND,
wxT("Too many occurrences of the item")); wxS("Too many occurrences of the item"));
index = pg->m_removedProperties.Index(item); index = pg->m_removedProperties.Index(item);
if ( index != wxNOT_FOUND ) if ( index != wxNOT_FOUND )
@@ -2131,7 +2131,7 @@ void wxPropertyGridPageState::DoDelete( wxPGProperty* item, bool doDelete )
pg->m_removedProperties.RemoveAt(index); pg->m_removedProperties.RemoveAt(index);
} }
wxASSERT_MSG( pg->m_removedProperties.Index(item) == wxNOT_FOUND, wxASSERT_MSG( pg->m_removedProperties.Index(item) == wxNOT_FOUND,
wxT("Too many occurrences of the item")); wxS("Too many occurrences of the item"));
delete item; delete item;
} }
@@ -2144,7 +2144,7 @@ void wxPropertyGridPageState::DoDelete( wxPGProperty* item, bool doDelete )
pg->m_removedProperties.RemoveAt(index); pg->m_removedProperties.RemoveAt(index);
} }
wxASSERT_MSG( pg->m_removedProperties.Index(item) == wxNOT_FOUND, wxASSERT_MSG( pg->m_removedProperties.Index(item) == wxNOT_FOUND,
wxT("Too many occurrences of the item")); wxS("Too many occurrences of the item"));
item->OnDetached(this, pg); item->OnDetached(this, pg);
} }

View File

@@ -99,8 +99,8 @@ wxString wxStringProperty::ValueToString( wxVariant& value,
{ {
// Calling this under incorrect conditions will fail // Calling this under incorrect conditions will fail
wxASSERT_MSG( argFlags & wxPG_VALUE_IS_CURRENT, wxASSERT_MSG( argFlags & wxPG_VALUE_IS_CURRENT,
"Sorry, currently default wxPGProperty::ValueToString() " wxS("Sorry, currently default wxPGProperty::ValueToString() ")
"implementation only works if value is m_value." ); wxS("implementation only works if value is m_value.") );
DoGenerateComposedValue(s, argFlags); DoGenerateComposedValue(s, argFlags);
} }
@@ -189,7 +189,7 @@ wxNumericPropertyValidator::
arr.Add(wxS("e")); arr.Add(wxS("E")); arr.Add(wxS("e")); arr.Add(wxS("E"));
// Use locale-specific decimal point // Use locale-specific decimal point
arr.Add(wxString::Format("%g", 1.1)[1]); arr.Add(wxString::Format(wxS("%g"), 1.1)[1]);
} }
SetIncludes(arr); SetIncludes(arr);
@@ -1253,7 +1253,7 @@ void wxEnumProperty::OnSetValue()
} }
else else
{ {
wxFAIL_MSG( wxT("Unexpected value type") ); wxFAIL_MSG( wxS("Unexpected value type") );
return; return;
} }
@@ -1445,7 +1445,7 @@ void wxEditEnumProperty::OnSetValue()
} }
else else
{ {
wxFAIL_MSG( wxT("Unexpected value type") ); wxFAIL_MSG( wxS("Unexpected value type") );
return; return;
} }