return RefPtr<Action>();
}
- char copy[strlen(path)+1];
-
- if (*path == '/') {
- const char* cslash = strchr (path, '/');
- if (!cslash) {
- return RefPtr<Action> ();
- }
- strcpy (copy, cslash+1);
- } else {
- strcpy (copy, path);
+ /* Skip <Actions>/ in path */
+
+ int len = strlen (path);
+
+ if (len < 3) {
+ /* shortest possible path: "a/b" */
+ return RefPtr<Action>();
}
+ if (len > 10 && !strncmp (path, "<Actions>/", 10 )) {
+ path = path+10;
+ } else if (path[0] == '/') {
+ path++;
+ }
+
+ char copy[len+1];
+ strcpy (copy, path);
char* slash = strchr (copy, '/');
if (!slash) {
return RefPtr<Action> ();
}
*slash = '\0';
+
return get_action (copy, ++slash);
}
if (action.empty()) {
row[function_key_columns.plain] = defstring;
} else {
- std::cerr << "action = " << action << '\n';
act = ActionManager::get_action (action.c_str());
- std::cerr << " action = " << act << endl;
if (act) {
row[function_key_columns.plain] = act->get_label();
} else {
if (act) {
(*row).set_value (col.index(), text);
}
+
}
}
snprintf (name, sizeof (name), "strip_%d", (8* _number) + i);
- std::cerr << "*** Surface " << _number << " Setup strips for index " << i << endl;
-
Strip* strip = new Strip (*this, name, i, strip_buttons);
groups[name] = strip;