From: Cristian Iorga Date: Tue, 16 Oct 2012 08:52:38 +0000 (+0300) Subject: bitbake: bitbake: hob/hobwidget: "Brought in by" column is now displayed correctly X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4a3b0d7287ba7ce223021d33895bf5c953f1e4dc;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git bitbake: bitbake: hob/hobwidget: "Brought in by" column is now displayed correctly In "Edit Recipes" and "Edit packages" pages, the "Brought in by" column is displayed correctly, with the right number of additional packages and a proper title. Fixes [YOCTO #2195]. (Bitbake rev: 4d1d3e5a54eb718e2eee02f734d929f15ccf99ce) Signed-off-by: Cristian Iorga Signed-off-by: Richard Purdie --- diff --git a/bitbake/lib/bb/ui/crumbs/hobwidget.py b/bitbake/lib/bb/ui/crumbs/hobwidget.py index 28dc375da54..65de9df78fc 100644 --- a/bitbake/lib/bb/ui/crumbs/hobwidget.py +++ b/bitbake/lib/bb/ui/crumbs/hobwidget.py @@ -155,9 +155,15 @@ class HobViewTable (gtk.VBox): bin = binb.split(', ') total_no = len(bin) if total_no > 1 and bin[0] == "User Selected": - present_binb = bin[1] + ' (+' + str(total_no) + ')' + if total_no > 2: + present_binb = bin[1] + ' (+' + str(total_no - 1) + ')' + else: + present_binb = bin[1] else: - present_binb = bin[0] + ' (+' + str(total_no) + ')' + if total_no > 1: + present_binb = bin[0] + ' (+' + str(total_no - 1) + ')' + else: + present_binb = bin[0] cell.set_property('text', present_binb) else: cell.set_property('text', "") diff --git a/bitbake/lib/bb/ui/crumbs/packageselectionpage.py b/bitbake/lib/bb/ui/crumbs/packageselectionpage.py index 8eb388e57c8..17b1dfe3c4e 100755 --- a/bitbake/lib/bb/ui/crumbs/packageselectionpage.py +++ b/bitbake/lib/bb/ui/crumbs/packageselectionpage.py @@ -52,7 +52,7 @@ class PackageSelectionPage (HobPage): 'col_max' : 300, 'expand' : 'True' }, { - 'col_name' : 'Brought in by', + 'col_name' : 'Brought in by (+others)', 'col_id' : PackageListModel.COL_BINB, 'col_style': 'binb', 'col_min' : 100, diff --git a/bitbake/lib/bb/ui/crumbs/recipeselectionpage.py b/bitbake/lib/bb/ui/crumbs/recipeselectionpage.py index 79c7790819e..fea92b51485 100755 --- a/bitbake/lib/bb/ui/crumbs/recipeselectionpage.py +++ b/bitbake/lib/bb/ui/crumbs/recipeselectionpage.py @@ -52,7 +52,7 @@ class RecipeSelectionPage (HobPage): 'col_max' : 300, 'expand' : 'True' }, { - 'col_name' : 'Brought in by', + 'col_name' : 'Brought in by (+others)', 'col_id' : RecipeListModel.COL_BINB, 'col_style': 'binb', 'col_min' : 100,