X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/422d0ff0bec79832494fe4605ffdcf8e87ba6c03..94709f191133613e115fdbf913eba5a81ddd207e:/contrib/src/deprecated/proplist.cpp?ds=sidebyside diff --git a/contrib/src/deprecated/proplist.cpp b/contrib/src/deprecated/proplist.cpp index 8e1f435f54..4b5d38453f 100644 --- a/contrib/src/deprecated/proplist.cpp +++ b/contrib/src/deprecated/proplist.cpp @@ -215,7 +215,7 @@ int wxPropertyListView::FindListIndexForProperty(wxProperty *property) if (property == (wxProperty *)m_propertyScrollingList->wxListBox::GetClientData(i)) return i; } - return -1; + return wxNOT_FOUND; } wxString wxPropertyListView::MakeNameValueString(wxString name, wxString value) @@ -258,7 +258,7 @@ bool wxPropertyListView::ShowProperty(wxProperty *property, bool select) if (select) { int sel = FindListIndexForProperty(property); - if (sel > -1) + if (sel != wxNOT_FOUND) m_propertyScrollingList->SetSelection(sel); } return true; @@ -400,7 +400,7 @@ bool wxPropertyListView::EditProperty(wxProperty *WXUNUSED(property)) void wxPropertyListView::OnPropertySelect(wxCommandEvent& WXUNUSED(event)) { int sel = m_propertyScrollingList->GetSelection(); - if (sel > -1) + if (sel != wxNOT_FOUND) { wxProperty *newSel = (wxProperty *)m_propertyScrollingList->wxListBox::GetClientData(sel); if (newSel && newSel != m_currentProperty) @@ -423,7 +423,7 @@ bool wxPropertyListView::CreateControls() if (!panel) return false; - wxFont guiFont = wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT); + wxFont guiFont = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT); #ifdef __WXMSW__ wxFont *boringFont = @@ -1435,14 +1435,14 @@ void wxColourListValidator::OnEdit(wxProperty *property, wxPropertyListView *vie return; wxChar *s = property->GetValue().StringValue(); - int r = 0; - int g = 0; - int b = 0; + unsigned char r = 0; + unsigned char g = 0; + unsigned char b = 0; if (s) { - r = wxHexToDec(s); - g = wxHexToDec(s+2); - b = wxHexToDec(s+4); + r = (unsigned char)wxHexToDec(s); + g = (unsigned char)wxHexToDec(s+2); + b = (unsigned char)wxHexToDec(s+4); } wxColour col(r,g,b); @@ -1453,7 +1453,9 @@ void wxColourListValidator::OnEdit(wxProperty *property, wxPropertyListView *vie for (int i = 0; i < 16; i++) { - wxColour colour(i*16, i*16, i*16); + wxColour colour((unsigned char)(i*16), + (unsigned char)(i*16), + (unsigned char)(i*16)); data.SetCustomColour(i, colour); } @@ -1711,7 +1713,7 @@ bool wxListOfStringsListValidator::EditStringList(wxWindow *parent, wxStringList void wxPropertyStringListEditorDialog::OnStrings(wxCommandEvent& WXUNUSED(event)) { int sel = m_listBox->GetSelection(); - if (sel > -1) + if (sel != wxNOT_FOUND) { m_currentSelection = sel; @@ -1722,7 +1724,7 @@ void wxPropertyStringListEditorDialog::OnStrings(wxCommandEvent& WXUNUSED(event) void wxPropertyStringListEditorDialog::OnDelete(wxCommandEvent& WXUNUSED(event)) { int sel = m_listBox->GetSelection(); - if (sel == -1) + if (sel == wxNOT_FOUND) return; wxNode *node = (wxNode *)m_listBox->wxListBox::GetClientData(sel);