X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;ds=sidebyside;f=src%2Fbindings.cc;h=cafc85016736eefd1e68ebdf0c6f0aa5cb73478e;hb=9e6b0d5a8d0226232802bdece77665b167f98dae;hp=fcbff769f5e4945506d5460784f5a144c74ccdca;hpb=3afcc0bbf048878003303a67faa656a216618513;p=chaz%2Fopenbox diff --git a/src/bindings.cc b/src/bindings.cc index fcbff769..cafc8501 100644 --- a/src/bindings.cc +++ b/src/bindings.cc @@ -241,7 +241,6 @@ bool Bindings::addKey(const StringVect &keylist, PyObject *callback) if (t) { // already bound to something - // XXX: look if callback is already bound to this key? t->callbacks.push_back(callback); destroytree(tree); } else { @@ -261,7 +260,7 @@ bool Bindings::addKey(const StringVect &keylist, PyObject *callback) return true; } - +/* bool Bindings::removeKey(const StringVect &keylist, PyObject *callback) { assert(false); // XXX: function not implemented yet @@ -295,7 +294,7 @@ bool Bindings::removeKey(const StringVect &keylist, PyObject *callback) } return false; } - +*/ void Bindings::setResetKey(const std::string &key) { @@ -482,6 +481,7 @@ bool Bindings::addButton(const std::string &but, MouseContext::MC context, MouseAction::MA action, PyObject *callback) { assert(context >= 0 && context < MouseContext::NUM_MOUSE_CONTEXT); + assert(action >= 0 && action < MouseAction::NUM_MOUSE_ACTION); Binding b(0,0); if (!translate(but, b, false))