summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2007-12-05 13:18:41 -0500
committerChris Lumens <clumens@redhat.com>2007-12-05 14:07:31 -0500
commit2d7aeb09db8c0a165e31ebf9d3ff507fb1c78b52 (patch)
tree140f8f9a2f652ac4d80c90edd3d946ac350422c5
parent44e21aae58267145d55a3bf9da83fc2951f35dc3 (diff)
downloadanaconda-2d7aeb09db8c0a165e31ebf9d3ff507fb1c78b52.tar.gz
anaconda-2d7aeb09db8c0a165e31ebf9d3ff507fb1c78b52.tar.xz
anaconda-2d7aeb09db8c0a165e31ebf9d3ff507fb1c78b52.zip
Remove the release notes code entirely.
-rw-r--r--exception.py1
-rwxr-xr-xgui.py7
-rw-r--r--iw/release_notes.py305
-rw-r--r--ui/anaconda.glade86
4 files changed, 1 insertions, 398 deletions
diff --git a/exception.py b/exception.py
index cb6a60328..4ebdfb288 100644
--- a/exception.py
+++ b/exception.py
@@ -130,7 +130,6 @@ def dumpException(out, text, tb, anaconda):
"anaconda.id.xsetup.xserver.hwstate.monitor.monlist",
"anaconda.id.xsetup.xserver.hwstate.monitor.monids",
"anaconda.intf.icw.buff",
- "anaconda.intf.icw.releaseNotesContents",
"anaconda.intf.icw.stockButtons",
"dispatch.sack.excludes",
]
diff --git a/gui.py b/gui.py
index 2eb3746bb..f18c05d93 100755
--- a/gui.py
+++ b/gui.py
@@ -41,8 +41,6 @@ import imputil
from rhpl.translate import _, N_
-from release_notes import *
-
import logging
log = logging.getLogger("anaconda")
@@ -1365,11 +1363,6 @@ class InstallControlWindow:
self.loadGlade()
self.window = self.mainxml.get_widget("mainWindow")
- # Remove the release notes button for now.
- hbuttonbox = self.mainxml.get_widget("hbuttonbox1")
- relnotesButton = self.mainxml.get_widget("relnotesButton")
- hbuttonbox.remove(relnotesButton)
-
self.createWidgets()
self.connectSignals()
diff --git a/iw/release_notes.py b/iw/release_notes.py
deleted file mode 100644
index e55043329..000000000
--- a/iw/release_notes.py
+++ /dev/null
@@ -1,305 +0,0 @@
-#!/usr/bin/python
-#
-# release_notes.py - "I can't believe it's not a web browser."
-#
-# David Cantrell <dcantrell@redhat.com>
-#
-# Copyright 2006 Red Hat, Inc.
-#
-# This software may be freely redistributed under the terms of the GNU
-# library public license.
-#
-# You should have received a copy of the GNU Library Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-#
-
-import sys
-import os
-import signal
-import gtk
-import gtkhtml2
-import urllib
-import urlparse
-from language import expandLangs
-
-import gui
-
-from rhpl.translate import _, N_
-
-class ReleaseNotesViewer:
- def __init__(self, anaconda):
- self.currentURI = None
- self.htmlheader = "<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"></head><body bgcolor=\"white\"><pre>"
- self.htmlfooter = "</pre></body></html>"
- self.doc = gtkhtml2.Document()
- self.vue = gtkhtml2.View()
- self.opener = urllib.FancyURLopener()
-
- # FIXME: these do not work, disabling for FC6 --dcantrell
- #self.doc.connect('request_url', self.requestURLCallBack)
- #self.doc.connect('link_clicked', self.linkClickedCallBack)
- #self.vue.connect('request_object', self.requestObjectCallBack)
- self.topDir = None
-
- self.width = None
- self.height = None
-
- self.is_showing = False
-
- self.anaconda = anaconda
- self.load()
- self.resize()
- self.setupWindow()
-
- def getReleaseNotes(self):
- langs = self.anaconda.id.instLanguage.getCurrentLangSearchList() + [ "" ]
-
- if not "en_US.UTF-8" in langs:
- langs += expandLangs("en_US.UTF-8")
-
- suffixList = []
- for lang in langs:
- if lang:
- suffixList.append("-%s.html" % (lang,))
- suffixList.append(".%s" % (lang,))
-
- for suffix in suffixList:
- fn = "RELEASE-NOTES%s" % (suffix,)
- try:
-# tmpfile = os.path.abspath(self.anaconda.dispatch.method.getFilename(fn, destdir="/tmp", retry=0))
- if tmpfile is None:
- continue
-
- # Just because we got a filename back doesn't
- # mean it's a valid file. Check that it's not
- # zero length too.
- st = os.stat(tmpfile)
- if st.st_size == 0L:
- os.remove(tmpfile)
- continue
-
- self.topDir = os.path.dirname(tmpfile)
- return tmpfile
- except:
- continue
-
- return None
-
- def resize(self, w=None, h=None):
- sw = gtk.gdk.screen_width()
- (step, args) = self.anaconda.dispatch.currentStep()
-
- if w is None:
- if sw > 800 or (sw == 800 and gui.runningMiniWm()):
- self.width = 800
- else:
- self.width = 640
- else:
- self.width = int(w)
-
- # 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
- if h is None:
- if sw >= 800:
- if step == "installpackages":
- self.height = 445
- else:
- self.height = 600
- else:
- if step == "installpackages":
- self.height = 300
- else:
- self.height = 480
- else:
- self.height = int(h)
-
- # FIXME: replace with logger from anaconda_log (fix exec first)
- def log(self, string):
- print string
-
- def load(self, uri=None):
- def loadWrapper(baloney):
- self.doc.open_stream('text/html')
- self.doc.write_stream(self.htmlheader)
- self.doc.write_stream(baloney)
- self.doc.write_stream(self.htmlfooter)
-
- if uri is None:
- uri = self.getReleaseNotes()
-
- if uri is not None:
- if os.access(uri, os.R_OK):
- try:
- f = self.openURI(uri)
- except OSError:
- self.log("Failed to open %s" % (uri,))
- return
-
- if f is not None:
- self.doc.clear()
- headers = f.info()
-
- mime = headers.getheader('Content-type')
- if mime == 'text/html':
- self.doc.open_stream(mime)
- self.doc.write_stream(f.read())
- else:
- loadWrapper(f.read())
-
- self.doc.close_stream()
- f.close()
-
- self.currentURI = self.resolveURI(uri)
- else:
- loadWrapper(_("Release notes are missing.\n"))
- self.doc.close_stream()
-
- self.currentURI = None
- else:
- loadWrapper(_("Release notes are missing.\n"))
- self.doc.close_stream()
-
- self.currentURI = None
-
- def isShowing(self):
- return self.is_showing
-
- def hide(self):
- if self.textWin is not None:
- self.textWin.hide_all()
- self.is_showing = False
-
- def setupWindow(self):
- self.vue.set_document(self.doc)
- self.textWin = gtk.Window()
- self.textWin.connect("delete-event", self.closedCallBack)
- mainbox = gtk.VBox(False, 6)
- self.textWin.add(mainbox)
-
- table = gtk.Table(3, 3, False)
- mainbox.pack_start(table)
-
- mainbox.pack_start(gtk.HSeparator(), False, False)
- bb = gtk.HButtonBox()
- bb.set_property("layout-style", gtk.BUTTONBOX_END)
-
- b = gtk.Button(stock="gtk-close")
- b.connect("clicked", self.closedCallBack)
- bb.pack_start(b)
- mainbox.pack_start(bb, False, False)
-
- vbox1 = gtk.VBox()
- vbox1.set_border_width(10)
- frame = gtk.Frame("")
- frame.add(vbox1)
- frame.set_label_align(0.5, 0.5)
- frame.set_shadow_type(gtk.SHADOW_NONE)
-
- self.textWin.set_position(gtk.WIN_POS_NONE)
- self.textWin.set_gravity(gtk.gdk.GRAVITY_NORTH_WEST)
-
- if self.vue is not None:
- sw = gtk.ScrolledWindow()
- sw.set_policy(gtk.POLICY_AUTOMATIC,gtk.POLICY_AUTOMATIC)
- sw.set_shadow_type(gtk.SHADOW_IN)
- sw.add(self.vue)
- sw.show_all()
- vbox1.pack_start(sw)
-
- a = gtk.Alignment(0, 0, 1.0, 1.0)
- a.add(frame)
-
- self.textWin.set_default_size(self.width, self.height)
- self.textWin.set_size_request(self.width, self.height)
-
- # we want the release notes dialog to be the same
- # size as the main installer window so it covers it
- # up completely. this isn't always the same size
- # as the root window, so figure out our northwest
- # origin point and then move the window
- if gtk.gdk.screen_width() == self.width:
- self.textWin.move(0, 0)
- else:
- # the width will always be fixed, but our
- # height changes depending on the installation
- # stage, so do the origin point calculations
- # using what would be the full height
- if self.width == 800:
- fullh = 600
- elif self.width == 640:
- fullh = 480
-
- left = (gtk.gdk.screen_width() - self.width) / 2
- top = (gtk.gdk.screen_height() - fullh) / 2
- self.textWin.move(left, top)
-
- table.attach(a, 1, 2, 1, 2, gtk.FILL | gtk.EXPAND, gtk.FILL | gtk.EXPAND, 5, 5)
-
- self.textWin.set_border_width(0)
- gui.addFrame(self.textWin, _("Release Notes"))
- else:
- self.textWin.set_position(gtk.WIN_POS_CENTER)
- label = gtk.Label(_("Unable to load file!"))
-
- table.attach(label, 1, 2, 1, 2, gtk.FILL | gtk.EXPAND, gtk.FILL | gtk.EXPAND, 5, 5)
-
- self.textWin.set_border_width(0)
- gui.addFrame(self.textWin)
-
- def view(self):
- self.textWin.show_all()
-
- # set cursor to normal (assuming that anaconda set it to busy
- # when it exec'd this viewer app to give progress indicator
- # to user).
- root = gtk.gdk.get_default_root_window()
- cursor = gtk.gdk.Cursor(gtk.gdk.LEFT_PTR)
- root.set_cursor(cursor)
-
- self.is_showing = True
-
- def resolveURI(self, link):
- parts = urlparse.urlparse(link)
- if parts[0] or parts[1]:
- return link
- else:
- # FIXME: does not work right now
- #return urlparse.urljoin(self.currentURI, link)
- return link
-
- def openURI(self, link):
- try:
- ret = self.opener.open(self.resolveURI(link))
- except IOError:
- ret = None
-
- return ret
-
- def closedCallBack(self, *args):
- self.textWin.hide_all()
- self.is_showing = False
-
- def linkClickedCallBack(self, document, link):
- if link[0] == '#':
- self.log("jump to anchor: %s" % (link,))
- self.vue.jump_to_anchor(link)
- else:
- self.load(link)
-
- def requestURLCallBack(self, document, url, stream):
- try:
- f = self.openURI(url)
- stream.write(f.read())
- except:
- # we'll try local from self.topDir
- url = os.path.abspath(self.topDir + '/' + url)
- try:
- f = self.openURI(url)
- stream.write(f.read())
- except:
- self.log("requested url not found: %s" % (url,))
-
- def requestObjectCallBack(self, *args):
- self.log("request objects call back: %s" % (args))
diff --git a/ui/anaconda.glade b/ui/anaconda.glade
index ce6a0caf2..b0d273c60 100644
--- a/ui/anaconda.glade
+++ b/ui/anaconda.glade
@@ -104,91 +104,7 @@
<property name="spacing">6</property>
<child>
- <widget class="GtkHButtonBox" id="hbuttonbox1">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_START</property>
- <property name="spacing">18</property>
-
- <child>
- <widget class="GtkButton" id="relnotesButton">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <signal name="clicked" handler="on_relnotesButton_clicked" last_modification_time="Wed, 12 Jan 2005 20:02:19 GMT"/>
-
- <child>
- <widget class="GtkAlignment" id="alignment2">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
- <property name="top_padding">0</property>
- <property name="bottom_padding">0</property>
- <property name="left_padding">0</property>
- <property name="right_padding">0</property>
-
- <child>
- <widget class="GtkHBox" id="hbox3">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">2</property>
-
- <child>
- <widget class="GtkImage" id="image3">
- <property name="visible">True</property>
- <property name="stock">gtk-new</property>
- <property name="icon_size">4</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label2">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Release Notes</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
+ <placeholder/>
</child>
<child>