[gnome-builder/wip/chergert/dspy: 7/11] dspy: reset scroll position when loading connection



commit 28ff9dec4382fad0b23b6071e40bf2ed15f8d5b3
Author: Christian Hergert <chergert redhat com>
Date:   Fri Apr 12 14:00:31 2019 -0700

    dspy: reset scroll position when loading connection

 src/plugins/dspy/gbp-dspy-surface.c | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/src/plugins/dspy/gbp-dspy-surface.c b/src/plugins/dspy/gbp-dspy-surface.c
index d7afe3d55..c414a7f97 100644
--- a/src/plugins/dspy/gbp-dspy-surface.c
+++ b/src/plugins/dspy/gbp-dspy-surface.c
@@ -133,6 +133,10 @@ on_connection_clicked_cb (GtkButton      *button,
   dspy_connection_model_set_address (model, info->addr);
   gtk_list_box_bind_model (self->names_list_box, G_LIST_MODEL (model), create_names_row, NULL, NULL);
   g_set_object (&self->model, model);
+
+  g_object_set (gtk_scrolled_window_get_vadjustment (self->names_scroller),
+                "value", 0.0,
+                NULL);
 }
 
 static void


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