Update of /cvsroot/audacity/audacity-src/src/prefs
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv4838
Modified Files:
KeyConfigPrefs.cpp
Log Message:
Add an "All Commands" category and start working on the sorting.
Index: KeyConfigPrefs.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/prefs/KeyConfigPrefs.cpp,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -d -r1.82 -r1.83
--- KeyConfigPrefs.cpp 4 Jun 2009 15:51:21 -0000 1.82
+++ KeyConfigPrefs.cpp 7 Jun 2009 12:41:43 -0000 1.83
@@ -105,6 +105,7 @@
mManager = project->GetCommandManager();
mManager->GetCategories(mCats);
+ mCats.Insert(_("All"), 0);
PopulateOrExchange(S);
@@ -185,6 +186,21 @@
mList->SetColumnWidth(KeyComboColumn, 250);
}
+int wxCALLBACK SortCallback(long item1, long item2, long sortData)
+{
+ wxArrayString *names = (wxArrayString *) sortData;
+
+ if (names->Item(item1) < names->Item(item2)) {
+ return -1;
+ }
+
+ if (names->Item(item1) > names->Item(item2)) {
+ return 1;
+ }
+
+ return 0;
+}
+
void KeyConfigPrefs::RepopulateBindingsList()
{
wxString cat = mCat->GetStringSelection();
@@ -205,7 +221,7 @@
mKeys.Add(key);
}
- if (mManager->GetCategoryFromName(name) != cat) {
+ if (cat != _("All") && mManager->GetCategoryFromName(name) != cat) {
continue;
}
@@ -234,6 +250,8 @@
ndx++;
}
+
+// mList->SortItems(SortCallback, (long) &mNames);
}
void KeyConfigPrefs::OnLoad(wxCommandEvent & e)
------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Audacity-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/audacity-cvs