summaryrefslogtreecommitdiffstats
path: root/gui.py
diff options
context:
space:
mode:
authorbfox <bfox>2001-06-21 18:46:37 +0000
committerbfox <bfox>2001-06-21 18:46:37 +0000
commitaeb689b3ca9cfebdf2cf5b6c50c0722f4327ede4 (patch)
tree53702dcc9260449a95b478b009dbe084b1ecfc25 /gui.py
parent213c3f6df6b571a75d661ad89581d12f8c40768c (diff)
downloadanaconda-aeb689b3ca9cfebdf2cf5b6c50c0722f4327ede4.tar.gz
anaconda-aeb689b3ca9cfebdf2cf5b6c50c0722f4327ede4.tar.xz
anaconda-aeb689b3ca9cfebdf2cf5b6c50c0722f4327ede4.zip
make the configFileData class available to other classes
Diffstat (limited to 'gui.py')
-rwxr-xr-xgui.py36
1 files changed, 24 insertions, 12 deletions
diff --git a/gui.py b/gui.py
index 6cbfb0d61..a50565dc6 100755
--- a/gui.py
+++ b/gui.py
@@ -76,16 +76,17 @@ root.set_cursor (cursor)
splashwindow = None
-def display_splash_screen():
+def display_splash_screen(configFileData):
def load_image(file):
try:
- im = GdkImlib.Image("/usr/share/anaconda/pixmaps/" + file)
+ im = GdkImlib.Image(file)
except:
try:
- im = GdkImlib.Image("pixmaps/" + file)
+ im = GdkImlib.Image("/usr/share/anaconda/pixmaps/" + file)
except:
print "Unable to load", file
+ raise RuntimeError, "Cannot find file %s" % file
return im
@@ -97,7 +98,9 @@ def display_splash_screen():
# If the xserver is running at 800x600 res or higher, use the
# 800x600 splash screen.
if width >= 800:
- im = load_image('first.png')
+ splashscreen = configFileData.getSplashscreen()
+# splashscreen = "pixmaps/first.png"
+ im = load_image(splashscreen)
else:
im = load_image('first-lowres.png')
@@ -274,9 +277,10 @@ class MessageWindow:
win.keyboard_ungrab()
class InstallInterface:
- def __init__ (self, runres, nofbmode):
+ def __init__ (self, runres, nofbmode, configFileData):
self.runres = runres
self.nofbmode = nofbmode
+ self.configFileData = configFileData
def __del__ (self):
pass
@@ -344,7 +348,7 @@ class InstallInterface:
lang = id.instLanguage.getCurrent()
lang = id.instLanguage.getLangNick(lang)
- self.icw = InstallControlWindow (self, self.dispatch, lang)
+ self.icw = InstallControlWindow (self, self.dispatch, lang, self.configFileData)
self.icw.run (self.runres)
class InstallControlWindow:
@@ -524,7 +528,7 @@ class InstallControlWindow:
s = "from %s import %s; newScreenClass = %s" % (file, className, className)
exec s
- ics = InstallControlState (self)
+ ics = InstallControlState (self, self.configFileData)
self.destroyCurrentWindow()
self.currentWindow = newScreenClass(ics)
@@ -583,7 +587,7 @@ class InstallControlWindow:
if (ics.getGrabNext ()):
nextButton.grab_focus ()
- def __init__ (self, ii, dispatch, locale):
+ def __init__ (self, ii, dispatch, locale, configFileData):
self.stockButtons = [
( STOCK_BUTTON_PREV, "prevButtonStock",
_("Back"), self.prevClicked ),
@@ -602,6 +606,7 @@ class InstallControlWindow:
self.dispatch = dispatch
self.setLanguage(locale)
self.helpWin = None
+ self.configFileData = configFileData
def keyRelease (self, window, event):
if ((event.keyval == GDK.KP_Delete or event.keyval == GDK.Delete)
@@ -640,7 +645,9 @@ class InstallControlWindow:
self.window.set_border_width (10)
- title = _("Red Hat Linux Installer")
+# title = _("Red Hat Linux Installer")
+ title = _(self.configFileData.getTitle())
+
if os.environ["DISPLAY"][:1] != ':':
# from gnome.zvt import *
# zvtwin = GtkWindow ()
@@ -678,7 +685,8 @@ class InstallControlWindow:
"pixmaps/",
"/tmp/updates"]:
try:
- im = GdkImlib.Image (dir + "anaconda_header.png")
+ im = GdkImlib.Image (self.configFileData.getTitleBar())
+# im = GdkImlib.Image (dir + "anaconda_header.png")
except:
im = None
else:
@@ -768,9 +776,10 @@ class InstallControlWindow:
mainloop ()
class InstallControlState:
- def __init__ (self, cw):
+ def __init__ (self, cw, configFileData):
self.searchPath = [ "./", "/usr/share/anaconda/", "./" ]
self.cw = cw
+ self.configFileData = configFileData
self.prevEnabled = 1
self.nextEnabled = 0
self.nextButtonInfo = None
@@ -818,12 +827,15 @@ class InstallControlState:
def readPixmap (self, file):
try:
- im = GdkImlib.Image ("/usr/share/anaconda/pixmaps/" + file)
+ im = GdkImlib.Image (file)
+# im = GdkImlib.Image ("/usr/share/anaconda/pixmaps/" + file)
except:
+# raise RuntimeError, "Unable to load file %d"% file
try:
im = GdkImlib.Image ("pixmaps/" + file)
except:
print "Unable to load", file
+ raise RuntimeError, "Unable to load file %d"% file
return None
return im