From 78a85881260eb537d60c05a26c048dc36b1b2089 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Mon, 30 Dec 2002 06:46:19 +0000 Subject: [PATCH] nicer output --- src/bindings.cc | 6 +++--- src/openbox.cc | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/bindings.cc b/src/bindings.cc index c4469bb1..3e65c049 100644 --- a/src/bindings.cc +++ b/src/bindings.cc @@ -21,7 +21,8 @@ static void print_branch(BindingTree *first, std::string str) while (p) { if (p->first_child) print_branch(p->first_child, str + " " + p->text); - printf("%d%s\n", p->id, (str + " " + p->text).c_str()); + if (!p->chain) + printf("%d%s\n", p->id, (str + " " + p->text).c_str()); BindingTree *s = p->next_sibling; delete p; p = s; @@ -83,9 +84,8 @@ static BindingTree *buildtree(const OBBindings::StringVect &keylist, int id) p->chain = false; } - printf("\n"); + printf("BUILDING:\n"); print_branch(ret, ""); - printf("\n"); // successfully built a tree return ret; diff --git a/src/openbox.cc b/src/openbox.cc index 952fca51..2d13ba1b 100644 --- a/src/openbox.cc +++ b/src/openbox.cc @@ -150,8 +150,8 @@ Openbox::Openbox(int argc, char **argv) _bindings = new OBBindings(); OBBindings::StringVect v; -// v.push_back("C-x"); -// v.push_back("C-y"); + v.push_back("C-x"); + v.push_back("C-y"); v.push_back("v"); _bindings->add(v, 1); v.clear(); @@ -160,6 +160,7 @@ Openbox::Openbox(int argc, char **argv) v.push_back("a"); _bindings->add(v, 2); + printf("CHAINS:\n"); _bindings->display(); ::exit(0); -- 2.45.2