summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/ui/crumbs/hobwidget.py
diff options
context:
space:
mode:
authorCristiana Voicu <cristiana.voicu@intel.com>2013-04-11 15:07:59 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-04-15 15:57:31 +0100
commit3cc69d34131351fc9eb8672a838002241af4d329 (patch)
tree73259cafbc673a91f986ae11d3083e89c72ec0fb /bitbake/lib/bb/ui/crumbs/hobwidget.py
parent612c25c59718d3b7a259ae72430544c2f6e369fc (diff)
downloadpoky-3cc69d34131351fc9eb8672a838002241af4d329.tar.gz
bitbake: hob: Refine sorting mechanisms in Hob
-refine sorting functions for each column from recipe list page and package list page -sort correctly size column from packages list page -set default sroting order and secondary sorting criteria -make included on included recipes/packages no sortable [YOCTO #2346 & #4194] (Bitbake rev: 56822176e3d5e613654a46c983d2f979d7a9eebc) Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/ui/crumbs/hobwidget.py')
-rw-r--r--bitbake/lib/bb/ui/crumbs/hobwidget.py16
1 files changed, 11 insertions, 5 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/hobwidget.py b/bitbake/lib/bb/ui/crumbs/hobwidget.py
index f482a26f6a..3707d6160d 100644
--- a/bitbake/lib/bb/ui/crumbs/hobwidget.py
+++ b/bitbake/lib/bb/ui/crumbs/hobwidget.py
@@ -83,7 +83,7 @@ class HobViewTable (gtk.VBox):
83 gobject.TYPE_PYOBJECT,)), 83 gobject.TYPE_PYOBJECT,)),
84 } 84 }
85 85
86 def __init__(self, columns): 86 def __init__(self, columns, name):
87 gtk.VBox.__init__(self, False, 6) 87 gtk.VBox.__init__(self, False, 6)
88 self.table_tree = gtk.TreeView() 88 self.table_tree = gtk.TreeView()
89 self.table_tree.set_headers_visible(True) 89 self.table_tree.set_headers_visible(True)
@@ -94,12 +94,18 @@ class HobViewTable (gtk.VBox):
94 self.toggle_columns = [] 94 self.toggle_columns = []
95 self.table_tree.connect("row-activated", self.row_activated_cb) 95 self.table_tree.connect("row-activated", self.row_activated_cb)
96 self.top_bar = None 96 self.top_bar = None
97 self.tab_name = name
97 98
98 for i, column in enumerate(columns): 99 for i, column in enumerate(columns):
99 col = gtk.TreeViewColumn(column['col_name']) 100 col_name = column['col_name']
101 col = gtk.TreeViewColumn(col_name)
100 col.set_clickable(True) 102 col.set_clickable(True)
101 col.set_resizable(True) 103 col.set_resizable(True)
102 col.set_sort_column_id(column['col_id']) 104 if self.tab_name.startswith('Included'):
105 if col_name!='Included':
106 col.set_sort_column_id(column['col_id'])
107 else:
108 col.set_sort_column_id(column['col_id'])
103 if 'col_min' in column.keys(): 109 if 'col_min' in column.keys():
104 col.set_min_width(column['col_min']) 110 col.set_min_width(column['col_min'])
105 if 'col_max' in column.keys(): 111 if 'col_max' in column.keys():
@@ -122,7 +128,7 @@ class HobViewTable (gtk.VBox):
122 self.toggle_id = i 128 self.toggle_id = i
123 col.pack_end(cell, True) 129 col.pack_end(cell, True)
124 col.set_attributes(cell, active=column['col_id']) 130 col.set_attributes(cell, active=column['col_id'])
125 self.toggle_columns.append(column['col_name']) 131 self.toggle_columns.append(col_name)
126 if 'col_group' in column.keys(): 132 if 'col_group' in column.keys():
127 col.set_cell_data_func(cell, self.set_group_number_cb) 133 col.set_cell_data_func(cell, self.set_group_number_cb)
128 elif column['col_style'] == 'radio toggle': 134 elif column['col_style'] == 'radio toggle':
@@ -133,7 +139,7 @@ class HobViewTable (gtk.VBox):
133 self.toggle_id = i 139 self.toggle_id = i
134 col.pack_end(cell, True) 140 col.pack_end(cell, True)
135 col.set_attributes(cell, active=column['col_id']) 141 col.set_attributes(cell, active=column['col_id'])
136 self.toggle_columns.append(column['col_name']) 142 self.toggle_columns.append(col_name)
137 elif column['col_style'] == 'binb': 143 elif column['col_style'] == 'binb':
138 cell = gtk.CellRendererText() 144 cell = gtk.CellRendererText()
139 col.pack_start(cell, True) 145 col.pack_start(cell, True)