diff options
Diffstat (limited to 'bitbake/lib/bb/ui/crumbs/recipeselectionpage.py')
-rwxr-xr-x | bitbake/lib/bb/ui/crumbs/recipeselectionpage.py | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/recipeselectionpage.py b/bitbake/lib/bb/ui/crumbs/recipeselectionpage.py index 9c138b2d66..ffe310aa81 100755 --- a/bitbake/lib/bb/ui/crumbs/recipeselectionpage.py +++ b/bitbake/lib/bb/ui/crumbs/recipeselectionpage.py | |||
@@ -162,15 +162,8 @@ class RecipeSelectionPage (HobPage): | |||
162 | sort_model = self.recipe_model.tree_model(filter, initial=True) | 162 | sort_model = self.recipe_model.tree_model(filter, initial=True) |
163 | tab.set_model(sort_model) | 163 | tab.set_model(sort_model) |
164 | tab.connect("toggled", self.table_toggled_cb, name) | 164 | tab.connect("toggled", self.table_toggled_cb, name) |
165 | if name == "Included recipes": | 165 | tab.connect("button-release-event", self.button_click_cb) |
166 | tab.connect("button-release-event", self.button_click_cb) | 166 | tab.connect("cell-fadeinout-stopped", self.after_fadeout_checkin_include, filter) |
167 | tab.connect("cell-fadeinout-stopped", self.after_fadeout_checkin_include) | ||
168 | if name == "Package Groups": | ||
169 | tab.connect("button-release-event", self.button_click_cb) | ||
170 | tab.connect("cell-fadeinout-stopped", self.after_fadeout_checkin_include) | ||
171 | if name == "All recipes": | ||
172 | tab.connect("button-release-event", self.button_click_cb) | ||
173 | tab.connect("cell-fadeinout-stopped", self.button_click_cb) | ||
174 | self.ins.append_page(tab, page['name'], page['tooltip']) | 167 | self.ins.append_page(tab, page['name'], page['tooltip']) |
175 | self.tables.append(tab) | 168 | self.tables.append(tab) |
176 | 169 | ||
@@ -270,12 +263,9 @@ class RecipeSelectionPage (HobPage): | |||
270 | if not self.recipe_model.path_included(path): | 263 | if not self.recipe_model.path_included(path): |
271 | self.recipe_model.include_item(item_path=path, binb="User Selected", image_contents=False) | 264 | self.recipe_model.include_item(item_path=path, binb="User Selected", image_contents=False) |
272 | else: | 265 | else: |
273 | if pagename == "Included recipes": | 266 | self.pre_fadeout_checkout_include(view_tree, pagename) |
274 | self.pre_fadeout_checkout_include(view_tree) | 267 | self.recipe_model.exclude_item(item_path=path) |
275 | self.recipe_model.exclude_item(item_path=path) | 268 | self.render_fadeout(view_tree, cell) |
276 | self.render_fadeout(view_tree, cell) | ||
277 | else: | ||
278 | self.recipe_model.exclude_item(item_path=path) | ||
279 | 269 | ||
280 | self.refresh_selection() | 270 | self.refresh_selection() |
281 | if not self.builder.customized: | 271 | if not self.builder.customized: |
@@ -285,6 +275,10 @@ class RecipeSelectionPage (HobPage): | |||
285 | 275 | ||
286 | self.builder.window_sensitive(True) | 276 | self.builder.window_sensitive(True) |
287 | 277 | ||
278 | view_model = view_tree.get_model() | ||
279 | vpath = self.recipe_model.convert_path_to_vpath(view_model, path) | ||
280 | view_tree.set_cursor(vpath) | ||
281 | |||
288 | def table_toggled_cb(self, table, cell, view_path, toggled_columnid, view_tree, pagename): | 282 | def table_toggled_cb(self, table, cell, view_path, toggled_columnid, view_tree, pagename): |
289 | # Click to include a recipe | 283 | # Click to include a recipe |
290 | self.builder.window_sensitive(False) | 284 | self.builder.window_sensitive(False) |
@@ -292,7 +286,7 @@ class RecipeSelectionPage (HobPage): | |||
292 | path = self.recipe_model.convert_vpath_to_path(view_model, view_path) | 286 | path = self.recipe_model.convert_vpath_to_path(view_model, view_path) |
293 | glib.idle_add(self.toggle_item_idle_cb, path, view_tree, cell, pagename) | 287 | glib.idle_add(self.toggle_item_idle_cb, path, view_tree, cell, pagename) |
294 | 288 | ||
295 | def pre_fadeout_checkout_include(self, tree): | 289 | def pre_fadeout_checkout_include(self, tree, pagename): |
296 | #resync the included items to a backup fade include column | 290 | #resync the included items to a backup fade include column |
297 | it = self.recipe_model.get_iter_first() | 291 | it = self.recipe_model.get_iter_first() |
298 | while it: | 292 | while it: |
@@ -301,8 +295,14 @@ class RecipeSelectionPage (HobPage): | |||
301 | it = self.recipe_model.iter_next(it) | 295 | it = self.recipe_model.iter_next(it) |
302 | # Check out a model which base on the column COL_FADE_INC, | 296 | # Check out a model which base on the column COL_FADE_INC, |
303 | # it's save the prev state of column COL_INC before do exclude_item | 297 | # it's save the prev state of column COL_INC before do exclude_item |
304 | filter = { RecipeListModel.COL_FADE_INC : [True], | 298 | filter = { RecipeListModel.COL_FADE_INC:[True] } |
305 | RecipeListModel.COL_TYPE : ['recipe', 'packagegroup'] } | 299 | if pagename == "Included recipes": |
300 | filter[RecipeListModel.COL_TYPE] = ['recipe', 'packagegroup'] | ||
301 | elif pagename == "All recipes": | ||
302 | filter[RecipeListModel.COL_TYPE] = ['recipe'] | ||
303 | else: | ||
304 | filter[RecipeListModel.COL_TYPE] = ['packagegroup'] | ||
305 | |||
306 | new_model = self.recipe_model.tree_model(filter, excluded_items_ahead=True) | 306 | new_model = self.recipe_model.tree_model(filter, excluded_items_ahead=True) |
307 | tree.set_model(new_model) | 307 | tree.set_model(new_model) |
308 | 308 | ||
@@ -322,8 +322,8 @@ class RecipeSelectionPage (HobPage): | |||
322 | 322 | ||
323 | cell.fadeout(tree, 1000, to_render_cells) | 323 | cell.fadeout(tree, 1000, to_render_cells) |
324 | 324 | ||
325 | def after_fadeout_checkin_include(self, table, ctrl, cell, tree): | 325 | def after_fadeout_checkin_include(self, table, ctrl, cell, tree, filter): |
326 | tree.set_model(self.recipe_model.tree_model(self.pages[0]['filter'])) | 326 | tree.set_model(self.recipe_model.tree_model(filter)) |
327 | 327 | ||
328 | def set_recipe_curr_tab(self, curr_page): | 328 | def set_recipe_curr_tab(self, curr_page): |
329 | self.ins.set_current_page(curr_page) | 329 | self.ins.set_current_page(curr_page) |