All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] hob/settings: add a scroll bar for the box with mirrors
@ 2012-10-18  9:09 Cristiana Voicu
  2012-10-24 20:11 ` Richard Purdie
  0 siblings, 1 reply; 2+ messages in thread
From: Cristiana Voicu @ 2012-10-18  9:09 UTC (permalink / raw)
  To: bitbake-devel

- 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>
---
 bitbake/lib/bb/ui/crumbs/hig.py |   13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/bitbake/lib/bb/ui/crumbs/hig.py b/bitbake/lib/bb/ui/crumbs/hig.py
index ccd9f39..e1aa84c 100644
--- a/bitbake/lib/bb/ui/crumbs/hig.py
+++ b/bitbake/lib/bb/ui/crumbs/hig.py
@@ -546,8 +546,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 "
@@ -556,8 +554,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:
@@ -608,6 +612,9 @@ class SimpleSettingsDialog (CrumbsDialog, SettingsUIHelper):
         self.show_all()
         self.nb.set_current_page(page_num)
 
+    def scroll_changed(self, widget, event, data=None):
+        adj = widget.get_vadjustment()
+        adj.set_value(adj.upper - adj.page_size)
 
     def create_proxy_page(self):
         advanced_vbox = gtk.VBox(False, 6)
-- 
1.7.9.5




^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] hob/settings: add a scroll bar for the box with mirrors
  2012-10-18  9:09 [PATCH] hob/settings: add a scroll bar for the box with mirrors Cristiana Voicu
@ 2012-10-24 20:11 ` Richard Purdie
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Purdie @ 2012-10-24 20:11 UTC (permalink / raw)
  To: Cristiana Voicu; +Cc: bitbake-devel

On Thu, 2012-10-18 at 12:09 +0300, Cristiana Voicu wrote:
> - 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>

Merged to master, thanks.

Richard




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-10-24 20:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-18  9:09 [PATCH] hob/settings: add a scroll bar for the box with mirrors Cristiana Voicu
2012-10-24 20:11 ` Richard Purdie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.