From: <cod...@go...> - 2008-10-29 20:13:50
|
Author: M0...@gm... Date: Wed Oct 29 13:12:51 2008 New Revision: 246 Added: branches/iVL/clsXconf.class Modified: branches/iVL/FrmXconf.class branches/iVL/FrmXconf.form Log: Added video driver detection to xconf module Modified: branches/iVL/FrmXconf.class ============================================================================== --- branches/iVL/FrmXconf.class (original) +++ branches/iVL/FrmXconf.class Wed Oct 29 13:12:51 2008 @@ -16,6 +16,8 @@ ' 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 cbSetupMethod_Click() DIM sMsg AS String SELECT CASE cbSetupMethod.Text @@ -26,7 +28,7 @@ CASE "Fbdev" smsg = ("Use the console framebuffer driver") CASE ELSE - smsg = "" + smsg = clsXconf.sVidID END SELECT ME.tlChoiceExp.text = sMsg ME.tlChoiceExp.Width = MdlObjSizer.get_object_width(sMsg) @@ -38,7 +40,7 @@ DIM sLine AS String DIM i, imark, ii AS Integer - Message.Warning(("We will now setup your graphical user interface. Your screen may flicker during this process")) + 'Message.Warning(("We will now setup your graphical user interface. Your screen may flicker during this process")) 'SHELL "/usr/bin/X -configure :2 2>/dev/null" WAIT' let's assume this produced a basic xorg.conf 'SHELL "cat /etc/X11.xorg.conf.new | grep ^Driver |cut -f 2 -d \':\'" TO sOut @@ -56,8 +58,19 @@ INC ii END IF UNTIL InStr(sFileIn[i + ii], "Driver") OR InStr(sFileIn[i + ii], "EndSection") '= TRUE - 'Message("Found Driver: " & sFileIn[i + ii]) sOut = Trim(Mid(sFileIn[i + ii], InStr(sFileIn[i + ii], "\"") + 1, Len(sFileIn[i + ii]) - InStr(sFileIn[i + ii], "\"") - 1)) + Message(sOut) + ' look for the indentifier string + ii = 0 + REPEAT + IF InStr(sFileIn[i + ii], "Identifier") = FALSE THEN + INC ii + END IF + UNTIL InStr(sFileIn[i + ii], "Identifier") OR InStr(sFileIn[i + ii], "EndSection") + clsXconf.sVidID = Trim(Mid(sFileIn[i + ii], InStr(sFileIn[i + ii], "\"") + 1, Len(sFileIn[i + ii]) - InStr(sFileIn[i + ii], "\"") - 1)) + 'Message(sID) + 'Message("Found Driver: " & sFileIn[i + ii]) + 'END IF END IF NEXT @@ -68,5 +81,14 @@ 'Message(sOut) + +END + +PUBLIC SUB Form_Resize() + + WITH ME + .TlBanner.Move(4, 24, .hbBanner.Width - (.TlBanner.Left * 2)) + + END WITH END Modified: branches/iVL/FrmXconf.form ============================================================================== --- branches/iVL/FrmXconf.form (original) +++ branches/iVL/FrmXconf.form Wed Oct 29 13:12:51 2008 @@ -4,26 +4,24 @@ MoveScaled(0,0,89,59) Text = ("") Arrangement = Arrange.Vertical - { hbBanner HBox - MoveScaled(1,1,77,6) + { hbBanner Panel + MoveScaled(1,1,86,4) + Arrangement = Arrange.Horizontal { TlBanner TextLabel - MoveScaled(1,1,27,3) + MoveScaled(1,0,27,3) Text = ("Graphical Interface Settings") } - { hrsep Separator - MoveScaled(3,4,14,1) - } } { Panel1 Panel - MoveScaled(1,8,69,13) + MoveScaled(0,6,69,13) Arrangement = Arrange.Horizontal AutoResize = True { Frame1 Frame - MoveScaled(0,0,63,11) + MoveScaled(0,0,69,13) Expand = True Text = ("") { tlChoiceExp TextLabel - MoveScaled(1,6,48,3) + MoveScaled(1,5,58,3) Text = ("") } { cbSetupMethod ComboBox Added: branches/iVL/clsXconf.class ============================================================================== --- (empty file) +++ branches/iVL/clsXconf.class Wed Oct 29 13:12:51 2008 @@ -0,0 +1,3 @@ +' Gambas class file + +STATIC PUBLIC sVidID AS String |