diff options
author | Erik Troan <ewt@redhat.com> | 2000-05-04 22:01:52 +0000 |
---|---|---|
committer | Erik Troan <ewt@redhat.com> | 2000-05-04 22:01:52 +0000 |
commit | bbdbe1699825081049b6923a2b4ef64fbdb4841c (patch) | |
tree | c5ebfc61483b40dc104146189aeeda749c7f04cd /iw/package_gui.py | |
parent | 62a3836e17b1c64c87df791203e235dbb24d96d7 (diff) | |
download | anaconda-bbdbe1699825081049b6923a2b4ef64fbdb4841c.tar.gz anaconda-bbdbe1699825081049b6923a2b4ef64fbdb4841c.tar.xz anaconda-bbdbe1699825081049b6923a2b4ef64fbdb4841c.zip |
size calculation works for components
Diffstat (limited to 'iw/package_gui.py')
-rw-r--r-- | iw/package_gui.py | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/iw/package_gui.py b/iw/package_gui.py index dacb6e661..309653c76 100644 --- a/iw/package_gui.py +++ b/iw/package_gui.py @@ -378,6 +378,9 @@ class PackageSelectionWindow (InstallWindow): ics.readHTML ("sel-group") self.selectIndividualPackages = FALSE + def getPrev (self): + self.todo.comps.setSelectionState(self.origSelection) + def getNext (self): if not self.__dict__.has_key ("individualPackages"): return None @@ -405,12 +408,32 @@ class PackageSelectionWindow (InstallWindow): return None + def setSize(self): + print "updated size", self.todo.comps.sizeStr() + + def componentToggled(self, widget): + # turn off all the comps + for comp in self.todo.comps: + if not comp.hidden: comp.unselect(0) + + # it's a shame component selection sucks + self.todo.comps['Base'].select (1) + + # turn on all the comps we selected + for (button, comp) in self.checkButtons: + if button.get_active (): + comp.select (1) + + self.setSize() + def getScreen (self): threads_leave () self.todo.getHeaderList () self.todo.getCompsList() threads_enter () + self.origSelection = self.todo.comps.getSelectionState() + sw = GtkScrolledWindow () sw.set_border_width (5) sw.set_policy (POLICY_AUTOMATIC, POLICY_AUTOMATIC) @@ -443,6 +466,7 @@ class PackageSelectionWindow (InstallWindow): checkButton = GtkCheckButton (comp.name) checkButton.set_active (comp.selected) + checkButton.connect('toggled', self.componentToggled) self.checkButtons.append ((checkButton, comp)) box.pack_start (checkButton) @@ -450,6 +474,8 @@ class PackageSelectionWindow (InstallWindow): box.set_focus_hadjustment(sw.get_hadjustment ()) box.set_focus_vadjustment(sw.get_vadjustment ()) + self.setSize() + vbox = GtkVBox (FALSE, 5) self.individualPackages = GtkCheckButton (_("Select individual packages")) self.individualPackages.set_active (self.selectIndividualPackages) |