scrolling logs in GtkTextView to the end (Re: scrolling windows)



HI,

http://mail.gnome.org/archives/gtk-app-devel-list/2003-March/msg00064.html

Please see this reference where this problem already handled, but there is issue regarding work on FTP server.
I Used this code for scrolling logs in GtkTextView to the end
Execution crash due to g_idle_add();
So please tell me how i can use this idle method.
static gboolean
status_page_scroll_to_end (gpointer data)
{
GtkTextIter iter;

gtk_text_buffer_get_end_iter (GTK_TEXT_BUFFER (viewbuf), &iter);
gtk_text_view_scroll_to_iter (GTK_TEXT_VIEW(view), &iter, 0, TRUE, 0.0, 1.0);

return FALSE;
}

/******************************************************************************

* status_message



static void
status_message (const gchar *msg)
{
....
gtk_text_buffer_get_end_iter (GTK_TEXT_BUFFER (viewbuf), &end);
gtk_text_buffer_insert( ... );
...

g_idle_add ( (GSourceFunc) status_page_scroll_to_end, NULL );
}


Regards,
ibrar ahmed


Ahhh...imagining that irresistible "new car" smell?
Check out new cars at Yahoo! Autos.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]