diff --git a/src/LabelDialog.cpp b/src/LabelDialog.cpp index fcbff4b84..12d1d9ae8 100644 --- a/src/LabelDialog.cpp +++ b/src/LabelDialog.cpp @@ -72,7 +72,11 @@ enum { BEGIN_EVENT_TABLE(LabelDialog, wxDialog) EVT_GRID_SELECT_CELL(LabelDialog::OnSelectCell) +#if wxCHECK_VERSION(3,0,0) + EVT_GRID_CELL_CHANGED(LabelDialog::OnCellChange) +#else EVT_GRID_CELL_CHANGE(LabelDialog::OnCellChange) +#endif EVT_BUTTON(ID_INSERTA, LabelDialog::OnInsert) EVT_BUTTON(ID_INSERTB, LabelDialog::OnInsert) EVT_BUTTON(ID_REMOVE, LabelDialog::OnRemove) @@ -438,7 +442,7 @@ void LabelDialog::OnInsert(wxCommandEvent &event) // Attempt to guess which track the label should reside on if (cnt > 0) { - row = mGrid->GetCursorRow(); + row = mGrid->GetGridCursorRow(); if (row > 0 && row >= cnt) { index = mTrackNames.Index(mGrid->GetCellValue(row - 1, Col_Track)); } @@ -470,8 +474,8 @@ void LabelDialog::OnInsert(wxCommandEvent &event) void LabelDialog::OnRemove(wxCommandEvent & WXUNUSED(event)) { - int row = mGrid->GetCursorRow(); - int col = mGrid->GetCursorColumn(); + int row = mGrid->GetGridCursorRow(); + int col = mGrid->GetGridCursorCol(); int cnt = mData.GetCount(); // Don't try to remove if no labels exist diff --git a/src/NoteTrack.cpp b/src/NoteTrack.cpp index 0be71aaab..d0c5d2e1d 100644 --- a/src/NoteTrack.cpp +++ b/src/NoteTrack.cpp @@ -318,8 +318,8 @@ int NoteTrack::DrawLabelControls(wxDC & dc, wxRect & r) } wxString t; - long w; - long h; + wxCoord w; + wxCoord h; t.Printf(wxT("%d"), chanName); dc.GetTextExtent(t, &w, &h); diff --git a/src/Project.cpp b/src/Project.cpp index e7f08d2b3..798996859 100644 --- a/src/Project.cpp +++ b/src/Project.cpp @@ -1688,7 +1688,7 @@ void AudacityProject::OnIconize(wxIconizeEvent &event) // why but it does no harm. // Should we be returning true/false rather than // void return? I don't know. - mIconized = event.Iconized(); + mIconized = event.IsIconized(); unsigned int i; diff --git a/src/Tags.cpp b/src/Tags.cpp index 1cfc35e43..e8baa2183 100644 --- a/src/Tags.cpp +++ b/src/Tags.cpp @@ -636,7 +636,11 @@ enum { }; BEGIN_EVENT_TABLE(TagsEditor, wxDialog) +#if wxCHECK_VERSION(3,0,0) + EVT_GRID_CELL_CHANGED(TagsEditor::OnChange) +#else EVT_GRID_CELL_CHANGE(TagsEditor::OnChange) +#endif EVT_BUTTON(EditID, TagsEditor::OnEdit) EVT_BUTTON(ResetID, TagsEditor::OnReset) EVT_BUTTON(ClearID, TagsEditor::OnClear) @@ -1216,7 +1220,7 @@ void TagsEditor::OnAdd(wxCommandEvent & WXUNUSED(event)) void TagsEditor::OnRemove(wxCommandEvent & WXUNUSED(event)) { - size_t row = mGrid->GetCursorRow(); + size_t row = mGrid->GetGridCursorRow(); if (!mEditTitle && mGrid->GetCellValue(row, 0).CmpNoCase(LABEL_TITLE) == 0) { return; diff --git a/src/TrackArtist.cpp b/src/TrackArtist.cpp index 90155e659..7e115d2cb 100644 --- a/src/TrackArtist.cpp +++ b/src/TrackArtist.cpp @@ -610,7 +610,7 @@ void TrackArtist::DrawVRuler(Track *t, wxDC * dc, wxRect & r) // ISO standard: A440 is in the 4th octave, denoted // A4 <- the "4" should be a subscript. s.Printf(wxT("C%d"), octave - 1); - long width, height; + wxCoord width, height; dc->GetTextExtent(s, &width, &height); if (obottom - height + 4 > r.y && obottom + 4 < r.y + r.height) { diff --git a/src/TrackPanel.cpp b/src/TrackPanel.cpp index 7ddede059..0d7743c9f 100644 --- a/src/TrackPanel.cpp +++ b/src/TrackPanel.cpp @@ -9589,7 +9589,7 @@ void TrackInfo::DrawTitleBar(wxDC * dc, const wxRect r, Track * t, wxString titleStr = t->GetName(); int allowableWidth = kTrackInfoWidth - 38 - kLeftInset; - long textWidth, textHeight; + wxCoord textWidth, textHeight; dc->GetTextExtent(titleStr, &textWidth, &textHeight); while (textWidth > allowableWidth) { titleStr = titleStr.Left(titleStr.Length() - 1); @@ -9655,7 +9655,7 @@ void TrackInfo::DrawMuteSolo(wxDC * dc, const wxRect r, Track * t, dc->SetPen( *wxTRANSPARENT_PEN );//No border! dc->DrawRectangle(bev); - long textWidth, textHeight; + wxCoord textWidth, textHeight; wxString str = (solo) ? /* i18n-hint: This is on a button that will silence this track.*/ _("Solo") : diff --git a/src/import/ImportPCM.cpp b/src/import/ImportPCM.cpp index bf0b3fd76..71bc6859d 100644 --- a/src/import/ImportPCM.cpp +++ b/src/import/ImportPCM.cpp @@ -541,7 +541,11 @@ int PCMImportFileHandle::Import(TrackFactory *trackFactory, if((mInfo.format & SF_FORMAT_TYPEMASK) == SF_FORMAT_AIFF) len = wxUINT32_SWAP_ON_LE(len); - if (Stricmp(id, "ID3 ") != 0) { // must be case insensitive +#if wxCHECK_VERSION(3,0,0) + if (wxStricmp(id, "ID3 ") != 0) { // must be case insensitive +#else + if (Stricmp(id, "ID3 ") != 0) { // must be case insensitive +#endif f.Seek(len + (len & 0x01), wxFromCurrent); continue; } diff --git a/src/widgets/KeyView.cpp b/src/widgets/KeyView.cpp index 398e8bbae..285ec70dd 100644 --- a/src/widgets/KeyView.cpp +++ b/src/widgets/KeyView.cpp @@ -585,8 +585,8 @@ KeyView::RefreshBindings(const wxArrayString & names, int x, y; // Remove any menu code from the category and prefix - wxString cat = wxMenuItem::GetLabelFromText(categories[i]); - wxString pfx = wxMenuItem::GetLabelFromText(prefixes[i]); + wxString cat = wxMenuItem::GetLabelText(categories[i]); + wxString pfx = wxMenuItem::GetLabelText(prefixes[i]); // Append "Menu" this node is for a menu title if (cat != wxT("Command")) @@ -696,7 +696,7 @@ KeyView::RefreshBindings(const wxArrayString & names, else { // Strip any menu codes from label - node.label = wxMenuItem::GetLabelFromText(labels[i].BeforeFirst(wxT('\t'))); + node.label = wxMenuItem::GetLabelText(labels[i].BeforeFirst(wxT('\t'))); } // Fill in remaining info @@ -1229,7 +1229,11 @@ KeyView::OnSetFocus(wxFocusEvent & event) // will also refresh the visual (highlighted) state. if (GetSelection() != wxNOT_FOUND) { - RefreshLine(GetSelection()); +#if wxCHECK_VERSION(3,0,0) + RefreshRow(GetSelection()); +#else + RefreshLine(GetSelection()); +#endif } #if wxUSE_ACCESSIBILITY @@ -1250,7 +1254,11 @@ KeyView::OnKillFocus(wxFocusEvent & event) // Refresh the selected line to adjust visual highlighting. if (GetSelection() != wxNOT_FOUND) { - RefreshLine(GetSelection()); +#if wxCHECK_VERSION(3,0,0) + RefreshRow(GetSelection()); +#else + RefreshLine(GetSelection()); +#endif } } @@ -1325,7 +1333,11 @@ KeyView::OnKeyDown(wxKeyEvent & event) RefreshLines(); // Reset the original top line - ScrollToLine(topline); +#if wxCHECK_VERSION(3,0,0) + ScrollToRow(topline); +#else + ScrollToLine(topline); +#endif // And make sure current line is still selected SelectNode(LineToIndex(line)); @@ -1389,7 +1401,11 @@ KeyView::OnKeyDown(wxKeyEvent & event) RefreshLines(); // Reset the original top line - ScrollToLine(topline); +#if wxCHECK_VERSION(3,0,0) + ScrollToRow(topline); +#else + ScrollToLine(topline); +#endif // And make sure current line is still selected SelectNode(LineToIndex(line)); @@ -1531,7 +1547,11 @@ KeyView::OnLeftDown(wxMouseEvent & event) RefreshLines(); // Reset the original top line - ScrollToLine(topline); +#if wxCHECK_VERSION(3,0,0) + ScrollToRow(topline); +#else + ScrollToLine(topline); +#endif // And make sure current line is still selected SelectNode(LineToIndex(line)); @@ -1757,7 +1777,11 @@ KeyView::GetLineHeight(int line) return 0; } +#if wxCHECK_VERSION(3,0,0) + return OnGetRowHeight(line); +#else return OnGetLineHeight(line); +#endif } // @@ -1892,7 +1916,7 @@ KeyViewAx::IdToLine(int childId, int & line) line = childId - 1; // Make sure id is valid - if (line < 0 || line >= (int) mView->GetLineCount()) + if (line < 0 || line >= (int) mView->GetItemCount()) { // Indicate the control itself in this case return false; @@ -1908,7 +1932,7 @@ bool KeyViewAx::LineToId(int line, int & childId) { // Make sure line is valid - if (line < 0 || line >= (int) mView->GetLineCount()) + if (line < 0 || line >= (int) mView->GetItemCount()) { // Indicate the control itself in this case childId = wxACC_SELF; @@ -1966,7 +1990,7 @@ KeyViewAx::GetChild(int childId, wxAccessible** child) wxAccStatus KeyViewAx::GetChildCount(int *childCount) { - *childCount = (int) mView->GetLineCount(); + *childCount = (int) mView->GetItemCount(); return wxACC_OK; } diff --git a/src/widgets/ProgressDialog.cpp b/src/widgets/ProgressDialog.cpp index b2e16dc7b..e79a4a3a6 100644 --- a/src/widgets/ProgressDialog.cpp +++ b/src/widgets/ProgressDialog.cpp @@ -1134,7 +1134,7 @@ ProgressDialog::ProgressDialog(const wxString & title, const wxString & message, wxClientDC dc(this); dc.SetFont(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT)); - long widthText = 0; + wxCoord widthText = 0; dc.GetTextExtent(message, &widthText, NULL, NULL, NULL, NULL); ds.x = (wxCoord) wxMax(wxMax(3 * widthText / 2, 4 * ds.y / 3), 300); SetClientSize(ds);