summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGustavo J. A. M. Carneiro <gjc@src.gnome.org>2007-04-14 17:07:25 +0000
committerGustavo J. A. M. Carneiro <gjc@src.gnome.org>2007-04-14 17:07:25 +0000
commit2421ba56f34e9e088b31dff53b477d35b600b715 (patch)
treef2bc69d6a3657bca21970ef6c6f4a48dd3eff96c
parentc292a0d1aaa9b6f68ec2a089d3b91914daf49ef9 (diff)
downloadpygobject-2421ba56f34e9e088b31dff53b477d35b600b715.tar.gz
pygobject-2421ba56f34e9e088b31dff53b477d35b600b715.tar.xz
pygobject-2421ba56f34e9e088b31dff53b477d35b600b715.zip
Bug 415853 – g_set_application_name() binding
svn path=/trunk/; revision=644
-rw-r--r--ChangeLog6
-rw-r--r--gobject/gobjectmodule.c30
2 files changed, 35 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index a33c66e..a69b0fd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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 }
};