From: <cod...@go...> - 2008-10-06 23:36:56
|
Author: m0e.lnx Date: Mon Oct 6 14:32:59 2008 New Revision: 214 Added: branches/iVL/MdlUsrAdd.module Modified: branches/iVL/.lang/#project.pot branches/iVL/.project branches/iVL/DevLog branches/iVL/FrmUserAdd.class branches/iVL/FrmUserAdd.form Log: - Begin development in the user add section Modified: branches/iVL/.lang/#project.pot ============================================================================== --- branches/iVL/.lang/#project.pot (original) +++ branches/iVL/.lang/#project.pot Mon Oct 6 14:32:59 2008 @@ -1,4 +1,4 @@ -# /home/moe/projects/installer/.project +# /home/remote/area-51/projects/installer/.project # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.project ============================================================================== --- branches/iVL/.project (original) +++ branches/iVL/.project Mon Oct 6 14:32:59 2008 @@ -1,7 +1,7 @@ # Gambas Project File 2.0 # Compiled with Gambas 2.9.0 Title=VectorLinux Installer -Startup=MdlCore +Startup=FrmUserAdd Version=0.0.102 Library=gb.gtk Library=gb.form Modified: branches/iVL/DevLog ============================================================================== --- branches/iVL/DevLog (original) +++ branches/iVL/DevLog Mon Oct 6 14:32:59 2008 @@ -1 +1 @@ -- Fixed progressbar values for custom installation. \ No newline at end of file +- Begin development in the user add section \ No newline at end of file Modified: branches/iVL/FrmUserAdd.class ============================================================================== --- branches/iVL/FrmUserAdd.class (original) +++ branches/iVL/FrmUserAdd.class Mon Oct 6 14:32:59 2008 @@ -1,8 +1,29 @@ ' Gambas class file + + +' This file is part of vinstall-ng + +' vinstall-ng is free software: you can redistribute it and/or modify +' it under the terms of the GNU General Public License as published by +' the Free Software Foundation, either version 2 of the License, or +' (at your option) any later version. + +' vinstall-ng is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU General Public License for more details. + +' 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 iUID AS Integer = 1000 PUBLIC SUB Form_Open() Fmain.frmcurr = ME + WITH ME + .tlBanner.Text = "<h3>" & ("Create User Accounts") & "</h3>" + END WITH END @@ -62,18 +83,45 @@ PUBLIC SUB Form_Resize() + + DIM iboxleft AS Integer + DIM iboxwidth AS Integer + - WITH ME - .Frame1.Move(4, 4, .ClientWidth - (.Frame1.left * 2), .ClientHeight - (.Frame1.Height * 2)) - .TextLabel1.Move(4, 12, .Frame1.Width - (.TextLabel1.Left * 2)) + WITH ME + + .tlBanner.Move(4, 4, .ClientWidth - (.tlBanner.left * 2)) + .hrSep.Move(4, .tlBanner.top + .tlBanner.Height, .tlBanner.Width) + .tlExp.Move(4, .hrSep.top + .hrSep.Height + 12, .hrSep.Width) + .TextLabel2.Move(4, .tlExp.top + .tlExp.Height + 8, MdlObjSizer.get_object_width(.TextLabel2.text) * 2) + .tbUsername.Move(.TextLabel2.Left + .TextLabel2.Width + 4, .TextLabel2.top, .TextLabel2.Width * 1.75) + iboxleft = .tbUsername.Left + iboxwidth = .tbUsername.Width + .TextLabel3.Move(4, .TextLabel2.top + .TextLabel2.Height + 4, .TextLabel2.Width) + .tbPasswd1.Move(iboxleft, .TextLabel3.top, iboxwidth) + .TextLabel4.Move(4, .TextLabel3.top + .TextLabel3.height + 4, .TextLabel2.Width) + .tbPasswd2.Move(iboxleft, .TextLabel4.top, iboxwidth) + .tlUserID.Move(4, .TextLabel4.top + .TextLabel4.Height + 4, .TextLabel2.Width) + .cbUserID.Move(iboxleft, .tlUserID.top, iboxwidth * 0.45) + .tbUsrID.Move(.cbUserID.Left + .cbUserID.Width + 4, .cbUserID.top, iboxwidth - (.cbUserID.Width + 4)) + .bUsePic.Move(4, .tbUsrID.top + .tbUsrID.Height + 4, MdlObjSizer.get_object_width(.bUsePic.Text) + 36) + .tbPicPath.Move(4, .bUsePic.top + .bUsePic.Height + 2, .TextLabel2.Width + iboxwidth + 8) + .btBrowse.Move(.tbPicPath.Left + .tbPicPath.Width + 4, .tbPicPath.top, MdlObjSizer.get_object_width(.btBrowse.text) + 36) + + + + + + '.Frame1.Move(4, 4, .ClientWidth - (.Frame1.left * 2), .ClientHeight - (.Frame1.Height * 2)) +' .TextLabel1.Move(4, 12, .Frame1.Width - (.TextLabel1.Left * 2)) - .TextLabel2.Move(4, .TextLabel1.top + .TextLabel1.Height + 16, 130) - .tbUsername.Move(.TextLabel2.left + .TextLabel2.Width + 4, .TextLabel2.top, 150) - .TextLabel3.Move(4, .TextLabel2.top + .TextLabel2.Height + 4, 130) - .tbPasswd1.Move(.TextLabel3.left + .TextLabel3.Width + 4, .TextLabel3.top, 150) - .TextLabel4.Move(4, .TextLabel3.top + .TextLabel3.Height + 4, 130) - .tbPasswd2.Move(.TextLabel4.left + .TextLabel4.Width + 4, .TextLabel4.top, 150) - .Button1.Move(.TextLabel4.left, .TextLabel4.top + .TextLabel4.Height + 8, MdlObjSizer.get_object_width(.button1.text) + 24) + ' .TextLabel2.Move(4, .TextLabel1.top + .TextLabel1.Height + 16, 130) + ' .tbUsername.Move(.TextLabel2.left + .TextLabel2.Width + 4, .TextLabel2.top, 150) + ' .TextLabel3.Move(4, .TextLabel2.top + .TextLabel2.Height + 4, 130) + ' .tbPasswd1.Move(.TextLabel3.left + .TextLabel3.Width + 4, .TextLabel3.top, 150) + ' .TextLabel4.Move(4, .TextLabel3.top + .TextLabel3.Height + 4, 130) + ' .tbPasswd2.Move(.TextLabel4.left + .TextLabel4.Width + 4, .TextLabel4.top, 150) + ' .Button1.Move(.TextLabel4.left, .TextLabel4.top + .TextLabel4.Height + 8, MdlObjSizer.get_object_width(.button1.text) + 24) @@ -84,5 +132,30 @@ PUBLIC SUB tbUsername_KeyPress() + +END + +PUBLIC SUB cbUserID_Click() + + IF Trim(cbUserID.text) = ("Auto") THEN + ME.tbUsrID.Visible = FALSE + ELSE + ME.tbUsrID.Visible = TRUE +END IF + +END + +PUBLIC SUB bUsePic_Click() + + WITH ME + .tbPicPath.Visible = bUsePic.Value + .btBrowse.Visible = .bUsePic.Value + END WITH + +END + +PUBLIC SUB Form_Menu() + + MdlUsrAdd.DISPLAY_USER_GROUP_OPTIONS() END Modified: branches/iVL/FrmUserAdd.form ============================================================================== --- branches/iVL/FrmUserAdd.form (original) +++ branches/iVL/FrmUserAdd.form Mon Oct 6 14:32:59 2008 @@ -1,44 +1,85 @@ # Gambas Form File 2.0 { Form Form - MoveScaled(0,0,72,47) + MoveScaled(0,0,76,67) Text = ("") - { Frame1 Frame - MoveScaled(1,2,62,37) - Text = ("Add Users") - { TextLabel1 TextLabel - MoveScaled(2,2,55,8) - Text = ("Choose a unique name for each user. Enter the password for twice for accuracy. You can make as many users as you want, and when you are finished click next to continue.") - } - { TextLabel2 TextLabel - MoveScaled(2,17,12,3) - Text = ("Username") - } - { tbUsername TextBox - MoveScaled(14,17,15,3) - Text = ("") - } - { TextLabel3 TextLabel - MoveScaled(2,20,16,3) - Text = ("Enter Password") - } - { tbPasswd1 TextBox - MoveScaled(16,20,16,3) - Text = ("") - Password = True - } - { TextLabel4 TextLabel - MoveScaled(2,23,14,3) - Text = ("ReEnter Password") - } - { tbPasswd2 TextBox - MoveScaled(16,23,16,3) - Text = ("") - Password = True - } - { Button1 Button - MoveScaled(2,27,14,1) - Text = ("Create User") - } + { tlExp TextLabel + MoveScaled(3,12,55,8) + Text = ("Choose a unique name for each user. Enter the password for twice for accuracy. You can make as many users as you want, and when you are finished click next to continue.") + } + { tbUsername TextBox + MoveScaled(23,20,15,3) + Text = ("") + } + { TextLabel2 TextLabel + MoveScaled(2,21,12,3) + Text = ("Username") + Alignment = Align.Normal + } + { TextLabel3 TextLabel + MoveScaled(2,24,16,3) + Text = ("Enter Password") + Alignment = Align.Normal + } + { tbPasswd1 TextBox + MoveScaled(16,24,16,3) + Text = ("") + Password = True + } + { tbPasswd2 TextBox + MoveScaled(16,27,16,3) + Text = ("") + Password = True + } + { TextLabel4 TextLabel + MoveScaled(2,27,14,3) + Text = ("ReEnter Password") + Alignment = Align.Normal + } + { Button1 Button + MoveScaled(1,63,14,1) + Text = ("Create User") + } + { tlBanner TextLabel + MoveScaled(1,2,55,4) + Text = ("") + } + { hrSep Separator + MoveScaled(30,8,12,1) + } + { tlUserID TextLabel + MoveScaled(2,31,12,3) + Text = ("User ID") + Alignment = Align.Normal + } + { cbUserID ComboBox + MoveScaled(16,31,16,2) + Text = ("") + ReadOnly = True + List = [("Auto"), ("Manual")] + } + { tbUsrID TextBox + MoveScaled(34,31,13,3) + Visible = False + Text = ("") + } + { bUsePic CheckBox + MoveScaled(2,35,45,3) + Text = ("User Picture ID for Login greeting") + } + { tbPicPath TextBox + MoveScaled(2,39,55,3) + Visible = False + Text = ("") + } + { btBrowse Button + MoveScaled(57,39,10,3) + Visible = False + Text = ("Select") + Picture = Picture["icon:/16/directory"] + } + { fGroupSel Frame + MoveScaled(2,44,69,17) + Text = ("User Rights Management") } } Added: branches/iVL/MdlUsrAdd.module ============================================================================== --- (empty file) +++ branches/iVL/MdlUsrAdd.module Mon Oct 6 14:32:59 2008 @@ -0,0 +1,71 @@ +' Gambas module file + +' This file is part of vinstall-ng + +' vinstall-ng is free software: you can redistribute it and/or modify +' it under the terms of the GNU General Public License as published by +' the Free Software Foundation, either version 2 of the License, or +' (at your option) any later version. + +' vinstall-ng is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU General Public License for more details. + +' 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 objGrps AS Object[] + +PUBLIC SUB DISPLAY_USER_GROUP_OPTIONS() +DIM sGrpList AS String = "cdrom,floppy,lp,scanner,audio,video,game,adm,sys,wheel" +DIM sGrpArr AS String[] +DIM i AS Integer +DIM sLabel, sComment, sToolTip AS String +DIM cb AS CheckBox +DIM x, y AS Integer + +objGrps = NEW Object[] +sGrpArr = Split(sGrpList, ",") +FOR i = 0 TO sGrpArr.Count - 1 + sLabel = Trim(sGrpArr[i]) + SELECT CASE sLabel + CASE "cdrom" + sComment = ("This user can access CD/DVD devices") + CASE "floppy" + sComment = ("This user can access floppy disks") + CASE "lp" + sComment = ("This user is allowed to print") + CASE "scanner" + sComment = ("This user can access scanner devices") + CASE "audio" + sComment = ("This user is allowed to change audio settings") + CASE "video" + sComment = ("This user is allowed to change video settings") + CASE "game" + sComment = ("This user is allowed to play restricted games") + CASE "adm" + sComment = ("Restricted administrator (backup)") + CASE "sys" + sComment = ("This user is a system administrator") + CASE "wheel" + sComment = ("Elite user") +END SELECT + x = 4 + y = 12 +cb = NEW CheckBox(FrmUserAdd.fGroupSel) + WITH cb + .text = sLabel + .Value = FALSE + .Height = 18 + .Width = MdlObjSizer.get_object_width(.text) + 24 + .Move(x, y) + .ToolTip = sComment + y = y + 4 + END WITH + objGrps.Add(cb) + 'y = y + cb.Height + 4 +NEXT + + + +END |