Patchwork [bitbake-devel,2/6] ui/crumbs: remove unused return value from append_toolbar_button

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

Comments

Joshua Lock - March 20, 2012, 12:18 a.m.
No caller of the method uses the returned toolbar variable

Signed-off-by: Joshua Lock <josh@linux.intel.com>
---
 lib/bb/ui/crumbs/hobpages.py               |    2 +-
 lib/bb/ui/crumbs/imageconfigurationpage.py |    6 +++---
 lib/bb/ui/crumbs/imagedetailspage.py       |    2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)
Dongxiao Xu - March 20, 2012, 5:30 a.m.
On Mon, 2012-03-19 at 17:18 -0700, Joshua Lock wrote:
> No caller of the method uses the returned toolbar variable
> 
> Signed-off-by: Joshua Lock <josh@linux.intel.com>
Acked-by: Dongxiao Xu <dongxiao.xu@intel.com>
> ---
>  lib/bb/ui/crumbs/hobpages.py               |    2 +-
>  lib/bb/ui/crumbs/imageconfigurationpage.py |    6 +++---
>  lib/bb/ui/crumbs/imagedetailspage.py       |    2 +-
>  3 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/lib/bb/ui/crumbs/hobpages.py b/lib/bb/ui/crumbs/hobpages.py
> index bd4b292..8137c0d 100755
> --- a/lib/bb/ui/crumbs/hobpages.py
> +++ b/lib/bb/ui/crumbs/hobpages.py
> @@ -84,4 +84,4 @@ class HobPage (gtk.VBox):
>          button = toolbar.append_element(gtk.TOOLBAR_CHILD_RADIOBUTTON, None,
>                       buttonname, tip_text, "Private text", icon,
>                       cb, None)
> -        return toolbar, button
> +        return button
> diff --git a/lib/bb/ui/crumbs/imageconfigurationpage.py b/lib/bb/ui/crumbs/imageconfigurationpage.py
> index c8f7a56..b0c5daa 100644
> --- a/lib/bb/ui/crumbs/imageconfigurationpage.py
> +++ b/lib/bb/ui/crumbs/imageconfigurationpage.py
> @@ -45,19 +45,19 @@ class ImageConfigurationPage (HobPage):
>          self.toolbar.set_orientation(gtk.ORIENTATION_HORIZONTAL)
>          self.toolbar.set_style(gtk.TOOLBAR_BOTH)
>  
> -        _, template_button = self.append_toolbar_button(self.toolbar,
> +        template_button = self.append_toolbar_button(self.toolbar,
>              "Template",
>              hic.ICON_TEMPLATES_DISPLAY_FILE,
>              hic.ICON_TEMPLATES_HOVER_FILE,
>              "Load a hob building template saved before",
>              self.template_button_clicked_cb)
> -        _, my_images_button = self.append_toolbar_button(self.toolbar,
> +        my_images_button = self.append_toolbar_button(self.toolbar,
>              "My images",
>              hic.ICON_IMAGES_DISPLAY_FILE,
>              hic.ICON_IMAGES_HOVER_FILE,
>              "Open images built out previously for running or deployment",
>              self.my_images_button_clicked_cb)
> -        _, settings_button = self.append_toolbar_button(self.toolbar,
> +        settings_button = self.append_toolbar_button(self.toolbar,
>              "Settings",
>              hic.ICON_SETTINGS_DISPLAY_FILE,
>              hic.ICON_SETTINGS_HOVER_FILE,
> diff --git a/lib/bb/ui/crumbs/imagedetailspage.py b/lib/bb/ui/crumbs/imagedetailspage.py
> index c063d74..0159d15 100755
> --- a/lib/bb/ui/crumbs/imagedetailspage.py
> +++ b/lib/bb/ui/crumbs/imagedetailspage.py
> @@ -122,7 +122,7 @@ class ImageDetailsPage (HobPage):
>          self.toolbar.set_orientation(gtk.ORIENTATION_HORIZONTAL)
>          self.toolbar.set_style(gtk.TOOLBAR_BOTH)
>  
> -        _, my_images_button = self.append_toolbar_button(self.toolbar,
> +        my_images_button = self.append_toolbar_button(self.toolbar,
>              "My images",
>              hic.ICON_IMAGES_DISPLAY_FILE,
>              hic.ICON_IMAGES_HOVER_FILE,

Patch

diff --git a/lib/bb/ui/crumbs/hobpages.py b/lib/bb/ui/crumbs/hobpages.py
index bd4b292..8137c0d 100755
--- a/lib/bb/ui/crumbs/hobpages.py
+++ b/lib/bb/ui/crumbs/hobpages.py
@@ -84,4 +84,4 @@  class HobPage (gtk.VBox):
         button = toolbar.append_element(gtk.TOOLBAR_CHILD_RADIOBUTTON, None,
                      buttonname, tip_text, "Private text", icon,
                      cb, None)
-        return toolbar, button
+        return button
diff --git a/lib/bb/ui/crumbs/imageconfigurationpage.py b/lib/bb/ui/crumbs/imageconfigurationpage.py
index c8f7a56..b0c5daa 100644
--- a/lib/bb/ui/crumbs/imageconfigurationpage.py
+++ b/lib/bb/ui/crumbs/imageconfigurationpage.py
@@ -45,19 +45,19 @@  class ImageConfigurationPage (HobPage):
         self.toolbar.set_orientation(gtk.ORIENTATION_HORIZONTAL)
         self.toolbar.set_style(gtk.TOOLBAR_BOTH)
 
-        _, template_button = self.append_toolbar_button(self.toolbar,
+        template_button = self.append_toolbar_button(self.toolbar,
             "Template",
             hic.ICON_TEMPLATES_DISPLAY_FILE,
             hic.ICON_TEMPLATES_HOVER_FILE,
             "Load a hob building template saved before",
             self.template_button_clicked_cb)
-        _, my_images_button = self.append_toolbar_button(self.toolbar,
+        my_images_button = self.append_toolbar_button(self.toolbar,
             "My images",
             hic.ICON_IMAGES_DISPLAY_FILE,
             hic.ICON_IMAGES_HOVER_FILE,
             "Open images built out previously for running or deployment",
             self.my_images_button_clicked_cb)
-        _, settings_button = self.append_toolbar_button(self.toolbar,
+        settings_button = self.append_toolbar_button(self.toolbar,
             "Settings",
             hic.ICON_SETTINGS_DISPLAY_FILE,
             hic.ICON_SETTINGS_HOVER_FILE,
diff --git a/lib/bb/ui/crumbs/imagedetailspage.py b/lib/bb/ui/crumbs/imagedetailspage.py
index c063d74..0159d15 100755
--- a/lib/bb/ui/crumbs/imagedetailspage.py
+++ b/lib/bb/ui/crumbs/imagedetailspage.py
@@ -122,7 +122,7 @@  class ImageDetailsPage (HobPage):
         self.toolbar.set_orientation(gtk.ORIENTATION_HORIZONTAL)
         self.toolbar.set_style(gtk.TOOLBAR_BOTH)
 
-        _, my_images_button = self.append_toolbar_button(self.toolbar,
+        my_images_button = self.append_toolbar_button(self.toolbar,
             "My images",
             hic.ICON_IMAGES_DISPLAY_FILE,
             hic.ICON_IMAGES_HOVER_FILE,