summaryrefslogtreecommitdiffstats
path: root/iw
diff options
context:
space:
mode:
authorMike Fulbright <msf@redhat.com>2002-07-12 07:04:44 +0000
committerMike Fulbright <msf@redhat.com>2002-07-12 07:04:44 +0000
commit327880a214096afe447b3378bd93aa13d8001085 (patch)
tree3ba8c41e54a26c19bbfd2720a362cf537788bff3 /iw
parent87057bacd608c59765056eb797e33eb4bc6cf518 (diff)
downloadanaconda-327880a214096afe447b3378bd93aa13d8001085.tar.gz
anaconda-327880a214096afe447b3378bd93aa13d8001085.tar.xz
anaconda-327880a214096afe447b3378bd93aa13d8001085.zip
show package group hierarchy
Diffstat (limited to 'iw')
-rw-r--r--iw/package_gui.py102
1 files changed, 46 insertions, 56 deletions
diff --git a/iw/package_gui.py b/iw/package_gui.py
index 639bc6d75..f929e36f2 100644
--- a/iw/package_gui.py
+++ b/iw/package_gui.py
@@ -512,71 +512,61 @@ class PackageSelectionWindow (InstallWindow):
sw = gtk.ScrolledWindow ()
sw.set_policy (gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
- boxcol1 = gtk.VBox (gtk.FALSE, 2)
- boxcol2 = gtk.VBox (gtk.FALSE, 2)
+ box = gtk.VBox (gtk.FALSE, 10)
+ box.set_border_width(5)
self.checkButtons = []
- compsorder = orderPackageGroups(self.comps)
- if len(compsorder) != len(self.comps):
- raise RuntimeError, ("len(Ordered comps) != len(original)")
-
- numvis = 0
- for comp in compsorder:
- if not comp.hidden:
- numvis = numvis + 1
-
-# grpTooltips = gtk.Tooltips()
-# grpTooltips.enable()
- idx = 0
- for comp in compsorder:
- if not comp.hidden:
- pixname = string.replace (comp.name, ' ', '-')
- pixname = string.replace (pixname, '/', '-')
- pixname = string.replace (pixname, '.', '-')
- pixname = string.replace (pixname, '(', '-')
- pixname = string.replace (pixname, ')', '-')
- pixname = string.lower (pixname) + ".png"
- checkButton = None
- pix = self.ics.readPixmap (pixname)
- if pix and 0:
- hbox = gtk.HBox (gtk.FALSE, 5)
- hbox.pack_start (pix, gtk.FALSE, gtk.FALSE, 0)
- label = gtk.Label (_(comp.name))
- label.set_alignment (0.0, 0.5)
- hbox.pack_start (label, gtk.TRUE, gtk.TRUE, 0)
- checkButton = gtk.CheckButton ()
- checkButton.add (hbox)
- else:
- checkButton = gtk.CheckButton (comp.name)
-
- checkButton.set_active (comp.isSelected(justManual = 1))
- checkButton.connect('toggled', self.componentToggled, comp)
- self.checkButtons.append ((checkButton, comp))
-
- if numvis <= 30:
- boxcol1.pack_start (checkButton)
- elif idx < numvis/2:
- boxcol1.pack_start (checkButton)
- else:
- boxcol2.pack_start (checkButton)
- idx = idx + 1
+ (parlist, pardict) = orderPackageGroups(self.comps)
+
+ for par in parlist:
+ vbox = gtk.VBox (gtk.FALSE, 2)
+ box.pack_start(vbox, gtk.FALSE, gtk.FALSE)
+
+ lbl = gtk.Label("")
+ lbl.set_markup("<big><b>%s</b></big>" % (par,))
+ lbl.set_alignment(0.0, 0.0)
+ vbox.pack_start(lbl)
+
+ for comp in pardict[par]:
+ if not comp.hidden:
+ pixname = string.replace (comp.name, ' ', '-')
+ pixname = string.replace (pixname, '/', '-')
+ pixname = string.replace (pixname, '.', '-')
+ pixname = string.replace (pixname, '(', '-')
+ pixname = string.replace (pixname, ')', '-')
+ pixname = string.lower (pixname) + ".png"
+ checkButton = None
+ pix = self.ics.readPixmap (pixname)
+ if pix and 0:
+ hbox = gtk.HBox (gtk.FALSE, 5)
+ hbox.pack_start (pix, gtk.FALSE, gtk.FALSE, 0)
+ label = gtk.Label (_(comp.name))
+ label.set_alignment (0.0, 0.5)
+ hbox.pack_start (label, gtk.TRUE, gtk.TRUE, 0)
+ checkButton = gtk.CheckButton ()
+ checkButton.add (hbox)
+ else:
+ checkButton = gtk.CheckButton (comp.name)
-# for cb in self.checkButtons:
-# grpTooltips.set_tip(cb[0], cb[1].name, "")
+ checkButton.set_active (comp.isSelected(justManual = 1))
+ checkButton.connect('toggled', self.componentToggled, comp)
+ self.checkButtons.append ((checkButton, comp))
+
+ tmphbox = gtk.HBox(gtk.FALSE)
+ crackhbox = gtk.HBox(gtk.FALSE)
+ crackhbox.set_size_request(30, -1)
+ tmphbox.pack_start(crackhbox, gtk.FALSE, gtk.FALSE)
+ tmphbox.pack_start(checkButton, gtk.TRUE, gtk.TRUE)
+ vbox.pack_start (tmphbox)
- tmpbox = gtk.HBox(gtk.FALSE, 0)
- tmpbox.pack_start(boxcol1)
- if numvis > 30:
- tmpbox.pack_start(boxcol2)
-
wrapper = gtk.VBox (gtk.FALSE, 0)
- wrapper.pack_start (tmpbox, gtk.FALSE)
+ wrapper.pack_start (box, gtk.FALSE)
sw.add_with_viewport (wrapper)
viewport = sw.get_children()[0]
viewport.set_shadow_type (gtk.SHADOW_IN)
- tmpbox.set_focus_hadjustment(sw.get_hadjustment ())
- tmpbox.set_focus_vadjustment(sw.get_vadjustment ())
+ box.set_focus_hadjustment(sw.get_hadjustment ())
+ box.set_focus_vadjustment(sw.get_vadjustment ())
hbox = gtk.HBox (gtk.FALSE, 5)