X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fpython.cc;h=60c3e012f2b4d3929897ed3471a53fdedd77cb8b;hb=5e5879a52bbfa70119a653e959265abf6d42f00e;hp=4bddce8f63be59cd4d7ba47200f6d4d32640fa4f;hpb=a0350e27b311db5cab49035752d3852ee68bf8a2;p=chaz%2Fopenbox diff --git a/src/python.cc b/src/python.cc index 4bddce8f..60c3e012 100644 --- a/src/python.cc +++ b/src/python.cc @@ -352,6 +352,11 @@ void python_init(char *argv0) PyRun_SimpleString("from _otk import *; from _openbox import *;"); PyRun_SimpleString("openbox = Openbox_instance()"); + /* XXX + sys.path.append('stuff') + install the .py wrappers, and include their path with this, then import em + */ + // set up access to the python global variables PyObject *obmodule = PyImport_AddModule("__main__"); obdict = PyModule_GetDict(obmodule); @@ -455,7 +460,7 @@ PyObject *ebind(ob::EventAction action, PyObject *func) return NULL; } - if (!ob::Openbox::instance->actions()->bind(action, func)) { + if (!ob::Openbox::instance->bindings()->addEvent(action, func)) { PyErr_SetString(PyExc_RuntimeError,"Unable to add binding."); return NULL; }