summaryrefslogtreecommitdiffstats
path: root/text.py
diff options
context:
space:
mode:
authorErik Troan <ewt@redhat.com>1999-09-02 18:44:04 +0000
committerErik Troan <ewt@redhat.com>1999-09-02 18:44:04 +0000
commit890c18647a1d54abd3c5b99c58dfd38058fe6cb0 (patch)
treea0854324bbaaa98517b1405240fa67f6893239d4 /text.py
parent7d2f1280e0bffaa34b04790506ffced0760a3607 (diff)
downloadanaconda-890c18647a1d54abd3c5b99c58dfd38058fe6cb0.tar.gz
anaconda-890c18647a1d54abd3c5b99c58dfd38058fe6cb0.tar.xz
anaconda-890c18647a1d54abd3c5b99c58dfd38058fe6cb0.zip
automatic partitioning in classed installs should work -- back buttons
are completely fucked though
Diffstat (limited to 'text.py')
-rw-r--r--text.py31
1 files changed, 26 insertions, 5 deletions
diff --git a/text.py b/text.py
index 1b4ff614f..8b77496cc 100644
--- a/text.py
+++ b/text.py
@@ -16,6 +16,7 @@ INSTALL_NOOP = -2
cat = gettext.Catalog ("anaconda", "/usr/share/locale")
_ = cat.gettext
+basicButtons = ((_("Ok"), "ok"), (_("Back"), "back"))
class LanguageWindow:
def __call__(self, screen, todo):
@@ -673,10 +674,8 @@ class HostnameWindow:
return INSTALL_OK
-class PartitionWindow:
+class AutoPartitionWindow:
def __call__(self, screen, todo):
- #if (not todo.setupFilesystems): return INSTALL_NOOP
-
fstab = []
for mntpoint, (dev, fstype, reformat) in todo.mounts.items ():
fstab.append ((dev, mntpoint))
@@ -686,9 +685,29 @@ class PartitionWindow:
drives.sort ()
todo.ddruid = fsedit(0, drives, fstab)
- dir = INSTALL_NOOP
todo.instClass.finishPartitioning(todo.ddruid)
- if not todo.instClass.skipPartitioning:
+
+ if not todo.getPartitionWarningText():
+ return INSTALL_NOOP
+
+ (rc, choice) = ListboxChoiceWindow(screen, _("Automatic Partitioning"),
+ _("%s\n\nIf you don't want to do this, you can continue with "
+ "this install by partitioning manually, or you can go back "
+ "and perform a fully customized installation.") %
+ (todo.getPartitionWarningText(), ),
+ [_("Continue"), _("Manually partition")],
+ buttons = basicButtons, default = _("Continue"))
+
+ if (rc == "back"): return INSTALL_BACK
+
+ if (choice == 1):
+ todo.ddruid = fsedit(0, drives, fstab)
+ todo.manuallyPartition()
+
+class PartitionWindow:
+ def __call__(self, screen, todo):
+ dir = INSTALL_NOOP
+ if not todo.getSkipPartitioning():
dir = todo.ddruid.edit ()
for partition, mount, fstype, size in todo.ddruid.getFstab ():
@@ -1508,6 +1527,8 @@ class InstallInterface:
]
self.installSteps = [
+ [_("Automatic Partition"), AutoPartitionWindow,
+ (self.screen, todo), "partition" ],
[_("Partition"), PartitionWindow, (self.screen, todo),
"partition" ],
[_("Filesystem Formatting"), FormatWindow, (self.screen, todo),