diff options
Diffstat (limited to 'bitbake/lib/bb/ui/crumbs/hoblistmodel.py')
-rw-r--r-- | bitbake/lib/bb/ui/crumbs/hoblistmodel.py | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/hoblistmodel.py b/bitbake/lib/bb/ui/crumbs/hoblistmodel.py index 4934ba8ed8..523a591620 100644 --- a/bitbake/lib/bb/ui/crumbs/hoblistmodel.py +++ b/bitbake/lib/bb/ui/crumbs/hoblistmodel.py | |||
@@ -34,7 +34,7 @@ class PackageListModel(gtk.TreeStore): | |||
34 | providing convenience functions to access gtk.TreeModel subclasses which | 34 | providing convenience functions to access gtk.TreeModel subclasses which |
35 | provide filtered views of the data. | 35 | provide filtered views of the data. |
36 | """ | 36 | """ |
37 | (COL_NAME, COL_VER, COL_REV, COL_RNM, COL_SEC, COL_SUM, COL_RDEP, COL_RPROV, COL_SIZE, COL_BINB, COL_INC) = range(11) | 37 | (COL_NAME, COL_VER, COL_REV, COL_RNM, COL_SEC, COL_SUM, COL_RDEP, COL_RPROV, COL_SIZE, COL_BINB, COL_INC, COL_FADE_INC) = range(12) |
38 | 38 | ||
39 | __gsignals__ = { | 39 | __gsignals__ = { |
40 | "package-selection-changed" : (gobject.SIGNAL_RUN_LAST, | 40 | "package-selection-changed" : (gobject.SIGNAL_RUN_LAST, |
@@ -62,6 +62,7 @@ class PackageListModel(gtk.TreeStore): | |||
62 | gobject.TYPE_STRING, | 62 | gobject.TYPE_STRING, |
63 | gobject.TYPE_STRING, | 63 | gobject.TYPE_STRING, |
64 | gobject.TYPE_STRING, | 64 | gobject.TYPE_STRING, |
65 | gobject.TYPE_BOOLEAN, | ||
65 | gobject.TYPE_BOOLEAN) | 66 | gobject.TYPE_BOOLEAN) |
66 | 67 | ||
67 | 68 | ||
@@ -437,7 +438,7 @@ class RecipeListModel(gtk.ListStore): | |||
437 | providing convenience functions to access gtk.TreeModel subclasses which | 438 | providing convenience functions to access gtk.TreeModel subclasses which |
438 | provide filtered views of the data. | 439 | provide filtered views of the data. |
439 | """ | 440 | """ |
440 | (COL_NAME, COL_DESC, COL_LIC, COL_GROUP, COL_DEPS, COL_BINB, COL_TYPE, COL_INC, COL_IMG, COL_INSTALL, COL_PN) = range(11) | 441 | (COL_NAME, COL_DESC, COL_LIC, COL_GROUP, COL_DEPS, COL_BINB, COL_TYPE, COL_INC, COL_IMG, COL_INSTALL, COL_PN, COL_FADE_INC) = range(12) |
441 | 442 | ||
442 | __dummy_image__ = "Create your own image" | 443 | __dummy_image__ = "Create your own image" |
443 | 444 | ||
@@ -461,7 +462,8 @@ class RecipeListModel(gtk.ListStore): | |||
461 | gobject.TYPE_BOOLEAN, | 462 | gobject.TYPE_BOOLEAN, |
462 | gobject.TYPE_BOOLEAN, | 463 | gobject.TYPE_BOOLEAN, |
463 | gobject.TYPE_STRING, | 464 | gobject.TYPE_STRING, |
464 | gobject.TYPE_STRING) | 465 | gobject.TYPE_STRING, |
466 | gobject.TYPE_BOOLEAN) | ||
465 | 467 | ||
466 | """ | 468 | """ |
467 | Find the model path for the item_name | 469 | Find the model path for the item_name |
@@ -498,17 +500,25 @@ class RecipeListModel(gtk.ListStore): | |||
498 | 500 | ||
499 | return True | 501 | return True |
500 | 502 | ||
503 | def exclude_item_sort_func(self, model, iter1, iter2): | ||
504 | val1 = model.get_value(iter1, RecipeListModel.COL_FADE_INC) | ||
505 | val2 = model.get_value(iter2, RecipeListModel.COL_INC) | ||
506 | return ((val1 == True) and (val2 == False)) | ||
507 | |||
501 | """ | 508 | """ |
502 | Create, if required, and return a filtered gtk.TreeModelSort | 509 | Create, if required, and return a filtered gtk.TreeModelSort |
503 | containing only the items which are items specified by filter | 510 | containing only the items which are items specified by filter |
504 | """ | 511 | """ |
505 | def tree_model(self, filter): | 512 | def tree_model(self, filter, excluded_items_head=False): |
506 | model = self.filter_new() | 513 | model = self.filter_new() |
507 | model.set_visible_func(self.tree_model_filter, filter) | 514 | model.set_visible_func(self.tree_model_filter, filter) |
508 | 515 | ||
509 | sort = gtk.TreeModelSort(model) | 516 | sort = gtk.TreeModelSort(model) |
510 | sort.set_sort_column_id(RecipeListModel.COL_NAME, gtk.SORT_ASCENDING) | 517 | if excluded_items_head: |
511 | sort.set_default_sort_func(None) | 518 | sort.set_default_sort_func(self.exclude_item_sort_func) |
519 | else: | ||
520 | sort.set_sort_column_id(RecipeListModel.COL_NAME, gtk.SORT_ASCENDING) | ||
521 | sort.set_default_sort_func(None) | ||
512 | return sort | 522 | return sort |
513 | 523 | ||
514 | def convert_vpath_to_path(self, view_model, view_path): | 524 | def convert_vpath_to_path(self, view_model, view_path): |