From: <cod...@go...> - 2008-09-16 21:34:40
|
Author: M0...@gm... Date: Tue Sep 16 14:32:23 2008 New Revision: 167 Added: branches/iVL/images/ethernet.png (contents, props changed) Modified: branches/iVL/.lang/#project.pot branches/iVL/.lang/ClsGlobal.pot branches/iVL/.lang/ClsPartSel.pot branches/iVL/.lang/ClsWinDrives.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/FrmPkgSel.pot branches/iVL/.lang/FrmSelISO.pot branches/iVL/.lang/FrmSummary.pot branches/iVL/.lang/FrmWinDrives.pot branches/iVL/.lang/MdlCore.pot branches/iVL/.lang/MdlDiskPart.pot branches/iVL/.lang/MdlObjSizer.pot branches/iVL/.lang/MdlPartSel.pot branches/iVL/.lang/MdlPkgSel.pot branches/iVL/.lang/MdlSetup.pot branches/iVL/.lang/MdlSummarize.pot branches/iVL/.lang/MdlWinDrives.pot branches/iVL/FrmEmbUsrAdd.class branches/iVL/FrmEmbUsrAdd.form branches/iVL/FrmNetConf.class branches/iVL/FrmNetConf.form branches/iVL/MdlNetConf.module Log: - Added button to re-launch the useradd.gambas module - Began new Netconf concept module/window Modified: branches/iVL/.lang/#project.pot ============================================================================== --- branches/iVL/.lang/#project.pot (original) +++ branches/iVL/.lang/#project.pot Tue Sep 16 14:32:23 2008 @@ -1,4 +1,4 @@ -# /home/vluser/area-51/projects/installer/.project +# /home/moe/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 Tue Sep 16 14:32:23 2008 @@ -1,4 +1,4 @@ -# /home/vluser/area-51/projects/installer/ClsGlobal.class +# /home/moe/projects/installer/ClsGlobal.class # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.lang/ClsPartSel.pot ============================================================================== --- branches/iVL/.lang/ClsPartSel.pot (original) +++ branches/iVL/.lang/ClsPartSel.pot Tue Sep 16 14:32:23 2008 @@ -1,4 +1,4 @@ -# /home/vluser/area-51/projects/installer/ClsPartSel.class +# /home/moe/projects/installer/ClsPartSel.class # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.lang/ClsWinDrives.pot ============================================================================== --- branches/iVL/.lang/ClsWinDrives.pot (original) +++ branches/iVL/.lang/ClsWinDrives.pot Tue Sep 16 14:32:23 2008 @@ -1,4 +1,4 @@ -# /home/vluser/area-51/projects/installer/ClsWinDrives.class +# /home/moe/projects/installer/ClsWinDrives.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 Tue Sep 16 14:32:23 2008 @@ -1,4 +1,4 @@ -# /home/vluser/area-51/projects/installer/FMain.class +# /home/moe/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 Tue Sep 16 14:32:23 2008 @@ -1,4 +1,4 @@ -# /home/vluser/area-51/projects/installer/FrmDiskPart.class +# /home/moe/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 Tue Sep 16 14:32:23 2008 @@ -1,4 +1,4 @@ -# /home/vluser/area-51/projects/installer/FrmLicense.class +# /home/moe/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 Tue Sep 16 14:32:23 2008 @@ -1,4 +1,4 @@ -# /home/vluser/area-51/projects/installer/FrmPartScheme.class +# /home/moe/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 Tue Sep 16 14:32:23 2008 @@ -1,4 +1,4 @@ -# /home/vluser/area-51/projects/installer/FrmPartSel.class +# /home/moe/projects/installer/FrmPartSel.class # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.lang/FrmPkgSel.pot ============================================================================== --- branches/iVL/.lang/FrmPkgSel.pot (original) +++ branches/iVL/.lang/FrmPkgSel.pot Tue Sep 16 14:32:23 2008 @@ -1,4 +1,4 @@ -# /home/vluser/area-51/projects/installer/FrmPkgSel.class +# /home/moe/projects/installer/FrmPkgSel.class # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.lang/FrmSelISO.pot ============================================================================== --- branches/iVL/.lang/FrmSelISO.pot (original) +++ branches/iVL/.lang/FrmSelISO.pot Tue Sep 16 14:32:23 2008 @@ -1,4 +1,4 @@ -# /home/vluser/area-51/projects/installer/FrmSelISO.class +# /home/moe/projects/installer/FrmSelISO.class # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.lang/FrmSummary.pot ============================================================================== --- branches/iVL/.lang/FrmSummary.pot (original) +++ branches/iVL/.lang/FrmSummary.pot Tue Sep 16 14:32:23 2008 @@ -1,4 +1,4 @@ -# /home/vluser/area-51/projects/installer/FrmSummary.class +# /home/moe/projects/installer/FrmSummary.class # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.lang/FrmWinDrives.pot ============================================================================== --- branches/iVL/.lang/FrmWinDrives.pot (original) +++ branches/iVL/.lang/FrmWinDrives.pot Tue Sep 16 14:32:23 2008 @@ -1,4 +1,4 @@ -# /home/vluser/area-51/projects/installer/FrmWinDrives.class +# /home/moe/projects/installer/FrmWinDrives.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 Tue Sep 16 14:32:23 2008 @@ -1,4 +1,4 @@ -# /home/vluser/area-51/projects/installer/MdlCore.module +# /home/moe/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 Tue Sep 16 14:32:23 2008 @@ -1,4 +1,4 @@ -# /home/vluser/area-51/projects/installer/MdlDiskPart.module +# /home/moe/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 Tue Sep 16 14:32:23 2008 @@ -1,4 +1,4 @@ -# /home/vluser/area-51/projects/installer/MdlObjSizer.module +# /home/moe/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 Tue Sep 16 14:32:23 2008 @@ -1,4 +1,4 @@ -# /home/vluser/area-51/projects/installer/MdlPartSel.module +# /home/moe/projects/installer/MdlPartSel.module # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.lang/MdlPkgSel.pot ============================================================================== --- branches/iVL/.lang/MdlPkgSel.pot (original) +++ branches/iVL/.lang/MdlPkgSel.pot Tue Sep 16 14:32:23 2008 @@ -1,4 +1,4 @@ -# /home/vluser/area-51/projects/installer/MdlPkgSel.module +# /home/moe/projects/installer/MdlPkgSel.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 Tue Sep 16 14:32:23 2008 @@ -1,4 +1,4 @@ -# /home/vluser/area-51/projects/installer/MdlSetup.module +# /home/moe/projects/installer/MdlSetup.module # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.lang/MdlSummarize.pot ============================================================================== --- branches/iVL/.lang/MdlSummarize.pot (original) +++ branches/iVL/.lang/MdlSummarize.pot Tue Sep 16 14:32:23 2008 @@ -1,4 +1,4 @@ -# /home/vluser/area-51/projects/installer/MdlSummarize.module +# /home/moe/projects/installer/MdlSummarize.module # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.lang/MdlWinDrives.pot ============================================================================== --- branches/iVL/.lang/MdlWinDrives.pot (original) +++ branches/iVL/.lang/MdlWinDrives.pot Tue Sep 16 14:32:23 2008 @@ -1,4 +1,4 @@ -# /home/vluser/area-51/projects/installer/MdlWinDrives.module +# /home/moe/projects/installer/MdlWinDrives.module # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/FrmEmbUsrAdd.class ============================================================================== --- branches/iVL/FrmEmbUsrAdd.class (original) +++ branches/iVL/FrmEmbUsrAdd.class Tue Sep 16 14:32:23 2008 @@ -17,20 +17,31 @@ PUBLIC SUB Form_Open() - DIM iID AS Integer = ME.Embedder1.Id + + ME.EMBED_VASMCC_MODULE() + 'btAddUser.Visible = FALSE + +END + + +PUBLIC SUB EMBED_VASMCC_MODULE() + + DIM iID AS Integer = ME.Embedder1.Id SHELL "$PWD/adduser.gambas " & iID & Space(1) & ME.ClientWidth & Space(1) & ME.clientHeight MdlCore.LOCK_GUI() - - END + + PUBLIC SUB Form_Resize() WITH ME .Embedder1.Move(0, 2, .ClientWidth - 4, .ClientHeight - 24) + .btAddUser.Move(4, .top + .ClientHeight - (.btAddUser.Height * 2), MdlObjSizer.get_object_width(.btAddUser.text) + 24) + END WITH END @@ -38,6 +49,36 @@ PUBLIC SUB Embedder1_Close() MdlCore.unlock_gui() + btAddUser.Show + Embedder1.Hide + + +END + +PUBLIC SUB btAddUser_Click() + + ME.EMBED_VASMCC_MODULE() + ME.Embedder1.show + ME.btAddUser.Hide + 'btAddUser.Visible = FALSE + +END + +PUBLIC SUB Embedder1_Leave() + + 'ME.Embedder1.Visible = FALSE + 'btAddUser.Visible = TRUE + Embedder1.Hide + btAddUser.show + 'ME.Refresh + +END + +PUBLIC SUB Embedder1_Embed() + 'btAddUser.Visible = FALSE + Embedder1.show + btAddUser.Hide + 'btAddUser.lower END Modified: branches/iVL/FrmEmbUsrAdd.form ============================================================================== --- branches/iVL/FrmEmbUsrAdd.form (original) +++ branches/iVL/FrmEmbUsrAdd.form Tue Sep 16 14:32:23 2008 @@ -4,6 +4,10 @@ MoveScaled(0,0,64,64) Text = ("") { Embedder1 Embedder - MoveScaled(1,3,60,47) + MoveScaled(1,2,58,51) + } + { btAddUser Button + MoveScaled(48,54,10,3) + Text = ("New User Account") } } Modified: branches/iVL/FrmNetConf.class ============================================================================== --- branches/iVL/FrmNetConf.class (original) +++ branches/iVL/FrmNetConf.class Tue Sep 16 14:32:23 2008 @@ -13,48 +13,28 @@ ' You should have received a copy of the GNU General Public License ' along with vinstall-ng. If not, see <http://www.gnu.org/licenses/>. -PRIVATE arrStaticOb AS object[] -PUBLIC SUB Form_Open() -DIM obj AS Object -arrStaticOb = NEW Object[] - - WITH ME - arrStaticOb.Add(.txtGatewayaddr) - arrStaticOb.Add(.txtSubnetNask) - arrStaticOb.Add(.tlGatewayAddr) - arrStaticOb.Add(.tlSubNetMask) - arrStaticOb.Add(.tlIpAddress) - arrStaticOb.Add(.txtStaticIp) - END WITH -FOR EACH obj IN arrStaticOb - obj.Visible = FALSE -NEXT - +PUBLIC FUNCTION GET_CURRENT_HOST_NAME() AS String + DIM sRes AS String + IF Exist("/etc/HOSTNAME") THEN + sRes = File.Load(DConv("/etc/HOSTNAME")) + IF sRes = "" THEN + sRes = "Vector.Linux.net" + END IF + ELSE + sRes = "Vector.Linux.net" + END IF + RETURN sRes + END -PUBLIC SUB tlHostNameLbl_MouseDown() - - -END - -PUBLIC SUB cbIpSettings_Click() - DIM tb AS TextBox - DIM tl AS TextLabel - DIM obj AS Object - IF ME.cbIpSettings.text = "STATIC" THEN +PUBLIC SUB Form_Open() - FOR EACH obj IN arrStaticOb - obj.Visible = TRUE - NEXT + ME.txtHostName.text = ME.GET_CURRENT_HOST_NAME() + MdlNetConf.LIST_NETWORK_INTERFACES + IF ERROR THEN Message(Error.text & "\n" & Error.where) - ELSE - FOR EACH obj IN arrStaticOb - obj.Visible = FALSE - NEXT - END IF - - END + Modified: branches/iVL/FrmNetConf.form ============================================================================== --- branches/iVL/FrmNetConf.form (original) +++ branches/iVL/FrmNetConf.form Tue Sep 16 14:32:23 2008 @@ -1,52 +1,24 @@ # Gambas Form File 2.0 { Form Form - MoveScaled(0,0,64,64) + MoveScaled(0,0,88,51) Text = ("") { tlHostNameLbl TextLabel - MoveScaled(1,6,16,3) + MoveScaled(1,2,16,3) Text = ("Computer Name") } { txtHostName TextBox - MoveScaled(18,6,28,3) + MoveScaled(18,2,28,3) Text = ("") } - { FrmIpSettings Frame - MoveScaled(1,11,62,33) - Text = (" TCP/IP Settings") - { cbIpSettings ComboBox - MoveScaled(1,3,16,2) - Text = ("") - ReadOnly = True - List = [("DHCP"), ("STATIC")] - } - { txtStaticIp TextBox - MoveScaled(25,6,19,3) - Text = ("") - } - { tlIpAddress TextLabel - MoveScaled(2,7,14,2) - Text = ("IP Address") - } - { tlSubNetMask TextLabel StaticSettings - Name = "tlSubNetMask" - MoveScaled(2,10,14,3) - Text = ("SubNet Mask") - } - { tlGatewayAddr TextLabel StaticSettings - Name = "tlGatewayAddr" - MoveScaled(2,14,17,3) - Text = ("Gateway Address") - } - { txtSubnetNask TextBox StaticSettings - Name = "txtSubnetNask" - MoveScaled(25,9,19,3) - Text = ("") - } - { txtGatewayaddr TextBox StaticSettings - Name = "txtGatewayaddr" - MoveScaled(25,13,19,3) - Text = ("") + { frmNetDevices Frame + MoveScaled(1,7,85,42) + Text = (" Network Interfaces") + { TSNetDevices TabStrip + MoveScaled(2,4,81,35) + Index = 0 + Text = ("Tab 0") + Index = 0 } } } Modified: branches/iVL/MdlNetConf.module ============================================================================== --- branches/iVL/MdlNetConf.module (original) +++ branches/iVL/MdlNetConf.module Tue Sep 16 14:32:23 2008 @@ -14,3 +14,81 @@ ' 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 SUB LIST_NETWORK_INTERFACES() + + ' This SUB will detect network interfaces and offer setup options for each one of them + DIM seths AS String + DIM saths AS String + DIM sDevList AS String[] + DIM sLine AS String[] + DIM sDev AS String + DIM sType AS String + DIM sDevAddr AS String + DIM tl AS TextLabel + DIM tb AS TextBox + DIM cb AS ComboBox + DIM i, ii AS Integer + DIM pTabPic AS picture = Picture["images/ethernet.png"] + + SHELL "ifconfig -a | grep eth" TO seths + File.Save(Temp("eths"), Trim(seths)) + + sDevList = Split(File.Load(DConv(Temp("eths"))), gb.NewLine) + 'Message(DConv(File.load(Temp("eths")))) + 'sEths = Trim(seths) + 'sDevList.Clear + + 'sDevList = Split(seths, "\n") + 'FrmNetConf.TsNetDevices.count = sDevList.count - 1 + 'PRINT FrmNetConf.TSNetDevices.count + 'PRINT sDevList.Count - 1 + 'FrmNetConf.TsNetDevices.index = 0 + FOR i = 0 TO sDevList.count - 1 + sLine = Split(sDevList[i], " ") + sDev = sLine[0] + sDevAddr = sLine[10] ' This may be off depending on which box this runs one... needs careful testing + + WITH FrmNetConf.TSNetDevices + PRINT .Count + + + .index = i + '.text = Left(sDevList[i], 4) + .text = sDev + IF sDevList[i] <> "" THEN + INC .Count + END IF + .picture = pTabPic + ' populate it with the objects + tl = NEW TextLabel(FrmNetConf.TSNetDevices) AS "DevAddresses" + WITH tl + .Move(4, 16) + .text = "Hardware Address" + .Height = 21 + .Alignment = Align.Normal + .Width = MdlObjSizer.get_object_width(.text) + + END WITH + tb = NEW TextBox(FrmNetConf.TSNetDevices) AS "txtDevAddresses" + WITH tb + .Move(tl.left + tl.Width + 4, tl.top) + .text = DConv(sDevAddr) + .ReadOnly = TRUE + .Width = MdlObjSizer.get_object_width(.text) + 24 + .Height = tl.Height + END WITH + END WITH + + + NEXT + FrmNetConf.TSNetDevices[FrmNetConf.TSNetDevices.count - 1].Delete ' Ugly hack to delete the trailing blank tab + + + + + + + IF ERROR THEN Message(Error.text & gb.newline & Error.where) + + +END Added: branches/iVL/images/ethernet.png ============================================================================== Binary file. No diff available. |