scrolling logs in GtkTextView to the end (Re: scrolling windows)
- From: ibrar ahmed <sayaji99 yahoo com>
- To: gtk-list gnome org
- Subject: scrolling logs in GtkTextView to the end (Re: scrolling windows)
- Date: Fri, 4 May 2007 04:37:43 -0700 (PDT)
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]