Patchwork [bitbake-devel,3/6] ui/crumbs/hobpage: no need to force a Toolbar button type

login
register
mail settings
Submitter Joshua Lock
Date March 20, 2012, 12:18 a.m.
Message ID <99b9fe836c07c12a36a9944331f89bbba4d46280.1332202341.git.josh@linux.intel.com>
Download mbox | patch
Permalink /patch/23831/
State Accepted
Commit 6491b5fd877d6006ebc91e0c73d443a6e7626f3f
Headers show

Comments

Joshua Lock - March 20, 2012, 12:18 a.m.
This uses a more concise API that will be more flexible whent he Toolbar
style is updated to match the visual design.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
---
 lib/bb/ui/crumbs/hobpages.py |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
Dongxiao Xu - March 20, 2012, 5:49 a.m.
On Mon, 2012-03-19 at 17:18 -0700, Joshua Lock wrote:
> This uses a more concise API that will be more flexible whent he Toolbar
> style is updated to match the visual design.
> 

Acked-by: Dongxiao Xu <dongxiao.xu@intel.com>

> Signed-off-by: Joshua Lock <josh@linux.intel.com>
> ---
>  lib/bb/ui/crumbs/hobpages.py |    4 +---
>  1 files changed, 1 insertions(+), 3 deletions(-)
> 
> diff --git a/lib/bb/ui/crumbs/hobpages.py b/lib/bb/ui/crumbs/hobpages.py
> index 8137c0d..baf250b 100755
> --- a/lib/bb/ui/crumbs/hobpages.py
> +++ b/lib/bb/ui/crumbs/hobpages.py
> @@ -81,7 +81,5 @@ class HobPage (gtk.VBox):
>          pix_buffer = gtk.gdk.pixbuf_new_from_file(icon_display)
>          icon.set_from_pixbuf(pix_buffer)
>          tip_text = tip
> -        button = toolbar.append_element(gtk.TOOLBAR_CHILD_RADIOBUTTON, None,
> -                     buttonname, tip_text, "Private text", icon,
> -                     cb, None)
> +        button = toolbar.append_item(buttonname, tip, None, icon, cb)
>          return button

Patch

diff --git a/lib/bb/ui/crumbs/hobpages.py b/lib/bb/ui/crumbs/hobpages.py
index 8137c0d..baf250b 100755
--- a/lib/bb/ui/crumbs/hobpages.py
+++ b/lib/bb/ui/crumbs/hobpages.py
@@ -81,7 +81,5 @@  class HobPage (gtk.VBox):
         pix_buffer = gtk.gdk.pixbuf_new_from_file(icon_display)
         icon.set_from_pixbuf(pix_buffer)
         tip_text = tip
-        button = toolbar.append_element(gtk.TOOLBAR_CHILD_RADIOBUTTON, None,
-                     buttonname, tip_text, "Private text", icon,
-                     cb, None)
+        button = toolbar.append_item(buttonname, tip, None, icon, cb)
         return button