/[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.7 - (show annotations) (download) (as text)
Fri Jun 9 05:03:00 2006 UTC (18 years, 6 months ago) by gordonr
Branch: MAIN
CVS Tags: HEAD
Changes since 1.6: +0 -0 lines
Content type: text/x-python
FILE REMOVED
See bug 1510 - all changes should be in the anaconda CVS repository

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 rc = intf.messageWindow(_("Warning"),
50 _("All disks will be reformatted and any data will be lost. Proceed?"),
51 type = "yesno", default = "no")
52
53 if rc == 0:
54 return INSTALL_BACK
55
56 if (choice != orig):
57 (name, objectClass, logo) = classes[choice]
58 c = objectClass(flags.expert)
59 c.setSteps(dispatch)
60 c.setInstallData(id)
61
62 return INSTALL_OK
63

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