Allow specifying several mousebinds in one go (hack)
[mikachu/openbox.git] / openbox / config.c
index 6c38eed..f5ac109 100644 (file)
@@ -584,8 +584,23 @@ static void parse_mouse(xmlNodePtr node, gpointer d)
                 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);
@@ -756,6 +771,13 @@ static void parse_theme(xmlNodePtr node, gpointer d)
 
         *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");
     }