summaryrefslogtreecommitdiffstats
path: root/iw/confirm_gui.py
blob: 95c62527c16ff3b442fb31fee231edb1f2036232 (plain)
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
from gtk import *
from iw_gui import *
from translate import _, N_
from package_gui import queryUpgradeContinue
import gui

class ConfirmWindow (InstallWindow):

    # ConfirmWindow tag="aboutupgrade" or "aboutinstall"
    def getScreen (self, labelText, longText):
        hbox = GtkHBox (TRUE, 5)
        box = GtkVBox (FALSE, 5)

        pix = self.ics.readPixmap ("about-to-install.png")
        if pix:
            a = GtkAlignment ()
            a.add (pix)
            a.set (0.5, 0.5, 1.0, 1.0)
            hbox.pack_start (a, FALSE)

	label = GtkLabel (labelText)
        label.set_line_wrap (TRUE)
        label.set_usize(190, -1)

	label2 = GtkLabel (longText)
        label2.set_line_wrap (TRUE)
        label2.set_usize(190, -1)
        
        box.pack_start (label, FALSE)
        box.pack_start (label2, FALSE)
        box.set_border_width (5)

        a = GtkAlignment ()
        a.add (box)
        a.set (0.5, 0.5, 0.0, 0.0)

        hbox.pack_start (a)
        return hbox
        
class InstallConfirmWindow (ConfirmWindow):
    windowTitle = N_("About to Install")
    htmlTag = "aboutinstall"

    def getScreen(self):
	return ConfirmWindow.getScreen(self,
	    _("Click next to begin installation of Red Hat Linux."),
	    _("A complete log of your installation will be in "
	      "/tmp/install.log after rebooting your system. You "
	      "may want to keep this file for later reference. "
              "A kickstart file representing the choices you have made "
              "will be in /root/anaconda-ks.cfg."))

class UpgradeConfirmWindow (ConfirmWindow):
    windowTitle = N_("About to Upgrade")
    htmlTag = "aboutupgrade"

    def getScreen(self):
	return ConfirmWindow.getScreen(self,
            _("Click next to begin upgrade of Red Hat Linux."),
            _("A complete log of your upgrade will be in "
	      "/tmp/upgrade.log after rebooting your system. You "
	      "may want to keep this file for later reference."))