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