summaryrefslogtreecommitdiff
path: root/gtk2_ardour/instrument_selector.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2016-10-06 13:57:58 +0200
committerRobin Gareus <robin@gareus.org>2016-10-06 13:57:58 +0200
commitb63babbc3d562741c4592de6d2990c44e9771060 (patch)
tree358380c1dfde23dddbfab280687f42b5ef70b009 /gtk2_ardour/instrument_selector.cc
parent344728551d25220398636c22372e5d89e9684497 (diff)
sort instrument list alphabetically
Diffstat (limited to 'gtk2_ardour/instrument_selector.cc')
-rw-r--r--gtk2_ardour/instrument_selector.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/gtk2_ardour/instrument_selector.cc b/gtk2_ardour/instrument_selector.cc
index ffd11ccf70..618facd42a 100644
--- a/gtk2_ardour/instrument_selector.cc
+++ b/gtk2_ardour/instrument_selector.cc
@@ -16,6 +16,7 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+#include "pbd/convert.h"
#include "ardour/plugin_manager.h"
#include "gtkmm2ext/gui_thread.h"
#include "instrument_selector.h"
@@ -64,6 +65,12 @@ InstrumentSelector::refill()
set_button_sensitivity(Gtk::SENSITIVITY_AUTO);
}
+static bool
+pluginsort (const PluginInfoPtr& a, const PluginInfoPtr& b)
+{
+ return PBD::downcase(a->name) < PBD::downcase(b->name);
+}
+
void
InstrumentSelector::build_instrument_list()
{
@@ -85,6 +92,8 @@ InstrumentSelector::build_instrument_list()
all_plugs.insert(all_plugs.end(), manager.lv2_plugin_info().begin(), manager.lv2_plugin_info().end());
#endif
+ all_plugs.sort (pluginsort);
+
_instrument_list = ListStore::create(_instrument_list_columns);
TreeModel::Row row = *(_instrument_list->append());