* [PATCH 1/4] lib/bb/ui/crumbs: only display one 'Brought in by' item in Hob trees
2012-04-06 23:18 [PATCH 0/4] Hob tweaks Joshua Lock
@ 2012-04-06 23:18 ` Joshua Lock
2012-04-06 23:18 ` [PATCH 2/4] lib/bb/ui/crumbs/recipeselectionpage: include 'Group' in 'Included' view Joshua Lock
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Joshua Lock @ 2012-04-06 23:18 UTC (permalink / raw)
To: bitbake-devel
The design calls for a single 'Brought in by' item to be shown in the
tree views with any extra items to be shown in the tooltip.
Signed-off-by: Joshua Lock <josh@linux.intel.com>
---
lib/bb/ui/crumbs/hobwidget.py | 13 +++++++++++++
lib/bb/ui/crumbs/packageselectionpage.py | 2 +-
lib/bb/ui/crumbs/recipeselectionpage.py | 2 +-
3 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/lib/bb/ui/crumbs/hobwidget.py b/lib/bb/ui/crumbs/hobwidget.py
index edb85db..3f6dd34 100644
--- a/lib/bb/ui/crumbs/hobwidget.py
+++ b/lib/bb/ui/crumbs/hobwidget.py
@@ -150,6 +150,10 @@ class HobViewTable (gtk.VBox):
col.pack_end(cell, True)
col.set_attributes(cell, active=column['col_id'])
self.toggle_columns.append(column['col_name'])
+ elif column['col_style'] == 'binb':
+ cell = gtk.CellRendererText()
+ col.pack_start(cell, True)
+ col.set_cell_data_func(cell, self.display_binb_cb, column['col_id'])
scroll = gtk.ScrolledWindow()
scroll.set_policy(gtk.POLICY_NEVER, gtk.POLICY_ALWAYS)
@@ -157,6 +161,15 @@ class HobViewTable (gtk.VBox):
scroll.add(self.table_tree)
self.pack_start(scroll, True, True, 0)
+ def display_binb_cb(self, col, cell, model, it, col_id):
+ binb = model.get_value(it, col_id)
+ # Just display the first item
+ if binb:
+ bin = binb.split(', ')
+ cell.set_property('text', bin[0])
+
+ return True
+
def set_model(self, tree_model):
self.table_tree.set_model(tree_model)
diff --git a/lib/bb/ui/crumbs/packageselectionpage.py b/lib/bb/ui/crumbs/packageselectionpage.py
index 7926636..78963f6 100755
--- a/lib/bb/ui/crumbs/packageselectionpage.py
+++ b/lib/bb/ui/crumbs/packageselectionpage.py
@@ -45,7 +45,7 @@ class PackageSelectionPage (HobPage):
}, {
'col_name' : 'Brought in by',
'col_id' : PackageListModel.COL_BINB,
- 'col_style': 'text',
+ 'col_style': 'binb',
'col_min' : 100,
'col_max' : 350
}, {
diff --git a/lib/bb/ui/crumbs/recipeselectionpage.py b/lib/bb/ui/crumbs/recipeselectionpage.py
index e4616a8..956b02d 100755
--- a/lib/bb/ui/crumbs/recipeselectionpage.py
+++ b/lib/bb/ui/crumbs/recipeselectionpage.py
@@ -45,7 +45,7 @@ class RecipeSelectionPage (HobPage):
}, {
'col_name' : 'Brought in by',
'col_id' : RecipeListModel.COL_BINB,
- 'col_style': 'text',
+ 'col_style': 'binb',
'col_min' : 100,
'col_max' : 500
}, {
--
1.7.7.6
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH 3/4] lib/bb/ui/crumbs/[recipe|package]selectionpage: fixed width Included col
2012-04-06 23:18 [PATCH 0/4] Hob tweaks Joshua Lock
2012-04-06 23:18 ` [PATCH 1/4] lib/bb/ui/crumbs: only display one 'Brought in by' item in Hob trees Joshua Lock
2012-04-06 23:18 ` [PATCH 2/4] lib/bb/ui/crumbs/recipeselectionpage: include 'Group' in 'Included' view Joshua Lock
@ 2012-04-06 23:18 ` Joshua Lock
2012-04-06 23:18 ` [PATCH 4/4] selectionpage: show persistent tooltips on click Joshua Lock
2012-04-10 22:48 ` [PATCH 0/4] Hob tweaks Richard Purdie
4 siblings, 0 replies; 6+ messages in thread
From: Joshua Lock @ 2012-04-06 23:18 UTC (permalink / raw)
To: bitbake-devel
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@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
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH 4/4] selectionpage: show persistent tooltips on click
2012-04-06 23:18 [PATCH 0/4] Hob tweaks Joshua Lock
` (2 preceding siblings ...)
2012-04-06 23:18 ` [PATCH 3/4] lib/bb/ui/crumbs/[recipe|package]selectionpage: fixed width Included col Joshua Lock
@ 2012-04-06 23:18 ` Joshua Lock
2012-04-10 22:48 ` [PATCH 0/4] Hob tweaks Richard Purdie
4 siblings, 0 replies; 6+ messages in thread
From: Joshua Lock @ 2012-04-06 23:18 UTC (permalink / raw)
To: bitbake-devel
Requiring a double click to show the tooltips isn't very intuitive, add
a callback to show the persistent tooltips on button release.
Signed-off-by: Joshua Lock <josh@linux.intel.com>
---
lib/bb/ui/crumbs/packageselectionpage.py | 13 ++++++++-----
lib/bb/ui/crumbs/recipeselectionpage.py | 13 ++++++++-----
2 files changed, 16 insertions(+), 10 deletions(-)
diff --git a/lib/bb/ui/crumbs/packageselectionpage.py b/lib/bb/ui/crumbs/packageselectionpage.py
index b1a199c..81ff76d 100755
--- a/lib/bb/ui/crumbs/packageselectionpage.py
+++ b/lib/bb/ui/crumbs/packageselectionpage.py
@@ -117,7 +117,7 @@ class PackageSelectionPage (HobPage):
tab.set_model(self.package_model.tree_model(filter))
tab.connect("toggled", self.table_toggled_cb)
if page['name'] == "Included":
- tab.connect("row-activated", self.tree_row_activated_cb)
+ tab.connect("button-release-event", self.button_click_cb)
label = gtk.Label(page['name'])
self.ins.append_page(tab, label)
@@ -146,10 +146,13 @@ class PackageSelectionPage (HobPage):
self.back_button.connect("clicked", self.back_button_clicked_cb)
button_box.pack_start(self.back_button, expand=False, fill=False)
- def tree_row_activated_cb(self, table, tree_model, path):
- binb = tree_model.get_value(tree_model.get_iter(path), PackageListModel.COL_BINB)
- if binb:
- self.builder.show_binb_dialog(binb)
+ def button_click_cb(self, widget, event):
+ path, col = widget.table_tree.get_cursor()
+ tree_model = widget.table_tree.get_model()
+ if path: # else activation is likely a removal
+ binb = tree_model.get_value(tree_model.get_iter(path), PackageListModel.COL_BINB)
+ if binb:
+ self.builder.show_binb_dialog(binb)
def build_image_clicked_cb(self, button):
self.builder.build_image()
diff --git a/lib/bb/ui/crumbs/recipeselectionpage.py b/lib/bb/ui/crumbs/recipeselectionpage.py
index d70fe52..019f9f3 100755
--- a/lib/bb/ui/crumbs/recipeselectionpage.py
+++ b/lib/bb/ui/crumbs/recipeselectionpage.py
@@ -148,7 +148,7 @@ class RecipeSelectionPage (HobPage):
tab.set_model(self.recipe_model.tree_model(filter))
tab.connect("toggled", self.table_toggled_cb)
if page['name'] == "Included":
- tab.connect("row-activated", self.tree_row_activated_cb)
+ tab.connect("button-release-event", self.button_click_cb)
label = gtk.Label(page['name'])
self.ins.append_page(tab, label)
@@ -177,10 +177,13 @@ class RecipeSelectionPage (HobPage):
self.back_button.connect("clicked", self.back_button_clicked_cb)
button_box.pack_start(self.back_button, expand=False, fill=False)
- def tree_row_activated_cb(self, table, tree_model, path):
- binb = tree_model.get_value(tree_model.get_iter(path), RecipeListModel.COL_BINB)
- if binb:
- self.builder.show_binb_dialog(binb)
+ def button_click_cb(self, widget, event):
+ path, col = widget.table_tree.get_cursor()
+ tree_model = widget.table_tree.get_model()
+ if path: # else activation is likely a removal
+ binb = tree_model.get_value(tree_model.get_iter(path), RecipeListModel.COL_BINB)
+ if binb:
+ self.builder.show_binb_dialog(binb)
def build_packages_clicked_cb(self, button):
self.builder.build_packages()
--
1.7.7.6
^ permalink raw reply related [flat|nested] 6+ messages in thread