GtkTextView issue
- From: Carlos Pereira <jose carlos pereira ist utl pt>
- To: gtk-app-devel-list gnome org
- Subject: GtkTextView issue
- Date: Mon, 31 Mar 2008 17:41:51 +0100
Hi,
This is to report an issue with gtk_text_buffer_create_tag,
affecting Gtk 2.10.0 (Fedora 8, amd64):
gtk_text_buffer_create_tag (buffer, "my_tag", "scale", 1, NULL);
When the scaling factor is 1.0 (or 2.0 or PANGO_SCALE_MEDIUM or
PANGO_SCALE_LARGE, etc.) everything works fine. However,
when scaling is 1 (or 2 or something that looks as an integer),
GTK crashes immediately, even if this tag is not actually used.
(The 20-line code working example below shows the issue).
This is not a real problem for users, but perhaps it could be
cleaned anyway? (assuming it was not fixed yet).
Cheers,
Carlos
****************
#include <gtk/gtk.h>
int main (int argc, char **argv)
{
GtkWidget *window, *text;
GtkTextBuffer *buffer;
GtkTextIter iter;
gtk_init (&argc, &argv);
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_default_size (GTK_WINDOW (window), 200, 200);
text = gtk_text_view_new ();
gtk_container_add (GTK_CONTAINER (window), text);
gtk_widget_show (text);
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (text));
gtk_text_buffer_create_tag (buffer, "my_tag", "scale", 1, NULL);
gtk_text_buffer_get_iter_at_offset (buffer, &iter, 0);
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter, "Hello World!",
-1, "my_tag", NULL);
gtk_widget_show (window);
gtk_main ();
return 0;
}
*************
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]