All,
I think I've found a bug in Gtk+2 gtk_text_buffer_insert() of a '\n'
following an existing '\r' in a GTK_TEXT_BUFFER (to convert end-of-line from
`CR` (Max pre-OSX) to `CRLF`. When I locate the existing '\r' end-of-line with
gtk_text_iter_forward_to_line_end
Hi all,
I am writing a simple application with GTK+, I updated the text view
area with the text using gtk_text_buffer_insert function.
I am wondering why the new text was not displayed immediately on the
text view right after the line: gtk_text_buffer_insert (..., new
text); ?
The new text
Have you tried forcing the main run loop to execute? i.e.:
while (gtk_events_pending())
gtk_main_iteration();
I am writing a simple application with GTK+, I updated the text view
area with the text using gtk_text_buffer_insert function.
I am wondering why the new text
this Characters one by one using the API :
gtk_text_buffer_insert()?
I think I don't understand quite what you mean with one by one.
Typically you'd add as much as you got from the socket -- like so:
/* at the beginning */
GtkTextBuffer *tb = gtk_text_buffer_new(NULL); /* or create a tag table
hi everyone,
I have a GtkTextView to display the data in the buffer *buffer.
The buffer i received from a socket consists of English and Chinese
Characters.
How to display this Characters one by one using the API :
gtk_text_buffer_insert()?
___
gtk
Hi
You can do it like this.
gchar * stuff = g_strdup_printf(%d, i);
gtk_text_buffer_insert(buffer, iter, stuff, -1);
g_free(stuff);
HTH
Archit
P.S. Now that you mention it, I guess it would be nice to have something
like gtk_text_buffer_insert_formatted() (I guess you were thinking the
same
Hi,
You can change the integer to string and can use it.
str = g_strdup_printf (%d, i);
And then use the string variable str.
Then free the str variable.
Thanks,
Shakti
Aaron Yang wrote:
hi everyone,
how do I do this:
int i;
printf(%d, i);
in a textview:
gtk_text_buffer_insert(buffer, iter, %d
,
GtkTextIter iter)
{
gtk_text_buffer_insert (buffer, iter, printing
from function1\n\n, -1);
}
void
function2 (GtkWidget *text,
GtkTextBuffer *buffer,
GtkTextIter iter)
{
gtk_text_buffer_insert (buffer, iter, printing
from function2\n\n, -1);
}
in the above program
)
will invalidate all outstanding iterators
(a:3445): Gtk-CRITICAL **: file gtktextbuffer.c: line
577 (gtk_text_buffer_insert): assertion
`gtk_text_iter_get_buffer (iter) == buffer' failed
cheers
gmt
___
gtk-list mailing list
gtk-list@gnome.org
http
hi everyone,
how do I do this:
int i;
printf(%d, i);
in a textview:
gtk_text_buffer_insert(buffer, iter, %d, -1);
regards
__
Do you Yahoo!?
Meet the all-new My Yahoo! - Try it today!
http://my.yahoo.com
Title: gtk_text_buffer_insert() cause fault.
After cross-compiling all the gtk+2.2 related things for my iPAQ, I can run all test applications in the examples directory except 'paned'. When I run 'paned' I got following errors.
# ./paned
Gtk-ERROR **: file gtktextdisplay.c: line 237
Hi,
[EMAIL PROTECTED] writes:
After cross-compiling all the gtk+2.2 related things for my iPAQ, I
can run all test applications in the examples directory except
'paned'. When I run 'paned' I got following errors.
# ./paned
Gtk-ERROR **: file gtktextdisplay.c: line 237
Title: RE: gtk_text_buffer_insert() cause fault.
I'm not using framebuffer based gtk+.
I'm using
tinyx 4.2.0
glib-2.2.2
gtk+-2.2.2
pango-1.2.3
atk-1.2.4
freetype-2.1.2
gettext-0.12.1
fcpackage.2_0 : Xft, Xrender, fontconfig
configure result of pango is like this.
backends
Hi,
[EMAIL PROTECTED] writes:
I'm not using framebuffer based gtk+.
Good, I'm not responsible for your bug then ;)
I think you should write a small test-case that triggers your problem
and file a bug-report at bugzilla.gnome.org attaching your test code.
Sven
14 matches
Mail list logo