diff options
author | Matt Wilson <msw@redhat.com> | 1999-08-22 20:15:21 +0000 |
---|---|---|
committer | Matt Wilson <msw@redhat.com> | 1999-08-22 20:15:21 +0000 |
commit | bbdcce88fee29a4c608475d69463370289520b0a (patch) | |
tree | f3242180acee28c0e373cb8aca6cd7f7b96ee5aa /iw/package.py | |
parent | a1995b9bcb2e3ea92c5ce093097e24cc91b93a26 (diff) | |
download | anaconda-bbdcce88fee29a4c608475d69463370289520b0a.tar.gz anaconda-bbdcce88fee29a4c608475d69463370289520b0a.tar.xz anaconda-bbdcce88fee29a4c608475d69463370289520b0a.zip |
ICONS
Diffstat (limited to 'iw/package.py')
-rw-r--r-- | iw/package.py | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/iw/package.py b/iw/package.py index 038b03815..5494a6521 100644 --- a/iw/package.py +++ b/iw/package.py @@ -6,6 +6,9 @@ from xpms import * from thread import * import rpm import GdkImlib +import string +import sys +import xpms class IndividualPackageSelectionWindow (InstallWindow): @@ -384,10 +387,34 @@ class PackageSelectionWindow (InstallWindow): sw.set_border_width (5) sw.set_policy (POLICY_AUTOMATIC, POLICY_AUTOMATIC) - box = GtkVBox (FALSE, 10) + box = GtkVBox (FALSE, 0) + for comp in self.todo.comps: if not comp.hidden: - checkButton = GtkCheckButton (comp.name) + pixname = string.replace (comp.name, ' ', '_') + pixname = string.replace (pixname, '/', '_') + pixname = string.replace (pixname, '.', '_') + pixname = string.replace (pixname, '(', '_') + pixname = string.replace (pixname, ')', '_') + pixname = string.upper (pixname) + "_XPM" + print pixname + picture = None + checkButton = None + if pixname in xpms.__dict__.keys (): + picture = xpms.__dict__[pixname] + if picture: + im = GdkImlib.create_image_from_xpm (picture) + im.render () + pix = im.make_pixmap () + hbox = GtkHBox (FALSE, 5) + hbox.pack_start (pix, FALSE, FALSE, 0) + label = GtkLabel (comp.name) + label.set_alignment (0.0, 0.5) + hbox.pack_start (label, TRUE, TRUE, 0) + checkButton = GtkCheckButton () + checkButton.add (hbox) + else: + checkButton = GtkCheckButton (comp.name) checkButton.set_active (comp.selected) def toggled (widget, comp): |