def checkSwap (self):
if PartitionWindow.swapon or (iutil.memInstalled() > 34000):
return 1
threads_leave ()
message = gui.MessageWindow(_("Low Memory"),
_("As you don't have much memory in this machine, we "
"need to turn on swap space immediately. To do this "
"we'll have to write your new partition table to the "
"disk immediately. Is that okay?"), "okcancel")
if (message.getrc () == 1):
threads_enter ()
return 0
def getNext(self):
from gnomepyfsedit import fsedit
if (self.__dict__.has_key("manuallyPartition") and
self.manuallyPartition.get_active()):
drives = self.todo.drives.available ().keys ()
drives.sort (isys.compareDrives)
self.todo.ddruid = fsedit(0, drives, self.fstab, self.todo.zeroMbr,
self.todo.ddruidReadOnly)
self.todo.manuallyPartition()
return None
def getScreen (self):
from gnomepyfsedit import fsedit
from installpath import InstallPathWindow
if (InstallPathWindow.fdisk and
InstallPathWindow.fdisk.get_active ()):
self.todo.manuallyPartition()
return None
# XXX hack
if self.todo.instClass.clearType:
self.ics.readHTML (self.todo.instClass.clearType)
todo = self.todo
self.fstab = []
for mntpoint, (dev, fstype, reformat) in todo.mounts.items ():
self.fstab.append ((dev, mntpoint))
if not todo.ddruid:
drives = todo.drives.available ().keys ()
drives.sort (isys.compareDrives)
todo.ddruid = fsedit(0, drives, self.fstab, self.todo.zeroMbr,
self.todo.ddruidReadOnly)
if not todo.instClass.finishPartitioning(todo.ddruid):
self.todo.log ("Autopartitioning FAILED\n")
if not todo.getPartitionWarningText():
return None
label = \
GtkLabel(_("%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(), ))
label.set_line_wrap(TRUE)
label.set_alignment(0.0, 0.0)
label.set_usize(400, -1)