summaryrefslogtreecommitdiffstats
path: root/gui.py
diff options
context:
space:
mode:
authorDavid Cantrell <dcantrell@redhat.com>2005-11-30 21:56:16 +0000
committerDavid Cantrell <dcantrell@redhat.com>2005-11-30 21:56:16 +0000
commit7a87a026cafaa8e92a7f6beff72c83bb006ada21 (patch)
treefcd2880109d787d31d5feba9ff3c3c56d65cff0b /gui.py
parent1b1604f8359b3a32325ccd4cd200929695a9721f (diff)
downloadanaconda-7a87a026cafaa8e92a7f6beff72c83bb006ada21.tar.gz
anaconda-7a87a026cafaa8e92a7f6beff72c83bb006ada21.tar.xz
anaconda-7a87a026cafaa8e92a7f6beff72c83bb006ada21.zip
Some more changes for the release notes viewer. The size is determined in
gui.py and passed to the release notes viewer on the command line. In the release notes viewer, we figure out where we need to anchor ourself and then move there. Among other things.
Diffstat (limited to 'gui.py')
-rwxr-xr-xgui.py35
1 files changed, 26 insertions, 9 deletions
diff --git a/gui.py b/gui.py
index 1055fccb9..defb1b366 100755
--- a/gui.py
+++ b/gui.py
@@ -1086,18 +1086,35 @@ class InstallControlWindow:
ofile.close()
# HACK to make release notes to work in test mode
- if os.access("iw/release_notes_viewer_gui.py", os.X_OK):
- path = ("iw/release_notes_viewer_gui.py",)
- else:
- path = ("/usr/lib/anaconda/iw/release_notes_viewer_gui.py",)
+ # also HACK to make it work from RHupdates
+ for dir in ("iw/", "/mnt/source/RHupdates/",
+ "/usr/lib/anaconda/iw/"):
+ path = dir + "release_notes_viewer_gui.py"
+ if os.access(path, os.X_OK):
+ break
# if no viewer present then just ignore click
- if not os.access(path[0], os.X_OK):
- log.warning("Viewer missing at %s - ignoring", path[0])
+ if not os.access(path, os.X_OK):
+ log.warning("Viewer not executable at %s - ignoring", path)
return 1
- args =(fn,)
-
+ # if we are at the installation progress bar step, make the
+ # release notes window smaller so the progress bar is still
+ # visible...otherwise, consume the entire screen
+ (step, args) = self.dispatch.currentStep()
+ print "runReleaseNotesViewer is at step %s" %(step)
+
+ if gtk.gdk.screen_width() >= 800:
+ res = ("800", "600",)
+ else:
+ res = ("640", "480",)
+
+ if step == "install":
+ if res[0] == "800":
+ res[1] = "400"
+ else:
+ res[1] = "300"
+
child = os.fork()
if (child == 0):
# close unneeded fd's
@@ -1107,7 +1124,7 @@ class InstallControlWindow:
except:
pass
- os.execv(path[0], path + args)
+ os.execl(path, path, fn, res[0], res[1])
# we are going to check several times a second to see if
# release notes viewer has exited so we can restore button