Use predefined constants to represent wxPGProperty attribute identifiers
Use predefined constants representing attribute identifiers instead of specific strings.
This commit is contained in:
@@ -2170,7 +2170,7 @@ bool wxMultiChoiceProperty::OnEvent( wxPropertyGrid* propgrid,
|
|||||||
|
|
||||||
if ( dlg.ShowModal() == wxID_OK && choiceCount )
|
if ( dlg.ShowModal() == wxID_OK && choiceCount )
|
||||||
{
|
{
|
||||||
int userStringMode = GetAttributeAsLong(wxS("UserStringMode"), 0);
|
int userStringMode = GetAttributeAsLong(wxPG_ATTR_MULTICHOICE_USERSTRINGMODE, 0);
|
||||||
|
|
||||||
wxArrayInt arrInt = dlg.GetSelections();
|
wxArrayInt arrInt = dlg.GetSelections();
|
||||||
|
|
||||||
@@ -2211,7 +2211,7 @@ bool wxMultiChoiceProperty::StringToValue( wxVariant& variant, const wxString& t
|
|||||||
{
|
{
|
||||||
wxArrayString arr;
|
wxArrayString arr;
|
||||||
|
|
||||||
int userStringMode = GetAttributeAsLong(wxS("UserStringMode"), 0);
|
int userStringMode = GetAttributeAsLong(wxPG_ATTR_MULTICHOICE_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) )
|
||||||
|
@@ -1966,8 +1966,8 @@ bool wxPGFileDialogAdapter::DoShowDialog( wxPropertyGrid* propGrid, wxPGProperty
|
|||||||
}
|
}
|
||||||
|
|
||||||
wxFileDialog dlg( propGrid->GetPanel(),
|
wxFileDialog dlg( propGrid->GetPanel(),
|
||||||
property->GetAttribute(wxS("DialogTitle"), _("Choose a file")),
|
property->GetAttribute(wxPG_FILE_DIALOG_TITLE, _("Choose a file")),
|
||||||
property->GetAttribute(wxS("InitialPath"), path),
|
property->GetAttribute(wxPG_FILE_INITIAL_PATH, path),
|
||||||
wxEmptyString,
|
wxEmptyString,
|
||||||
property->GetAttribute(wxPG_FILE_WILDCARD, wxALL_FILES),
|
property->GetAttribute(wxPG_FILE_WILDCARD, wxALL_FILES),
|
||||||
property->GetAttributeAsLong(wxPG_FILE_DIALOG_STYLE, 0),
|
property->GetAttributeAsLong(wxPG_FILE_DIALOG_STYLE, 0),
|
||||||
|
Reference in New Issue
Block a user