[pygtk] Manually wrap gtk.Clipboard.wait_for_uris
- From: Gian Mario Tagliaretti <gianmt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygtk] Manually wrap gtk.Clipboard.wait_for_uris
- Date: Tue, 6 Apr 2010 19:28:46 +0000 (UTC)
commit 864f03f64b531a1abb69531f8481d5b2791d04c3
Author: Gian Mario Tagliaretti <gianmt gnome org>
Date: Tue Apr 6 21:27:59 2010 +0200
Manually wrap gtk.Clipboard.wait_for_uris
gtk/gtk.override | 27 +++++++++++++++++++++++++++
1 files changed, 27 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtk.override b/gtk/gtk.override
index 7f34a85..fa05771 100644
--- a/gtk/gtk.override
+++ b/gtk/gtk.override
@@ -8820,3 +8820,30 @@ _wrap_gtk_widget_set_allocation(PyGObject *self,
Py_INCREF(Py_None);
return Py_None;
}
+%%
+override gtk_clipboard_wait_for_uris noargs
+static PyObject *
+_wrap_gtk_clipboard_wait_for_uris(PyGObject *self)
+{
+ gchar **uris = NULL, **tmp;
+ PyObject *ret;
+ int i = 0, j;
+
+ uris = gtk_clipboard_wait_for_uris(GTK_CLIPBOARD(self->obj));
+
+ if (uris) {
+ tmp = uris;
+ while (*tmp)
+ tmp++, i++;
+
+ ret = PyTuple_New(i);
+ for (j = 0; j < i; j++)
+ PyTuple_SetItem(ret, j, PyString_FromString(uris[j]));
+
+ g_strfreev(uris);
+
+ return ret;
+ }
+ Py_INCREF(Py_None);
+ return Py_None;
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]