Update of /cvsroot/audacity/audacity-src/src/prefs
In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv25401
Modified Files:
KeyConfigPrefs.cpp
Log Message:
Allow search for keyboard shortcut to wrap
Index: KeyConfigPrefs.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/prefs/KeyConfigPrefs.cpp,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -d -r1.70 -r1.71
--- KeyConfigPrefs.cpp 12 Mar 2007 09:23:15 -0000 1.70
+++ KeyConfigPrefs.cpp 25 Mar 2007 20:04:38 -0000 1.71
@@ -263,6 +263,7 @@
int selected = mList->GetNextItem(-1, wxLIST_NEXT_ALL,
wxLIST_STATE_SELECTED);
int cnt = mList->GetItemCount();
wxListItem item;
+ bool found = false;
item.SetColumn(CommandColumn);
item.SetMask(wxLIST_MASK_TEXT);
@@ -283,9 +284,34 @@
wxLIST_STATE_FOCUSED | wxLIST_STATE_SELECTED);
mList->EnsureVisible(i);
+
+ found = true;
+
break;
}
}
+
+ if (!found) {
+ for (int i = 0; i < selected; i++)
+ {
+ item.SetId(i);
+
+ mList->GetItem(item);
+
+ if (item.m_text.Left(1).IsSameAs(keycode, false)) {
+ mList->SetItemState(event.GetIndex(),
+ 0,
+ wxLIST_STATE_FOCUSED | wxLIST_STATE_SELECTED);
+
+ mList->SetItemState(i,
+ wxLIST_STATE_FOCUSED | wxLIST_STATE_SELECTED,
+ wxLIST_STATE_FOCUSED | wxLIST_STATE_SELECTED);
+
+ mList->EnsureVisible(i);
+ break;
+ }
+ }
+ }
}
void KeyConfigPrefs::OnItemSelected(wxListEvent &event)
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Audacity-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/audacity-cvs