]> Dogcows Code - chaz/openbox/blobdiff - openbox/config.c
remove focusLast and focusLastOnDesktop
[chaz/openbox] / openbox / config.c
index cee3c1378740a6c55b2e919ac245595af255dea0..4251390c9fcd031fc9d60595e80fcb0e1133d180 100644 (file)
@@ -8,8 +8,6 @@
 
 gboolean config_focus_new;
 gboolean config_focus_follow;
-gboolean config_focus_last;
-gboolean config_focus_last_on_desktop;
 guint    config_focus_delay;
 
 char *config_theme;
@@ -71,7 +69,7 @@ static void parse_key(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node,
         if (parse_attr_string("key", n, &key)) {
             keylist = g_list_append(keylist, key);
 
-            parse_key(i, doc, n->xmlChildrenNode, keylist);
+            parse_key(i, doc, n->children, keylist);
 
             it = g_list_last(keylist);
             g_free(it->data);
@@ -93,7 +91,7 @@ static void parse_key(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node,
 static void parse_keyboard(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node,
                            void *d)
 {
-    parse_key(i, doc, node->xmlChildrenNode, NULL);
+    parse_key(i, doc, node->children, NULL);
 }
 
 /*
@@ -116,7 +114,7 @@ static void parse_mouse(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node,
     ObMouseAction mact;
     ObAction *action;
 
-    node = node->xmlChildrenNode;
+    node = node->children;
     
     if ((n = parse_find_node("dragThreshold", node)))
         config_mouse_threshold = parse_int(doc, n);
@@ -127,7 +125,7 @@ static void parse_mouse(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node,
     while (n) {
         if (!parse_attr_string("name", n, &contextstr))
             goto next_n;
-        nbut = parse_find_node("mousebind", n->xmlChildrenNode);
+        nbut = parse_find_node("mousebind", n->children);
         while (nbut) {
             if (!parse_attr_string("button", nbut, &buttonstr))
                 goto next_nbut;
@@ -148,7 +146,7 @@ static void parse_mouse(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node,
                 mact = OB_MOUSE_ACTION_MOTION;
             } else
                 goto next_nbut;
-            nact = parse_find_node("action", nbut->xmlChildrenNode);
+            nact = parse_find_node("action", nbut->children);
             while (nact) {
                 if ((action = action_parse(i, doc, nact, uact)))
                     mouse_bind(buttonstr, contextstr, mact, action);
@@ -169,18 +167,14 @@ static void parse_focus(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node,
 {
     xmlNodePtr n;
 
-    node = node->xmlChildrenNode;
+    node = node->children;
     
     if ((n = parse_find_node("focusNew", node)))
         config_focus_new = parse_bool(doc, n);
     if ((n = parse_find_node("followMouse", node)))
         config_focus_follow = parse_bool(doc, n);
-    if ((n = parse_find_node("focusLast", node)))
-        config_focus_last = parse_bool(doc, n);
-    if ((n = parse_find_node("focusLastOnDesktop", node)))
-        config_focus_last_on_desktop = parse_bool(doc, n);
     if ((n = parse_find_node("focusDelay", node)))
-        config_focus_delay = parse_int(doc, n);
+        config_focus_delay = parse_int(doc, n) * 1000;
 }
 
 static void parse_theme(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node,
@@ -188,7 +182,7 @@ static void parse_theme(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node,
 {
     xmlNodePtr n;
 
-    node = node->xmlChildrenNode;
+    node = node->children;
 
     if ((n = parse_find_node("name", node))) {
         gchar *c;
@@ -209,7 +203,7 @@ static void parse_desktops(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node,
 {
     xmlNodePtr n;
 
-    node = node->xmlChildrenNode;
+    node = node->children;
     
     if ((n = parse_find_node("number", node)))
         config_desktops_num = parse_int(doc, n);
@@ -222,7 +216,7 @@ static void parse_desktops(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node,
         g_slist_free(config_desktops_names);
         config_desktops_names = NULL;
 
-        nname = parse_find_node("name", n->xmlChildrenNode);
+        nname = parse_find_node("name", n->children);
         while (nname) {
             config_desktops_names = g_slist_append(config_desktops_names,
                                                    parse_string(doc, nname));
@@ -236,7 +230,7 @@ static void parse_resize(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node,
 {
     xmlNodePtr n;
 
-    node = node->xmlChildrenNode;
+    node = node->children;
     
     if ((n = parse_find_node("drawContents", node)))
         config_redraw_resize = parse_bool(doc, n);
@@ -246,7 +240,7 @@ static void parse_dock(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node, void *d)
 {
     xmlNodePtr n;
 
-    node = node->xmlChildrenNode;
+    node = node->children;
 
     if ((n = parse_find_node("position", node))) {
         if (parse_contains("TopLeft", doc, n))
@@ -299,12 +293,12 @@ static void parse_dock(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node, void *d)
     if ((n = parse_find_node("autoHide", node)))
         config_dock_hide = parse_bool(doc, n);
     if ((n = parse_find_node("hideTimeout", node)))
-        config_dock_hide_timeout = parse_int(doc, n);
+        config_dock_hide_timeout = parse_int(doc, n) * 1000;
 }
 
 static void parse_menu(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node, void *d)
 {
-    for (node = node->xmlChildrenNode; node; node = node->next) {
+    for (node = node->children; node; node = node->next) {
         if (!xmlStrcasecmp(node->name, (const xmlChar*) "file")) {
             gchar *c;
 
@@ -321,7 +315,7 @@ static void parse_resistance(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node,
 {
     xmlNodePtr n;
 
-    node = node->xmlChildrenNode;
+    node = node->children;
     if ((n = parse_find_node("strength", node)))
         config_resist_win = parse_int(doc, n);
     if ((n = parse_find_node("screen_edge_strength", node)))
@@ -332,8 +326,6 @@ void config_startup(ObParseInst *i)
 {
     config_focus_new = TRUE;
     config_focus_follow = FALSE;
-    config_focus_last = TRUE;
-    config_focus_last_on_desktop = TRUE;
     config_focus_delay = 0;
 
     parse_register(i, "focus", parse_focus, NULL);
@@ -360,7 +352,7 @@ void config_startup(ObParseInst *i)
     config_dock_y = 0;
     config_dock_orient = OB_ORIENTATION_VERT;
     config_dock_hide = FALSE;
-    config_dock_hide_timeout = 3000;
+    config_dock_hide_timeout = 300;
 
     parse_register(i, "dock", parse_dock, NULL);
 
@@ -390,6 +382,8 @@ void config_shutdown()
 
     g_free(config_theme);
 
+    g_free(config_title_layout);
+
     for (it = config_desktops_names; it; it = g_slist_next(it))
         g_free(it->data);
     g_slist_free(config_desktops_names);
This page took 0.025076 seconds and 4 git commands to generate.