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

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

 



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.
_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux