mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-09 00:04:56 +01:00
sort instrument list alphabetically
This commit is contained in:
parent
344728551d
commit
b63babbc3d
1 changed files with 9 additions and 0 deletions
|
|
@ -16,6 +16,7 @@
|
||||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "pbd/convert.h"
|
||||||
#include "ardour/plugin_manager.h"
|
#include "ardour/plugin_manager.h"
|
||||||
#include "gtkmm2ext/gui_thread.h"
|
#include "gtkmm2ext/gui_thread.h"
|
||||||
#include "instrument_selector.h"
|
#include "instrument_selector.h"
|
||||||
|
|
@ -64,6 +65,12 @@ InstrumentSelector::refill()
|
||||||
set_button_sensitivity(Gtk::SENSITIVITY_AUTO);
|
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
|
void
|
||||||
InstrumentSelector::build_instrument_list()
|
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());
|
all_plugs.insert(all_plugs.end(), manager.lv2_plugin_info().begin(), manager.lv2_plugin_info().end());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
all_plugs.sort (pluginsort);
|
||||||
|
|
||||||
_instrument_list = ListStore::create(_instrument_list_columns);
|
_instrument_list = ListStore::create(_instrument_list_columns);
|
||||||
|
|
||||||
TreeModel::Row row = *(_instrument_list->append());
|
TreeModel::Row row = *(_instrument_list->append());
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue