/[smeserver]/cdrom.image/updates/installpath_text.py
ViewVC logotype

Contents of /cdrom.image/updates/installpath_text.py

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.4 - (show annotations) (download) (as text)
Mon Oct 10 05:27:15 2005 UTC (19 years, 2 months ago) by gordonr
Branch: MAIN
Changes since 1.3: +1 -1 lines
Content type: text/x-python
Revert - can't have a parameter 'default' and a local variable 'default', it seems

1 #
2 # installpath_text: text mode installation type selection dialog
3 #
4 # Copyright 2001-2002 Red Hat, Inc.
5 #
6 # This software may be freely redistributed under the terms of the GNU
7 # library public license.
8 #
9 # You should have received a copy of the GNU Library Public License
10 # along with this program; if not, write to the Free Software
11 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
12 #
13
14 from snack import *
15 from constants_text import *
16 from rhpl.translate import _
17 from flags import flags
18 import installclass
19
20 class InstallPathWindow:
21 def __call__ (self, screen, dispatch, id, method, intf):
22 tmpclasses = installclass.availableClasses()
23
24 # strip out '_' in names cause we dont do mnemonics in text mode
25 classes = []
26 for (n, o, l) in tmpclasses:
27 n2 = n.replace("_", "")
28 classes.append((n2, o, l))
29
30 choices = []
31 default = 0
32 i = 0
33 orig = None
34
35 for (name, object, icon) in classes:
36 choices.append(_(name))
37
38 if isinstance(id.instClass, object):
39 orig = i
40 elif object.default:
41 default = i
42
43 i = i + 1
44
45 if orig != None:
46 default = orig
47
48 choice = default
49 # (button, choice) = ListboxChoiceWindow(screen, _("Installation Type"),
50 # _("What type of system would you like to install?"),
51 # choices, [TEXT_OK_BUTTON, TEXT_BACK_BUTTON],
52 # width = 40, default = default, help = "installpath")
53 #
54 # if button == TEXT_BACK_CHECK:
55 # return INSTALL_BACK
56
57 rc = intf.messageWindow(_("Warning"),
58 _("All disks will be reformatted and any data will be lost. Proceed?"),
59 type = "yesno")
60
61 if rc == 0:
62 return INSTALL_BACK
63
64 if (choice != orig):
65 (name, objectClass, logo) = classes[choice]
66 c = objectClass(flags.expert)
67 c.setSteps(dispatch)
68 c.setInstallData(id)
69
70 return INSTALL_OK
71

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed