summaryrefslogtreecommitdiffstats
path: root/iw/filter_type.py
blob: 3c691bd1c8da342860c93d4d641af2fef671720f (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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#
# Copyright (C) 2009  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/>.
#
# Author(s): Chris Lumens <clumens@redhat.com>
#

import gtk
import gobject
import math

from constants import *
import gui
from partition_ui_helpers_gui import *
from pixmapRadioButtonGroup_gui import pixmapRadioButtonGroup

from iw_gui import *
from flags import flags
from storage.deviceaction import *

import gettext
_ = lambda x: gettext.ldgettext("anaconda", x)

class FilterTypeWindow(InstallWindow):
    def __init__(self, ics):
        InstallWindow.__init__(self, ics)
        ics.setTitle("Filter Type")
        ics.setNextEnabled(True)

    def getNext(self):
        if self.buttonGroup.getCurrent() == "simple":
            self.anaconda.simpleFilter = True
        else:
            self.anaconda.simpleFilter = False

        return None

    def getScreen(self, anaconda):
        self.anaconda = anaconda
        self.intf = anaconda.intf

        vbox = gtk.VBox()
        label = gtk.Label(_("What type of devices will your installation "
                            "involve?"))
        label.set_alignment(0.0, 0.0)
        vbox.pack_start(label, expand=False, fill=False)

        self.buttonGroup = pixmapRadioButtonGroup()
        self.buttonGroup.addEntry("simple", _("Basic Storage Devices"),
                                  descr=_("Installs or upgrades to typical types "
                                          "of storage devices.  If you're not sure "
                                          "which option is right for you, this is "
                                          "probably it."))
        self.buttonGroup.addEntry("complex", _("Specialized Storage Devices"),
                                  descr=_("Installs or upgrades to devices such as "
                                          "Storage Area Networks (SANs) or mainframe "
                                          "attached disks (DASD), usually in an "
                                          "enterprise environment"))

        widget = self.buttonGroup.render()
        vbox.pack_start(widget, expand=True, fill=True)

        if self.anaconda.simpleFilter == True:
            self.buttonGroup.setCurrent("simple")
        else:
            self.buttonGroup.setCurrent("complex")

        return vbox