1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
#
# congrats_gui.py: install/upgrade complete screen.
#
# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006 Red Hat, Inc.
# All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import gtk
import gui
import iutil
from iw_gui import *
from constants import *
import os
import gettext
_ = lambda x: gettext.ldgettext("anaconda", x)
class CongratulationWindow (InstallWindow):
windowTitle = N_("Congratulations")
def __init__ (self, ics):
InstallWindow.__init__(self, ics)
ics.setPrevEnabled(False)
# force buttonbar on in case release notes viewer is running
ics.cw.mainxml.get_widget("buttonBar").set_sensitive(True)
# this mucks around a bit, but it's the weird case and it's
# better than adding a lot of complication to the normal
ics.cw.mainxml.get_widget("nextButton").hide()
if os.path.exists("/dev/live-osimg"):
ics.cw.mainxml.get_widget("closeButton").show()
ics.cw.mainxml.get_widget("closeButton").grab_focus()
else:
ics.cw.mainxml.get_widget("rebootButton").show()
ics.cw.mainxml.get_widget("rebootButton").grab_focus()
def getNext(self):
# XXX - copy any screenshots over
gui.copyScreenshots()
# CongratulationWindow tag=NA
def getScreen (self, anaconda):
hbox = gtk.HBox (False, 5)
pix = gui.readImageFromFile ("done.png")
if pix:
a = gtk.Alignment ()
a.add (pix)
a.set (0.5, 0.5, 1.0, 1.0)
a.set_size_request(200, -1)
hbox.pack_start (a, False, False, 36)
bootstr = ""
if iutil.isS390() or os.path.exists("/dev/live-osimg"):
floppystr = _("Please reboot the system to use the installed "
"system.\n\n")
else:
floppystr = _("Press the \"Reboot\" button to reboot your system."
"\n\n")
txt = _("Congratulations, the installation is complete.\n\n"
"%s%s") %(floppystr, bootstr)
label = gui.WrappingLabel(txt)
label.set_size_request(250, -1)
hbox.pack_start (label, True, True)
gtk.gdk.beep()
return hbox
|