diff options
author | 2007-01-07 20:57:16 +0000 | |
---|---|---|
committer | 2007-01-07 20:57:16 +0000 | |
commit | f6fb46b4b74821a3735aab8c8a176abe4736a79d (patch) | |
tree | 45933032cfcbede22e2b4ebc9225c2022df07824 /src/fe/dialog | |
parent | force part_size_mb to int (diff) | |
download | gli-f6fb46b4b74821a3735aab8c8a176abe4736a79d.tar.gz gli-f6fb46b4b74821a3735aab8c8a176abe4736a79d.tar.bz2 gli-f6fb46b4b74821a3735aab8c8a176abe4736a79d.zip |
adding more of the mountpoints screen
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/gli/branches/overhaul@1610 f8877401-5920-0410-a79b-8e2d7e04ca0d
Diffstat (limited to 'src/fe/dialog')
-rwxr-xr-x | src/fe/dialog/gli-dialog.py | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/fe/dialog/gli-dialog.py b/src/fe/dialog/gli-dialog.py index 5366435..a963889 100755 --- a/src/fe/dialog/gli-dialog.py +++ b/src/fe/dialog/gli-dialog.py @@ -323,6 +323,36 @@ Press OK to continue""") if parts[part] > 0: choices_list.append(part) choices = self._dmenu_list_to_choices(choices_list) code, menuitemidx = self._d.menu(_(u"Select a Partition to define a mountpoint for: %s" % str(parts)), choices=choices, height=18) + if menuitemidx: + partition = choices_list[int(menuitemidx)-1] + else: continue + + #Ask for mountpoint for this partition. #FIXME use Partition to get the type. + choices_list = ['ext2', 'ext3', 'linux-swap', 'xfs', 'jfs', 'reiserfs','ntfs', 'fat16', 'fat32'] + choices = self._dmenu_list_to_choices(choices_list) + code,fstypeidx = self._d.menu(_(u"Select the filesystem for partition %s") % partition, choices=choices, height=18) + if fstypeidx: + fstype = choices_list[int(fstypeidx)-1] + else: continue + + #Ask for the mountpoint + mountpoint_menu = ["/","/boot","/etc","/home","/lib","/mnt","/mnt/windows","/opt","/root","/usr","/usr/local","/usr/portage","/var",_(u"Other")] + code, mountpt = self._d.menu(_(u"Choose a mountpoint from the list or choose Other to type your own for partition %s. ") % partition, choices=self._dmenu_list_to_choices(mountpoint_menu)) #may have to make that an integer + if code == self._DLG_OK: + mountpoint = mountpoint_menu[int(mountpt)-1] + if mountpoint == _(u"Other"): + code, mountpoint = self._d.inputbox(_(u"Enter a mountpoint for partition %s") % partition) + + if not mountpoint: continue + + #Ask for mountopts + code, mountopts = self._d.inputbox(_(u"Enter mount options for mountpoint %s. Leave blank for defaults") % mountpoint, height=13, width=50) + if code != self._DLG_OK: + continue + + #We have all the info we need, now add the mount + mounts.append({'devnode': partition, 'mountopts': mountopts, 'mountpoint': mountpoint, 'type': fstype}) + def set_partitions(self): partitions_string1 = _(u"""The first thing on the new system to setup is the partitoning. You will first select a drive and then edit its partitions. |