mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-19 21:09:03 +02:00
oe-pkgdata-browser: Select a matching package when a recipe is selected
When a recipe is selected, automatically select the package that matches the recipe name (if it exists), otherwise select the first package. (From OE-Core rev: 856ca73909b5060c3939f6c55c9c7f38ac699abb) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
c4f462412f
commit
77bba85df1
|
@ -176,12 +176,18 @@ class PkgUi():
|
||||||
return
|
return
|
||||||
|
|
||||||
recipe = model[it][RecipeColumns.Recipe]
|
recipe = model[it][RecipeColumns.Recipe]
|
||||||
for package in packages_in_recipe(self.pkgdata, recipe):
|
packages = packages_in_recipe(self.pkgdata, recipe)
|
||||||
|
for package in packages:
|
||||||
# TODO also show PKG after debian-renaming?
|
# TODO also show PKG after debian-renaming?
|
||||||
data = load_runtime_package(self.pkgdata, package)
|
data = load_runtime_package(self.pkgdata, package)
|
||||||
# TODO stash data to avoid reading in on_package_changed
|
# TODO stash data to avoid reading in on_package_changed
|
||||||
self.package_iters[package] = self.package_store.append([package, int(data["PKGSIZE"])])
|
self.package_iters[package] = self.package_store.append([package, int(data["PKGSIZE"])])
|
||||||
|
|
||||||
|
package = recipe if recipe in packages else sorted(packages)[0]
|
||||||
|
path = self.package_store.get_path(self.package_iters[package])
|
||||||
|
self.package_view.set_cursor(path)
|
||||||
|
self.package_view.scroll_to_cell(path)
|
||||||
|
|
||||||
def on_package_changed(self, selection):
|
def on_package_changed(self, selection):
|
||||||
self.label.set_text("")
|
self.label.set_text("")
|
||||||
self.file_store.clear()
|
self.file_store.clear()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user