From: <cod...@go...> - 2009-05-04 20:16:26
|
Author: M0...@gm... Date: Mon May 4 08:58:39 2009 New Revision: 543 Added: branches/speedy/Conf5.class branches/speedy/Conf5.form Modified: branches/speedy/.lang/.pot branches/speedy/.lang/Conf5.pot branches/speedy/.project Log: - Restored old working services window. Modified: branches/speedy/.lang/.pot ============================================================================== --- branches/speedy/.lang/.pot (original) +++ branches/speedy/.lang/.pot Mon May 4 08:58:39 2009 @@ -387,7 +387,7 @@ msgid "Setting" msgstr "" -#: Conf3a.class:118 Conf5.class:36 Step7a.class:49 Step7b.class:28 +#: Conf3a.class:118 Step7a.class:49 Step7b.class:28 msgid "Description" msgstr "" @@ -438,16 +438,72 @@ msgid "Linux.net" msgstr "" -#: Conf5.class:35 +#: Conf5.class:60 msgid "Service" msgstr "" -#: Conf5.class:126 -msgid "System Serices" +#: Conf5.class:89 +msgid "System task scheduler" msgstr "" -#: Conf5.class:147 -msgid "Select system services to run on start-up" +#: Conf5.class:92 +msgid "Bluetooth device manager" +msgstr "" + +#: Conf5.class:95 +msgid "Secure Shell remote access" +msgstr "" + +#: Conf5.class:98 +msgid "Software update notifications" +msgstr "" + +#: Conf5.class:101 +msgid "Wireless network scanner" +msgstr "" + +#: Conf5.class:104 +msgid "Printing service" +msgstr "" + +#: Conf5.class:107 +msgid "File in userspace daemon" +msgstr "" + +#: Conf5.class:110 +msgid "Internet Super Server" +msgstr "" + +#: Conf5.class:113 +msgid "RPC Port Mapper" +msgstr "" + +#: Conf5.class:116 +msgid "Windows networking service" +msgstr "" + +#: Conf5.class:119 +msgid "VMWare modules" +msgstr "" + +#: Conf5.class:122 +msgid "Network interface manager" +msgstr "" + +#: Conf5.class:125 +msgid "Enhanced network security" +msgstr "" + +#: Conf5.class:128 +msgid "Mouse driver for Text Mode interface" +msgstr "" + +#: Conf5.class:227 +msgid "System Services" +msgstr "" + +#: Conf5.class:248 +msgid "Select the system services to be launched at start-up." msgstr "" #: FDone.class:23 FMain.class:317 FMain0.class:318 Modified: branches/speedy/.lang/Conf5.pot ============================================================================== --- branches/speedy/.lang/Conf5.pot (original) +++ branches/speedy/.lang/Conf5.pot Mon May 4 08:58:39 2009 @@ -14,19 +14,71 @@ "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: Conf5.class:35 +#: Conf5.class:60 msgid "Service" msgstr "" -#: Conf5.class:36 -msgid "Description" +#: Conf5.class:89 +msgid "System task scheduler" msgstr "" -#: Conf5.class:126 -msgid "System Serices" +#: Conf5.class:92 +msgid "Bluetooth device manager" msgstr "" -#: Conf5.class:147 -msgid "Select system services to run on start-up" +#: Conf5.class:95 +msgid "Secure Shell remote access" +msgstr "" + +#: Conf5.class:98 +msgid "Software update notifications" +msgstr "" + +#: Conf5.class:101 +msgid "Wireless network scanner" +msgstr "" + +#: Conf5.class:104 +msgid "Printing service" +msgstr "" + +#: Conf5.class:107 +msgid "File in userspace daemon" +msgstr "" + +#: Conf5.class:110 +msgid "Internet Super Server" +msgstr "" + +#: Conf5.class:113 +msgid "RPC Port Mapper" +msgstr "" + +#: Conf5.class:116 +msgid "Windows networking service" +msgstr "" + +#: Conf5.class:119 +msgid "VMWare modules" +msgstr "" + +#: Conf5.class:122 +msgid "Network interface manager" +msgstr "" + +#: Conf5.class:125 +msgid "Enhanced network security" +msgstr "" + +#: Conf5.class:128 +msgid "Mouse driver for Text Mode interface" +msgstr "" + +#: Conf5.class:227 +msgid "System Services" +msgstr "" + +#: Conf5.class:248 +msgid "Select the system services to be launched at start-up." msgstr "" Modified: branches/speedy/.project ============================================================================== --- branches/speedy/.project (original) +++ branches/speedy/.project Mon May 4 08:58:39 2009 @@ -1,7 +1,7 @@ # Gambas Project File 2.0 # Compiled with Gambas 2.12 Title=VectorLinux Installer -Startup=Conf5 +Startup=MdlStartUp Version=0.0.2 Library=gb.gtk Library=gb.form Added: branches/speedy/Conf5.class ============================================================================== --- (empty file) +++ branches/speedy/Conf5.class Mon May 4 08:58:39 2009 @@ -0,0 +1,196 @@ +' 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/>. + +' ==================== services configuration settings ================= +PRIVATE picStatus AS Picture +PUBLIC SUB Form_Open() + + WITH ME + .tlbanner.Text = "<h2>" & tlbanner.Text & "</h2>" + END WITH + ME.Prepare_Grid() + ME.lIST_SERVICES() +END +PUBLIC FUNCTION GetNext() AS String + + MdlMain.ADVANCE_STATUS_TREE("Step9", "Step10") + RETURN "FDone" + +END +PUBLIC SUB StartUp() + + + +END +PUBLIC SUB OnExit() + + ME.SAVE_SERVICES_LIST() + +END + + +PUBLIC SUB Form_Resize() + + WITH ME + .gvSvcList.Height = .ClientH - (.gvSvcList.Top + 12) + .gvSvcList.Columns[2].Width = .gvSvcList.Width - (.gvSvcList.Columns[2].Left + 12) + END WITH + +END +PUBLIC SUB Prepare_Grid() + DIM i AS Integer + WITH ME + .gvSvcList.Rows.Count = 3 + .gvSvcList.columns.Count = 4 + .gvheader.rows.Count = 1 + .gvheader.Columns.Count = 3 + .gvheader[0, 2].Text = UCase(("Service")) + FOR i = 0 TO gvheader.columns.Count - 1 + .gvheader[0, i].BackColor = Color.SelectedBackground + .gvheader[0, i].Alignment = Align.Center + NEXT + .gvSvcList.columns[0].Width = 24 + .gvheader.Columns[0].Width = 24 + .gvSvcList.Columns[1].Width = 64 + .gvheader.Columns[1].Width = 64 + .gvSvcList.Columns[3].Width = 1 + END WITH + + +END + + +PUBLIC SUB lIST_SERVICES() + + DIM irow AS Integer + DIM sService, sDesc AS String + DIM sPic AS Picture + DIM sLogo AS Image + DIM sSvcPath AS String = "/etc/rc.d/init.d" 'ClsGlobal.sTargetPath &/ "etc" &/ "rc.d" &/ "init.d" + + picStatus = Picture.Load("images/16px-check.png") + + FOR EACH sService IN Dir(sSvcPath, "*", gb.File) + SELECT CASE sService + CASE "cron" + sDesc = ("System task scheduler") + sPic = picStatus + CASE "bluetooth" + sDesc = ("Bluetooth device manager") + sPic = "" + CASE "sshd" + sDesc = ("Secure Shell remote access") + sPic = "" + CASE "gslaptd" + sDesc = ("Software update notifications") + sPic = picStatus + CASE "wifi-radar" + sDesc = ("Wireless network scanner") + sPic = "" + CASE "cups" + sDesc = ("Printing service") + sPic = picStatus + CASE "fuse" + sDesc = ("File in userspace daemon") + sPic = "" + CASE "inetd" + sDesc = ("Internet Super Server") + sPic = "" + CASE "portmap" + sDesc = ("RPC Port Mapper") + sPic = "" + CASE "samba" + sDesc = ("Windows networking service") + sPic = "" + CASE "vmware" + sDesc = ("VMWare modules") + sPic = "" + CASE "wicd" + sDesc = ("Network interface manager") + sPic = picStatus + CASE "firewall" + sDesc = ("Enhanced network security") + sPic = "" + CASE "gpm" + sDesc = ("Mouse driver for Text Mode interface") + sPic = "" + END SELECT + IF Exist("images" &/ sService & ".svg") THEN + sLogo = Image.Load("images" &/ sService & ".svg") + ELSE + sLogo = Image.Load("images" &/ "service.svg") + END IF + + + IF sDesc THEN + ME.gvSvcList[irow, 0].Picture = sPic + IF sLogo THEN + ME.gvSvcList[irow, 1].Picture = sLogo.Picture + ME.gvSvcList[irow, 1].Alignment = Align.Center + END IF + ME.gvSvcList.rows[irow].Height = 64 'sLogo.Height + ME.gvSvcList[irow, 0].Alignment = Align.Center + ME.gvSvcList[irow, 2].Text = UCase(sService) & gb.NewLine & gb.NewLine & sDesc + ME.gvSvcList[irow, 3].Text = sService + INC irow + INC gvSvcList.Rows.Count + END IF + NEXT + + DEC gvSvcList.Rows.Count + DEC gvSvcList.Rows.Count + DEC gvSvcList.Rows.Count + + +END + + +PUBLIC SUB gvSvcList_Click() + + IF LAST.column > 1 THEN RETURN + IF gvSvcList[LAST.row, 0].Picture = picStatus THEN + gvSvcList[LAST.row, 0].Picture = "" + ELSE + gvSvcList[LAST.row, 0].Picture = picStatus + END IF + + gvSvcList.Refresh() + +END +PUBLIC SUB SAVE_SERVICES_LIST() + + DIM irow AS Integer + DIM sSVc AS String + + ' We will default to runlevel 4 (GUI Mode) for services. + FOR irow = 0 TO ME.gvSvcList.Rows.Count - 1 + sSVc = gvSvcList[irow, 3].Text + IF gvSvcList[irow, 0].Picture = picStatus THEN + PRINT " \\__ Setting up services" & gb.NewLine + PRINT " \\- " & sSVc + SHELL "chroot " & ClsGlobal.sTargetPath & " /sbin/service -s " & sSVc & " 4" WAIT + END IF + + NEXT + +END + + +PUBLIC SUB gvSvcList_Menu() + + ME.SAVE_SERVICES_LIST() + +END Added: branches/speedy/Conf5.form ============================================================================== --- (empty file) +++ branches/speedy/Conf5.form Mon May 4 08:58:39 2009 @@ -0,0 +1,49 @@ +# Gambas Form File 2.0 + +{ Form Form + MoveScaled(0,0,92,59) + Text = ("") + Arrangement = Arrange.Row + Padding = 2 + { HPanel1 HPanel + MoveScaled(0,0,60,5) + Expand = True + { tlbanner TextLabel + MoveScaled(12,0,33,3) + Expand = True + Text = ("System Services") + } + { Separator1 Separator + MoveScaled(13,4,25,1) + Expand = True + } + } + { HBox1 HBox + MoveScaled(4,5,6,2) + Expand = True + } + { HBox2 HBox + MoveScaled(0,7,59,3.5) + Expand = True + { tlExp TextLabel + MoveScaled(1,0,21,3.5) + Expand = True + Text = ("Select the system services to be launched at start-up.") + } + } + { HBox3 HBox + MoveScaled(1,11,4,2) + Expand = True + } + { gvheader GridView + MoveScaled(1,13,56,3) + Expand = True + Scrollbar = Scroll.None + Border = False + } + { gvSvcList GridView + MoveScaled(1,18,56,19) + Expand = True + Scrollbar = Scroll.Vertical + } +} |