diff --git a/include/wx/propgrid/manager.h b/include/wx/propgrid/manager.h index fab85cec9b..dc7580011e 100644 --- a/include/wx/propgrid/manager.h +++ b/include/wx/propgrid/manager.h @@ -352,8 +352,8 @@ public: wxPropertyGridIterator GetIterator( int flags = wxPG_ITERATE_DEFAULT, wxPGProperty* firstProp = NULL ) { - wxFAIL_MSG( "Please only iterate through individual pages " - "or use CreateVIterator()" ); + wxFAIL_MSG( wxS("Please only iterate through individual pages ") + wxS("or use CreateVIterator()") ); return wxPropertyGridInterface::GetIterator( flags, firstProp ); } @@ -361,8 +361,8 @@ public: GetIterator(int flags = wxPG_ITERATE_DEFAULT, wxPGProperty* firstProp = NULL) const { - wxFAIL_MSG( "Please only iterate through individual pages " - " or use CreateVIterator()" ); + wxFAIL_MSG( wxS("Please only iterate through individual pages ") + wxS("or use CreateVIterator()") ); return wxPropertyGridInterface::GetIterator( flags, firstProp ); } @@ -374,16 +374,16 @@ public: */ wxPropertyGridIterator GetIterator( int flags, int startPos ) { - wxFAIL_MSG( "Please only iterate through individual pages " - "or use CreateVIterator()" ); + wxFAIL_MSG( wxS("Please only iterate through individual pages ") + wxS("or use CreateVIterator()") ); return wxPropertyGridInterface::GetIterator( flags, startPos ); } wxPropertyGridConstIterator GetIterator( int flags, int startPos ) const { - wxFAIL_MSG( "Please only iterate through individual pages " - "or use CreateVIterator()" ); + wxFAIL_MSG( wxS("Please only iterate through individual pages ") + wxS("or use CreateVIterator()") ); return wxPropertyGridInterface::GetIterator( flags, startPos ); } diff --git a/include/wx/propgrid/property.h b/include/wx/propgrid/property.h index 04bb247092..d245dec3f9 100644 --- a/include/wx/propgrid/property.h +++ b/include/wx/propgrid/property.h @@ -801,13 +801,13 @@ public: const wxPGChoiceEntry& Item( unsigned int i ) const { - wxASSERT_MSG( i < GetCount(), "invalid index" ); + wxASSERT_MSG( i < GetCount(), wxS("invalid index") ); return m_items[i]; } wxPGChoiceEntry& Item( unsigned int i ) { - wxASSERT_MSG( i < GetCount(), "invalid index" ); + wxASSERT_MSG( i < GetCount(), wxS("invalid index") ); return m_items[i]; } diff --git a/include/wx/propgrid/propgriddefs.h b/include/wx/propgrid/propgriddefs.h index 553b15ae75..e25a091d60 100644 --- a/include/wx/propgrid/propgriddefs.h +++ b/include/wx/propgrid/propgriddefs.h @@ -461,7 +461,7 @@ WX_PG_DECLARE_EDITOR_WITH_DECL(ChoiceAndButton,WXDLLIMPEXP_PROPGRID) template wxVariant WXVARIANT( const T& WXUNUSED(value) ) { - wxFAIL_MSG("Code should always call specializations of this template"); + wxFAIL_MSG(wxS("Code should always call specializations of this template")); return wxVariant(); } @@ -559,8 +559,8 @@ expdecl wxVariant& operator << ( wxVariant &variant, const classname &value )\ expdecl classname& classname##RefFromVariant( wxVariant& variant ) \ { \ wxASSERT_MSG( variant.GetType() == wxS(#classname), \ - wxString::Format("Variant type should have been '%s'" \ - "instead of '%s'", \ + wxString::Format(wxS("Variant type should have been '%s'") \ + wxS("instead of '%s'"), \ wxS(#classname), \ variant.GetType().c_str())); \ classname##VariantData *data = \ @@ -570,8 +570,8 @@ expdecl classname& classname##RefFromVariant( wxVariant& variant ) \ expdecl const classname& classname##RefFromVariant( const wxVariant& variant ) \ { \ wxASSERT_MSG( variant.GetType() == wxS(#classname), \ - wxString::Format("Variant type should have been '%s'" \ - "instead of '%s'", \ + wxString::Format(wxS("Variant type should have been '%s'") \ + wxS("instead of '%s'"), \ wxS(#classname), \ variant.GetType().c_str())); \ classname##VariantData *data = \ diff --git a/src/propgrid/property.cpp b/src/propgrid/property.cpp index a50cac76d6..233aab9ff7 100644 --- a/src/propgrid/property.cpp +++ b/src/propgrid/property.cpp @@ -526,7 +526,7 @@ void wxPGProperty::InitAfterAdded( wxPropertyGridPageState* pageState, // Make sure deprecated virtual functions are not implemented wxString s = GetValueAsString( 0xFFFF ); wxASSERT_MSG( s == g_invalidStringContent, - "Implement ValueToString() instead of GetValueAsString()" ); + wxS("Implement ValueToString() instead of GetValueAsString()") ); #endif if ( !parentIsRoot && !parent->IsCategory() ) @@ -614,8 +614,8 @@ void wxPGProperty::InitAfterAdded( wxPropertyGridPageState* pageState, wxPG_PROP_AGGREGATE) || ((m_flags & wxPG_PROP_PARENTAL_FLAGS) == wxPG_PROP_MISC_PARENT), - "wxPGProperty parental flags set incorrectly at " - "this time" ); + wxS("wxPGProperty parental flags set incorrectly at ") + wxS("this time") ); if ( HasFlag(wxPG_PROP_AGGREGATE) ) { @@ -843,7 +843,7 @@ void wxPGProperty::GetDisplayInfo( unsigned int column, } wxASSERT_MSG( cell.GetData(), - wxString::Format("Invalid cell for property %s", + wxString::Format(wxS("Invalid cell for property %s"), GetName().c_str()) ); // We need to return customized cell object. @@ -1008,13 +1008,13 @@ wxString wxPGProperty::ValueToString( wxVariant& WXUNUSED(value), { wxCHECK_MSG( GetChildCount() > 0, wxEmptyString, - "If user property does not have any children, it must " - "override GetValueAsString" ); + wxS("If user property does not have any children, it must ") + wxS("override GetValueAsString") ); // FIXME: Currently code below only works if value is actually m_value wxASSERT_MSG( argFlags & wxPG_VALUE_IS_CURRENT, - "Sorry, currently default wxPGProperty::ValueToString() " - "implementation only works if value is m_value." ); + wxS("Sorry, currently default wxPGProperty::ValueToString() ") + wxS("implementation only works if value is m_value.") ); wxString text; DoGenerateComposedValue(text, argFlags); @@ -2293,8 +2293,8 @@ void wxPGProperty::DoAddChild( wxPGProperty* prop, int index, void wxPGProperty::DoPreAddChild( int index, wxPGProperty* prop ) { wxASSERT_MSG( !prop->GetBaseName().empty(), - "Property's children must have unique, non-empty " - "names within their scope" ); + wxS("Property's children must have unique, non-empty ") + wxS("names within their scope") ); prop->m_arrIndex = index; m_children.insert( m_children.begin()+index, @@ -2314,8 +2314,8 @@ void wxPGProperty::AddPrivateChild( wxPGProperty* prop ) wxASSERT_MSG( (m_flags & wxPG_PROP_PARENTAL_FLAGS) == wxPG_PROP_AGGREGATE, - "Do not mix up AddPrivateChild() calls with other " - "property adders." ); + wxS("Do not mix up AddPrivateChild() calls with other ") + wxS("property adders.") ); DoPreAddChild( m_children.size(), prop ); } @@ -2344,8 +2344,8 @@ wxPGProperty* wxPGProperty::InsertChild( int index, wxASSERT_MSG( (m_flags & wxPG_PROP_PARENTAL_FLAGS) == wxPG_PROP_MISC_PARENT, - "Do not mix up AddPrivateChild() calls with other " - "property adders." ); + wxS("Do not mix up AddPrivateChild() calls with other ") + wxS("property adders.") ); DoPreAddChild( index, childProperty ); } diff --git a/src/propgrid/propgrid.cpp b/src/propgrid/propgrid.cpp index 4cef09ac8a..85b1b8daa6 100644 --- a/src/propgrid/propgrid.cpp +++ b/src/propgrid/propgrid.cpp @@ -535,10 +535,10 @@ wxPropertyGrid::~wxPropertyGrid() // Let's use wxMessageBox to make the message appear more // reliably (and *before* the crash can happen). - ::wxMessageBox("wxPropertyGrid was being destroyed in an event " - "generated by it. This usually leads to a crash " - "so it is recommended to destroy the control " - "at idle time instead."); + ::wxMessageBox(wxS("wxPropertyGrid was being destroyed in an event ") + wxS("generated by it. This usually leads to a crash ") + wxS("so it is recommended to destroy the control ") + wxS("at idle time instead.")); } DoSelectProperty(NULL, wxPG_SEL_NOVALIDATE|wxPG_SEL_DONT_SEND_EVENT); @@ -2084,7 +2084,7 @@ int wxPropertyGrid::DoDrawItems( wxDC& dc, return itemsRect->y; wxCHECK_MSG( !m_pState->m_itemsAdded, itemsRect->y, - "no items added" ); + wxS("no items added") ); wxASSERT( m_pState->DoGetRoot()->GetChildCount() ); int lh = m_lineHeight; @@ -2107,11 +2107,11 @@ int wxPropertyGrid::DoDrawItems( wxDC& dc, wxCHECK_MSG( firstItemTopY < lastItemBottomY, itemsRect->y, - "invalid y values" ); + wxS("invalid y values") ); /* - wxLogDebug(" -> DoDrawItems(\"%s\" -> \"%s\"" - " %i -> %i height=%i (ch=%i), itemsRect = 0x%lX %i,%i %ix%i)", + wxLogDebug(wxS(" -> DoDrawItems(\"%s\" -> \"%s\"") + wxS(" %i -> %i height=%i (ch=%i), itemsRect = 0x%lX %i,%i %ix%i)"), firstItem->GetLabel().c_str(), lastItem->GetLabel().c_str(), firstItemTopY, lastItemBottomY, @@ -4238,9 +4238,9 @@ bool wxPropertyGrid::DoSelectProperty( wxPGProperty* p, unsigned int flags ) if ( m_wndEditor ) { wxASSERT_MSG( m_wndEditor->GetParent() == GetPanel(), - "CreateControls must use result of " - "wxPropertyGrid::GetPanel() as parent " - "of controls." ); + wxS("CreateControls must use result of ") + wxS("wxPropertyGrid::GetPanel() as parent ") + wxS("of controls.") ); // Set validator, if any #if wxUSE_VALIDATORS @@ -4290,9 +4290,9 @@ bool wxPropertyGrid::DoSelectProperty( wxPGProperty* p, unsigned int flags ) if ( m_wndEditor2 ) { wxASSERT_MSG( m_wndEditor2->GetParent() == GetPanel(), - "CreateControls must use result of " - "wxPropertyGrid::GetPanel() as parent " - "of controls." ); + wxS("CreateControls must use result of ") + wxS("wxPropertyGrid::GetPanel() as parent ") + wxS("of controls.") ); // Get proper id for wndSecondary m_wndSecId = m_wndEditor2->GetId(); @@ -4587,7 +4587,7 @@ void wxPropertyGrid::RecalculateVirtualSize( int forceXPos ) wxASSERT_LEVEL_2_MSG( m_pState->GetVirtualHeight() == m_pState->GetActualVirtualHeight(), - "VirtualHeight and ActualVirtualHeight should match" + wxS("VirtualHeight and ActualVirtualHeight should match") ); m_iFlags |= wxPG_FL_RECALCULATING_VIRTUAL_SIZE; @@ -6122,7 +6122,7 @@ wxPGEditor* wxPropertyGrid::DoRegisterEditorClass( wxPGEditor* editorClass, wxCHECK_MSG( vt_it == wxPGGlobalVars->m_mapEditorClasses.end(), (wxPGEditor*) vt_it->second, - "Editor with given name was already registered" ); + wxS("Editor with given name was already registered") ); wxPGGlobalVars->m_mapEditorClasses[name] = (void*)editorClass; diff --git a/src/propgrid/propgridpagestate.cpp b/src/propgrid/propgridpagestate.cpp index 001b8f846d..2444b2af8c 100644 --- a/src/propgrid/propgridpagestate.cpp +++ b/src/propgrid/propgridpagestate.cpp @@ -1206,7 +1206,7 @@ void wxPropertyGridPageState::DoSetColumnProportion( unsigned int column, int proportion ) { wxASSERT_MSG( proportion >= 1, - "Column proportion must 1 or higher" ); + wxS("Column proportion must 1 or higher") ); if ( proportion < 1 ) proportion = 1; @@ -1684,7 +1684,7 @@ bool wxPropertyGridPageState::PrepareToAddItem( wxPGProperty* property, if ( scheduledParent && !scheduledParent->IsCategory() ) { wxASSERT_MSG( !property->GetBaseName().empty(), - "Property's children must have unique, non-empty names within their scope" ); + wxS("Property's children must have unique, non-empty names within their scope") ); } property->m_parentState = this; @@ -1720,7 +1720,7 @@ bool wxPropertyGridPageState::PrepareToAddItem( wxPGProperty* property, (!scheduledParent || scheduledParent->IsCategory()) ) { wxFAIL_MSG(wxString::Format( - "wxPropertyGrid item with name \"%s\" already exists", + wxS("wxPropertyGrid item with name \"%s\" already exists"), property->GetName())); wxPGGlobalVars->m_warnings++;