Add plugin name to win_create api call

This commit is contained in:
James Booth
2016-07-03 00:48:22 +01:00
parent 31c66bf857
commit 70a79abd3b
6 changed files with 15 additions and 6 deletions

View File

@@ -456,13 +456,16 @@ python_api_win_create(PyObject *self, PyObject *args)
char *tag = NULL;
PyObject *p_callback = NULL;
char *plugin_name = _python_plugin_name();
log_debug("Win create %s for %s", tag, plugin_name);
if (!PyArg_ParseTuple(args, "sO", &tag, &p_callback)) {
return Py_BuildValue("");
}
if (p_callback && PyCallable_Check(p_callback)) {
allow_python_threads();
api_win_create(tag, p_callback, NULL, python_window_callback);
api_win_create(plugin_name, tag, p_callback, NULL, python_window_callback);
disable_python_threads();
}