diff options
| author | Cristiana Voicu <cristiana.voicu@intel.com> | 2013-03-27 17:20:07 +0200 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-03-29 10:41:25 +0000 |
| commit | 2f4fe1ee111a3dff68ac1cea6f3f6767cd6fe4eb (patch) | |
| tree | 7ecc49a7043292e18266b1078774f19992d99122 /bitbake/lib/bb/ui/crumbs/recipeselectionpage.py | |
| parent | e98716fc923f0aa60c85ce3547eb416a6af32971 (diff) | |
| download | poky-2f4fe1ee111a3dff68ac1cea6f3f6767cd6fe4eb.tar.gz | |
bitbake: hob: Search strings and results should be persistent
Now, the search results stay until I clear the search field,
so that I can manipulate the search results.
[YOCTO #4112 & #4117]
(Bitbake rev: d880ce966ca825aa66a23755fcb47497fb3f26c3)
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/recipeselectionpage.py')
| -rwxr-xr-x | bitbake/lib/bb/ui/crumbs/recipeselectionpage.py | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/recipeselectionpage.py b/bitbake/lib/bb/ui/crumbs/recipeselectionpage.py index aa0cd60c3f..47bb253309 100755 --- a/bitbake/lib/bb/ui/crumbs/recipeselectionpage.py +++ b/bitbake/lib/bb/ui/crumbs/recipeselectionpage.py | |||
| @@ -195,24 +195,25 @@ class RecipeSelectionPage (HobPage): | |||
| 195 | button_box.pack_end(self.back_button, expand=False, fill=False) | 195 | button_box.pack_end(self.back_button, expand=False, fill=False) |
| 196 | 196 | ||
| 197 | def search_entry_changed(self, entry): | 197 | def search_entry_changed(self, entry): |
| 198 | current_tab = self.ins.get_current_page() | ||
| 199 | filter = self.pages[current_tab]['filter'] | ||
| 200 | text = entry.get_text() | 198 | text = entry.get_text() |
| 201 | filter[RecipeListModel.COL_NAME] = text | 199 | if text not in self.ins.search_names: |
| 202 | self.tables[current_tab].set_model(self.recipe_model.tree_model(filter, search_data=text)) | 200 | current_tab = self.ins.get_current_page() |
| 203 | if self.recipe_model.filtered_nb == 0: | 201 | filter = self.pages[current_tab]['filter'] |
| 204 | if not self.ins.get_nth_page(current_tab).top_bar: | 202 | filter[RecipeListModel.COL_NAME] = text |
| 205 | self.ins.get_nth_page(current_tab).add_no_result_bar(entry) | 203 | self.tables[current_tab].set_model(self.recipe_model.tree_model(filter, search_data=text)) |
| 206 | self.ins.get_nth_page(current_tab).top_bar.show() | 204 | if self.recipe_model.filtered_nb == 0: |
| 207 | self.ins.get_nth_page(current_tab).scroll.hide() | 205 | if not self.ins.get_nth_page(current_tab).top_bar: |
| 208 | else: | 206 | self.ins.get_nth_page(current_tab).add_no_result_bar(entry) |
| 209 | if self.ins.get_nth_page(current_tab).top_bar: | 207 | self.ins.get_nth_page(current_tab).top_bar.show() |
| 210 | self.ins.get_nth_page(current_tab).top_bar.hide() | 208 | self.ins.get_nth_page(current_tab).scroll.hide() |
| 211 | self.ins.get_nth_page(current_tab).scroll.show() | 209 | else: |
| 212 | if entry.get_text() == '': | 210 | if self.ins.get_nth_page(current_tab).top_bar: |
| 213 | entry.set_icon_sensitive(gtk.ENTRY_ICON_SECONDARY, False) | 211 | self.ins.get_nth_page(current_tab).top_bar.hide() |
| 214 | else: | 212 | self.ins.get_nth_page(current_tab).scroll.show() |
| 215 | entry.set_icon_sensitive(gtk.ENTRY_ICON_SECONDARY, True) | 213 | if entry.get_text() == '': |
| 214 | entry.set_icon_sensitive(gtk.ENTRY_ICON_SECONDARY, False) | ||
| 215 | else: | ||
| 216 | entry.set_icon_sensitive(gtk.ENTRY_ICON_SECONDARY, True) | ||
| 216 | 217 | ||
| 217 | def button_click_cb(self, widget, event): | 218 | def button_click_cb(self, widget, event): |
| 218 | path, col = widget.table_tree.get_cursor() | 219 | path, col = widget.table_tree.get_cursor() |
