On Fri, Feb 02, 2001 at 07:09:27PM -0300, Nahuel Greco wrote:
> Hi, i must do a wysiwyg html editor for linux, for this, i want to use gtkhtml
> from python. I have done a search, and the mailing list messages says that the
> current python-gtkhtml is broken, is this true?
> 
I have attached a patch I used to build a debian package for
python-gnome 1.0.53. It works for plain html, but crashes my app if the
file contains any graphics. I have not tried to find out what's the
problem.

-- 
Tom Cato Amundsen <[EMAIL PROTECTED]>
GNU Solfege - free eartraining, http://www.gnu.org/software/solfege/
--- gnome-python-1.0.53/pygnome/gtkhtmlmodule.c Thu Apr  6 17:20:40 2000
+++ python-gnome-1.0.53/pygnome/gtkhtmlmodule.c Mon Oct 23 16:25:04 2000
@@ -31,12 +31,12 @@
 static PyObject *_wrap_gtk_html_begin (PyObject *self, PyObject *args) {
     gchar *url;
     PyObject *html, *handle;
-    GtkHTMLStreamHandle stream;
+    GtkHTMLStream *stream;
     
     if (!PyArg_ParseTuple(args, "O!s:gtk_html_begin",
                          &PyGtk_Type, &html, &url))
        return NULL;
-    stream = gtk_html_begin (GTK_HTML (PyGtk_Get(html)), url);
+    stream = gtk_html_begin (GTK_HTML (PyGtk_Get(html)));
     
     handle = PyCObject_FromVoidPtr((void *) stream, NULL);
 
@@ -50,7 +50,7 @@
     char *buf;
     int length;
     PyObject *html, *handle;
-    GtkHTMLStreamHandle stream;
+    GtkHTMLStream *stream;
     
     if (!PyArg_ParseTuple(args, "O!O!s#:gtk_html_write",
                          &PyGtk_Type, &html,
@@ -58,7 +58,7 @@
                          &buf, &length))
        return NULL;
 
-    stream = (GtkHTMLStreamHandle) PyCObject_AsVoidPtr (handle);
+    stream = (GtkHTMLStream *) PyCObject_AsVoidPtr (handle);
     gtk_html_write (GTK_HTML (PyGtk_Get(html)), stream, buf, length);
     
     Py_INCREF(Py_None);
@@ -69,7 +69,7 @@
     char *buf;
     int status;
     PyObject *html, *handle;
-    GtkHTMLStreamHandle stream;
+    GtkHTMLStream * stream;
     
     if (!PyArg_ParseTuple(args, "O!O!i:gtk_html_end",
                          &PyGtk_Type, &html,
@@ -77,7 +77,7 @@
                          &status))
        return NULL;
 
-    stream = (GtkHTMLStreamHandle) PyCObject_AsVoidPtr (handle);
+    stream = (GtkHTMLStream*) PyCObject_AsVoidPtr (handle);
     gtk_html_end (GTK_HTML (PyGtk_Get(html)), stream, status);
     
     Py_INCREF(Py_None);

Reply via email to