]> Dogcows Code - chaz/openbox/blobdiff - src/openbox.i
typo
[chaz/openbox] / src / openbox.i
index b5e7f09e4799791ff7cef4a4f4f8fa70e15615e3..b88175d90e6565d7f984aa9d080e95fa8988ce25 100644 (file)
 %inline %{
   enum ActionType {
     Action_ButtonPress,
-    Action_ButtonRelease,
     Action_Click,
     Action_DoubleClick,
     Action_EnterWindow,
     Action_LeaveWindow,
     Action_KeyPress,
-    Action_MouseMotion
+    Action_MouseMotion,
+    Action_NewWindow,
+    Action_CloseWindow
   };
   enum WidgetType {
     Type_Frame,
@@ -97,6 +98,10 @@ PyObject * unregister_all(int action)
 
 PyObject * bind(PyObject *keylist, PyObject *func)
 {
+  if (!PyCallable_Check(func)) {
+    PyErr_SetString(PyExc_TypeError, "Invalid callback function.");
+    return NULL;
+  }
   if (!PyList_Check(keylist)) {
     PyErr_SetString(PyExc_TypeError, "Invalid keylist. Not a list.");
     return NULL;
This page took 0.020246 seconds and 4 git commands to generate.