summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Henstridge <james@daa.com.au>2000-11-02 05:48:18 +0000
committerJames Henstridge <jamesh@src.gnome.org>2000-11-02 05:48:18 +0000
commit600b84abbef8aa710b3ea24ae5294f3eae6d285c (patch)
treeb6f069a8e04f78c9a473e19eb8b95b2d86e5fff3
parent17d6325ecd19cfafe20d64067345fff80fe13c5e (diff)
downloadpygtk-600b84abbef8aa710b3ea24ae5294f3eae6d285c.tar.gz
small changes to handle GtkTextIter objects as arguments to signals, now
2000-11-02 James Henstridge <james@daa.com.au> * gtk/gtk-types.c (_pygtk_register_boxed_types): small changes to handle GtkTextIter objects as arguments to signals, now that Havoc made the appropriate changes in gtk.
-rw-r--r--ChangeLog6
-rw-r--r--gtk/gtk-types.c16
2 files changed, 21 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index a21ffa69..58725276 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2000-11-02 James Henstridge <james@daa.com.au>
+
+ * gtk/gtk-types.c (_pygtk_register_boxed_types): small changes to
+ handle GtkTextIter objects as arguments to signals, now that Havoc
+ made the appropriate changes in gtk.
+
2000-10-30 James Henstridge <james@daa.com.au>
* gobjectmodule.c (pyg_closure_marshal): reorder parameters to
diff --git a/gtk/gtk-types.c b/gtk/gtk-types.c
index 5dec4f9e..70d8fc20 100644
--- a/gtk/gtk-types.c
+++ b/gtk/gtk-types.c
@@ -3570,6 +3570,20 @@ PyGtkSelectionData_to_value(GValue *value, PyObject *object)
}
return -1;
}
+static PyObject *
+PyGtkTextIter_from_value(const GValue *value)
+{
+ return PyGtkTextIter_New(g_value_get_boxed(value));
+}
+static int
+PyGtkTextIter_to_value(GValue *value, PyObject *object)
+{
+ if (PyGtkTextIter_Check(object)) {
+ g_value_set_boxed(value, PyGtkTextIter_Get(object));
+ return 0;
+ }
+ return -1;
+}
/* We have to set ob_type here because stupid win32 does not allow you
* to use variables from another dll in a global variable initialisation.
@@ -3606,5 +3620,5 @@ _pygtk_register_boxed_types(PyObject *moddict)
register_tp(GdkCursor);
register_tp(GtkCTreeNode);
register_tp(GdkDevice);
- register_tp(GtkTextIter);
+ register_tp2(GtkTextIter, GTK_TYPE_TEXT_ITER);
}