From 55232e33fb351c5bcb95b99d9a54cc1b585271be Mon Sep 17 00:00:00 2001 From: Jeremy Katz Date: Mon, 19 Dec 2005 22:08:44 +0000 Subject: 2005-12-19 Jeremy Katz * gui.py (InstallControlWindow.createWidgets): Don't dither the header, clean up the code to set the GtkImage * iw/welcome_gui.py (WelcomeWindow.getScreen): Don't dither. --- ChangeLog | 5 +++++ gui.py | 20 +++++++++++--------- iw/welcome_gui.py | 2 +- 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index e6e1a39ce..b4585de3c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,11 @@ 2005-12-19 Jeremy Katz + * gui.py (InstallControlWindow.createWidgets): Don't dither the + header, clean up the code to set the GtkImage + + * iw/welcome_gui.py (WelcomeWindow.getScreen): Don't dither. + * scripts/mk-images.x86_64 (SYSLINUX): Generate syslinux splash using script in -logos package instead of hard-coding knowledge of colors here. diff --git a/gui.py b/gui.py index fe1bda8c9..91a70c416 100755 --- a/gui.py +++ b/gui.py @@ -413,8 +413,8 @@ def findPixmap(file): for dir in ("/mnt/source/RHupdates/pixmaps/", "/mnt/source/RHupdates/", "/tmp/updates/pixmaps/", "/tmp/updates/", - "/tmp/product/pixmaps/", "/tmp/product/", - "/usr/share/anaconda/pixmaps/", "pixmaps/", + "/tmp/product/pixmaps/", "/tmp/product/", "pixmaps/", + "/usr/share/anaconda/pixmaps/" "/usr/share/pixmaps/", "/usr/share/anaconda/", ""): fn = dir + file @@ -436,7 +436,8 @@ def getPixbuf(file): return pixbuf -def readImageFromFile(file, height = None, width = None, dither = None): +def readImageFromFile(file, height = None, width = None, dither = None, + image = None): pixbuf = getPixbuf(file) if pixbuf is None: return None @@ -447,7 +448,10 @@ def readImageFromFile(file, height = None, width = None, dither = None): pixbuf = pixbuf.scale_simple(height, width, gtk.gdk.INTERP_BILINEAR) - p = gtk.Image() + if image is None: + p = gtk.Image() + else: + p = image if dither: (pixmap, mask) = pixbuf.render_pixmap_and_mask() pixmap.draw_pixbuf(gtk.gdk.GC(pixmap), pixbuf, 0, 0, 0, 0, @@ -1346,11 +1350,9 @@ class InstallControlWindow: self.window.set_title(_("%s Installer") %(productName,)) # FIXME: doesn't handle the lowres case - p = readImageFromFile("anaconda_header.png", dither = 1) - if p is not None: - i = self.mainxml.get_widget("headerImage") - apply(i.set_from_pixmap, p.get_pixmap()) - else: + i = self.mainxml.get_widget("headerImage") + p = readImageFromFile("anaconda_header.png", dither = False, image = i) + if p is None: print _("Unable to load title bar") if DEBUG: diff --git a/iw/welcome_gui.py b/iw/welcome_gui.py index 854f0e26a..f989d2a83 100644 --- a/iw/welcome_gui.py +++ b/iw/welcome_gui.py @@ -27,7 +27,7 @@ class WelcomeWindow (InstallWindow): # WelcomeWindow tag="wel" def getScreen (self): - pix = gui.readImageFromFile("splash.png", dither=True) + pix = gui.readImageFromFile("splash.png", dither=False) box = gtk.EventBox () box.add (pix) return box -- cgit