summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorLiming An <limingx.l.an@intel.com>2012-03-22 19:08:40 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-03-23 16:10:24 +0000
commit98fa27c4c992dacae93cb127319271c87a9c2363 (patch)
treef25b76ddc8ffcd3e9fea0a4df051a92faac7c794 /bitbake
parentf427bfa0e438ea618d0baf4ebfe4f8404eb4840e (diff)
downloadpoky-98fa27c4c992dacae93cb127319271c87a9c2363.tar.gz
Hob: add auto scroll to rows which be new appended in hob building log page
For make the building screen to provide clear information about task in progress by request, so add this function. At the beginning of building, the vertical scroll bar will go to the active area automatically. Once the user moves the scroll bar in the middle, the automatic move of the bar is disabled. However, once the user moves it to the bottom again, it will be kept to the bottom even though more logs come. [Yocto #2098] (Bitbake rev: cf43be6685d45c66e6508bbce653f8a67db66a9b) Signed-off-by: Liming An <limingx.l.an@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rwxr-xr-xbitbake/lib/bb/ui/crumbs/builddetailspage.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/builddetailspage.py b/bitbake/lib/bb/ui/crumbs/builddetailspage.py
index 92ca176190..5f1524f05f 100755
--- a/bitbake/lib/bb/ui/crumbs/builddetailspage.py
+++ b/bitbake/lib/bb/ui/crumbs/builddetailspage.py
@@ -38,7 +38,7 @@ class BuildDetailsPage (HobPage):
38 super(BuildDetailsPage, self).__init__(builder, "Building ...") 38 super(BuildDetailsPage, self).__init__(builder, "Building ...")
39 39
40 self.num_of_issues = 0 40 self.num_of_issues = 0
41 41 self.endpath = (0,)
42 # create visual elements 42 # create visual elements
43 self.create_visual_elements() 43 self.create_visual_elements()
44 44
@@ -77,6 +77,8 @@ class BuildDetailsPage (HobPage):
77 self.scrolled_view_build.add(self.build_tv) 77 self.scrolled_view_build.add(self.build_tv)
78 self.notebook.append_page(self.scrolled_view_build, gtk.Label("Log")) 78 self.notebook.append_page(self.scrolled_view_build, gtk.Label("Log"))
79 79
80 self.builder.handler.build.model.connect_after("row-changed", self.scroll_to_present_row, self.scrolled_view_build.get_vadjustment(), self.build_tv)
81
80 self.button_box = gtk.HBox(False, 6) 82 self.button_box = gtk.HBox(False, 6)
81 self.back_button = HobAltButton("Back to image configuration") 83 self.back_button = HobAltButton("Back to image configuration")
82 self.back_button.connect("clicked", self.back_button_clicked_cb) 84 self.back_button.connect("clicked", self.back_button_clicked_cb)
@@ -138,3 +140,10 @@ class BuildDetailsPage (HobPage):
138 140
139 def hide_stop_button(self): 141 def hide_stop_button(self):
140 self.stop_button.hide() 142 self.stop_button.hide()
143
144 def scroll_to_present_row(self, model, path, iter, v_adj, treeview):
145 if treeview and v_adj:
146 if path[0] > self.endpath[0]: # check the event is a new row append or not
147 self.endpath = path
148 if v_adj.value == (v_adj.upper - v_adj.page_size): # check the gtk.adjustment position is at end boundary or not
149 treeview.scroll_to_cell(path)