]> Dogcows Code - chaz/openbox/blobdiff - tools/themetoxml/themetoxml.c
add the 'engine="box"' to the theme format, and require it to be there so we can...
[chaz/openbox] / tools / themetoxml / themetoxml.c
index a75cf19afc95af1e06a73960b9329406054db3de..f7d5aa6e0b365a9f1531f845132cccf9889f8409 100644 (file)
@@ -89,8 +89,7 @@ static gboolean read_string(XrmDatabase db, const gchar *rname,
   
     if (XrmGetResource(db, rname, rclass, &rettype, &retvalue) &&
         retvalue.addr != NULL) {
-        *value = retvalue.addr;
-        g_strstrip(*value);
+        *value = g_strstrip(retvalue.addr);
         ret = TRUE;
     }
 
@@ -315,6 +314,7 @@ int main(int argc, char **argv)
     doc = xmlNewDoc((const xmlChar*) "1.0");
     xmlDocSetRootElement
         (doc,(root = xmlNewNode(NULL, (const xmlChar*)"openbox_theme")));
+    xmlSetProp(root, (const xmlChar*)"engine", (const xmlChar*)"box");
     xmlSetProp(root, (const xmlChar*)"version", (const xmlChar*)"1");
     xmlSetProp(root, (const xmlChar*)"xmlns",
                (const xmlChar*)"http://openbox.org/themerc");
@@ -423,8 +423,12 @@ int main(int argc, char **argv)
         COLOR3("menu","inactive","primary",i,j,k,255);
 
     if (read_color(db, "menu.items.disabled.text.color",
-                   &i, &j, &k))
+                   &i, &j, &k)) {
         COLOR3("menu","disabled","primary",i,j,k,255);
+        read_color(db, "menu.items.activedisabled.text.color",
+                   &i, &j, &k); /* read this if we can */
+        COLOR4("menu","activedisabled","text","primary",i,j,k,255);
+    }
 
     if (read_color(db, "menu.items.active.text.color",
                    &i, &j, &k))
@@ -440,6 +444,7 @@ int main(int argc, char **argv)
     APPEARANCE3("window.inactive.grip.bg", "window", "inactive", "grip");
     APPEARANCE2("menu.items.bg", "menu", "entries");
     APPEARANCE2("menu.items.active.bg", "menu", "active");
+    APPEARANCE2("menu.items.active.bg", "menu", "activedisabled");
     APPEARANCE2("menu.title.bg", "menu", "title");
 
     APPEARANCE4("window.active.button.disabled.bg",
@@ -451,9 +456,9 @@ int main(int argc, char **argv)
     APPEARANCE4("window.inactive.button.pressed.bg",
                 "window", "inactive", "buttons", "pressed");
     APPEARANCE4("window.active.button.toggled.bg",
-                "window", "active", "buttons", "toggled");
+                "window", "active", "buttons", "toggled-unpressed");
     APPEARANCE4("window.inactive.button.toggled.bg",
-                "window", "inactive", "buttons", "toggled");
+                "window", "inactive", "buttons", "toggled-unpressed");
     APPEARANCE4("window.active.button.unpressed.bg",
                 "window", "active", "buttons", "unpressed");
     APPEARANCE4("window.inactive.button.unpressed.bg",
@@ -539,6 +544,8 @@ int main(int argc, char **argv)
             ATTR5("menu","active","text","shadow","offset","y",NUM(i));
             ATTR4("menu","disabled","shadow","offset","x",NUM(i));
             ATTR4("menu","disabled","shadow","offset","y",NUM(i));
+            ATTR5("menu","activedisabled","text","shadow","offset","x",NUM(i));
+            ATTR5("menu","activedisabled","text","shadow","offset","y",NUM(i));
         }
         if ((p = strstr(s, "shadowtint=")))
         {
@@ -548,6 +555,7 @@ int main(int argc, char **argv)
             COLOR4("menu","inactive","shadow","primary",j,j,j,i);
             COLOR5("menu","active","text","shadow","primary",j,j,j,i);
             COLOR4("menu","disabled","shadow","primary",j,j,j,i);
+            COLOR5("menu","activedisabled","text","shadow","primary",j,j,j,i);
         }
     }
 
This page took 0.021765 seconds and 4 git commands to generate.