PackagesWindow can show just the packages from an installer.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@905 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2008-05-31 14:36:23 +00:00
parent 9c18ed51e2
commit c8d8d72abc
10 changed files with 82 additions and 32 deletions
+5 -2
View File
@@ -189,8 +189,9 @@ class PackageIconRequest : public ThumbnailRequest {
// ----------------------------------------------------------------------------- : PackageUpdateList : implementation
PackageUpdateList::PackageUpdateList(Window* parent, const InstallablePackages& packages, int id)
PackageUpdateList::PackageUpdateList(Window* parent, const InstallablePackages& packages, bool show_only_installable, int id)
: TreeList(parent, id)
, show_only_installable(show_only_installable)
, packages(packages)
{
item_height = max(item_height,17);
@@ -206,7 +207,9 @@ void PackageUpdateList::initItems() {
FOR_EACH_CONST(ip, packages) {
String group = ip->description->installer_group;
if (group.empty()) group = _("custom");
root.add(ip, group);
if (!show_only_installable || ip->installer) {
root.add(ip, group);
}
}
// tree to treelist items
items.clear();