Re: gtkhtml
- From: Archit Baweja <bighead users sourceforge net>
- To: "Stephen M. Przepiora" <gearhead twcny rr com>
- Cc: gtk-app-devel <gtk-app-devel-list gnome org>
- Subject: Re: gtkhtml
- Date: 17 May 2002 22:51:48 +0530
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hey
I remember having the same problem. I think putting the GtkHTML widget inside
a GtkScrolledWindow should do the trick.
HTH
Archit Baweja
"Stephen M. Przepiora" <gearhead twcny rr com> writes:
Hello All,
I have been trying to create a Gnome app with Glade and gtkhtml
but am
not having any luck.
I inserted a custom widget and assigned a function to create it, in that
function I create the gtkhtml widget:
GtkWidget* notebook;
GtkWidget* html, *html_label;
notebook = gtk_notebook_new();
gtk_notebook_set_show_tabs(GTK_NOTEBOOK(notebook), TRUE);
gtk_notebook_set_show_border(GTK_NOTEBOOK(notebook), TRUE);
html = gtk_html_new();
gtk_object_set_data_full (GTK_OBJECT (notebook), "html", html,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_ref(html);
gtk_html_load_from_string (GTK_HTML (html),
"<html><body>foo</body></html>",
strlen("<html><body>foo</body></html>"));
gtk_signal_connect (GTK_OBJECT (html), "url_requested",
GTK_SIGNAL_FUNC (url_requested), NULL);
gtk_widget_show(html);
html_label = gtk_label_new("html");
gtk_object_set_data_full (GTK_OBJECT (notebook), "html_label",
html_label,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show(html_label);
gtk_container_add(GTK_CONTAINER(notebook),html);
gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook),
gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook), 0),
html_label);
gtk_notebook_set_page(GTK_NOTEBOOK(notebook),
gtk_notebook_page_num(GTK_NOTEBOOK(notebook),html));
return notebook;
however every time I run this app it crashes on me. I have narrowed it
down to the html widget by replacing it with a label and everything
works fine.
Am I creating the html widget properly?
Steve
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
- --
Homepage: http://symonds.net/~bighead/
GPG Key: http://symonds.net/~bighead/bighead-gpg-key.asc
Gnome in Hindi: http://symonds.net/~bighead/gnome/gnome-devnag-howto/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.6 and Gnu Privacy Guard <http://www.gnupg.org/>
iD8DBQE85Tws2rWNPKmGjMcRAghCAJ9OfSeTJc2oCSgXCbL8y0Epe7/b1ACgngcb
nOLYI1Ttk23OIu0pnO0RC8Q=
=20Rk
-----END PGP SIGNATURE-----
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]