Refactor property attribute names in wxPGProperty::GetAttribute calls.
Use attribute constants instead of strings in wxPGProperty and wxPGDefaultRenderer classes and in NumericValidation() function. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78400 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
3100258aa1
commit
1bac5cfbe0
@ -2297,12 +2297,12 @@ inline unsigned int wxPropertyGridPageState::GetActualVirtualHeight() const
|
||||
|
||||
inline wxString wxPGProperty::GetHintText() const
|
||||
{
|
||||
wxVariant vHintText = GetAttribute(wxPGGlobalVars->m_strHint);
|
||||
wxVariant vHintText = GetAttribute(wxPG_ATTR_HINT);
|
||||
|
||||
#if wxPG_COMPATIBILITY_1_4
|
||||
// Try the old, deprecated "InlineHelp"
|
||||
if ( vHintText.IsNull() )
|
||||
vHintText = GetAttribute(wxPGGlobalVars->m_strInlineHelp);
|
||||
vHintText = GetAttribute(wxPG_ATTR_INLINE_HELP);
|
||||
#endif
|
||||
|
||||
if ( !vHintText.IsNull() )
|
||||
|
@ -264,7 +264,7 @@ bool wxPGDefaultRenderer::Render( wxDC& dc, const wxRect& rect,
|
||||
// Add units string?
|
||||
if ( propertyGrid->GetColumnCount() <= 2 )
|
||||
{
|
||||
wxString unitsString = property->GetAttribute(wxPGGlobalVars->m_strUnits, wxEmptyString);
|
||||
wxString unitsString = property->GetAttribute(wxPG_ATTR_UNITS, wxEmptyString);
|
||||
if ( !unitsString.empty() )
|
||||
text = wxString::Format(wxS("%s %s"), text.c_str(), unitsString.c_str() );
|
||||
}
|
||||
@ -810,7 +810,7 @@ void wxPGProperty::GetDisplayInfo( unsigned int column,
|
||||
else if ( column == 1 )
|
||||
*pString = GetDisplayedString();
|
||||
else if ( column == 2 )
|
||||
*pString = GetAttribute(wxPGGlobalVars->m_strUnits, wxEmptyString);
|
||||
*pString = GetAttribute(wxPG_ATTR_UNITS, wxEmptyString);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -857,7 +857,7 @@ wxString wxPGProperty::GetColumnText( unsigned int col, int choiceIndex ) const
|
||||
else if ( col == 1 )
|
||||
return GetDisplayedString();
|
||||
else if ( col == 2 )
|
||||
return GetAttribute(wxPGGlobalVars->m_strUnits, wxEmptyString);
|
||||
return GetAttribute(wxPG_ATTR_UNITS, wxEmptyString);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -357,14 +357,14 @@ bool NumericValidation( const wxPGProperty* property,
|
||||
bool minOk = false;
|
||||
bool maxOk = false;
|
||||
|
||||
variant = property->GetAttribute(wxPGGlobalVars->m_strMin);
|
||||
variant = property->GetAttribute(wxPG_ATTR_MIN);
|
||||
if ( !variant.IsNull() )
|
||||
{
|
||||
variant.Convert(&min);
|
||||
minOk = true;
|
||||
}
|
||||
|
||||
variant = property->GetAttribute(wxPGGlobalVars->m_strMax);
|
||||
variant = property->GetAttribute(wxPG_ATTR_MAX);
|
||||
if ( !variant.IsNull() )
|
||||
{
|
||||
variant.Convert(&max);
|
||||
@ -443,14 +443,14 @@ bool NumericValidation( const wxPGProperty* property,
|
||||
bool minOk = false;
|
||||
bool maxOk = false;
|
||||
|
||||
variant = property->GetAttribute(wxPGGlobalVars->m_strMin);
|
||||
variant = property->GetAttribute(wxPG_ATTR_MIN);
|
||||
if ( !variant.IsNull() )
|
||||
{
|
||||
variant.Convert(&min);
|
||||
minOk = true;
|
||||
}
|
||||
|
||||
variant = property->GetAttribute(wxPGGlobalVars->m_strMax);
|
||||
variant = property->GetAttribute(wxPG_ATTR_MAX);
|
||||
if ( !variant.IsNull() )
|
||||
{
|
||||
variant.Convert(&max);
|
||||
|
Loading…
Reference in New Issue
Block a user