summaryrefslogtreecommitdiffstats
path: root/gui.py
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2005-12-19 22:08:44 +0000
committerJeremy Katz <katzj@redhat.com>2005-12-19 22:08:44 +0000
commit55232e33fb351c5bcb95b99d9a54cc1b585271be (patch)
tree53983c3c3726ebb1885825d1317c86eeebaf4eda /gui.py
parentaf50332151e5903701bf649f9f28617d71285c49 (diff)
downloadanaconda-55232e33fb351c5bcb95b99d9a54cc1b585271be.tar.gz
anaconda-55232e33fb351c5bcb95b99d9a54cc1b585271be.tar.xz
anaconda-55232e33fb351c5bcb95b99d9a54cc1b585271be.zip
2005-12-19 Jeremy Katz <katzj@redhat.com>
* 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.
Diffstat (limited to 'gui.py')
-rwxr-xr-xgui.py20
1 files changed, 11 insertions, 9 deletions
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: