]> Dogcows Code - chaz/openbox/commitdiff
change the rc config format for font shadows, now:
authorDana Jansens <danakj@orodu.net>
Sun, 4 Mar 2007 17:04:50 +0000 (17:04 +0000)
committerDana Jansens <danakj@orodu.net>
Sun, 4 Mar 2007 17:04:50 +0000 (17:04 +0000)
<font...
  <shadow enabled="yes/no">
    <offset>1</offset>
    <tint>25</tint>
  </shadow>
</font>

openbox/config.c

index 66c836ea16d0238e0178e47a68bc1c9f7e44442e..8f197df57adeafddebd0b48f3e21e6473630fc17 100644 (file)
@@ -489,14 +489,20 @@ static void parse_theme(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node,
                 slant = RR_FONTSLANT_OBLIQUE;
             g_free(s);
         }
-        if ((fnode = parse_find_node("shadow", n->children)))
-            shadow = parse_bool(doc, fnode);
-        if ((fnode = parse_find_node("shadowoffset", n->children)))
-            offset = parse_int(doc, fnode);
-        if ((fnode = parse_find_node("shadowtint", n->children))) {
-            tint = parse_int(doc, fnode);
-            if (tint > 100) tint = 100;
-            else if (tint < -100) tint = -100;
+        if ((fnode = parse_find_node("shadow", n->children))) {
+            xmlNodePtr snode;
+            gboolean   s;
+
+            if (parse_attr_bool("enabled", fnode, &s))
+                shadow = s;
+            
+            if ((snode = parse_find_node("offset", fnode->children)))
+                offset = parse_int(doc, snode);
+            if ((snode = parse_find_node("tint", fnode->children))) {
+                tint = parse_int(doc, snode);
+                if (tint > 100) tint = 100;
+                else if (tint < -100) tint = -100;
+            }
         }
 
         *font = RrFontOpen(ob_rr_inst, name, size, weight, slant,
This page took 0.024703 seconds and 4 git commands to generate.