merging wx3 changes
This commit is contained in:
parent
0bb643fcda
commit
0319f6ea51
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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") :
|
||||
|
|
|
@ -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 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;
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
#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)
|
||||
{
|
||||
#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
|
||||
#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
|
||||
#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
|
||||
#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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue
Block a user