[gnome-builder] build-log: don't muck with insert/selection mark



commit 7f51c1c9c12ae33090f64dee6550feff36dae115
Author: Christian Hergert <chergert redhat com>
Date:   Wed Dec 23 00:29:59 2015 -0800

    build-log: don't muck with insert/selection mark
    
    We want to just scroll to the bottom, without touching the insert/selcetion
    mark. "move-cursor" does this just fine.
    
    We still need to deal with the problem of where the user has manually
    scrolled up, and not continue to autoscroll.

 plugins/build-tools/gbp-build-log-panel.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)
---
diff --git a/plugins/build-tools/gbp-build-log-panel.c b/plugins/build-tools/gbp-build-log-panel.c
index 6639a48..c3130b8 100644
--- a/plugins/build-tools/gbp-build-log-panel.c
+++ b/plugins/build-tools/gbp-build-log-panel.c
@@ -56,7 +56,6 @@ gbp_build_log_panel_log (GbpBuildLogPanel  *self,
                          IdeBuildResult    *result)
 {
   GtkTextIter iter;
-  GtkTextMark *insert;
 
   g_assert (GBP_IS_BUILD_LOG_PANEL (self));
   g_assert (message != NULL);
@@ -79,9 +78,7 @@ gbp_build_log_panel_log (GbpBuildLogPanel  *self,
       gtk_text_buffer_apply_tag (self->buffer, self->stderr_tag, &begin, &iter);
     }
 
-  insert = gtk_text_buffer_get_insert (self->buffer);
-  gtk_text_buffer_move_mark (self->buffer, insert, &iter);
-  gtk_text_view_scroll_mark_onscreen (self->text_view, insert);
+  g_signal_emit_by_name (self->text_view, "move-cursor", GTK_MOVEMENT_BUFFER_ENDS, 1, FALSE);
 }
 
 void


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