summaryrefslogtreecommitdiffstats
path: root/gio
diff options
context:
space:
mode:
authorGian Mario Tagliaretti <gianmt@gnome.org>2009-04-05 19:06:54 +0000
committerGian Mario Tagliaretti <gianmt@src.gnome.org>2009-04-05 19:06:54 +0000
commit82e18dfab3270e5ca972491be2d50d6b3b85f975 (patch)
treecfb5eeb387a1324c6e7da52013bcced3842f9f4d /gio
parent14a6cda08733771ea748fb8c7e4c885244944b6b (diff)
downloadpygobject-82e18dfab3270e5ca972491be2d50d6b3b85f975.tar.gz
pygobject-82e18dfab3270e5ca972491be2d50d6b3b85f975.tar.xz
pygobject-82e18dfab3270e5ca972491be2d50d6b3b85f975.zip
Wrap new GFile method.
2009-04-05 Gian Mario Tagliaretti <gianmt@gnome.org> * gio/gfile.override: (_wrap_g_file_set_display_name_async) Wrap new GFile method. * tests/test_gio.py: Test the above methods. svn path=/trunk/; revision=1056
Diffstat (limited to 'gio')
-rw-r--r--gio/gfile.override50
1 files changed, 49 insertions, 1 deletions
diff --git a/gio/gfile.override b/gio/gfile.override
index 406d62a..4cbeb1c 100644
--- a/gio/gfile.override
+++ b/gio/gfile.override
@@ -1514,7 +1514,55 @@ _wrap_g_file_set_attributes_finish(PyGObject *self,
return py_ret;
}
+%%
+override g_file_set_display_name_async kwargs
+static PyObject *
+_wrap_g_file_set_display_name_async(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "display_name", "callback",
+ "io_priority", "cancellable", "user_data", NULL };
+ PyGIONotify *notify;
+ char *display_name;
+ int io_priority = G_PRIORITY_DEFAULT;
+ GCancellable *cancellable = NULL;
+ PyGObject *py_cancellable = NULL;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "sO|iOO:GFile.set_display_name_async",
+ kwlist,
+ &display_name,
+ &notify->callback,
+ &io_priority,
+ &py_cancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_file_set_display_name_async(G_FILE(self->obj),
+ display_name,
+ io_priority,
+ (GCancellable *) cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
-/* GFile.set_display_name_async */
/* GFile.load_partial_contents_async: No ArgType for GFileReadMoreCallback */
/* GFile.load_partial_contents_finish: No ArgType for char** */