diff options
author | jstebbins <[email protected]> | 2008-08-04 18:54:12 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2008-08-04 18:54:12 +0000 |
commit | 9127ccaa62aab59f84e202b7021840c6724f5506 (patch) | |
tree | 0a1daa2d9d9c0bd1583aebc667d07889160a5528 /gtk/src/callbacks.c | |
parent | 6bc770f343b5beab72fbb4aeff9da89e4e4e2fe5 (diff) |
LinGui: fix a couple problems with activity window scrolling noted by a user
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1608 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk/src/callbacks.c')
-rw-r--r-- | gtk/src/callbacks.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/gtk/src/callbacks.c b/gtk/src/callbacks.c index 33ecd5264..9b5b4c6ab 100644 --- a/gtk/src/callbacks.c +++ b/gtk/src/callbacks.c @@ -2813,7 +2813,8 @@ ghb_log_cb(GIOChannel *source, GIOCondition cond, gpointer data) gsize length; GtkTextView *textview; GtkTextBuffer *buffer; - GtkTextMark *mark; + GtkTextIter iter; + //GtkTextMark *mark; GError *gerror = NULL; GIOStatus status; @@ -2824,9 +2825,13 @@ ghb_log_cb(GIOChannel *source, GIOCondition cond, gpointer data) { textview = GTK_TEXT_VIEW(GHB_WIDGET (ud->builder, "activity_view")); buffer = gtk_text_view_get_buffer (textview); - mark = gtk_text_buffer_get_insert (buffer); - gtk_text_view_scroll_mark_onscreen(textview, mark); - gtk_text_buffer_insert_at_cursor (buffer, text, -1); + // I would like to auto-scroll the window when the scrollbar + // is at the bottom, but I'm having difficulty finding a way + // to reliably detect that the scrollbar is at the bottom + //mark = gtk_text_buffer_get_insert (buffer); + //gtk_text_view_scroll_mark_onscreen(textview, mark); + gtk_text_buffer_get_end_iter(buffer, &iter); + gtk_text_buffer_insert(buffer, &iter, text, -1); g_io_channel_write_chars (ud->activity_log, text, length, &length, NULL); g_free(text); } |