]> Dogcows Code - chaz/openbox/blobdiff - openbox/keytree.c
combine the old focus cycle popup code with mika's new list-mode popup, and make...
[chaz/openbox] / openbox / keytree.c
index fb26624d0732d88105c97094d036137d5d5fcf9d..56cc96d41baf767dac67e8f9152e2fcb98475c60 100644 (file)
@@ -63,10 +63,7 @@ KeyBindingTree *tree_build(GList *keylist)
                                           g_strdup(kit->data)); /* deep copy */
         ret->first_child = p;
         if (p != NULL) p->parent = ret;
-        if (!translate_key(it->data, &ret->state, &ret->key)) {
-            tree_destroy(ret);
-            return NULL;
-        }
+        translate_key(it->data, &ret->state, &ret->key);
     }
     return ret;
 }
@@ -135,16 +132,15 @@ KeyBindingTree *tree_find(KeyBindingTree *search, gboolean *conflict)
 gboolean tree_chroot(KeyBindingTree *tree, GList *keylist)
 {
     guint key, state;
-    if (translate_key(keylist->data, &state, &key)) {
-        while (tree != NULL && !(tree->state == state && tree->key == key))
-            tree = tree->next_sibling;
-        if (tree != NULL) {
-            if (keylist->next == NULL) {
-                tree->chroot = TRUE;
-                return TRUE;
-            } else
-                return tree_chroot(tree->first_child, keylist->next);
-        }
+    translate_key(keylist->data, &state, &key);
+    while (tree != NULL && !(tree->state == state && tree->key == key))
+        tree = tree->next_sibling;
+    if (tree != NULL) {
+        if (keylist->next == NULL) {
+            tree->chroot = TRUE;
+            return TRUE;
+        } else
+            return tree_chroot(tree->first_child, keylist->next);
     }
     return FALSE;
 }
This page took 0.020694 seconds and 4 git commands to generate.