mirror of
https://github.com/cookiengineer/audacity
synced 2026-03-21 05:35:45 +01:00
merging wx3 changes
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user