summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCristiana Voicu <cristiana.voicu@intel.com>2012-10-18 12:09:51 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-10-24 21:08:46 +0100
commit00afd6a25c0cc0a4fcddd9f7c26a17ef6c47cbd2 (patch)
treeffa7607725cdf07a70ca5cdd3f4e500b33b5d838
parent93fb0a2c56100b2bbc8769af9ae2343c05e72193 (diff)
downloadbitbake-00afd6a25c0cc0a4fcddd9f7c26a17ef6c47cbd2.tar.gz
hob/settings: add a scroll bar for the box with mirrors
- added a scroll bar in the shared state tab from settings - added a signal on it, so when you add a new mirror, it will auto-scroll to the end of the list [YOCTO #3229] Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/ui/crumbs/hig.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/bb/ui/crumbs/hig.py b/lib/bb/ui/crumbs/hig.py
index b3aea92fa..4f4fecb58 100644
--- a/lib/bb/ui/crumbs/hig.py
+++ b/lib/bb/ui/crumbs/hig.py
@@ -581,8 +581,6 @@ class SimpleSettingsDialog (CrumbsDialog, SettingsUIHelper):
sub_vbox.pack_start(label, expand=False, fill=False)
sub_vbox.pack_start(sstatedir_widget, expand=False, fill=False, padding=12)
- sub_vbox = gtk.VBox(False)
- advanced_vbox.pack_start(sub_vbox, expand=False, fill=False)
content = "<span weight=\"bold\">Shared state mirrors</span>"
tooltip = "URLs pointing to pre-built mirrors that will speed your build. "
tooltip += "Select the \'Standard\' configuration if the structure of your "
@@ -591,8 +589,14 @@ class SimpleSettingsDialog (CrumbsDialog, SettingsUIHelper):
tooltip += "http://www.yoctoproject.org/docs/current/poky-ref-manual/"
tooltip += "poky-ref-manual.html#shared-state\">Yocto Project Reference Manual</a>."
table = self.gen_label_info_widget(content, tooltip)
- sub_vbox.pack_start(table, expand=False, fill=False)
+ advanced_vbox.pack_start(table, expand=False, fill=False)
+ sub_vbox = gtk.VBox(False)
+ scroll = gtk.ScrolledWindow()
+ scroll.set_policy(gtk.POLICY_NEVER, gtk.POLICY_AUTOMATIC)
+ scroll.add_with_viewport(sub_vbox)
+ scroll.connect('size-allocate', self.scroll_changed)
+ advanced_vbox.pack_start(scroll, gtk.TRUE, gtk.TRUE, 0)
searched_string = "file://"
if self.sstatemirrors_changed == 0:
@@ -1004,6 +1008,9 @@ class SimpleSettingsDialog (CrumbsDialog, SettingsUIHelper):
self.handler.disconnect(self.proxy_test_failed_id)
super(SimpleSettingsDialog, self).destroy()
+ def scroll_changed(self, widget, event, data=None):
+ adj = widget.get_vadjustment()
+ adj.set_value(adj.upper - adj.page_size)
#
# AdvancedSettings Dialog