From: <cod...@go...> - 2008-07-12 02:26:57
|
Author: M0E.lnx Date: Fri Jul 11 19:26:01 2008 New Revision: 36 Modified: branches/iVL/.lang/#project.pot branches/iVL/.lang/ClsGlobal.pot branches/iVL/.lang/FMain.pot branches/iVL/.lang/FrmDiskPart.pot branches/iVL/.lang/FrmLicense.pot branches/iVL/.lang/FrmPartScheme.pot branches/iVL/.lang/FrmPartSel.pot branches/iVL/.lang/FrmSelISO.pot branches/iVL/.lang/MdlCore.pot branches/iVL/.lang/MdlDiskPart.pot branches/iVL/.lang/MdlObjSizer.pot branches/iVL/.lang/MdlPartSel.pot branches/iVL/.lang/MdlSetup.pot branches/iVL/FrmPartSel.form branches/iVL/MdlPartSel.module Log: Progress on the partition selection algorithm. Modified: branches/iVL/.lang/#project.pot ============================================================================== --- branches/iVL/.lang/#project.pot (original) +++ branches/iVL/.lang/#project.pot Fri Jul 11 19:26:01 2008 @@ -1,4 +1,4 @@ -# /home/moises/area-51/projects/installer/.project +# /home/vluser/area-51/projects/installer/.project # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.lang/ClsGlobal.pot ============================================================================== --- branches/iVL/.lang/ClsGlobal.pot (original) +++ branches/iVL/.lang/ClsGlobal.pot Fri Jul 11 19:26:01 2008 @@ -1,4 +1,4 @@ -# /home/moises/area-51/projects/installer/ClsGlobal.class +# /home/vluser/area-51/projects/installer/ClsGlobal.class # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.lang/FMain.pot ============================================================================== --- branches/iVL/.lang/FMain.pot (original) +++ branches/iVL/.lang/FMain.pot Fri Jul 11 19:26:01 2008 @@ -1,4 +1,4 @@ -# /home/moises/area-51/projects/installer/FMain.class +# /home/vluser/area-51/projects/installer/FMain.class # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.lang/FrmDiskPart.pot ============================================================================== --- branches/iVL/.lang/FrmDiskPart.pot (original) +++ branches/iVL/.lang/FrmDiskPart.pot Fri Jul 11 19:26:01 2008 @@ -1,4 +1,4 @@ -# /home/moises/area-51/projects/installer/FrmDiskPart.class +# /home/vluser/area-51/projects/installer/FrmDiskPart.class # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.lang/FrmLicense.pot ============================================================================== --- branches/iVL/.lang/FrmLicense.pot (original) +++ branches/iVL/.lang/FrmLicense.pot Fri Jul 11 19:26:01 2008 @@ -1,4 +1,4 @@ -# /home/moises/area-51/projects/installer/FrmLicense.class +# /home/vluser/area-51/projects/installer/FrmLicense.class # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.lang/FrmPartScheme.pot ============================================================================== --- branches/iVL/.lang/FrmPartScheme.pot (original) +++ branches/iVL/.lang/FrmPartScheme.pot Fri Jul 11 19:26:01 2008 @@ -1,4 +1,4 @@ -# /home/moises/area-51/projects/installer/FrmPartScheme.class +# /home/vluser/area-51/projects/installer/FrmPartScheme.class # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.lang/FrmPartSel.pot ============================================================================== --- branches/iVL/.lang/FrmPartSel.pot (original) +++ branches/iVL/.lang/FrmPartSel.pot Fri Jul 11 19:26:01 2008 @@ -1,4 +1,4 @@ -# /home/moises/area-51/projects/installer/FrmPartSel.class +# /home/vluser/area-51/projects/installer/FrmPartSel.class # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. @@ -14,7 +14,19 @@ "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: FrmPartSel.class:58 +#: FrmPartSel.class:61 msgid "Define where the operating system will be installed\n<br>\nLinux is a modular operating system. This means that it has the ability to keep system and user data separately.<br> A recommended setup would included a / (root), a /home, and a swap partitions.\n<br>\nPlease select which partitions you would like to use for your install" +msgstr "" + +#: FrmPartSel.class:69 +msgid "<b>Partition</b>" +msgstr "" + +#: FrmPartSel.class:75 +msgid "<b>Mount Point</b>" +msgstr "" + +#: FrmPartSel.class:81 +msgid "<b>File System</b>" msgstr "" Modified: branches/iVL/.lang/FrmSelISO.pot ============================================================================== --- branches/iVL/.lang/FrmSelISO.pot (original) +++ branches/iVL/.lang/FrmSelISO.pot Fri Jul 11 19:26:01 2008 @@ -1,4 +1,4 @@ -# /home/moises/area-51/projects/installer/FrmSelISO.class +# /home/vluser/area-51/projects/installer/FrmSelISO.class # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.lang/MdlCore.pot ============================================================================== --- branches/iVL/.lang/MdlCore.pot (original) +++ branches/iVL/.lang/MdlCore.pot Fri Jul 11 19:26:01 2008 @@ -1,4 +1,4 @@ -# /home/moises/area-51/projects/installer/MdlCore.module +# /home/vluser/area-51/projects/installer/MdlCore.module # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.lang/MdlDiskPart.pot ============================================================================== --- branches/iVL/.lang/MdlDiskPart.pot (original) +++ branches/iVL/.lang/MdlDiskPart.pot Fri Jul 11 19:26:01 2008 @@ -1,4 +1,4 @@ -# /home/moises/area-51/projects/installer/MdlDiskPart.module +# /home/vluser/area-51/projects/installer/MdlDiskPart.module # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.lang/MdlObjSizer.pot ============================================================================== --- branches/iVL/.lang/MdlObjSizer.pot (original) +++ branches/iVL/.lang/MdlObjSizer.pot Fri Jul 11 19:26:01 2008 @@ -1,4 +1,4 @@ -# /home/moises/area-51/projects/installer/MdlObjSizer.module +# /home/vluser/area-51/projects/installer/MdlObjSizer.module # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.lang/MdlPartSel.pot ============================================================================== --- branches/iVL/.lang/MdlPartSel.pot (original) +++ branches/iVL/.lang/MdlPartSel.pot Fri Jul 11 19:26:01 2008 @@ -1,4 +1,4 @@ -# /home/moises/area-51/projects/installer/MdlPartSel.module +# /home/vluser/area-51/projects/installer/MdlPartSel.module # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.lang/MdlSetup.pot ============================================================================== --- branches/iVL/.lang/MdlSetup.pot (original) +++ branches/iVL/.lang/MdlSetup.pot Fri Jul 11 19:26:01 2008 @@ -1,4 +1,4 @@ -# /home/moises/area-51/projects/installer/MdlSetup.module +# /home/vluser/area-51/projects/installer/MdlSetup.module # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/FrmPartSel.form ============================================================================== --- branches/iVL/FrmPartSel.form (original) +++ branches/iVL/FrmPartSel.form Fri Jul 11 19:26:01 2008 @@ -9,5 +9,20 @@ } { scrollPartitions ScrollView MoveScaled(1,16,69,36) + { tlPartRow TextLabel + MoveScaled(1,1,14,3) + Text = ("<b>Partition</b>") + Alignment = Align.Left + } + { tlPartRow2 TextLabel + MoveScaled(19,1,14,3) + Text = ("<b>Mount Point</b>") + Alignment = Align.Left + } + { tlPartRow3 TextLabel + MoveScaled(39,1,14,3) + Text = ("<b>File System</b>") + Alignment = Align.Left + } } } Modified: branches/iVL/MdlPartSel.module ============================================================================== --- branches/iVL/MdlPartSel.module (original) +++ branches/iVL/MdlPartSel.module Fri Jul 11 19:26:01 2008 @@ -17,6 +17,9 @@ ' You should have received a copy of the GNU General Public License ' along with vinstall-ng. If not, see <http://www.gnu.org/licenses/>. +PUBLIC oMountPoints AS Object[] +PUBLIC oFsTypes AS Object[] + PUBLIC SUB DISPLAY_PARTITION_OPTIONS() DIM tl AS TextLabel @@ -32,14 +35,20 @@ DIM vSwapSize AS Variant DIM iswapsize AS Float DIM i3drdrowX AS Integer + DIM iX AS Integer - + ' fire up the arrays + oFsTypes = NEW Object[] + oMountPoints = NEW Object[] ' We will mount the partitions first, and then figure out their size SHELL "export PATH=$PATH:/sbin && sudo probepart | grep -e \" Linux$\" | cut -f 1 -d \' \'" TO sDump1 sDump1 = Trim(sDump1) - y = FrmPartSel.y + 24 + + + y = FrmPartSel.tlPartRow.top + FrmPartSel.tlPartRow.Height + 8 + IF InStr(sDump1, gb.NewLine) > 0 THEN sPartList = Split(sDump1, gb.NewLine) FOR i = 0 TO sPartList.Count - 1 @@ -69,7 +78,7 @@ .Width = lbwidth END IF .Height = 27 - .x = .Parent.X + .x = FrmPartSel.tlPartRow.Left .Alignment = Align.Normal .y = y END WITH @@ -78,11 +87,14 @@ cb = NEW ComboBox(FrmPartSel.scrollPartitions) AS "MountPoints" WITH cb .tag = Trim(sPartList[i]) - .x = lbwidth + 24 + '.x = lbwidth + 24 + .X = FrmPartSel.tlPartRow2.Left .y = y .Height = tl.Height .Width = tl.Width .ReadOnly = TRUE + .tag = Trim(sPartList[i]) + .Add("Not Used") .Add("/") .Add("/home") .Add("/opt") @@ -90,12 +102,14 @@ .Add("/var") .Add("/tmp") END WITH + oMountPoints.Add(cb) i3drdrowX = cb.x + cb.Width + 8 'create the file system options cb = NEW ComboBox(FrmPartSel.scrollPartitions) AS "fsTypes" WITH cb .Tag = Trim(sPartList[i]) - .x = i3drdrowX + '.x = i3drdrowX + .x = FrmPartSel.tlPartRow3.Left .y = y .ReadOnly = TRUE .Width = tl.Width @@ -104,7 +118,9 @@ .Add("Ext2") .Add("Ext3") .Add("JFS") + .Add("Do not format") END WITH + oFsTypes.Add(cb) ' now umount the partition and delete the mount point @@ -138,7 +154,8 @@ 'now create the swap label and combo box tl = NEW TextLabel(FrmPartSel.scrollPartitions) AS "swlabel" WITH tl - .x = .Parent.x + '.x = .Parent.x + .x = FrmPartSel.tlPartRow.Left .y = y .Text = sPart & " ( " & CStr(iswapsize) & "G )" .Width = lbwidth @@ -151,7 +168,8 @@ cb = NEW ComboBox(FrmPartSel.scrollPartitions) AS "swapsel" WITH cb .y = y - .x = lbwidth + 24 + '.x = lbwidth + 24 + .x = FrmPartSel.tlPartRow2.Left .Width = tl.Width .tag = "swapSelection" .ReadOnly = TRUE @@ -163,12 +181,50 @@ 'Message.Info("Swap total = " & iswapsize) END IF - - - + END + +PUBLIC SUB MountPoints_CLick() + + DIM sdropdwn AS ComboBox + DIM sTag AS String = LAST.tag + DIM sText AS String = Trim(LAST.text) + + IF sText = "Not Used" THEN + FOR EACH sdropdwn IN oFsTypes + IF sdropdwn.Tag = sTag THEN + sdropdwn.Enabled = FALSE + ELSE + sdropdwn.Enabled = TRUE + END IF + NEXT + ELSE + FOR EACH sdropdwn IN oFsTypes + IF sdropdwn.Tag = sTag THEN + sdropdwn.Enabled = TRUE + END IF + NEXT + END IF + +END + +PUBLIC SUB fsTypes_click() + + DIM cb AS ComboBox + +IF LAST.text = "Do not format" + FOR EACH cb IN oMountPoints + IF cb.tag = LAST.tag AND cb.text = "/" THEN + Message.Error("The / partition MUST BE FORMATTED. No way around that") + RETURN + END IF + NEXT + END IF + +END + |