diff options
author | Cristiana Voicu <cristiana.voicu@intel.com> | 2013-05-07 11:07:55 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-05-10 13:33:33 +0100 |
commit | 9c60292b6fc1effdb6a7d41453e3ff7db850e178 (patch) | |
tree | f3be8ede1fc97404fe293637067bbb03884c629b /bitbake | |
parent | 24f060805f106292a393294091c1a65b0fa6b3ad (diff) | |
download | poky-9c60292b6fc1effdb6a7d41453e3ff7db850e178.tar.gz |
bitbake: hob: clicking on "cancel" should reset table sorting to default
Changed the "cancel" callback function for both recipes and packages
list page.
[YOCTO #4333]
(Bitbake rev: 05ebbaa2426716c6254c4a98872020d02d2944bd)
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rwxr-xr-x | bitbake/lib/bb/ui/crumbs/packageselectionpage.py | 9 | ||||
-rwxr-xr-x | bitbake/lib/bb/ui/crumbs/recipeselectionpage.py | 10 |
2 files changed, 19 insertions, 0 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/packageselectionpage.py b/bitbake/lib/bb/ui/crumbs/packageselectionpage.py index 66cb7ff633..a4d86bd610 100755 --- a/bitbake/lib/bb/ui/crumbs/packageselectionpage.py +++ b/bitbake/lib/bb/ui/crumbs/packageselectionpage.py | |||
@@ -199,6 +199,7 @@ class PackageSelectionPage (HobPage): | |||
199 | if self.package_model.filtered_nb == 0: | 199 | if self.package_model.filtered_nb == 0: |
200 | if not self.ins.get_nth_page(current_tab).top_bar: | 200 | if not self.ins.get_nth_page(current_tab).top_bar: |
201 | self.ins.get_nth_page(current_tab).add_no_result_bar(entry) | 201 | self.ins.get_nth_page(current_tab).add_no_result_bar(entry) |
202 | self.ins.get_nth_page(current_tab).top_bar.set_no_show_all(True) | ||
202 | self.ins.get_nth_page(current_tab).top_bar.show() | 203 | self.ins.get_nth_page(current_tab).top_bar.show() |
203 | self.ins.get_nth_page(current_tab).scroll.hide() | 204 | self.ins.get_nth_page(current_tab).scroll.hide() |
204 | else: | 205 | else: |
@@ -246,6 +247,13 @@ class PackageSelectionPage (HobPage): | |||
246 | self.builder.parsing_warnings = [] | 247 | self.builder.parsing_warnings = [] |
247 | self.builder.build_image() | 248 | self.builder.build_image() |
248 | 249 | ||
250 | def refresh_tables(self): | ||
251 | self.ins.reset_entry(self.ins.search, 0) | ||
252 | for tab in self.tables: | ||
253 | index = self.tables.index(tab) | ||
254 | filter = self.pages[index]['filter'] | ||
255 | tab.set_model(self.package_model.tree_model(filter, initial=True)) | ||
256 | |||
249 | def back_button_clicked_cb(self, button): | 257 | def back_button_clicked_cb(self, button): |
250 | if self.builder.previous_step == self.builder.IMAGE_GENERATED: | 258 | if self.builder.previous_step == self.builder.IMAGE_GENERATED: |
251 | self.builder.restore_initial_selected_packages() | 259 | self.builder.restore_initial_selected_packages() |
@@ -253,6 +261,7 @@ class PackageSelectionPage (HobPage): | |||
253 | self.builder.show_image_details() | 261 | self.builder.show_image_details() |
254 | else: | 262 | else: |
255 | self.builder.show_configuration() | 263 | self.builder.show_configuration() |
264 | self.refresh_tables() | ||
256 | 265 | ||
257 | def refresh_selection(self): | 266 | def refresh_selection(self): |
258 | self.builder.configuration.selected_packages = self.package_model.get_selected_packages() | 267 | self.builder.configuration.selected_packages = self.package_model.get_selected_packages() |
diff --git a/bitbake/lib/bb/ui/crumbs/recipeselectionpage.py b/bitbake/lib/bb/ui/crumbs/recipeselectionpage.py index 8573b81ea8..9c138b2d66 100755 --- a/bitbake/lib/bb/ui/crumbs/recipeselectionpage.py +++ b/bitbake/lib/bb/ui/crumbs/recipeselectionpage.py | |||
@@ -214,6 +214,7 @@ class RecipeSelectionPage (HobPage): | |||
214 | if self.recipe_model.filtered_nb == 0: | 214 | if self.recipe_model.filtered_nb == 0: |
215 | if not self.ins.get_nth_page(current_tab).top_bar: | 215 | if not self.ins.get_nth_page(current_tab).top_bar: |
216 | self.ins.get_nth_page(current_tab).add_no_result_bar(entry) | 216 | self.ins.get_nth_page(current_tab).add_no_result_bar(entry) |
217 | self.ins.get_nth_page(current_tab).top_bar.set_no_show_all(True) | ||
217 | self.ins.get_nth_page(current_tab).top_bar.show() | 218 | self.ins.get_nth_page(current_tab).top_bar.show() |
218 | self.ins.get_nth_page(current_tab).scroll.hide() | 219 | self.ins.get_nth_page(current_tab).scroll.hide() |
219 | else: | 220 | else: |
@@ -243,13 +244,22 @@ class RecipeSelectionPage (HobPage): | |||
243 | self.builder.show_recipe_property_dialog(properties) | 244 | self.builder.show_recipe_property_dialog(properties) |
244 | 245 | ||
245 | def build_packages_clicked_cb(self, button): | 246 | def build_packages_clicked_cb(self, button): |
247 | self.refresh_tables() | ||
246 | self.builder.build_packages() | 248 | self.builder.build_packages() |
247 | 249 | ||
250 | def refresh_tables(self): | ||
251 | self.ins.reset_entry(self.ins.search, 0) | ||
252 | for tab in self.tables: | ||
253 | index = self.tables.index(tab) | ||
254 | filter = self.pages[index]['filter'] | ||
255 | tab.set_model(self.recipe_model.tree_model(filter, search_data="", initial=True)) | ||
256 | |||
248 | def back_button_clicked_cb(self, button): | 257 | def back_button_clicked_cb(self, button): |
249 | self.builder.recipe_model.set_selected_image(self.builder.configuration.initial_selected_image) | 258 | self.builder.recipe_model.set_selected_image(self.builder.configuration.initial_selected_image) |
250 | self.builder.image_configuration_page.update_image_combo(self.builder.recipe_model, self.builder.configuration.initial_selected_image) | 259 | self.builder.image_configuration_page.update_image_combo(self.builder.recipe_model, self.builder.configuration.initial_selected_image) |
251 | self.builder.image_configuration_page.update_image_desc() | 260 | self.builder.image_configuration_page.update_image_desc() |
252 | self.builder.show_configuration() | 261 | self.builder.show_configuration() |
262 | self.refresh_tables() | ||
253 | 263 | ||
254 | def refresh_selection(self): | 264 | def refresh_selection(self): |
255 | self.builder.configuration.selected_image = self.recipe_model.get_selected_image() | 265 | self.builder.configuration.selected_image = self.recipe_model.get_selected_image() |