X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5c79993559a36f918eb95ff59539bb22b491435d..e68b7b364aff19665e2c6ee8c68266b6f3d56355:/src/propgrid/props.cpp diff --git a/src/propgrid/props.cpp b/src/propgrid/props.cpp index 8698b72728..1463a9000c 100644 --- a/src/propgrid/props.cpp +++ b/src/propgrid/props.cpp @@ -203,7 +203,7 @@ bool wxNumericPropertyValidator::Validate(wxWindow* parent) return false; wxWindow* wnd = GetWindow(); - if ( !wnd->IsKindOf(CLASSINFO(wxTextCtrl)) ) + if ( !wxDynamicCast(wnd, wxTextCtrl) ) return true; // Do not allow zero-length string @@ -1080,7 +1080,7 @@ bool wxEnumProperty::ValidateValue( wxVariant& value, wxPGValidationInfo& WXUNUS // unless property has string as preferred value type // To reduce code size, use conversion here as well if ( value.GetType() == wxPG_VARIANT_TYPE_STRING && - !this->IsKindOf(CLASSINFO(wxEditEnumProperty)) ) + !wxDynamicCastThis(wxEditEnumProperty) ) return ValueFromString_( value, value.GetString(), wxPG_PROPERTY_SPECIFIC ); return true; @@ -1127,7 +1127,7 @@ bool wxEnumProperty::ValueFromString_( wxVariant& value, const wxString& text, i bool asText = false; - bool isEdit = this->IsKindOf(CLASSINFO(wxEditEnumProperty)); + bool isEdit = this->IsKindOf(wxCLASSINFO(wxEditEnumProperty)); // If text not any of the choices, store as text instead // (but only if we are wxEditEnumProperty) @@ -1683,7 +1683,7 @@ bool wxPGFileDialogAdapter::DoShowDialog( wxPropertyGrid* propGrid, wxPGProperty wxString path; int indFilter = -1; - if ( property->IsKindOf(CLASSINFO(wxFileProperty)) ) + if ( wxDynamicCast(property, wxFileProperty) ) { fileProp = ((wxFileProperty*)property); wxFileName filename = fileProp->GetValue().GetString(); @@ -1703,8 +1703,8 @@ bool wxPGFileDialogAdapter::DoShowDialog( wxPropertyGrid* propGrid, wxPGProperty property->GetAttribute(wxS("DialogTitle"), _("Choose a file")), property->GetAttribute(wxS("InitialPath"), path), wxEmptyString, - property->GetAttribute(wxPG_FILE_WILDCARD, _("All files (*.*)|*.*")), - 0, + property->GetAttribute(wxPG_FILE_WILDCARD, wxALL_FILES), + property->GetAttributeAsLong(wxPG_FILE_DIALOG_STYLE, 0), wxDefaultPosition ); if ( indFilter >= 0 ) @@ -1732,7 +1732,7 @@ wxFileProperty::wxFileProperty( const wxString& label, const wxString& name, { m_flags |= wxPG_PROP_SHOW_FULL_FILENAME; m_indFilter = -1; - SetAttribute( wxPG_FILE_WILDCARD, _("All files (*.*)|*.*") ); + SetAttribute( wxPG_FILE_WILDCARD, wxALL_FILES); SetValue(value); }