compare plugin/creator/category names UTF8-aware
This commit is contained in:
parent
96947e2f3a
commit
a01edede5e
@ -37,6 +37,7 @@
|
||||
|
||||
#include "ardour/plugin_manager.h"
|
||||
#include "ardour/plugin.h"
|
||||
#include "ardour/utils.h"
|
||||
|
||||
#include "ardour_ui.h"
|
||||
#include "plugin_selector.h"
|
||||
@ -538,13 +539,13 @@ struct PluginMenuCompareByCreator {
|
||||
bool operator() (PluginInfoPtr a, PluginInfoPtr b) const {
|
||||
int cmp;
|
||||
|
||||
cmp = g_strcasecmp (a->creator.c_str(), b->creator.c_str());
|
||||
cmp = cmp_nocase_utf8 (a->creator, b->creator);
|
||||
|
||||
if (cmp < 0) {
|
||||
return true;
|
||||
} else if (cmp == 0) {
|
||||
/* same creator ... compare names */
|
||||
if (g_strcasecmp (a->name.c_str(), b->name.c_str()) < 0) {
|
||||
if (cmp_nocase_utf8 (a->name, b->name) < 0) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -556,7 +557,7 @@ struct PluginMenuCompareByName {
|
||||
bool operator() (PluginInfoPtr a, PluginInfoPtr b) const {
|
||||
int cmp;
|
||||
|
||||
cmp = g_strcasecmp (a->name.c_str(), b->name.c_str());
|
||||
cmp = cmp_nocase_utf8 (a->name, b->name);
|
||||
|
||||
if (cmp < 0) {
|
||||
return true;
|
||||
@ -574,13 +575,13 @@ struct PluginMenuCompareByCategory {
|
||||
bool operator() (PluginInfoPtr a, PluginInfoPtr b) const {
|
||||
int cmp;
|
||||
|
||||
cmp = g_strcasecmp (a->category.c_str(), b->category.c_str());
|
||||
cmp = cmp_nocase_utf8 (a->category, b->category);
|
||||
|
||||
if (cmp < 0) {
|
||||
return true;
|
||||
} else if (cmp == 0) {
|
||||
/* same category ... compare names */
|
||||
if (g_strcasecmp (a->name.c_str(), b->name.c_str()) < 0) {
|
||||
if (cmp_nocase_utf8 (a->name, b->name) < 0) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user