Patchwork [bitbake-devel,4/6] ui/crumbs/imageconfigurationpage: make use of the HobInfoButton

login
register
mail settings
Submitter Joshua Lock
Date March 3, 2012, 12:39 a.m.
Message ID <4994d44f42e195fe92f75e9f562eb9de0d974371.1330734444.git.josh@linux.intel.com>
Download mbox | patch
Permalink /patch/22603/
State Accepted
Commit 10b4a6770640db49f2f55b8ad7ce55aebb250598
Headers show

Comments

Joshua Lock - March 3, 2012, 12:39 a.m.
Use the new HobInfoButton widget in place of the existing gtk.Image with
tooltip.

Modify the markup of the tooltip so that the link to the reference manual
is a clickable hyperlink.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
---
 lib/bb/ui/crumbs/imageconfigurationpage.py |   12 ++++--------
 1 files changed, 4 insertions(+), 8 deletions(-)
Shane Wang - March 5, 2012, 10:32 p.m.
Joshua Lock wrote onĀ 2012-03-02:

> Use the new HobInfoButton widget in place of the existing gtk.Image with
> tooltip.
> 
> Modify the markup of the tooltip so that the link to the reference manual
> is a clickable hyperlink.
> 
> Signed-off-by: Joshua Lock <josh@linux.intel.com>

ACK

--
Shane

Patch

diff --git a/lib/bb/ui/crumbs/imageconfigurationpage.py b/lib/bb/ui/crumbs/imageconfigurationpage.py
index db54d79..f029bf8 100644
--- a/lib/bb/ui/crumbs/imageconfigurationpage.py
+++ b/lib/bb/ui/crumbs/imageconfigurationpage.py
@@ -24,7 +24,7 @@  import gtk
 import glib
 from bb.ui.crumbs.progressbar import HobProgressBar
 from bb.ui.crumbs.hobcolor import HobColors
-from bb.ui.crumbs.hobwidget import hic, HobXpmLabelButtonBox
+from bb.ui.crumbs.hobwidget import hic, HobXpmLabelButtonBox, HobInfoButton
 from bb.ui.crumbs.hoblistmodel import RecipeListModel
 from bb.ui.crumbs.hobpages import HobPage
 
@@ -137,16 +137,12 @@  class ImageConfigurationPage (HobPage):
             "Layers", "Add support for machines, software, etc")
         self.layer_button.connect("button-release-event", self.layer_button_clicked_cb)
 
-        icon_file = hic.ICON_INFO_DISPLAY_FILE
-        self.layer_info_icon = gtk.Image()
-        pix_buffer = gtk.gdk.pixbuf_new_from_file(icon_file)
-        self.layer_info_icon.set_from_pixbuf(pix_buffer)
         markup = "Layers are a powerful mechanism to extend the Yocto Project "
         markup += "with your own functionality.\n"
-        markup += "For more on layers, check:\n"
+        markup += "For more on layers, check the <a href=\""
         markup += "http://www.yoctoproject.org/docs/current/poky-ref-manual/"
-        markup += "poky-ref-manual.html#usingpoky-changes-layers."
-        self.layer_info_icon.set_tooltip_markup(markup)
+        markup += "poky-ref-manual.html#usingpoky-changes-layers\">reference manual</a>."
+        self.layer_info_icon = HobInfoButton(markup, self.get_parent())
 
         self.progress_bar = HobProgressBar()
         self.machine_separator = gtk.HSeparator()