diff options
author | Jeremy Katz <katzj@redhat.com> | 2005-12-08 06:15:32 +0000 |
---|---|---|
committer | Jeremy Katz <katzj@redhat.com> | 2005-12-08 06:15:32 +0000 |
commit | e082e652580b62e611c2ef6918dd5a5137ace8c7 (patch) | |
tree | 7075f616053ecf4dbc3f50940e702776632f400f /iw | |
parent | 894a0653fde6a56909937e03e044570b6a8fd7fd (diff) | |
download | anaconda-e082e652580b62e611c2ef6918dd5a5137ace8c7.tar.gz anaconda-e082e652580b62e611c2ef6918dd5a5137ace8c7.tar.xz anaconda-e082e652580b62e611c2ef6918dd5a5137ace8c7.zip |
2005-12-08 Jeremy Katz <katzj@redhat.com>
* iw/GroupSelector.py (GroupSelector.__setGroupDescription): Don't
allow detail twiddling for groups that aren't selected. Only show
count of optional/default packages (and only if the group is selected)
Diffstat (limited to 'iw')
-rw-r--r-- | iw/GroupSelector.py | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/iw/GroupSelector.py b/iw/GroupSelector.py index 91676a01f..d1e7e5101 100644 --- a/iw/GroupSelector.py +++ b/iw/GroupSelector.py @@ -288,7 +288,7 @@ class GroupSelector: i = b.get_end_iter() inst = 0 cnt = 0 - pkgs = grp.packages # FIXME: or do we want just optional + default? + pkgs = grp.default_packages.keys() + grp.optional_pkgs.keys() for p in pkgs: if self.ayum.isPackageInstalled(p): cnt += 1 @@ -297,17 +297,14 @@ class GroupSelector: cnt += 1 else: self.ayum.log(2, "no such package %s for %s" %(p, grp.groupid)) - b.insert_with_tags_by_name(i, _("[%d/%d installed]") %(inst, cnt), - "right-just") - - # details makes little sense if there aren't any optional packages - for p in grp.mandatory_packages.keys(): - if self.ayum.pkgSack.searchNevra(name=p): - cnt -= 1 - if cnt == 0: + + if cnt == 0 or group.selected == False: self.xml.get_widget("detailsButton").set_sensitive(False) else: self.xml.get_widget("detailsButton").set_sensitive(True) + b.insert_with_tags_by_name(i, + _("[%d of %d optional packages installed]") + %(inst, cnt), "right-just") def _groupToggled(self, widget, path): i = self.groupstore.get_iter_from_string(path) |