[bitbake-devel] [PATCH 3/4] lib/bb/ui/crumbs/[recipe|package]selectionpage: fixed width Included col

Joshua Lock josh at linux.intel.com
Fri Apr 6 23:18:35 UTC 2012


Set the expand property on all columns other than the 'Included' column
so that the included column remains at the max size set.

Signed-off-by: Joshua Lock <josh at linux.intel.com>
---
 lib/bb/ui/crumbs/hobwidget.py            |    2 +
 lib/bb/ui/crumbs/packageselectionpage.py |   23 +++++++++++-------
 lib/bb/ui/crumbs/recipeselectionpage.py  |   36 ++++++++++++++++++-----------
 3 files changed, 38 insertions(+), 23 deletions(-)

diff --git a/lib/bb/ui/crumbs/hobwidget.py b/lib/bb/ui/crumbs/hobwidget.py
index 3f6dd34..9ea70ad 100644
--- a/lib/bb/ui/crumbs/hobwidget.py
+++ b/lib/bb/ui/crumbs/hobwidget.py
@@ -127,6 +127,8 @@ class HobViewTable (gtk.VBox):
                 col.set_min_width(column['col_min'])
             if 'col_max' in column.keys():
                 col.set_max_width(column['col_max'])
+            if 'expand' in column.keys():
+                col.set_expand(True)
             self.table_tree.append_column(col)
 
             if (not 'col_style' in column.keys()) or column['col_style'] == 'text':
diff --git a/lib/bb/ui/crumbs/packageselectionpage.py b/lib/bb/ui/crumbs/packageselectionpage.py
index 78963f6..b1a199c 100755
--- a/lib/bb/ui/crumbs/packageselectionpage.py
+++ b/lib/bb/ui/crumbs/packageselectionpage.py
@@ -41,25 +41,28 @@ class PackageSelectionPage (HobPage):
                        'col_id'   : PackageListModel.COL_NAME,
                        'col_style': 'text',
                        'col_min'  : 100,
-                       'col_max'  : 300
+                       'col_max'  : 300,
+                       'expand'   : 'True'
                       }, {
                        'col_name' : 'Brought in by',
                        'col_id'   : PackageListModel.COL_BINB,
                        'col_style': 'binb',
                        'col_min'  : 100,
-                       'col_max'  : 350
+                       'col_max'  : 350,
+                       'expand'   : 'True'
                       }, {
                        'col_name' : 'Size',
                        'col_id'   : PackageListModel.COL_SIZE,
                        'col_style': 'text',
                        'col_min'  : 100,
-                       'col_max'  : 300
+                       'col_max'  : 300,
+                       'expand'   : 'True'
                       }, {
                        'col_name' : 'Included',
                        'col_id'   : PackageListModel.COL_INC,
                        'col_style': 'check toggle',
-                       'col_min'  : 50,
-                       'col_max'  : 50
+                       'col_min'  : 100,
+                       'col_max'  : 100
                      }]
         }, {
          'name'    : 'All packages',
@@ -69,19 +72,21 @@ class PackageSelectionPage (HobPage):
                        'col_id'   : PackageListModel.COL_NAME,
                        'col_style': 'text',
                        'col_min'  : 100,
-                       'col_max'  : 400
+                       'col_max'  : 400,
+                       'expand'   : 'True'
                       }, {
                        'col_name' : 'Size',
                        'col_id'   : PackageListModel.COL_SIZE,
                        'col_style': 'text',
                        'col_min'  : 100,
-                       'col_max'  : 500
+                       'col_max'  : 500,
+                       'expand'   : 'True'
                       }, {
                        'col_name' : 'Included',
                        'col_id'   : PackageListModel.COL_INC,
                        'col_style': 'check toggle',
-                       'col_min'  : 50,
-                       'col_max'  : 50
+                       'col_min'  : 100,
+                       'col_max'  : 100
                       }]
         }
     ]
diff --git a/lib/bb/ui/crumbs/recipeselectionpage.py b/lib/bb/ui/crumbs/recipeselectionpage.py
index 8314449..d70fe52 100755
--- a/lib/bb/ui/crumbs/recipeselectionpage.py
+++ b/lib/bb/ui/crumbs/recipeselectionpage.py
@@ -41,25 +41,28 @@ class RecipeSelectionPage (HobPage):
                        'col_id'   : RecipeListModel.COL_NAME,
                        'col_style': 'text',
                        'col_min'  : 100,
-                       'col_max'  : 400
+                       'col_max'  : 400,
+                       'expand'   : 'True'
                       }, {
                        'col_name' : 'Brought in by',
                        'col_id'   : RecipeListModel.COL_BINB,
                        'col_style': 'binb',
                        'col_min'  : 100,
-                       'col_max'  : 500
+                       'col_max'  : 500,
+                       'expand'   : 'True'
                       }, {
                        'col_name' : 'Group',
                        'col_id'   : RecipeListModel.COL_GROUP,
                        'col_style': 'text',
                        'col_min'  : 100,
-                       'col_max'  : 300
+                       'col_max'  : 300,
+                       'expand'   : 'True'
                       }, {
                        'col_name' : 'Included',
                        'col_id'   : RecipeListModel.COL_INC,
                        'col_style': 'check toggle',
-                       'col_min'  : 50,
-                       'col_max'  : 50
+                       'col_min'  : 100,
+                       'col_max'  : 100
                       }]
         }, {
          'name'    : 'All recipes',
@@ -69,25 +72,28 @@ class RecipeSelectionPage (HobPage):
                        'col_id'   : RecipeListModel.COL_NAME,
                        'col_style': 'text',
                        'col_min'  : 100,
-                       'col_max'  : 400
+                       'col_max'  : 400,
+                       'expand'   : 'True'
                       }, {
                        'col_name' : 'License',
                        'col_id'   : RecipeListModel.COL_LIC,
                        'col_style': 'text',
                        'col_min'  : 100,
-                       'col_max'  : 400
+                       'col_max'  : 400,
+                       'expand'   : 'True'
                       }, {
                        'col_name' : 'Group',
                        'col_id'   : RecipeListModel.COL_GROUP,
                        'col_style': 'text',
                        'col_min'  : 100,
-                       'col_max'  : 400
+                       'col_max'  : 400,
+                       'expand'   : 'True'
                       }, {
                        'col_name' : 'Included',
                        'col_id'   : RecipeListModel.COL_INC,
                        'col_style': 'check toggle',
-                       'col_min'  : 50,
-                       'col_max'  : 50
+                       'col_min'  : 100,
+                       'col_max'  : 100
                       }]
         }, {
          'name'    : 'Tasks',
@@ -97,19 +103,21 @@ class RecipeSelectionPage (HobPage):
                        'col_id'   : RecipeListModel.COL_NAME,
                        'col_style': 'text',
                        'col_min'  : 100,
-                       'col_max'  : 400
+                       'col_max'  : 400,
+                       'expand'   : 'True'
                       }, {
                        'col_name' : 'Description',
                        'col_id'   : RecipeListModel.COL_DESC,
                        'col_style': 'text',
                        'col_min'  : 100,
-                       'col_max'  : 400
+                       'col_max'  : 400,
+                       'expand'   : 'True'
                       }, {
                        'col_name' : 'Included',
                        'col_id'   : RecipeListModel.COL_INC,
                        'col_style': 'check toggle',
-                       'col_min'  : 50,
-                       'col_max'  : 50
+                       'col_min'  : 100,
+                       'col_max'  : 100
                       }]
         }
     ]
-- 
1.7.7.6





More information about the bitbake-devel mailing list