gchar *keystring, **keys, **key;
xmlNodePtr n;
gboolean is_chroot = FALSE;
+ gboolean grab = TRUE;
if (!obt_xml_attr_string(node, "key", &keystring))
return;
obt_xml_attr_bool(node, "chroot", &is_chroot);
+ obt_xml_attr_bool(node, "grab", &grab);
keys = g_strsplit(keystring, " ", 0);
for (key = keys; *key; ++key) {
action = actions_parse(n);
if (action)
- keyboard_bind(keylist, action);
+ keyboard_bind(keylist, action, grab);
n = obt_xml_find_node(n->next, "action");
}
}
while (nact) {
ObActionsAct *action;
- if ((action = actions_parse(nact)))
- mouse_bind(buttonstr, cx, mact, action);
+ if ((action = actions_parse(nact))) {
+ gchar *p = buttonstr;
+ while (*p) {
+ gchar *s = strchr(p, ' ');
+ if (s) {
+ *s = '\0';
+ } else {
+ s = p;
+ while (*++s);
+ s--;
+ }
+ mouse_bind(p, cx, mact, action);
+ actions_act_ref(action); /* ref the action for each binding */
+ p = s+1;
+ }
+ actions_act_unref(action); /* remove the extra ref */
+ }
nact = obt_xml_find_node(nact->next, "action");
}
g_free(buttonstr);
*font = RrFontOpen(ob_rr_inst, name, size, weight, slant);
g_free(name);
+
+ if ((fnode = obt_xml_find_node(n->children, "description"))) {
+ gchar *s = obt_xml_node_string(fnode);
+ RrFontDescriptionFromString(*font, s);
+ g_free(s);
+ }
+
next_font:
n = obt_xml_find_node(n->next, "font");
}
};
for (it = binds; it->key; ++it) {
GList *l = g_list_append(NULL, g_strdup(it->key));
- keyboard_bind(l, actions_parse_string(it->actname));
+ keyboard_bind(l, actions_parse_string(it->actname), TRUE);
}
}