diff options
| -rw-r--r-- | bitbake/lib/bb/ui/crumbs/tasklistmodel.py | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/tasklistmodel.py b/bitbake/lib/bb/ui/crumbs/tasklistmodel.py index d2f49d1642..3921581139 100644 --- a/bitbake/lib/bb/ui/crumbs/tasklistmodel.py +++ b/bitbake/lib/bb/ui/crumbs/tasklistmodel.py | |||
| @@ -89,7 +89,7 @@ class TaskListModel(gtk.ListStore): | |||
| 89 | providing convenience functions to access gtk.TreeModel subclasses which | 89 | providing convenience functions to access gtk.TreeModel subclasses which |
| 90 | provide filtered views of the data. | 90 | provide filtered views of the data. |
| 91 | """ | 91 | """ |
| 92 | (COL_NAME, COL_DESC, COL_LIC, COL_GROUP, COL_DEPS, COL_BINB, COL_TYPE, COL_INC, COL_IMG, COL_PATH) = range(10) | 92 | (COL_NAME, COL_DESC, COL_LIC, COL_GROUP, COL_DEPS, COL_BINB, COL_TYPE, COL_INC, COL_IMG, COL_PATH, COL_PN) = range(11) |
| 93 | 93 | ||
| 94 | __gsignals__ = { | 94 | __gsignals__ = { |
| 95 | "tasklist-populated" : (gobject.SIGNAL_RUN_LAST, | 95 | "tasklist-populated" : (gobject.SIGNAL_RUN_LAST, |
| @@ -122,6 +122,7 @@ class TaskListModel(gtk.ListStore): | |||
| 122 | gobject.TYPE_STRING, | 122 | gobject.TYPE_STRING, |
| 123 | gobject.TYPE_BOOLEAN, | 123 | gobject.TYPE_BOOLEAN, |
| 124 | gobject.TYPE_BOOLEAN, | 124 | gobject.TYPE_BOOLEAN, |
| 125 | gobject.TYPE_STRING, | ||
| 125 | gobject.TYPE_STRING) | 126 | gobject.TYPE_STRING) |
| 126 | 127 | ||
| 127 | """ | 128 | """ |
| @@ -265,7 +266,8 @@ class TaskListModel(gtk.ListStore): | |||
| 265 | self.COL_LIC, lic, self.COL_GROUP, group, | 266 | self.COL_LIC, lic, self.COL_GROUP, group, |
| 266 | self.COL_DEPS, " ".join(packages[p]), self.COL_BINB, "", | 267 | self.COL_DEPS, " ".join(packages[p]), self.COL_BINB, "", |
| 267 | self.COL_TYPE, atype, self.COL_INC, False, | 268 | self.COL_TYPE, atype, self.COL_INC, False, |
| 268 | self.COL_IMG, False, self.COL_PATH, filename) | 269 | self.COL_IMG, False, self.COL_PATH, filename, |
| 270 | self.COL_PN, item) | ||
| 269 | 271 | ||
| 270 | self.emit("tasklist-populated") | 272 | self.emit("tasklist-populated") |
| 271 | 273 | ||
| @@ -527,6 +529,20 @@ class TaskListModel(gtk.ListStore): | |||
| 527 | it = self.contents.iter_next(it) | 529 | it = self.contents.iter_next(it) |
| 528 | return userpkgs, allpkgs | 530 | return userpkgs, allpkgs |
| 529 | 531 | ||
| 532 | """ | ||
| 533 | Return a squished (uniquified) list of the PN's of all selected items | ||
| 534 | """ | ||
| 535 | def get_selected_pn(self): | ||
| 536 | pns = [] | ||
| 537 | |||
| 538 | it = self.contents.get_iter_first() | ||
| 539 | while it: | ||
| 540 | if self.contents.get_value(it, self.COL_BINB): | ||
| 541 | pns.append(self.contents.get_value(it, self.COL_PN)) | ||
| 542 | it = self.contents.iter_next(it) | ||
| 543 | |||
| 544 | return self.squish(pns) | ||
| 545 | |||
| 530 | def image_contents_removed(self): | 546 | def image_contents_removed(self): |
| 531 | it = self.get_iter_first() | 547 | it = self.get_iter_first() |
| 532 | while it: | 548 | while it: |
