- nbut = obt_xml_find_node(n->children, "mousebind");
- while (nbut) {
- if (!obt_xml_attr_string(nbut, "button", &buttonstr))
- goto next_nbut;
- if (obt_xml_attr_contains(nbut, "action", "press")) {
- mact = OB_MOUSE_ACTION_PRESS;
- } else if (obt_xml_attr_contains(nbut, "action", "release")) {
- mact = OB_MOUSE_ACTION_RELEASE;
- } else if (obt_xml_attr_contains(nbut, "action", "click")) {
- mact = OB_MOUSE_ACTION_CLICK;
- } else if (obt_xml_attr_contains(nbut, "action","doubleclick")) {
- mact = OB_MOUSE_ACTION_DOUBLE_CLICK;
- } else if (obt_xml_attr_contains(nbut, "action", "drag")) {
- mact = OB_MOUSE_ACTION_MOTION;
- } else
- goto next_nbut;
- nact = obt_xml_find_node(nbut->children, "action");
- while (nact) {
- ObActionsAct *action;
-
- if ((action = actions_parse(nact)))
- mouse_bind(buttonstr, contextstr, mact, action);
- nact = obt_xml_find_node(nact->next, "action");
+
+ modcxstr = g_strdup(cxstr); /* make a copy to mutilate */
+ while (frame_next_context_from_string(modcxstr, &cx)) {
+ if (!cx) {
+ gchar *s = strchr(modcxstr, ' ');
+ if (s) {
+ *s = '\0';
+ g_message(_("Invalid context \"%s\" in mouse binding"),
+ modcxstr);
+ *s = ' ';
+ }
+ continue;