diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | gobject/gobjectmodule.c | 30 |
2 files changed, 35 insertions, 1 deletions
@@ -1,4 +1,8 @@ -2007-04-14 Gustavo J. A. M. Carneiro <gjc@gnome.org> +2007-04-14 Gustavo J. A. M. Carneiro <gjc@gnome.org> + + * gobject/gobjectmodule.c (pyg_set_application_name) + (pyg_set_prgname): Add wrappers for g_set_application_name and + g_set_prgname. Patch by Havoc Pennington. Fixes #415853. * gobject/pygobject.h: Bug #419379: Modernize init_pygobject: use static inline functions instead of macros. diff --git a/gobject/gobjectmodule.c b/gobject/gobjectmodule.c index 48ca598..f2da743 100644 --- a/gobject/gobjectmodule.c +++ b/gobject/gobjectmodule.c @@ -2755,6 +2755,32 @@ pyg_filename_from_utf8(PyGObject *self, PyObject *args) return py_filename; } + +PyObject* +pyg_set_application_name(PyObject *self, PyObject *args) +{ + char *s; + + if (!PyArg_ParseTuple(args, "s:gobject.set_application_name", &s)) + return NULL; + g_set_application_name(s); + Py_INCREF(Py_None); + return Py_None; +} + +PyObject* +pyg_set_prgname(PyObject *self, PyObject *args) +{ + char *s; + + if (!PyArg_ParseTuple(args, "s:gobject.set_prgname", &s)) + return NULL; + g_set_prgname(s); + Py_INCREF(Py_None); + return Py_None; +} + + static PyMethodDef pygobject_functions[] = { { "type_name", pyg_type_name, METH_VARARGS }, { "type_from_name", pyg_type_from_name, METH_VARARGS }, @@ -2814,6 +2840,10 @@ static PyMethodDef pygobject_functions[] = { (PyCFunction)pyg_filename_display_basename, METH_VARARGS }, { "filename_from_utf8", (PyCFunction)pyg_filename_from_utf8, METH_VARARGS }, + { "set_application_name", + (PyCFunction)pyg_set_application_name, METH_VARARGS }, + { "set_prgname", + (PyCFunction)pyg_set_prgname, METH_VARARGS }, { NULL, NULL, 0 } }; |