Re: Cant get GtkTextBuffer from GtkTextView widget
- From: Roman Makurin <drolyk gmail com>
- To: gtk-app-devel-list gnome org
- Subject: Re: Cant get GtkTextBuffer from GtkTextView widget
- Date: Mon, 14 Apr 2008 12:19:26 +0400
Ð ÐÐÐ, 14/04/2008 Ð 09:59 +0300, Tiberius DULUMAN ÐÐÑÐÑ:
The handler should be:
static void handler(GtkWidget *widget, GtkTextView *tview)
{
GtkTextBuffer *buffer = NULL;
GtkTextIter iterator;
buffer = gtk_text_view_get_buffer(tview);
g_assert(buffer != NULL); <<< assert that it is not null
gtk_text_buffer_get_end_iter(buffer, &iterator); <<< pass an allocated
iterator
gtk_text_buffer_insert(buffer, &iterator, "Info message", -1);
}
Thanks, it helps me.
--
If you think of MS-DOS as mono, and Windows as stereo,
then Linux is Dolby Digital and all the music is free...
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]