Changeset 766


Ignore:
Timestamp:
Apr 5, 2013, 7:54:46 PM (12 years ago)
Author:
Herwig Bauernfeind
Message:

GUI-Tools: EVFSGUI 2.5, SMBMON 2.5 yet another place to fix Ticket #202

Location:
trunk/guitools
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/guitools/shared/smbtree.vrs

    r759 r766  
    280280
    281281            do while(left(line,1) = '09'x) /* Share loop */
    282                 parse var line '09'x share type comment
    283                 type = translate(strip(type))
    284                 comment = strip(comment)
     282                share   = strip(substr(line,2,16))
     283                type    = translate(strip(substr(line,17,10)))
     284                comment = strip(substr(line,27,))
    285285
    286286                select
     
    294294                /* Now the machine receives the wakeup icon */
    295295                ok = VRMethod('CN_smbtree', 'SetRecordAttr', smbtree.!machine, 'Icon', "#35:PMWP.DLL")
     296               
    296297                parent = smbtree.!machine
    297298                smbtree.!share = VRMethod( "CN_smbtree", "AddRecord",parent,, share||'0D0A'x||comment, res)
  • trunk/guitools/smbmon/smbmon.vrp

    r759 r766  
    77RunDirectory: U:\Develop\Samba\trunk\guitools\smbmon
    88VRXWindow: __VREMainWindow,1,2180,3614,1024,6769
    9 VRXWindow: __VRESectionListWindow,1,4083,11804,7372,6047
    10 VRXWindow: __VREToolsWindow,1,2156,1494,6483,1659
     9VRXWindow: __VRESectionListWindow,1,4083,11226,7372,6589
     10VRXWindow: __VREToolsWindow,1,2156,1494,6483,1667
    1111VRXWindow: __VREWindListWindow,1,964,11708,3132,3150
    1212UserFile: 1
    1313UserWindow: Main,1
    14 UserWindow: SW_FILES,1
    15 UserWindow: SW_SMBTREE,1
     14UserWindow: SW_DAEMONS,1
  • trunk/guitools/smbmon/smbmon.vrx

    r703 r766  
    295295*/
    296296_GUIInit:
    297     say '_GUIInit() started'
     297    IF options.!debug == 1 then say time()' _GUIInit() started'
    298298
    299299    if datatype(Top) = 'NUM' then do
     
    362362   
    363363    ok = VRSet("Main", "Visible", 1)
    364     say '_GUIInit() done'
     364    IF options.!debug == 1 then say time()' _GUIInit() done'
    365365return
    366366
     
    392392*/
    393393_INIRead:
    394     say '_INIRead() started.'
     394    IF options.!debug == 1 then say time()' _INIRead() started'
    395395
    396396    OurINI = strip(VRParseFileName(VRget("Application","Program"),'DP')'\SMBSTATUS.INI',,'\')
    397397    ok = SysFileTree(OurINI, INIFound.,'FO')
    398398    if INIFound.0 = 1 then OurINI = VRParseFileName(INIFound.1,'DPNE')
    399     say 'OurINI='OurINI
    400     HelpFile = VRParseFileName(OurINI,'DPN')'.HLP'
    401     say 'HelpFile='HelpFile
     399    IF options.!debug == 1 then say '  OurINI='OurINI
    402400
    403401    Top   = VRGetIni( "Pos", "Top",    OurINI , 'NoClose')
     
    448446    if options.!debug = "" then options.!debug = 0
    449447
    450     if options.!Debug then ok = VRREdirectStdIO("ON")
    451                       else ok = VRREdirectStdIO("OFF")
     448    if options.!Debug then ok = VRRedirectStdIO("ON")
     449                      else ok = VRRedirectStdIO("OFF")
    452450
    453451    advanced.!bigicons = VRGetIni( "Settings", "BigIcons", OurINI)
     
    471469
    472470    smbdoutput = TempDir'smbd.out'
    473     say '_INIRead() done.'
     471    IF options.!debug == 1 then say time()' _INIRead() done'
    474472return
    475473
     
    520518*/
    521519_LoadotherFuncs:
    522     ok = VRRedirectStdIO("OFF")
     520    IF options.!debug == 1 then say time()' _LoadotherFuncs() started'
     521    SIGNAL ON SYNTAX NAME DLLMissing
    523522
    524523    call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
     
    528527    call PRLoadFuncs
    529528
    530 return
    531 
     529    SIGNAL OFF SYNTAX
     530    IF options.!debug == 1 then say time()' _LoadotherFuncs() done'
     531return
     532
     533DLLMissing:
     534    Fatal = 1
     535    call VRMessage 'Main', 'REXX function library 'strip(translate(word(sourceline(SIGL-1),4),'  ',"',"))'.DLL is missing!', "EVFSGUI fatal error", "E"
     536signal Quit
    532537/*:VRX         _MsgYesNo
    533538*/
     
    612617*/
    613618_Refresh:
    614     say "_Refresh() started"
     619    IF options.!debug == 1 then say time()' _Refresh() started'
    615620    ok = VRSet("TM_refresh","Enabled", 0)
    616621    SmbNoInit = 0
     
    651656/* say '  2:'hdr2 */
    652657    Zeile = linein(refreshoutput)
    653    say '    'Zeile
     658    say '    'Zeile
    654659    if SmbNoInit then do
    655660        call lineout samba.!msg, SambaStVer
     
    664669    end
    665670
    666     say 'SmbNoInit = 'SmbNoInit
     671    say '  SmbNoInit = 'SmbNoInit
    667672
    668673    /* Active users */
     
    776781    end
    777782    ok = VRSet("TM_refresh","Enabled", 1)
    778     say "_Refresh() done"
     783
     784    IF options.!debug == 1 then say time()' _Refresh() done'
    779785return
    780786/*:VRX         _RefreshDaemons
    781787*/
    782788_RefreshDaemons:
    783     say "_RefreshDaemons() started"
     789    IF options.!debug == 1 then say time()' _RefreshDaemons() started'
     790    ok = VRSet("TM_RefreshDaemons","Delay",3000)
     791
    784792    ok = VRSet("CN_Daemons","Painting", 0 )
    785 
    786793    call VRSet VRWindow(), 'Pointer', 'Wait'
    787794
     
    904911    ok = VRSet("CN_Daemons","Painting", 1 )
    905912    if Running then call _SambaUptime
    906     say "_RefreshDaemons() done"
     913
     914    IF options.!debug == 1 then say time()' _RefreshDaemons() done'
    907915return
    908916
     
    940948    ok = SysFileDelete(PingOut)
    941949*/
     950/*:VRX         _RefreshDaemonsDelay
     951*/
     952_RefreshDaemonsDelay:
     953    IF options.!debug == 1 then say time()' _RefreshDaemonsDelay() started'
     954    IF options.!debug == 1 then say "  Old intervall = "VRGet("TM_RefreshDaemons","Delay")
     955    ok = VRSet("TM_RefreshDaemons","Delay",   60000)
     956    IF options.!debug == 1 then say "  New Intervall = "VRGet("TM_RefreshDaemons","Delay")
     957    IF options.!debug == 1 then say time()' _RefreshDaemonsDelay() done'
     958return
     959
    942960/*:VRX         _SambaFindPIDfile
    943961*/
    944962_SambaFindPIDfile:
    945     say "_SambaFindPIDfile() started"
     963    IF options.!debug == 1 then say time()' _SambaFindPIDfile() started'
     964
    946965    ok = SysFileTree(ETC'\samba\pid\nmbd*pid',nmbdpid.,'FO')
    947     if nmbdpid.0 = 1 then nmbdpidfile = nmbdpid.1; else nmbdpidfile = ""
    948     say "  nmbdpidfile = "nmbdpidfile
    949     say "_SambaFindPIDfile() done"
     966    if nmbdpid.0 = 1
     967        then nmbdpidfile = nmbdpid.1;
     968        else nmbdpidfile = ""
     969
     970    IF options.!debug == 1 then say "  nmbdpidfile = "nmbdpidfile
     971
     972    IF options.!debug == 1 then say time()' _SambaFindPIDfile() done'
    950973return
    951974
     
    10051028*/
    10061029_SambaUptime:
    1007     say "_SambaUptime() started"
     1030    IF options.!debug == 1 then say time()' _SambaUptime() started'
    10081031    call _SambaFindPIDfile
    10091032    if nmbdpidfile = "" then do
     
    10201043    NowTime   = "2008-03-05 08:59:50" */
    10211044
    1022     say StartTime
    1023     say NowTime
     1045    IF options.!debug == 1 then do
     1046        say "  Start Time ='"StartTime"'"
     1047        say "  Now   Time ='"NowTime"'"
     1048    end
    10241049
    10251050    doM.0 = 12
     
    10321057    if nY//4 = 0 & nY//400 <> 0 then doM.2 = 29
    10331058
    1034     say doM.2
     1059    /* say doM.2 */
    10351060
    10361061    uY =nY-sY
     
    10531078    if uM < 0 then do; uY = uY - 1; uM = uM + 12; end
    10541079
    1055     say uY uM uD uH uMi uS
     1080    /* say uY uM uD uH uMi uS */
    10561081
    10571082    UpTimeStr = ' 'NlvGetMessage(43)':'
     
    10641089
    10651090    ok = VRset("CN_Daemons", "Caption", UpTimeStr)
    1066     say "_SambaUptime() done"
     1091
     1092    IF options.!debug == 1 then say time()' _SambaUptime() done'
    10671093return
    10681094
     
    12081234/*:VRX         CN_Daemons_Click
    12091235*/
    1210 CN_Daemons_Click:
    1211     ok = VRSet("TM_Refresh","Enabled", 0)
    1212     ok = VRSet("TM_RefreshDaemons","Enabled", 0)
    1213     ok = VRSet("PB_PAUSEDISPLAY","Caption", "Resume")
     1236CN_Daemons_Click:
     1237    IF options.!debug == 1 then say time()' CN_Daemons_Click() started'
     1238    NowClickedRecord = VRInfo("Record")
     1239    say "  NowRecord  = '"NowClickedRecord"'"
     1240    say "  LastRecord = '"LastClickedRecord"'"
     1241    if NowClickedRecord <> LastClickedRecord then call _RefreshDaemonsDelay
     1242    LastClickedRecord = NowClickedRecord
     1243    IF options.!debug == 1 then say time()' CN_Daemons_Click() done'
    12141244return
    12151245
     
    12191249    if VRInfo("Top") < 400 & VRGet("CN_Daemons", "View") = "Detail" then call _ColumnsMenu "CN_Daemons"
    12201250    else do
    1221         ok = VRSet("TM_Refresh","Enabled", 0)
    1222         ok = VRSet("TM_RefreshDaemons","Enabled", 0)
    1223         ok = VRSet("PB_PAUSEDISPLAY","Caption", "Resume")
     1251        say "  Record = '"VRInfo("Record")"'"
     1252
     1253        call _RefreshDaemonsDelay
     1254
    12241255        DRH = VRInfo("Record")
    12251256        OH = VRInfo("Object")
     
    14321463        address cmd 'kill -9 'DaemonName
    14331464    end
    1434     ok = VRSet("TM_refresh","Enabled", 1)
    1435     call PB_PAUSEDISPLAY_Click
     1465    ok = VRSet("TM_Refresh","Enabled", 1)
    14361466return
    14371467
     
    14661496        call _SambaShowMsg "section table registered tdb"
    14671497    end
    1468     ok = VRSet("TM_refresh","Enabled", 1)
    1469     call PB_PAUSEDISPLAY_Click
     1498    ok = VRSet("TM_Refresh","Enabled", 1)
    14701499return
    14711500
     
    14851514        address cmd samba.!smbcmd' start 'DaemonName
    14861515    end
    1487     ok = VRSet("TM_refresh","Enabled", 1)
    1488     call PB_PAUSEDISPLAY_Click
     1516    ok = VRSet("TM_Refresh","Enabled", 1)
    14891517return
    14901518
     
    16571685/*:VRX         Main_Create
    16581686*/
    1659 Main_Create:
     1687Main_Create:
     1688    options.!debug    = 1
     1689    if options.!debug == 1 then do
     1690        ok = VRRedirectStdIO("ON")
     1691        say time()' Main_Create started'
     1692    end
     1693    else ok = VRRedirectStdIO("OFF")
     1694 
    16601695    call _LoadOtherFuncs
    16611696    call _InitTempDir
     
    16811716    end */
    16821717    ok = VRMethod("PB_Refresh","SetFocus")
     1718
     1719    if options.!debug == 1 then say time()' Main_Create done'
    16831720return
    16841721/*:VRX         Main_Deactivate
     
    17791816    ok = VRSet("PB_Reload", "Top",    pbtn_height*5 - marginx2)
    17801817    ok = VRSet("PB_DelLogs","Top",    pbtn_height*6 - marginx2)
    1781     ok = VRSet("DT_PAUSEDISPLAY","Top",   pane_height - pbtn_height*2 -1020 - marginx2)
    1782     ok = VRSet("PB_PAUSEDISPLAY","Top",   pane_height - pbtn_height -1020 - marginx2)
    17831818
    17841819    ok = VRSet("PB_START",  "Left",   pane_width -  760 - marginx2 - pbtn_width)
     
    17871822    ok = VRSet("PB_Reload", "Left",   pane_width -  760 - marginx2 - pbtn_width)
    17881823    ok = VRSet("PB_DelLogs","Left",   pane_width -  760 - marginx2 - pbtn_width)
    1789     ok = VRSet("DT_PAUSEDISPLAY","Left",  pane_width -  760 - marginx2 - pbtn_width)
    1790     ok = VRSet("PB_PAUSEDISPLAY","Left",  pane_width -  760 - marginx2 - pbtn_width)
    17911824
    17921825    ok = VRset("GB_SMBTREE","Top",    margin  )
     
    19371970return
    19381971
    1939 /*:VRX         PB_PAUSEDISPLAY_Click
    1940 */
    1941 PB_PAUSEDISPLAY_Click:
    1942     if VRGet("TM_RefreshDaemons","Enabled") then do
    1943         ok = VRSet("TM_RefreshDaemons","Enabled", 0)
    1944         ok = VRSet("PB_PAUSEDISPLAY","Caption", "Resume")
    1945     end
    1946     else do
    1947         ok = VRSet("TM_RefreshDaemons","Enabled", 1)
    1948         ok = VRSet("PB_PAUSEDISPLAY","Caption", "Pause")
    1949     end
    1950 return
    1951 
    19521972/*:VRX         PB_Refresh_Click
    19531973*/
    1954 PB_Refresh_Click:
     1974PB_Refresh_Click:
     1975    IF options.!debug == 1 then say time()' PB_Refresh_Click() started'
    19551976    ok = SysSleep(0.3)
    1956     page =  VRInfo("Page")
    1957 say page
     1977
     1978    say "  CurrentPageNr = "CurrentPageNr
    19581979
    19591980    if CurrentPageNr = 5 then do
     
    19631984    end
    19641985    else call _Refresh
     1986    IF options.!debug == 1 then say time()' PB_Refresh_Click() done'
    19651987return
    19661988
     
    19771999    end
    19782000    ok = VRSet("TM_Refresh","Delay", 2000)
    1979     if \VRGet("TM_RefreshDaemons","Enabled") then call PB_PAUSEDISPLAY_Click
    19802001    call VRSet VRWindow(), 'Pointer', '<default>'
    19812002return
     
    19932014    end
    19942015    ok = VRSet("TM_Refresh","Delay", 1000)
    1995     if \VRGet("TM_RefreshDaemons","Enabled") then call PB_PAUSEDISPLAY_Click
    19962016    call VRSet VRWindow(), 'Pointer', '<default>'
    19972017return
     
    20272047    end
    20282048    ok = VRSet("TM_Refresh","Delay", 1000)
    2029     if \VRGet("TM_RefreshDaemons","Enabled") then call PB_PAUSEDISPLAY_Click
    20302049    call VRSet VRWindow(), 'Pointer', '<default>'
    20312050    say "IPB_Start_Click done"
     
    20442063    end
    20452064    ok = VRSet("TM_Refresh","Delay", 1000)
    2046     if \VRGet("TM_RefreshDaemons","Enabled") then call PB_PAUSEDISPLAY_Click
    20472065    call VRSet VRWindow(), 'Pointer', '<default>'
    20482066    say "IPB_Stop_Click done"
     
    24082426        when page = 4 then do /* daemons */
    24092427            ok = VRSet("TM_RefreshDaemons","Enabled", 1)
     2428            ok = VRSet("TM_RefreshDaemons","Delay",   3000)
    24102429        end
    24112430        when page = 5 then do /* smbtree */
     
    24322451*/
    24332452TM_RefreshDaemons_Trigger:
     2453    ok = VRSet("TM_RefreshDaemons","Delay", 3000)
    24342454    call _RefreshDaemons
    24352455return
Note: See TracChangeset for help on using the changeset viewer.