Ignore:
Timestamp:
Dec 9, 2016, 10:06:20 AM (4 years ago)
Author:
Herwig Bauernfeind
Message:

GUITools: All changes that have built over time.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/guitools/sscc/sscc.vrx

    r875 r990  
    9393#append U:\Develop\Samba\guitools-1.0\shared\inittempdir.vrs
    9494#append U:\Develop\Samba\guitools-1.0\shared\sambainit.vrs
    95 #append U:\Develop\Samba\guitools-2.0\shared\nlv.vrs
    9695#append U:\Develop\Samba\guitools-1.0\shared\swat.vrs
     96#append U:\Develop\Samba\trunk\guitools\shared\nlv.vrs
    9797*/
    9898return
     
    211211    IF options.!debug == 1 THEN say "_CreateVocObject() done"
    212212return Success
     213/*:VRX         _DebugLog
     214*/
     215_DebugLog:
     216    IF options.!debug <> 1 THEN return
     217    debugline = strip(arg(1))
     218    if pos("started", debugline) > 0 |,
     219       pos("aborted", debugline) > 0 |,
     220       pos("done",    debugline) > 0
     221            then say time()' 'debugline
     222            else say '  'debugline
     223return
     224
    213225/*:VRX         _dirdialog
    214226*/
     
    306318    if \IsCupsPrintcap then call _PrintCapCreate
    307319
     320    stst = NLVGetMessage(15)
     321    parse var stst startst '/' stopst
     322
     323    if _SambaRunning() then do
     324        ok = VRSet("PB_StartStop", "BackColor", "Red")
     325        ok = VRSet("PB_StartStop", "Caption", stopst)
     326    end
     327    else do
     328        ok = VRSet("PB_StartStop", "BackColor", "Green")
     329        ok = VRSet("PB_StartStop", "Caption", startst)
     330    end
     331
    308332    if SmbConfExists then call _SmbConfLoad
    309333                     else ok = VRSet("TM_Installer","Enabled", 1)
     
    314338_GUIInitNLV:
    315339    say '_GUIInitNLV started'
     340    settings.!helpfile = 0
    316341    CALL NLVSetup
    317342    CALL NLVSetText 'Main', 'Caption', 1
     
    320345    CALL NLVSetText 'PB_Reload',        'Caption',   11
    321346    CALL NLVSetText 'PB_Reload',        'Hinttext', 111
    322     CALL NLVSetText 'PB_Save',        'Caption',   12
    323     CALL NLVSetText 'PB_Save',        'Hinttext', 112
     347    CALL NLVSetText 'PB_Save',          'Caption',   12
     348    CALL NLVSetText 'PB_Save',          'Hinttext', 112
     349    CALL NLVSetText 'PB_StartStop',     'Caption',   15
     350    CALL NLVSetText 'PB_StartStop',     'Hinttext', 113
    324351    CALL NLVSetText 'PB_Undo',          'Caption',    9
    325352    CALL NLVSetText 'PB_Undo',          'Hinttext', 109
     
    342369    CALL NLVSetText 'Menu_File_PrintCap',       'Caption',  37
    343370    CALL NLVSetText 'Menu_File_SmbUpdate',      'Caption',  44
     371    CALL NLVSetText 'Menu_File_YumInstall',     'Caption',  99
    344372    CALL NLVSetText 'Menu_File_Exit',           'Caption',  27
    345373
     
    500528*/
    501529_MasterPasswdCreate:
    502     call lineout samba.!masterpasswd, '# Created by SSCC ver. 'word(VRGet("Main","Hinttext"),2)
     530    call lineout samba.!masterpasswd, '# Created by 'VRParseFileName(OurINI,'N')' Ver. 'word(VRGet("Main","Hinttext"),2)
    503531    call lineout samba.!masterpasswd, '# syntax:'
    504532    call lineout samba.!masterpasswd, '# username:passwd:UID:GID:login-class:chg pw x sec:deact x sec:GECOS:home:shell'
    505     call lineout samba.!masterpasswd, 'root:*:0:513::0:0:root:/nonexistent:/usr/sbin/nologin'
     533    call lineout samba.!masterpasswd, 'root:*:0:512::0:0:root:/nonexistent:/usr/sbin/nologin'
    506534    call lineout samba.!masterpasswd, 'guest:*:65534:65534::0:0:guest:/nonexistent:/usr/sbin/nologin'
    507535    ok = stream(samba.!masterpasswd,'c','close')
     536return
     537
     538/*:VRX         _MasterPasswdFindUser
     539*/
     540_MasterPasswdFindUser: procedure expose username.
     541    IF options.!debug == 1 THEN say '_MasterpasswdFindUser("'arg(1)'") started'
     542    FindUser = arg(1)
     543    Idx = 0
     544    do I = 1 to username.0
     545        if translate(username.I) = translate(FindUser) then do
     546            Idx = I
     547            leave
     548        end
     549    end
     550    IF options.!debug == 1 THEN say '_MasterpasswdFindUser("'FindUser'") done, returning 'Idx
     551return idx
     552/*:VRX         _MasterPasswdRead
     553*/
     554_MasterPasswdRead:
     555    IF options.!debug == 1 THEN say '_MasterpasswdRead() started'
     556    /* Read complete master.passwd */
     557    I = 0
     558
     559    do until lines(samba.!masterpasswd) = 0
     560        userline = strip(linein(samba.!masterpasswd))
     561   
     562        /* Skip comments */
     563        if left(userline,1) = "#" then iterate
     564        if left(userline,1) = ";" then iterate 
     565
     566        /* parse fields into stem variables */
     567        I = I + 1
     568        parse var userline username.I':'password.I':'uid.I':'gid.I':'LoginClass.I':'pwchange.I':'deact.I':'gecos.I':'home.I':'shell.I
     569
     570        Status.I =""   
     571        do J = 1 to I - 1
     572            if translate(Username.J) = translate(Username.I) then do
     573                status.I = "DUPLICATE"
     574                leave
     575            end
     576        end
     577    end
     578    ok = stream(samba.!masterpasswd,'c','close')
     579    drop userline
     580
     581    /* set "stem roots" properly */
     582    username.0  = I
     583    password.0  = I
     584    uid.0       = I
     585    gid.0       = I
     586    loginclass.0= I
     587    pwchange.0  = I
     588    deact.0     = I
     589    gecos.0     = I
     590    home.0      = I
     591    shell.0     = I
     592
     593    /* also smbpasswd stems */
     594    lmhash. = ''
     595    nthash. = ''
     596    flags.  = ''
     597    lct.    = ''
     598    lmhash.0 = I
     599    nthash.0 = I
     600    flags.0  = I
     601    lct.0    = I
     602
     603    /* smbusermap stem */
     604    MapTo. = ''
     605    MapTo.0 = I
     606
     607    /* our private stem */
     608    status.0 = I
     609    IF options.!debug == 1 THEN say '_MasterpasswdRead() done, read 'username.0' users'
     610return
     611
     612/*:VRX         _MasterPasswdWrite
     613*/
     614_MasterpasswdWrite:
     615    IF options.!debug == 1 THEN say "_MasterpasswdWrite() started"
     616    newmasterpasswd = TempDir'master.passwd'
     617
     618    ok = SysFileDelete(newmasterpasswd)
     619
     620    call lineout newmasterpasswd, '# Created by 'VRParseFileName(OurINI,'N')' Ver. 'word(VRGet("Main","Hinttext"),2)
     621    call lineout newmasterpasswd, '# syntax:'
     622    call lineout newmasterpasswd, '# username:passwd:UID:GID:login-class:chg pw x sec:deact x sec:GECOS:home:shell'
     623
     624    do I = 1 to username.0
     625        select
     626            when Status.I = "DUPLICATE" & settings.!FixErrors = 1 then iterate
     627            when Status.I = "UID MISMATCH" then do
     628                call lineout newmasterpasswd, username.I':'password.I':'word(uid.I,1)':'gid.I':'loginclass.I':'pwchange.I':'deact.I':'gecos.I':'home.I':'shell.I
     629            end
     630            when Status.I = "UNIX MISSING" & settings.!FixErrors then do
     631                call lineout newmasterpasswd, username.I':'password.I':'uid.I':'gid.I':'loginclass.I':'pwchange.I':'deact.I':'gecos.I':'home.I':'shell.I
     632            end
     633            otherwise call lineout newmasterpasswd, username.I':'password.I':'uid.I':'gid.I':'loginclass.I':'pwchange.I':'deact.I':'gecos.I':'home.I':'shell.I
     634        end
     635    end
     636    ok = stream(newmasterpasswd,'c','close')
     637    ok = VRCopyFile( samba.!masterpasswd, samba.!masterpasswd'.bak' )
     638    ok = VRCopyFile( newmasterpasswd, samba.!masterpasswd )
     639    ok = SysFileDelete(newmasterpasswd)
     640    IF options.!debug == 1 THEN say "_MasterpasswdWrite() done"
    508641return
    509642
     
    796929    ok = stream(pwdfile,"c","close")
    797930
     931    /* update Master.passwd and (s)pwd.db */
     932    call _MasterPasswdRead
     933    nx = _MasterPasswdFindUser("root")
     934
     935    call rxFuncAdd "Crypt", "RxCrypt", "RxCrypt"
     936
     937    itoa64 = "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
     938    salt   = ""
     939    do i = 1 to 8
     940        salt = salt || substr( itoa64, random( 0, 63 ) + 1, 1 )
     941    end
     942    password.nx = Crypt(VRGet("EF_RootPassword","Value"), salt )
     943
     944    /* we need this otherwise _MasterPasswdWrite does not work */
     945    settings.!FixErrors = 1
     946    call _MasterPasswdWrite
     947    call _PasswordDbRewrite
     948
    798949    /* Create the root account */
    799950    IF options.!debug == 1 THEN say '  'samba.!smbpasswdexe' -a root -s <'pwdfile
     
    806957    ok = SysFileDelete(pwdfile)
    807958
     959
     960
    808961    /* Deal with swat */
    809     /* FixMe: We do not need htpasswd.exe anymore as we use rxcrypt.dll */
     962    /* We could use rxcrypt.dll however htpasswd.exe (at least in theory) is more flexible regarding encryption */
    810963    if swatauth then do
    811964        /* we always remove the old swat */
     
    822975    IF options.!debug == 1 THEN say "_SambaRootPWSet() done"
    823976return
    824 
    825977/*:VRX         _SambaShowError
    826978*/
     
    8631015*/
    8641016_SambaUserCreate:
    865     eCSUser  = value("USER",,"OS2ENVIRONMENT")
    866     HostName = value("HOSTNAME",,"OS2ENVIRONMENT")
    867     if translate(eCSUser) = translate(Hostname) then do
    868         Msg.Text = NLVGetMessage(118, eCSUser)
    869         Msg.Type = "I"
    870         call _ShowMsg
    871     end
     1017    eCSUser = value("USER",,"OS2ENVIRONMENT")
    8721018    if translate(eCSUser) <> "root" & translate(eCSUser) <> "guest" then do
    8731019        Msg.Text = NLVGetMessage(75, eCSUser)
     
    9681114*/
    9691115_SharesReset:
    970     say '_SharesReset started'
     1116    call _debuglog '_SharesReset() started'
    9711117    ok = VRset("EF_path", "Value","")
    9721118    ok = VRFlush( , "EF_path" )
     
    9801126        ok = VRDestroy(CreatedObjs.I)     
    9811127    end
    982     say '_SharesReset done'
     1128    call _debuglog '_SharesReset() done'
    9831129return
    9841130
     
    10301176        if pos("idmap uid",smbline) > 0 then iterate
    10311177        if pos("idmap gid",smbline) > 0 then iterate
    1032         if pos("idmap config",smbline) > 0 then iterate
    10331178        if pos("winbind separator",smbline) > 0 then iterate
    10341179        if pos("copy ",smbline) > 0 then iterate
     
    10461191*/
    10471192_SmbConfCreateDefault:
     1193    call _debuglog "_SmbConfCreateDefault() started"
    10481194    ok = SysFileDelete(smbconf)
    10491195   
     
    10591205    call _SmbConfDefault_ShareDrives
    10601206    ok = stream(smbconf,'c','close')
     1207    call _debuglog "_SmbConfCreateDefault() done"
    10611208return
    10621209
     
    11201267*/
    11211268_SmbConfDefault_Global:
     1269    call _debuglog "_SmbConfDefault_Global() started"
    11221270    Migrate = (arg(1) = 1)
    11231271    if \Migrate then do /* when migrating these 4 lines are there already */
    11241272        section       = '[global]'
    11251273        call lineout smbconf, section
    1126         call lineout smbconf, Indent||'workgroup = 'VRGet("EF_Workgroup_Initial","value")
     1274        call lineout smbconf, Indent||'workgroup = WORKGROUP'
    11271275        call lineout smbconf, Indent||'netbios name = 'value('HOSTNAME',,'OS2ENVIRONMENT')
    11281276        call lineout smbconf, Indent||'server string = %h Samba Server for eCS (OS/2)'
     
    11301278    end
    11311279
    1132     call lineout smbconf, Indent||'dos charset = IBM-850'
    1133     call lineout smbconf, Indent||'display charset = IBM-850'
    1134     call lineout smbconf, Indent||'unix charset = IBM-850'
     1280    if SysQueryProcessCodePage() = "850" then do
     1281        call lineout smbconf, Indent||'dos charset = IBM-850'
     1282        call lineout smbconf, Indent||'display charset = IBM-850'
     1283        call lineout smbconf, Indent||'unix charset = IBM-850'
     1284    end
     1285    else do
     1286        call lineout smbconf, Indent||'dos charset = IBM-850'
     1287        call lineout smbconf, Indent||'display charset = SYSTEM'
     1288        call lineout smbconf, Indent||'unix charset = SYSTEM'
     1289    end
    11351290
    11361291    CurCP = SysQueryProcessCodePage()
     
    11851340    end
    11861341    ok = stream(smbconf, 'c','close') 
     1342    call _debuglog "_SmbConfDefault_Global() done"
    11871343return
    11881344/*:VRX         _SmbConfDefault_Homes
     
    13621518*/
    13631519_SmbConfLoad:
    1364     IF options.!debug == 1 THEN say '_SmbConfLoad() started'
    1365     IF options.!debug == 1 THEN say '  Loading "'samba.!smbconf'" ('stream(samba.!smbconf,'c','query size')' bytes)'
     1520    call _debuglog '_SmbConfLoad() started'
     1521    call _debuglog 'Loading "'samba.!smbconf'" ('stream(samba.!smbconf,'c','query size')' bytes)'
    13661522
    13671523/*  ok = IniEnumSections(sections., samba.!smbconf) */
     
    14111567    end
    14121568    ok = VRMethod("CN_smbconf","SetRecordAttr",smbconf.!root, "Collapsed", 0 )
    1413     IF options.!debug == 1 THEN say '_SmbConfLoad() done'
     1569    call _debuglog '_SmbConfLoad() done'
    14141570return
    14151571
     
    16781834*/
    16791835_SmbConfTreeReset:
     1836    call _debuglog '_SmbConfTreeReset() started'
    16801837    call _SharesReset
    16811838    ok = VRMethod( "CN_SmbConf", "RemoveRecord", smbconf.!root )
    16821839    call _SmbConfTreeInit
    16831840    call _GUIInit
     1841    call _debuglog '_SmbConfTreeReset() done'
    16841842return
    16851843
     
    18181976
    18191977    Ok = VRset("Main", "Painting", 0)
     1978    ok = VRSet("Main", 'Pointer', 'WAIT' )
    18201979    ok = VRset("GB_Help",      "Visible", 0)
    18211980    ok = VRset("GB_Global",    "Visible", 0)
     
    18261985        IF options.!debug == 1 THEN SAY 'CN_smbconf_Click() aborted, no handle'
    18271986        Ok = VRset("Main", "Painting", 1)
     1987        ok = VRSet("Main", 'Pointer', '<default>' )
    18281988        return
    18291989    end
     
    18422002    call _SharesReset
    18432003    Ok = VRset("Main", "Painting", 1)
     2004    ok = VRSet("Main", 'Pointer', '<default>' )
    18442005
    18452006    ok = VRSet("TM_Value", "Enabled", 1)
     
    18472008        IF options.!debug == 1 THEN SAY 'CN_smbconf_Click() aborted, got parent handle'
    18482009        Ok = VRset("Main", "Painting", 1)
     2010        ok = VRSet("Main", 'Pointer', '<default>' )
    18492011        return
    18502012    end
     
    18622024
    18632025        Ok = VRset("Main", "Painting", 0)
     2026        ok = VRSet("Main", 'Pointer', 'WAIT' )
    18642027        CurSection = sections.I
    18652028        CurSIdx = I
     
    18802043                        IF options.!debug == 1 THEN  say '  InsertPage = 'ok
    18812044
    1882 /*                    ok = VRset("Main", "Painting", 1)
     2045/*                  ok = VRset("Main", "Painting", 1)
     2046                    ok = VRSet("Main", 'Pointer', '<default>' )
    18832047                    Msg.Text = NLVGetMessage(114)
    18842048                    Msg.Type = "I"
     
    18922056            if \VRIsValidObject("GB_"ActiveGroup) then do
    18932057                ok = VRset("Main", "Painting", 1)
     2058                ok = VRSet("Main", 'Pointer', '<default>' )
    18942059                Msg.Text = NLVGetMessage(114)
    18952060                Msg.Type = "I"
     
    19842149
    19852150                if ObjYPos > VRGet("GB_Global","Height") - 1200 then do
    1986                     /* Ok = VRset("Main", "Painting", 1) */
     2151                 /* Ok = VRset("Main", "Painting", 1)
     2152                    ok = VRSet("Main", 'Pointer', '<default>' )*/
    19872153                    Page = Page + 1
    19882154                    if Page = 2 then do
    19892155                        Ok = VRset("Main", "Painting", 1)
     2156                        Ok = VRset("Main", "Painting", 0)
    19902157                        ok = VRSet("Main", 'Pointer', 'Wait' )
    1991                         Ok = VRset("Main", "Painting", 0)
    19922158                    end
    19932159                    if \VRIsValidOBject("GL_GLOBAL_"Page) then do
     
    21382304*/
    21392305GB_Global_1_Create:
    2140     call GB_Global_1_Init   
     2306    call GB_Global_1_Init
     2307    SysCP = SysQueryProcessCodePage()
     2308    ok = VRMethod( "EF_unix_charset",    "AddString", "IBM-"SysCP, 2)
     2309    ok = VRMethod( "EF_display_charset", "AddString", "IBM-"SysCP, 2)
     2310    if pos("IBM-"SysCP, VRGet( "EF_dos_charset","InitialList")) = 0 then do
     2311        ok = VRMethod( "EF_dos_charset", "AddString", "IBM-"SysCP, 2)
     2312    end
    21412313return
    21422314
     
    23202492    IF options.!debug == 1 THEN SAY "Main_Resize() started"
    23212493    Ok = VRset("Main", "Painting", 0)
    2322 
    2323    /*  /* Basic measurements */
    2324     main_iwidth  = VRGet("Main","InteriorWidth")                /* Width of window client-area */
    2325     main_iheight = VRGet("Main","InteriorHeight")               /* Height of window client-area */
    2326 
    2327     if main_iheight < 5500 then ok = VRSet("Main","Height",6200)
    2328     sbar_height  = VRGet("GB_STATUSBAR","Height")               /* Height of status-bar */
    2329     split_left   = VRGet("SPLIT_Main","Left")                   /* Position of the left edge of the split-bar */
    2330     marginx2     = margin * 2                                   /* Common margin around controls */
    2331     pbtn_height  = 400                                          /* Height of the panels' internal button areas */
    2332 
    2333     pane_height  = main_iheight - sbar_height - (margin * 4)    /* Height of a split-bar panel */
    2334     lpane_width  = split_left - margin                          /* Width of the left split-bar panel */
    2335     rpane_width  = main_iwidth - split_left - 60 - margin       /* Width of the right split-bar panel */ */
    2336 
    2337     /* ab hier alt */
    23382494    ok = VRSet("GB_SmbConfTree","Top",    FWidth)
    23392495    ok = VRSet("GB_SmbConfTree","Left",   FWidth-24)
    2340     ok = VRSet("GB_SmbConfTree","Height", VRGet("Main", "Height") -1350)
     2496    ok = VRSet("GB_SmbConfTree","Height", VRGet("Main", "Height") -1400)
    23412497
    23422498    ok = VRset("GB_SmbConfTree3","Top",     FWidth)
     
    24082564
    24092565    if MButton.bTop < 1300 & MButton.bLeft < 1300 then do
    2410         MButton.bTop = 4842
     2566        MButton.bTop = 4802
    24112567        MButton.bLeft = 3758
    24122568        MButton.bWidth = 1241
     
    24142570    end
    24152571
    2416     ok = VRSet("PB_Reload", "Top",    MButton.bTop)
    2417     ok = VRSet("PB_Reload", "Left",   MButton.bLeft)
     2572    ok = VRSet("PB_Reload",   "Top",    MButton.bTop)
     2573    ok = VRSet("PB_Reload",   "Left",   VRGet("GB_SmbConfTree","Left"))
     2574    ok = VRSet("PB_Reload",   "Width",  MButton.bWidth)
     2575
     2576    ok = VRSet("PB_StartStop","Top",    MButton.bTop)
     2577    ok = VRSet("PB_StartStop","Left",   VRGet("GB_SmbConfTree","Width")-MButton.bWidth-FWidth)
     2578    ok = VRSet("PB_StartStop","Width",  MButton.bWidth)
     2579
     2580    ok = VRSet("PB_Save",   "Top",    MButton.bTop)
     2581    ok = VRSet("PB_Save",   "Left",   MButton.bLeft)
    24182582    ok = VRSet("PB_Reload", "Width",  MButton.bWidth)
    24192583
    2420     ok = VRSet("PB_Save", "Top",    MButton.bTop)
    2421     ok = VRSet("PB_Save", "Left",   MButton.bLeft+1*FWidth+MButton.bWidth)
    2422     ok = VRSet("PB_Reload", "Width",  MButton.bWidth)
    2423 
    24242584    ok = VRSet("PB_Undo",   "Top",    MButton.bTop)
    2425     ok = VRSet("PB_Undo",   "Left",   MButton.bLeft+2*FWidth+MButton.bWidth*2)
     2585    ok = VRSet("PB_Undo",   "Left",   MButton.bLeft+2*FWidth+MButton.bWidth*1)
    24262586    ok = VRSet("PB_Undo",   "Width",  MButton.bWidth)
     2587
     2588    ok = VRSet("PB_Help",   "Top",    MButton.bTop)
     2589    ok = VRSet("PB_Help",   "Left",   MButton.bLeft+6*FWidth+MButton.bWidth*2)
     2590    ok = VRSet("PB_Help",   "Width",  MButton.bWidth)
    24272591
    24282592    ok = VRSet("PB_Cancel", "Top",    MButton.bTop)
     
    24302594    ok = VRSet("PB_Cancel", "Width",  MButton.bWidth)
    24312595
    2432  /* ok = VRSet("PB_Help",   "Top",    MButton.bTop)
    2433     ok = VRSet("PB_Help",   "Left",   MButton.bLeft+6*FWidth+MButton.bWidth*3)
    2434     ok = VRSet("PB_Help",   "Width",  MButton.bWidth) */
    24352596
    24362597    drop MButton.b
     
    25722733*/
    25732734Menu_File_reset_Click:
     2735    say "Menu_File_reset_Click() started"
    25742736    call _SmbConfCreateDefault
    25752737    ok = SysFileTree(smbconf,exist.,'FO')
    25762738    SmbConfExists = exist.0
    25772739    call _SmbConfTreeReset
     2740    say "Menu_File_reset_Click() done"
    25782741return
    25792742
     
    25972760return
    25982761
     2762/*:VRX         Menu_File_YumInstall_Click
     2763*/
     2764Menu_File_YumInstall_Click:
     2765    address cmd 'yum install libc libcx libgcc1 cups-libs popt-libs gettext-libs zlib readline'
     2766return
     2767
    25992768/*:VRX         Menu_Help_About_Click
    26002769*/
     
    26132782Menu_Options_ExportMode_Click:
    26142783    say 'ExpertMode_Click started'
    2615     say         samba.!testparmexe' -v -s 1>'TempDir'smb.conf 2>'TempDir'sscc.testparm'
    2616     address cmd samba.!testparmexe' -v -s 1>'TempDir'smb.conf 2>'TempDir'sscc.testparm'
     2784    ok = VRSet("Main", 'Pointer', 'WAIT' )
     2785    log_level    = IniGet('log level',    'global', samba.!smbconf)
     2786    if datatype(log_level) <> "NUM" then log_level = 2
     2787    say         samba.!testparmexe' -v -s -d='log_level' 1>'TempDir'smb.conf 2>'TempDir'sscc.testparm'
     2788    address cmd samba.!testparmexe' -v -s -d='log_level' 1>'TempDir'smb.conf 2>'TempDir'sscc.testparm'
    26172789    say 'VRCopyFile('TempDir'smb.conf, 'smbconf' )'
    26182790    say "  smb.conf Gr”áe: "stream(smbconf,'c','QUERY SIZE')
     
    26222794    call _SmbConfTreeReset
    26232795    call Main_Resize
     2796    ok = VRSet("Main", 'Pointer', '<default>' )
    26242797    say 'ExpertMode_Click done'
    26252798return
     
    26362809*/
    26372810Menu_Options_SimpleMode_Click:
    2638     say 'SimpleMode_Click started'
    2639 
     2811    call _debuglog 'Menu_SimpleMode_Click() started'
     2812    ok = VRSet("Main", 'Pointer', 'WAIT' )
    26402813    /* Workaround for testparm bugs */
    26412814    say 'VRCopyFile('smbconf', 'TempDir'smb.conf )'
    26422815    ok = VRCopyFile( smbconf, TempDir'smb.conf')
    26432816    call _SmbConfCommitChanges
    2644 
    2645     say samba.!testparmexe' -s 1>'TempDir'smb.conf 2>'TempDir'sscc.testparm'
    2646     address cmd samba.!testparmexe' -s 1>'TempDir'smb.conf 2>'TempDir'sscc.testparm'
     2817    log_level    = IniGet('log level',    'global', samba.!smbconf)
     2818    if datatype(log_level) <> "NUM" then log_level = 2
     2819    say samba.!testparmexe' -s -d='log_level' 1>'TempDir'smb.conf 2>'TempDir'sscc.testparm'
     2820    address cmd samba.!testparmexe' -s -d='log_level' 1>'TempDir'smb.conf 2>'TempDir'sscc.testparm'
    26472821    NewSize = stream(TempDir"smb.conf",'c','QUERY SIZE')
    26482822    say "  "TempDir"smb.conf Gr”áe: "NewSize
     
    26542828    say 'Copy ok ='ok' (1 = success, 0 = failure)'
    26552829    call _SmbConfTreeReset
    2656     do I = Page to 3 by -1
    2657         ok = VRMethod( "GB_Global", "DeletePage", I  )
    2658         ok = VRDestroy("GL_GLOBAL_"I)
     2830
     2831    if datatype(Page) = "NUM" then do
     2832        do I = Page to 3 by -1
     2833            ok = VRMethod( "GB_Global", "DeletePage", I  )
     2834            ok = VRDestroy("GL_GLOBAL_"I)
     2835        end
    26592836    end
    26602837    Page = 2
    26612838    call Main_resize
    2662 say 'SimpleMode_Click done'
     2839    ok = VRSet("Main", 'Pointer', '<>default' )
     2840    call _debuglog 'Menu_SimpleMode_Click() done'
    26632841return
    26642842
     
    28042982    IF options.!debug == 1 THEN say 'PB_Cancel_Click() started'   
    28052983    if VRGet("PB_Save","Enabled") then call PB_Save_Click
    2806 'pause'
    28072984    call Quit
    28082985    IF options.!debug == 1 THEN say 'PB_Cancel_Click() done'   
     
    29273104        call _LMHostsImport
    29283105    end
    2929 
     3106    if VRGet("CB_YumInstall","set") then do
     3107        call Menu_File_YumInstall_Click
     3108    end
    29303109    call RemoveConfig_Close
    29313110return
     
    29503129    call PB_Save_Click   
    29513130    call beep 960, 1
    2952     address CMD samba.!smbcmd' reload'
     3131    if _SambaRunning() then do
     3132        address CMD samba.!smbcmd' stop'
     3133        ok = VRSet("PB_StartStop", "BackColor", "Green")
     3134        ok = VRSet("PB_StartStop", "Caption", startst)
     3135    end
     3136    else do
     3137        address CMD samba.!smbcmd' start'
     3138        ok = VRSet("PB_StartStop", "BackColor", "Red")   
     3139        ok = VRSet("PB_StartStop", "Caption", stopst)
     3140    end
    29533141return
    29543142
     
    30713259    ok = VRset("CB_RemoveBackend","Caption", NLVGetMessage(56, 'Backend'))
    30723260    ok = VRset("CB_RemoveLMHosts","Caption", NLVGetMessage(56, 'lmhosts'))
     3261    ok = VRset("CB_YumInstall","Caption", NLVGetMessage(99))
    30733262
    30743263    /* Check if ?db backend files exist */
Note: See TracChangeset for help on using the changeset viewer.