From 65371f53dbb06180b750dad7c19e7bcf0f8651d6 Mon Sep 17 00:00:00 2001 From: monsta Date: Sun, 6 Nov 2016 14:42:18 +0300 Subject: drop Python plugins support and --enable-python build option it requires PyGTK so won't even build with GTK+3 but keep plugins themselves for future porting to libpeas --- .../python/bindings/plumacommands.override | 122 --------------------- 1 file changed, 122 deletions(-) delete mode 100644 plugin-loaders/python/bindings/plumacommands.override (limited to 'plugin-loaders/python/bindings/plumacommands.override') diff --git a/plugin-loaders/python/bindings/plumacommands.override b/plugin-loaders/python/bindings/plumacommands.override deleted file mode 100644 index 9713b5e0..00000000 --- a/plugin-loaders/python/bindings/plumacommands.override +++ /dev/null @@ -1,122 +0,0 @@ -%% -headers -#define NO_IMPORT_PYGOBJECT -#define NO_IMPORT_PYGTK -#include -#include - -#include "pluma-commands.h" -#include "pluma-window.h" - -void pyplumacommands_register_classes (PyObject *d); -void pyplumacommands_add_constants (PyObject *module, const gchar *strip_prefix); - -%% -modulename pluma.commands -%% -import pluma.Window as PyPlumaWindow_Type -import pluma.Document as PyPlumaDocument_Type -%% -ignore-glob - _* -%% -override pluma_commands_load_uri kwargs -static PyObject * -_wrap_pluma_commands_load_uri (PyObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "window", "uri", "encoding", "line_pos", NULL }; - PyGObject *window; - char *uri; - int line_pos = 0; - PyObject *py_encoding = NULL; - PlumaEncoding *encoding = NULL; - - if (!PyArg_ParseTupleAndKeywords (args, kwargs, "O!s|Oi:load_uri", - kwlist, &PyPlumaWindow_Type, - &window, &uri, &py_encoding, - &line_pos)) - return NULL; - - if (py_encoding != NULL && py_encoding != Py_None) - { - if (pyg_boxed_check (py_encoding, PLUMA_TYPE_ENCODING)) - encoding = pyg_boxed_get (py_encoding, PlumaEncoding); - else - { - PyErr_SetString (PyExc_TypeError, - "encoding should be a PlumaEncoding"); - return NULL; - } - } - - pluma_commands_load_uri (PLUMA_WINDOW (window->obj), uri, encoding, - line_pos); - Py_INCREF (Py_None); - return Py_None; -} -%% -override pluma_commands_load_uris kwargs -static PyObject * -_wrap_pluma_commands_load_uris (PyObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "window", "uris", "encoding", "line_pos", NULL }; - PyGObject *window; - GSList *uris = NULL; - int line_pos = 0; - PyObject *py_encoding = NULL; - PyObject *list; - PyObject *item; - PlumaEncoding *encoding = NULL; - int len; - int i; - - if (!PyArg_ParseTupleAndKeywords (args, kwargs, "O!O|Oi:load_uri", - kwlist, &PyPlumaWindow_Type, - &window, &list, &py_encoding, - &line_pos)) - return NULL; - - if (py_encoding != NULL && py_encoding != Py_None) - { - if (pyg_boxed_check (py_encoding, PLUMA_TYPE_ENCODING)) - encoding = pyg_boxed_get (py_encoding, PlumaEncoding); - else { - PyErr_SetString (PyExc_TypeError, - "encoding should be a PlumaEncoding"); - return NULL; - } - } - - if (!PySequence_Check (list)) - { - PyErr_SetString (PyExc_TypeError, - "second argument must be a sequence"); - return NULL; - } - - len = PySequence_Length (list); - - for (i = 0; i < len; i++) - { - item = PySequence_GetItem (list, i); - Py_DECREF (item); - - if (!PyString_Check (item)) - { - PyErr_SetString (PyExc_TypeError, - "sequence item not a string"); - g_slist_free (uris); - return NULL; - } - - uris = g_slist_prepend (uris, PyString_AsString (item)); - } - - uris = g_slist_reverse (uris); - pluma_commands_load_uris (PLUMA_WINDOW (window->obj), uris, - encoding, line_pos); - g_slist_free (uris); - - Py_INCREF (Py_None); - return Py_None; -} -- cgit v1.2.1