X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=src%2Fpython.cc;h=12e74eeea1b0d5f1c6effe5b8206602167b4c465;hb=cdcc526a0274cace9f542960fe4eee4ddcc23d31;hp=f6ed7a7e7dc9bc083dad407faccfc12a9fd234de;hpb=ef02a0c8ae65f169157c90064a335303e964a4c1;p=chaz%2Fopenbox diff --git a/src/python.cc b/src/python.cc index f6ed7a7e..12e74eee 100644 --- a/src/python.cc +++ b/src/python.cc @@ -100,7 +100,7 @@ PyObject *mbind(const std::string &button, ob::MouseContext context, return NULL; } - if (!ob::Openbox::instance->bindings()->addButton(button, context, + if (!ob::openbox->bindings()->addButton(button, context, action, func)) { PyErr_SetString(PyExc_RuntimeError,"Unable to add binding."); return NULL; @@ -115,7 +115,7 @@ PyObject *ebind(ob::EventAction action, PyObject *func) return NULL; } - if (!ob::Openbox::instance->bindings()->addEvent(action, func)) { + if (!ob::openbox->bindings()->addEvent(action, func)) { PyErr_SetString(PyExc_RuntimeError,"Unable to add binding."); return NULL; } @@ -145,7 +145,7 @@ PyObject *kbind(PyObject *keylist, ob::KeyContext context, PyObject *func) } (void)context; // XXX use this sometime! - if (!ob::Openbox::instance->bindings()->addKey(vectkeylist, func)) { + if (!ob::openbox->bindings()->addKey(vectkeylist, func)) { PyErr_SetString(PyExc_RuntimeError,"Unable to add binding."); return NULL; } @@ -174,7 +174,7 @@ PyObject *kunbind(PyObject *keylist, PyObject *func) vectkeylist.push_back(PyString_AsString(str)); } - if (!ob::Openbox::instance->bindings()->removeKey(vectkeylist, func)) { + if (!ob::openbox->bindings()->removeKey(vectkeylist, func)) { PyErr_SetString(PyExc_RuntimeError, "Could not remove callback."); return NULL; } @@ -183,12 +183,12 @@ PyObject *kunbind(PyObject *keylist, PyObject *func) void kunbind_all() { - ob::Openbox::instance->bindings()->removeAllKeys(); + ob::openbox->bindings()->removeAllKeys(); } void set_reset_key(const std::string &key) { - ob::Openbox::instance->bindings()->setResetKey(key); + ob::openbox->bindings()->setResetKey(key); } PyObject *send_client_msg(Window target, int type, Window about, @@ -205,7 +205,7 @@ PyObject *send_client_msg(Window target, int type, Window about, e.xclient.type = ClientMessage; e.xclient.format = 32; e.xclient.message_type = - Openbox::instance->property()->atom((otk::Property::Atoms)type); + openbox->property()->atom((otk::Property::Atoms)type); e.xclient.window = about; e.xclient.data.l[0] = data; e.xclient.data.l[1] = data1; @@ -213,7 +213,7 @@ PyObject *send_client_msg(Window target, int type, Window about, e.xclient.data.l[3] = data3; e.xclient.data.l[4] = data4; - XSendEvent(otk::Display::display, target, false, + XSendEvent(**otk::display, target, false, SubstructureRedirectMask | SubstructureNotifyMask, &e); Py_INCREF(Py_None); return Py_None;