frei0r improvements
This commit is contained in:
@@ -155,6 +155,8 @@ void EffectControls::show_effect_menu(int type, int subtype) {
|
||||
effects_loaded.lock();
|
||||
|
||||
QMenu effects_menu(this);
|
||||
effects_menu.setToolTipsVisible(true);
|
||||
|
||||
for (int i=0;i<effects.size();i++) {
|
||||
const EffectMeta& em = effects.at(i);
|
||||
|
||||
@@ -162,6 +164,9 @@ void EffectControls::show_effect_menu(int type, int subtype) {
|
||||
QAction* action = new QAction(&effects_menu);
|
||||
action->setText(em.name);
|
||||
action->setData(reinterpret_cast<quintptr>(&em));
|
||||
if (!em.tooltip.isEmpty()) {
|
||||
action->setToolTip(em.tooltip);
|
||||
}
|
||||
|
||||
QMenu* parent = &effects_menu;
|
||||
if (!em.category.isEmpty()) {
|
||||
@@ -178,6 +183,7 @@ void EffectControls::show_effect_menu(int type, int subtype) {
|
||||
}
|
||||
if (!found) {
|
||||
parent = new QMenu(&effects_menu);
|
||||
parent->setToolTipsVisible(true);
|
||||
parent->setTitle(em.category);
|
||||
|
||||
bool found = false;
|
||||
|
||||
+1
-1
@@ -360,7 +360,7 @@ EffectGizmo *Effect::gizmo(int i) {
|
||||
return gizmos.at(i);
|
||||
}
|
||||
|
||||
int Effect::gizmo_count(){
|
||||
int Effect::gizmo_count() {
|
||||
return gizmos.size();
|
||||
}
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@ struct EffectMeta {
|
||||
QString category;
|
||||
QString filename;
|
||||
QString path;
|
||||
QString tooltip;
|
||||
int internal;
|
||||
int type;
|
||||
int subtype;
|
||||
|
||||
@@ -188,6 +188,9 @@ void load_frei0r_effects_worker(const QString& dir, EffectMeta& em, QVector<QStr
|
||||
em.name = info.name;
|
||||
em.path = dir;
|
||||
em.filename = entry_list.at(j);
|
||||
em.tooltip = QString("%1\n%2\n%3\n%4").arg(em.name, info.author, info.explanation, em.filename);
|
||||
|
||||
loaded_names.append(em.name);
|
||||
|
||||
effects.append(em);
|
||||
}
|
||||
@@ -203,18 +206,12 @@ void load_frei0r_effects_worker(const QString& dir, EffectMeta& em, QVector<QStr
|
||||
|
||||
void load_frei0r_effects() {
|
||||
QList<QString> effect_dirs = get_effects_paths();
|
||||
int lim = effect_dirs.size();
|
||||
|
||||
// add extra search paths for frei0r effects
|
||||
for (int i=0;i<lim;i++) {
|
||||
effect_dirs.append(QDir(effect_dirs.at(i)).filePath("frei0r"));
|
||||
}
|
||||
|
||||
// add defined paths for frei0r plugins on unix
|
||||
#if defined(__APPLE__) || defined(__linux__)
|
||||
effect_dirs.append(QDir::homePath() + "/.frei0r-1/lib");
|
||||
effect_dirs.append("/usr/local/lib/frei0r-1");
|
||||
effect_dirs.append("/usr/lib/frei0r-1");
|
||||
effect_dirs.prepend("/usr/lib/frei0r-1");
|
||||
effect_dirs.prepend("/usr/local/lib/frei0r-1");
|
||||
effect_dirs.prepend(QDir::homePath() + "/.frei0r-1/lib");
|
||||
#endif
|
||||
|
||||
QVector<QString> loaded_names;
|
||||
|
||||
Reference in New Issue
Block a user