13
0

Consolidate code: use libardour API to sort scripts

This commit is contained in:
Robin Gareus 2019-07-18 15:50:34 +02:00
parent 9748656a90
commit 59fe1e5bdd
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -564,14 +564,6 @@ SessionDialog::open_button_pressed (GdkEventButton* ev)
return true;
}
struct LuaScriptListSorter
{
bool operator() (LuaScriptInfoPtr const a, LuaScriptInfoPtr const b) const {
return ARDOUR::cmp_nocase_utf8 (a->name, b->name) < 0;
}
};
void
SessionDialog::populate_session_templates ()
{
@ -592,8 +584,7 @@ SessionDialog::populate_session_templates ()
}
}
LuaScriptListSorter cmp;
std::sort (scripts.begin(), scripts.end(), cmp);
std::sort (scripts.begin(), scripts.end(), LuaScripting::Sorter());
for (LuaScriptList::const_iterator s = scripts.begin(); s != scripts.end(); ++s) {
TreeModel::Row row = *(template_model->append ());