Changeset 703


Ignore:
Timestamp:
Jun 13, 2012, 12:08:42 PM (13 years ago)
Author:
Herwig Bauernfeind
Message:

GUI-Tools: Updates in EVFSGUI/SMBMON/Shared code

Location:
trunk/guitools
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • trunk/guitools/evfsgui/evfsgui.RC

    r697 r703  
    2727BITMAP 36 .\rc\icons\green-on-16.bmp
    2828BITMAP 37 .\rc\icons\green-off-16.bmp
     29icon 50 .\rc\icons\smbwait.ico
    2930icon 68 .\rc\icons\passive.ico
    3031icon 80 .\rc\icons\PDF.ICO
  • trunk/guitools/evfsgui/evfsgui.vrp

    r702 r703  
    1010VRXWindow: __VREMainWindow,1,1951,2361,891,7841
    1111VRXWindow: __VREFileListWindow,1,1253,11033,2665,3358
    12 VRXWindow: __VRESectionListWindow,1,1229,11900,10696,3342
     12VRXWindow: __VRESectionListWindow,1,1156,12382,12238,5095
    1313VRXWindow: __VREToolsWindow,0,3096,8528,6486,1669
    1414VRXWindow: __VREWindListWindow,1,723,11708,3686,3150
     
    1717UserWindow: SW_LOGIN,1
    1818UserWindow: SW_INFO,1
    19 UserWindow: SW_SMBTREE,1
    2019UserWindow: SW_CONDET,1
     20UserWindow: SW_DIALOG,1
  • trunk/guitools/evfsgui/evfsgui.vrx

    r702 r703  
    753753    END
    754754
     755    if (mtype.1 = '' & mtype.2 = '' & mtype.3 = '' & mtype.4 = '') THEN DO /* we do not seem to have an NLV file */
     756        /* we fill the array with the list predefined directly in the GUI control */
     757        ok = VRMethod( "CB_MOUNT", "GetStringList", "mtype." )
     758    end
     759
    755760    /* SMBTree */
    756761    CALL NLVSetText 'PB_SMBTREE_CONNECT',             "Caption", 28
     
    770775    /* Common margin around controls */
    771776    margin = ((VRGet("Main", "InteriorLeft") / 3) * 2) + 2
     777
     778    smbwait = "#50"
    772779
    773780    if options.!debug == 1 then say time()' _GUIInit done'
     
    792799
    793800    say _ucInitObj()
    794 
    795     options.!storecreds = _ucChkObj()
     801    say _ucChkObj()
    796802
    797803    IF STREAM( settings.!ini, 'C', 'QUERY EXISTS') == '' THEN DO
     
    878884        IF advanced.!lmhosts    == '' THEN advanced.!lmhosts    = 1
    879885
     886        options.!storecreds = VRGetIni('Settings', 'StoreCreds', settings.!ini)
     887say "options.!storecreds = "options.!storecreds
     888        IF options.!storecreds == '' then options.!storecreds = 1
     889                                     
     890say "options.!storecreds = "options.!storecreds
     891        IF _ucChkObj() = 0 then options.!storecreds = 0           
     892say "options.!storecreds = "options.!storecreds
     893
    880894        options.!debug = VRGetIni('Settings', 'Debug', settings.!ini)
    881895        IF options.!debug == '' THEN options.!debug = 0       /* Turn off debug by default for release builds */
     
    983997    CALL VRSetIni 'Settings', 'LMHosts',       advanced.!lmhosts    , settings.!ini, 'NoClose'
    984998
     999    CALL VRSetIni 'Settings', 'StoreCreds',    options.!storecreds  , settings.!ini, 'NoClose'
    9851000    CALL VRSetIni 'Settings', 'Debug',         options.!debug       , settings.!ini, 'NoClose'
    9861001    CALL VRSetIni 'Settings', 'MiniIcons',     advanced.!miniicons  , settings.!ini, 'NoClose'
     
    10611076            if datatype(T1) = "NUM" & datatype(T2) = "NUM" & datatype(T3) = "NUM" & datatype(T4) = "NUM" then do
    10621077                FoundName = 0
     1078                /* Don't add a local link IP to LMHosts - workaround only */
     1079                if T1 = '169' & T2 = '254' then iterate
    10631080                do J = 1 to lmname.0 /* machine already in LMHosts? */
    10641081                    if lmname.J = SmbObj.resname then do /* Yes? then update IP */
     
    13871404_ShowMsg:
    13881405    /* preliminary implementation - we just do not ignore it anymore -
    1389        - ShowMsg from smbmon/smbusers shoule become a shared library */
     1406       - ShowMsg from smbmon/smbusers should become a shared library */
    13901407    ok = VRSet("DT_StatusBar", "Caption", Msg.Text)
    13911408return
     
    16231640
    16241641    mount = VRGet("CB_MOUNT", "Value")
     1642
     1643    /* Catch empty mount type error */
     1644    if mount = "" then do
     1645        if mtype.1 <> "" then ok = VRSet("CB_MOUNT", "Value", mtype.1)
     1646        if options.!debug == 1 then say time()' '||"CB_MOUNT_Change aborted"
     1647        return
     1648    end
    16251649
    16261650    SELECT
     
    16571681            CALL NLVSetText "DT_NETWORK", "Caption", 22
    16581682        END
     1683        OTHERWISE DO
     1684            id = VRMessage( "", 'unknown mount type here >>'mount'<< mtype1=>>'mtype.1'<<', "Mount change error", "E", )
     1685        END       
    16591686    END
    16601687    if options.!debug == 1 then say time()' '||"CB_MOUNT_Change done"
     
    25652592*/
    25662593Main_Create:
    2567     options.!debug    = 0
     2594    options.!debug    = 1
    25682595    if options.!debug == 1 then do
    25692596        ok = VRRedirectStdIO("ON")
     
    32053232*/
    32063233Menu_File_ucCred_Reset_Click:
    3207     ok = _ucDelUc()
     3234    if _ucChkUc() then ok = _ucDelUc()
    32083235    ok = VRSet("Pict_PWINMEM","PicturePath","#37")
    3209     ok = VRSet("EF_USER","Value","")
     3236    ok = VRSet("EF_USER",    "Value","")
    32103237    ok = VRSet("EF_PASSWORD","Value","")
    3211     /* FIXME: Add a message box here */
     3238    call _UserCredUpdate
    32123239return
    32133240
     
    36863713    CALL SW_ADVANCED_Init_Content
    36873714RETURN
     3715
     3716/*:VRX         PB_ClearCred_Click
     3717*/
     3718PB_ClearCred_Click:
     3719    call Menu_File_ucCred_Reset_Click
     3720return
    36883721
    36893722/*:VRX         PB_CONDET_HELP_Click
     
    40924125        ok = VRSet("PB_SETTINGS_UNDO","Enabled", 0)
    40934126    end
     4127    if options.!storecreds = 0 then call Menu_File_ucCred_Reset_Click
    40944128return
    40954129
     
    41084142/*:VRX         PB_SMBTREE_CONNECT_Click
    41094143*/
    4110 PB_SMBTREE_CONNECT_Click: PROCEDURE EXPOSE settings. options. icons. fs. advanced. cd. samba.
     4144PB_SMBTREE_CONNECT_Click: PROCEDURE EXPOSE settings. options. icons. fs. advanced. cd. samba. mtype.
    41114145    if options.!debug == 1 then say time()' '||"PB_CONNECT_Click started"
    41124146
     
    45944628        say '  Icon:     "'SMBObj.icon'"'
    45954629    end
    4596 
     4630say "Vorher:"rpc.srvinfo.OS_VERSION
     4631    drop rpc.
     4632say "Vorher:"rpc.srvinfo.OS_VERSION
    45974633    rpc_success = _rpcsrvinfo(SMBObj.resname,credentials.!username,credentials.!password)
    45984634
     
    46164652        ok = VRMethod( "CN_INFO", "SetFieldData", Info.!version,Info.TypeFH, strip(NLVGetMessage(139),'T',':'),Info.ValueFH, rpc.srvinfo.OS_VERSION)
    46174653        ok = VRMethod( "CN_INFO", "SetFieldData", Info.!status, Info.TypeFH, strip(NLVGetMessage(67),'T',':'),Info.ValueFH, rpc.srvinfo.LOGONSTATUS )
     4654        /* we did not get these, but we know them anyway */
     4655        if rpc.srvinfo.NETBIOSNAME  = "" then ok = VRMethod( "CN_INFO", "SetFieldData", Info.!nbname, Info.TypeFH, strip(NLVGetMessage(137),'T',':'),Info.ValueFH, SMBObj.resname'ø')
     4656        if rpc.srvinfo.SERVERSTRING = "" then ok = VRMethod( "CN_INFO", "SetFieldData", Info.!comment,Info.TypeFH, strip(NLVGetMessage(125),'T',':'),Info.ValueFH, SMBObj.comment'ø')
    46184657    end
    46194658    else do
  • trunk/guitools/shared/nlv.vrs

    r638 r703  
    8181            if nlv = "EN" then do
    8282                NLVSrchDone = 1 /* We give up and leave */
     83                id = VRMessage( "", "Could not find a valid language file!", "NLV Setup Error", "E", )
    8384                /* We will leave without a valid NLV file here! */
    8485            end
  • trunk/guitools/shared/rxrpclib.vrs

    r675 r703  
    1919    password = arg(3)
    2020
     21    call VRSet VRWindow(), 'Pointer', 'Wait'
    2122    say '  'samba.!rpcclientexe' 'server' --user='username'%'password' --command="enumdomgroups" 'debuglevel' '
    2223    address cmd samba.!rpcclientexe' 'server' --user='username'%'password' --command="enumdomgroups" 'debuglevel' >'samba.!msg
     24    call VRSet VRWindow(), 'Pointer', '<default>'
    2325
    2426    rpc.enumdomgroups. = ""
     
    7577    password = arg(3)
    7678
     79    call VRSet VRWindow(), 'Pointer', 'Wait'
    7780    say '  'samba.!rpcclientexe' 'server' --user='username'%'password' --command="enumdomusers" 'debuglevel' '
    7881    address cmd samba.!rpcclientexe' 'server' --user='username'%'password' --command="enumdomusers" 'debuglevel' >'samba.!msg
     82    call VRSet VRWindow(), 'Pointer', '<default>'
    7983
    8084    rpc.enumdomusers. = ""
     
    133137    usercred = '--user='username'%'password
    134138
     139    call VRSet VRWindow(), 'Pointer', 'Wait'
    135140    say     '  'samba.!rpcclientexe' 'server' 'usercred' --command="enumprinters" 'debuglevel' '
    136141    address cmd samba.!rpcclientexe' 'server' 'usercred' --command="enumprinters" 'debuglevel' >'samba.!msg
     142    call VRSet VRWindow(), 'Pointer', '<default>'
    137143
    138144    rpc.enumprinters. = ""
     
    183189    password = arg(3)
    184190
     191    call VRSet VRWindow(), 'Pointer', 'Wait'
    185192    say '  'samba.!rpcclientexe' 'server' --user='username'%'password' --command="netshareenum" 'debuglevel' '
    186193    address cmd samba.!rpcclientexe' 'server' --user='username'%'password' --command="netshareenum" 'debuglevel' >'samba.!msg
     194    call VRSet VRWindow(), 'Pointer', '<default>'
    187195
    188196    rpc.netshareenum. = ""
     
    235243    share    = arg(4)
    236244
     245    call VRSet VRWindow(), 'Pointer', 'Wait'
    237246    say '  'samba.!rpcclientexe' 'server' --user='username'%'password' --command="netsharegetinfo 'share'" 'debuglevel' '
    238247    address cmd samba.!rpcclientexe' 'server' --user='username'%'password' --command="netsharegetinfo 'share'" 'debuglevel' >'samba.!msg
     248    call VRSet VRWindow(), 'Pointer', '<default>'
    239249
    240250    rpc.netsharegetinfo. = ""
     
    343353    userrid  = arg(4)
    344354
     355    call VRSet VRWindow(), 'Pointer', 'Wait'
    345356    say '  'samba.!rpcclientexe' 'server' --user='username'%'password' --command="queryuser 'userrid'" 'debuglevel' '
    346357    address cmd samba.!rpcclientexe' 'server' --user='username'%'password' --command="queryuser 'userrid'" 'debuglevel' >'samba.!msg
     358    call VRSet VRWindow(), 'Pointer', '<default>'
    347359
    348360    rpc.queryuser. = ""
     
    390402/*:VRX         _rpcsrvinfo
    391403*/
    392 _rpcsrvinfo:  procedure expose rpc. samba. options.  debuglevel
     404_rpcsrvinfo:  procedure expose rpc. samba. options.  debuglevel tempdir
    393405    IF options.!debug == 1 THEN SAY time()" _rpcsrvinfo() started"
    394406    server   = arg(1)
    395407    username = arg(2)
    396408    password = arg(3)
     409
     410    /* Initialize temporary files */   
     411    rpcinfo.!msg = SysTempFileName(TempDir||"rpcinfo_msg.???")
     412    rpcinfo.!err = SysTempFileName(TempDir||"rpcinfo_err.???")
     413    ok = stream(rpcinfo.!msg,'c','close')
     414    ok = stream(rpcinfo.!err,'c','close')
     415    ok = SysFileDelete(rpcinfo.!msg)
     416    ok = SysFileDelete(rpcinfo.!err)
    397417
    398418    usercred = '--user='username'%'password
    399419    if UserCred   = 'USERCRED'   | UserCred = '' | UserCred = '--user=%' then UserCred = '-N'
    400420
    401     say     '  'samba.!rpcclientexe' 'server' 'usercred' --command="srvinfo" 'debuglevel' 2>'samba.!error' 1>'samba.!msg
    402     address cmd samba.!rpcclientexe' 'server' 'usercred' --command="srvinfo" 'debuglevel' 2>'samba.!error' 1>'samba.!msg
     421    call VRSet VRWindow(), 'Pointer', 'Wait'
     422    say     '  'samba.!rpcclientexe' 'server' 'usercred' --command="srvinfo" 'debuglevel' 2>'rpcinfo.!err' 1>'rpcinfo.!msg
     423    address cmd samba.!rpcclientexe' 'server' 'usercred' --command="srvinfo" 'debuglevel' 2>'rpcinfo.!err' 1>'rpcinfo.!msg
     424    call VRSet VRWindow(), 'Pointer', '<default>'
    403425
    404426    rpc.srvinfo. = ""
    405427
    406428    Failure = 0
    407     do while lines(samba.!error) > 0
    408         rpcline = linein(samba.!error)
    409         say "  "samba.!error":"rpcline
    410         if pos("UNSUCCESSFUL", rpcline) > 0 then do
    411             ok = stream(samba.!error,'c','close')
    412             ok = SysFileDelete(samba.!error)
     429    do while lines(rpcinfo.!err) > 0
     430        rpcline = linein(rpcinfo.!err)
     431        IF options.!debug == 1 THEN say "  "rpcinfo.!err': "'rpcline'"'
     432        if pos("UNSUCCESSFUL", translate(rpcline)) > 0 | pos("CANNOT CONNECT", translate(rpcline)) > 0 then do
     433            ok = stream(rpcinfo.!msg,'c','close')
     434            ok = stream(rpcinfo.!err,'c','close')
     435            ok = SysFileDelete(rpcinfo.!msg)
     436            ok = SysFileDelete(rpcinfo.!err)
    413437            Failure = 1
    414438            retval = 0
     
    421445
    422446    SIGNAL ON SYNTAX NAME RPCERROR
    423     do until lines(samba.!msg) = 0
    424         rpcline = linein(samba.!msg)
     447    do until lines(rpcinfo.!msg) = 0
     448        rpcline = linein(rpcinfo.!msg)
    425449        if pos("creating default valid table",rpcline) <> 0 then iterate
    426450
     
    444468            rpc.srvinfo.CAPABILITIES = ""
    445469            do I = 1 to words(rpc.srvinfo.SERVERSTRING)
    446                 say "Word "I":"word(rpc.srvinfo.SERVERSTRING,I)
     470                /* say "Word "I":"word(rpc.srvinfo.SERVERSTRING,I) */
    447471                if length(word(rpc.srvinfo.SERVERSTRING,I)) >=4 then leave
    448472                if length(word(rpc.srvinfo.SERVERSTRING,I)) = 2 | length(word(rpc.srvinfo.SERVERSTRING,I)) = 3 then do
     
    460484    SIGNAL OFF SYNTAX
    461485
    462     ok = stream(samba.!msg,'c','close')
    463     ok = SysFileDelete(samba.!msg)
     486    ok = stream(rpcinfo.!msg,'c','close')
     487    ok = stream(rpcinfo.!err,'c','close')
     488    ok = SysFileDelete(rpcinfo.!msg)
     489    ok = SysFileDelete(rpcinfo.!err)
    464490
    465491    if Failure = 0 then do
     
    477503
    478504RPCERROR:
    479     ok = stream(samba.!msg,'c','close')
    480     ok = SysFileDelete(samba.!msg)
     505    ok = stream(rpcinfo.!msg,'c','close')
     506    ok = stream(rpcinfo.!err,'c','close')
     507    ok = SysFileDelete(rpcinfo.!msg)
     508    ok = SysFileDelete(rpcinfo.!err)
     509
    481510    say "  rpc parsing error in line "sigl": "strip(sourceline(sigl))
    482511    retval = -1
  • trunk/guitools/shared/smbtree.vrs

    r688 r703  
    1919    address cmd 'detach 'samba.!smbtreeexe' 'BroadCast' -S 'UserCred' 'debuglevel' >'samba.!serverlist
    2020
     21    if UserCred = '-N' then ok = VRSet("CN_SMBTREE","Caption","User context: Guest")
     22    else do
     23        parse var UserCred '--user='username'%'.
     24        ok = VRSet("CN_SMBTREE","Caption","User context: "username)
     25    end
     26
    2127    if BroadCast = '-b' then BroadCast = 1; else BroadCast = 0
    2228    if UserCred  = '-N' then UserCred = ''
     
    4450    if ShowHidden = 'SHOWHIDDEN' | ShowHidden = '' then ShowHidden = 0
    4551    if BroadCast = 1 then BroadCast = '-b'; else BroadCast = ''
     52
     53    if UserCred = '-N' then ok = VRSet("CN_SMBTREE","Caption","User context: Guest")
     54    else do
     55        parse var UserCred '--user='username'%'.
     56        ok = VRSet("CN_SMBTREE","Caption","User context: "username)
     57    end
    4658
    4759    ok = VRset("TM_RefreshTreeDisplay","Enabled",0)
     
    155167    address cmd 'detach 'samba.!smbclientexe' -L "'machine'" 'UserCred' 'debuglevel' 2>'smbmachine' 1>&2'
    156168
     169    if UserCred = '-N' then ok = VRSet("CN_SMBTREE","Caption","User context: Guest")
     170    else do
     171        parse var UserCred '--user='username'%'.
     172        ok = VRSet("CN_SMBTREE","Caption","User context: "username)
     173    end
     174   
    157175    if UserCred = '-N' then UserCred = ''
    158176
  • trunk/guitools/smbmon/changes

    r688 r703  
    1 Version 2.5.alpha 10-2011
     1Version 2.5.beta 02-2012
    22                        +Added:   Delete old logs
    3                         +Added:   enhanced refresh code
     3                        +Added:   Kill single processes
     4                        +Added:   (even more) enhanced refresh code
    45                        *Changed: Use Alex Taylor's Warp4-style notebook
    56                                  instead of my emulation
     
    78                        *Changed: Use latest smbtree.vrs to have all browsing
    89                                  enhancements added to EVFSGUI
     10                        !Fixed:   Columns menu was upside down
     11                        !Fixed:   Do not turn off display AFTER starting/stopping etc...
    912                        Note: This is based upon 1.9 line of code.
    1013Version 2.1.alpha 07-2011
  • trunk/guitools/smbmon/rc/lang/smbmon_de.mkm

    r688 r703  
    3737SMM0031I: Darstellung
    3838SMM0032I: Ping
    39 SMM0033I: "%1"-Prozess stoppen
     39SMM0033I: Prozess "%1" stoppen
    4040SMM0034I: Den "%1"-Prozess wirklich stoppen?
    4141SMM0035I: Sortieren
    42 SMM0036I: "%1"-Prozess starten
     42SMM0036I: Prozess "%1" starten
    4343SMM0037I: Den "%1"-Prozess wirklich starten?
    44 SMM0038?:
    45 SMM0039?:
     44SMM0038I: Prozess "%1" killen               
     45SMM0039I: Den "%1"-Prozess wirklich killen?
    4646; Daemon Status
    4747SMM0040I: gestartet
  • trunk/guitools/smbmon/rc/lang/smbmon_en.mkm

    r688 r703  
    4242SMM0036I: Start "%1"-daemon
    4343SMM0037I: Really start "%1"-daemon?
    44 SMM0038?:
    45 SMM0039?:
     44SMM0038I: Kill "%1"-process       
     45SMM0039I: Really kill "%1"-process?
    4646; Daemon Status
    4747SMM0040I: is running
  • trunk/guitools/smbmon/rc/lang/smbmon_es.mkm

    r688 r703  
    4242SMM0036I: Iniciar "%1"-daemon
    4343SMM0037I: Realmente iniciar "%1"-daemon?
    44 SMM0038?:
    45 SMM0039?:
     44SMM0038I: Matar "%1"-daemon           
     45SMM0039I: Realmente matar "%1"-daemon?
    4646; Daemon Status
    4747SMM0040I: en funcionamiento
  • trunk/guitools/smbmon/rc/lang/smbmon_fr.mkm

    r688 r703  
    4444SMM0036I: Lancer le d‚mon-"%1"
    4545SMM0037I: Voulez-vous r‚ellement lancer le d‚mon-"%1" ?
    46 SMM0038?:
    47 SMM0039?:
     46SMM0038I: Tuer le d‚mon-"%1"                         
     47SMM0039I: Voulez-vous r‚ellement tuer le d‚mon-"%1" ?
    4848; Daemon Status
    4949SMM0040I: est en cours d'ex‚cution
  • trunk/guitools/smbmon/rc/lang/smbmon_sv.mkm

    r688 r703  
    4242SMM0036I: Start ned "%1"
    4343SMM0037I: Skall verkligen "%1" startas?
    44 SMM0038?:
    45 SMM0039?:
     44SMM0038I: D”da ned "%1"               
     45SMM0039I: Skall verkligen "%1" d”das?
    4646; Daemon Status
    4747SMM0040I: startad
  • trunk/guitools/smbmon/smbmon.vrp

    r688 r703  
    66RunParameters:
    77RunDirectory: U:\Develop\Samba\trunk\guitools\smbmon
    8 VRXWindow: __VREMainWindow,1,2180,3614,915,4216
    9 VRXWindow: __VRESectionListWindow,1,3541,11804,7914,3342
    10 VRXWindow: __VREToolsWindow,1,2156,1494,6483,1663
     8VRXWindow: __VREMainWindow,1,2180,3614,1024,6769
     9VRXWindow: __VRESectionListWindow,1,3541,11804,7914,6047
     10VRXWindow: __VREToolsWindow,1,2156,1494,6480,1669
    1111VRXWindow: __VREWindListWindow,1,964,11708,2650,3150
    1212UserFile: 1
    1313UserWindow: Main,1
    14 UserWindow: SW_DAEMONS,1
     14UserWindow: SW_FILES,1
  • trunk/guitools/smbmon/smbmon.vrx

    r688 r703  
    112112    ok = VRMethod(Container, "GetFieldList", "Fields." )
    113113
    114     do I = 1 to 12
     114    do I = 1 to 14
     115        R2I = right("0"||I,2)
    115116        if I <= fields.0 then do
    116 /*          say "Columns_"||right("0"||I,2)' 'VRMethod(Container, "GetFieldAttr", fields.I, "Title" ) */
    117             ok = VRset("Columns_"||right("0"||I,2), "Visible", 1)
    118             ok = VRset("Columns_"||right("0"||I,2), "Caption", VRMethod(Container, "GetFieldAttr", fields.I, "Title" ))
    119             ok = VRset("Columns_"||right("0"||I,2), "Checked", VRMethod(Container, "GetFieldAttr", fields.I, "Visible" ))
    120             ok = VRset("Columns_"||right("0"||I,2), "Userdata", Container'|'fields.I'|'VRMethod(Container, "GetFieldAttr", fields.I, "Visible" ))
    121         end
    122         else ok = VRset("Columns_"||right("0"||I,2), "Visible", 0)
     117/*          say "Columns_"||R2I' 'VRMethod(Container, "GetFieldAttr", fields.I, "Title" ) */
     118            ok = VRset("Columns_"||R2I, "Visible", 1)
     119            ok = VRset("Columns_"||R2I, "Caption", VRMethod(Container, "GetFieldAttr", fields.I, "Title" ))
     120            ok = VRset("Columns_"||R2I, "Checked", VRMethod(Container, "GetFieldAttr", fields.I, "Visible" ))
     121            ok = VRset("Columns_"||R2I, "Userdata", Container'|'fields.I'|'VRMethod(Container, "GetFieldAttr", fields.I, "Visible" ))
     122        end
     123        else ok = VRset("Columns_"||R2I, "Visible", 0)
    123124    end
    124125    ok = VRMethod( "Columns", "Popup", , , "", "" )   
     
    12291230        if DRH <> "" then DaemonName = VRMethod("CN_Daemons", "GetRecordAttr", DRH, "Caption")
    12301231        select
    1231             when Words(DaemonName) = 3 then do
     1232            when Words(DaemonName) = 3 then do /* a child process with PID in name */
    12321233                DaemonName = word(DaemonName,2)
    12331234                ok = VRset("ContextMenu_Daemons_Sep1","Visible", 1 )
     1235                ok = VRSet("ContextMenu_Daemons_KillPID", "Caption", NLVGetMessage( 38, DaemonName))
     1236                ok = VRset("ContextMenu_Daemons_KillPID",  "Visible", 1 )
     1237                ok = VRset("ContextMenu_Daemons_Start", "Visible", 0 )
     1238                ok = VRset("ContextMenu_Daemons_Ping",  "Visible", 1 )
     1239                ok = VRset("ContextMenu_Daemons_Sep1",  "Visible", 1 )
    12341240            end
    1235             when Words(DaemonName) = 1 then do
     1241            when Words(DaemonName) = 1 then do /* on smbd.exe or nmbd.exe root processes */
    12361242                parse var DaemonName DaemonName'.exe'
    12371243                if strip(VRMethod("CN_Daemons", "GetFieldData", DRH, DPidsFH)) <> "" then do
     
    12441250                    ok = VRSet("ContextMenu_Daemons_Start", "Caption", NLVGetMessage( 36, DaemonName))
    12451251                    ok = VRset("ContextMenu_Daemons_Start", "Visible", 1 )
     1252                    ok = VRset("ContextMenu_Daemons_KillPID","Visible", 0 )
    12461253                    ok = VRset("ContextMenu_Daemons_Ping",  "Visible", 0 )
    12471254                    ok = VRset("ContextMenu_Daemons_Sep1",  "Visible", 1 )
     
    13951402return
    13961403
     1404/*:VRX         Columns_13_Click
     1405*/
     1406Columns_13_Click:
     1407    call _ColumnShow
     1408return
     1409
     1410/*:VRX         Columns_14_Click
     1411*/
     1412Columns_14_Click:
     1413    call _ColumnShow
     1414return
     1415
    13971416/*:VRX         ContextMenu_Daemons_Details_Click
    13981417*/
     
    14021421    ok = VRset("ContextMenu_Daemons_Details","Enabled",0)
    14031422    ok = VRSet("TM_refresh","Enabled", 1)
     1423return
     1424
     1425/*:VRX         ContextMenu_Daemons_KillPID_Click
     1426*/
     1427ContextMenu_Daemons_KillPID_Click:
     1428    Msg.Text = NLVGetMessage(39, DaemonName)
     1429    Msg.Type = 'Q'
     1430    if _MsgYesNo() = 1 then do
     1431        say 'kill -9 'DaemonName
     1432        address cmd 'kill -9 'DaemonName
     1433    end
     1434    ok = VRSet("TM_refresh","Enabled", 1)
     1435    call PB_PAUSEDISPLAY_Click
    14041436return
    14051437
     
    14351467    end
    14361468    ok = VRSet("TM_refresh","Enabled", 1)
     1469    call PB_PAUSEDISPLAY_Click
    14371470return
    14381471
     
    14531486    end
    14541487    ok = VRSet("TM_refresh","Enabled", 1)
     1488    call PB_PAUSEDISPLAY_Click
    14551489return
    14561490
     
    19431977    end
    19441978    ok = VRSet("TM_Refresh","Delay", 2000)
     1979    if \VRGet("TM_RefreshDaemons","Enabled") then call PB_PAUSEDISPLAY_Click
    19451980    call VRSet VRWindow(), 'Pointer', '<default>'
    19461981return
     
    19581993    end
    19591994    ok = VRSet("TM_Refresh","Delay", 1000)
     1995    if \VRGet("TM_RefreshDaemons","Enabled") then call PB_PAUSEDISPLAY_Click
    19601996    call VRSet VRWindow(), 'Pointer', '<default>'
    19611997return
     
    19912027    end
    19922028    ok = VRSet("TM_Refresh","Delay", 1000)
     2029    if \VRGet("TM_RefreshDaemons","Enabled") then call PB_PAUSEDISPLAY_Click
    19932030    call VRSet VRWindow(), 'Pointer', '<default>'
    19942031    say "IPB_Start_Click done"
     
    20072044    end
    20082045    ok = VRSet("TM_Refresh","Delay", 1000)
     2046    if \VRGet("TM_RefreshDaemons","Enabled") then call PB_PAUSEDISPLAY_Click
    20092047    call VRSet VRWindow(), 'Pointer', '<default>'
    20102048    say "IPB_Stop_Click done"
Note: See TracChangeset for help on using the changeset viewer.