Changeset 688


Ignore:
Timestamp:
Feb 7, 2012, 8:30:41 AM (10 years ago)
Author:
Herwig Bauernfeind
Message:

GUI-Tools: Updates in EVFSGUI, SMBMON and SSCC

Location:
trunk/guitools
Files:
18 edited

Legend:

Unmodified
Added
Removed
  • trunk/guitools/evfsgui/changes

    r675 r688  
    1616 
    1717Version 2.5.x 2012-??-??
     18+ Added: Show for who we are waiting
    1819+ Added: -timesync switch, allows time sync using commandline
    1920+ Added: Support time synchronisation (requires new net.exe)
  • trunk/guitools/evfsgui/evfsgui.vrp

    r675 r688  
    99RunDirectory: U:\Develop\Samba\trunk\guitools\evfsgui
    1010VRXWindow: __VREMainWindow,1,1951,2361,891,7841
    11 VRXWindow: __VREFileListWindow,1,1144,10744,2665,3358
    12 VRXWindow: __VRESectionListWindow,1,3903,10744,8082,4505
    13 VRXWindow: __VREToolsWindow,0,2987,8528,6486,1669
     11VRXWindow: __VREFileListWindow,1,1253,11033,2665,3358
     12VRXWindow: __VRESectionListWindow,1,3927,11033,8082,7986
     13VRXWindow: __VREToolsWindow,0,3084,8528,6486,1669
    1414VRXWindow: __VREWindListWindow,1,723,11708,3686,3150
    1515UserFile: 1
    1616UserWindow: Main,1
    17 UserWindow: SW_SMBTREE,1
    18 UserWindow: SW_DIALOG,1
  • trunk/guitools/evfsgui/evfsgui.vrx

    r675 r688  
    24692469LoadFileSysFuncs:
    24702470    IF options.!debug == 1 THEN SAY time()' LoadFileSysFuncs() started'
     2471
    24712472    Fatal = 1
    24722473    RestartCount = 0
     
    24742475    FoundND = 1
    24752476
    2476     if SysSearchPath("PATH", "EVFSCTL.EXE") = "" then do
     2477    program = VRGet("Application", "Program")
     2478    if program = "" then parse source . . program
     2479    say "Program = '"program"'"
     2480    program = translate(VRParseFileName(Program,'N'))
     2481    say "Program = '"program"'"
     2482
     2483    if SysSearchPath("PATH", "EVFSCTL.EXE") = "" | program = "SMBGUI" then do
    24772484        FoundEVFS = 0
    24782485        ForceNDFS = 1
     
    25542561*/
    25552562Main_Create:
    2556     options.!debug    = 1
     2563    options.!debug    = 0
    25572564    IF options.!debug == 1 THEN do
    25582565        ok = VRRedirectStdIO("ON")
     
    43904397    CALL NLVSetText 'CB_TRAC',         "Caption", 134
    43914398
    4392     ok = VRSet("DT_About","Caption", 'EVFSGUI (c) 2007-2011 Alexander Taylor and Herwig Bauernfeind')
     4399    ok = VRSet("DT_About","Caption", Program' (c) 2007-2012 Alexander Taylor and Herwig Bauernfeind')
    43934400
    43944401    About.DscFH  = VRMethod( "CN_ABOUT", "AddField", "String", "Component" )
  • trunk/guitools/shared/smbtree.vrs

    r660 r688  
    55    say time()' _RefreshTree() started'
    66    FirstRun = 0
    7 
     7    if VRIsValidObject("DT_STATUSBAR") then ok = VRSet("DT_STATUSBAR","Caption", "Refreshing network")
    88    ok = SysFileDelete(samba.!msg)
    99
     
    3636
    3737    stat = stream(samba.!serverlist,'c','open read')
    38     if stat <> "READY:" then return
     38    if stat <> "READY:" then do
     39        if VRIsValidObject("DT_STATUSBAR") then ok = VRSet("DT_STATUSBAR","Caption", VRGet("DT_STATUSBAR","Caption")||'.')
     40        return
     41    end
    3942
    4043    if UserCred = 'USERCRED' | UserCred = '' | UserCred = '--user=%' then UserCred = '-N'
     
    392395    if BroadCast = 1 then BroadCast = '-b'; else BroadCast = ''
    393396
    394     say     '  'samba.!smbtreeexe' 'BroadCast' -D 'debuglevel' 'UserCred' >'samba.!msg
    395     address cmd samba.!smbtreeexe' 'BroadCast' -D 'debuglevel' 'UserCred' >'samba.!msg
     397    call VRSet VRWindow(), 'Pointer', 'Wait'
     398    say       '  detach 'samba.!smbtreeexe' 'BroadCast' -D 'debuglevel' 'UserCred' >'samba.!msg
     399    address cmd 'detach 'samba.!smbtreeexe' 'BroadCast' -D 'debuglevel' 'UserCred' >'samba.!msg
     400
     401    if VRIsValidObject("DT_STATUSBAR") then ok = VRSet("DT_STATUSBAR","Caption","Enumerating workgroups")
     402    do while stream(samba.!msg,'c','open read') <> "READY:"
     403        ok = SysSleep(1)
     404        if VRIsValidObject("DT_STATUSBAR") then ok = VRSet("DT_STATUSBAR","Caption", VRGet("DT_STATUSBAR","Caption")||'.')
     405    end
     406    call VRSet VRWindow(), 'Pointer', '<default>'
    396407
    397408    if BroadCast = '-b' then BroadCast = 1; else BroadCast = 0
     
    445456    /* Get all IP addresses of the machine */
    446457    machine = arg(1)
    447     say     '  'samba.!nmblookupexe' 'machine' 'debuglevel' >'samba.!msg
    448     address cmd samba.!nmblookupexe' 'machine' 'debuglevel' >'samba.!msg
     458    call VRSet VRWindow(), 'Pointer', 'Wait'
     459    say       '  detach 'samba.!nmblookupexe' 'machine' 'debuglevel' >'samba.!msg
     460    address cmd 'detach 'samba.!nmblookupexe' 'machine' 'debuglevel' >'samba.!msg
     461
     462    if VRIsValidObject("DT_STATUSBAR") then ok = VRSet("DT_STATUSBAR","Caption","Obtaining IP from "machine)
     463    do while stream(samba.!msg,'c','open read') <> "READY:"
     464        ok = SysSleep(0.33)
     465        if VRIsValidObject("DT_STATUSBAR") then ok = VRSet("DT_STATUSBAR","Caption", VRGet("DT_STATUSBAR","Caption")||'.')
     466    end
     467    call VRSet VRWindow(), 'Pointer', '<default>'
     468
    449469    ok = file2stem(samba.!msg,"nmblookup.")
    450470    ipstr = ""; ip = ""
     
    461481_GetMachineMACRoles: procedure expose debuglevel samba.
    462482    machine = arg(1) /* May be name or IP */
    463     say     '  'samba.!nmblookupexe' -A 'machine' 'debuglevel' >'samba.!msg
    464     address cmd samba.!nmblookupexe' -A 'machine' 'debuglevel' >'samba.!msg
     483    call VRSet VRWindow(), 'Pointer', 'Wait'
     484    say       '  detach 'samba.!nmblookupexe' -A 'machine' 'debuglevel' >'samba.!msg
     485    address cmd 'detach 'samba.!nmblookupexe' -A 'machine' 'debuglevel' >'samba.!msg
     486
     487    if VRIsValidObject("DT_STATUSBAR") then ok = VRSet("DT_STATUSBAR","Caption","Obtaining capabilities from "machine)
     488    do while stream(samba.!msg,'c','open read') <> "READY:"
     489        ok = SysSleep(0.33)
     490        if VRIsValidObject("DT_STATUSBAR") then ok = VRSet("DT_STATUSBAR","Caption", VRGet("DT_STATUSBAR","Caption")||'.')
     491    end
     492    call VRSet VRWindow(), 'Pointer', '<default>'
    465493    ok = file2stem(samba.!msg,"nmblookup.")
    466494    Roles = ""
     
    486514_GetMachineNMBStatus: procedure expose debuglevel samba.
    487515    machine = arg(1) /* name only allowed */
    488     say     '  'samba.!nmblookupexe' -S 'machine' 'debuglevel' >'samba.!msg
    489     address cmd samba.!nmblookupexe' -S 'machine' 'debuglevel' >'samba.!msg
     516    call VRSet VRWindow(), 'Pointer', 'Wait'
     517    say       '  detach 'samba.!nmblookupexe' -S 'machine' 'debuglevel' >'samba.!msg
     518    address cmd 'detach 'samba.!nmblookupexe' -S 'machine' 'debuglevel' >'samba.!msg
     519
     520    if VRIsValidObject("DT_STATUSBAR") then ok = VRSet("DT_STATUSBAR","Caption","Querying "machine" for roles")
     521    do while stream(samba.!msg,'c','open read') <> "READY:"
     522        ok = SysSleep(0.33)
     523        if VRIsValidObject("DT_STATUSBAR") then ok = VRSet("DT_STATUSBAR","Caption", VRGet("DT_STATUSBAR","Caption")||'.')
     524    end
     525    call VRSet VRWindow(), 'Pointer', '<default>'
     526
    490527    ok = file2stem(samba.!msg,"nmblookup.")
    491528    IPStr = ""
  • trunk/guitools/smbmon/changes

    r642 r688  
    11Version 2.5.alpha 10-2011
     2                        +Added:   Delete old logs
     3                        +Added:   enhanced refresh code
    24                        *Changed: Use Alex Taylor's Warp4-style notebook
    35                                  instead of my emulation
  • trunk/guitools/smbmon/rc/lang/smbmon_de.mkm

    r654 r688  
    2020SMM0015I: Benutzer
    2121SMM0016I: Dateien
    22 SMM0017I: Dienste
     22SMM0017I: Freigaben
    2323SMM0018I: Prozesse
    2424SMM0019I: Netzwerkumgebung
     
    3232SMM0027I: Keine Best„tigung nach Start/Stop/Restart/Reload
    3333SMM0028I: wenn minimiert
    34 SMM0029?:
     34SMM0029I: WPS Methode zum Starten/Stoppen/Neustarten/Neu laden benutzen
    3535SMM0030?:
    3636; Daemons Context menu
     
    6363SMM0055I: Alle Benutzer anzeigen, die mit diesem Server verbunden sind.
    6464SMM0056I: Alle auf diesem Server ge”ffneten Dateien anzeigen.
    65 SMM0057I: Alle auf diesem Server verbundenen Dienste anzeigen.
     65SMM0057I: Alle auf diesem Server verbundenen Freigaben anzeigen.
    6666SMM0058I: Alle auf diesem Server gestarteten Prozesse anzeigen.
    6767SMM0059I: Die Netzwerkumgebung dieses Servers anzeigen.
  • trunk/guitools/smbmon/rc/lang/smbmon_en.mkm

    r654 r688  
    2020SMM0015I: Users
    2121SMM0016I: Files
    22 SMM0017I: Services
     22SMM0017I: Shares
    2323SMM0018I: Daemons
    2424SMM0019I: Nethood
     
    3232SMM0027I: No messagebox after Start/Stop/Restart/Reload
    3333SMM0028I: when minimized
    34 SMM0029?:
     34SMM0029I: Use WPS method to Start/Stop/Restart/Reload
    3535SMM0030?:
    3636; Daemons Context menu
  • trunk/guitools/smbmon/rc/lang/smbmon_es.mkm

    r654 r688  
    3232SMM0027I: Sin mensajes despues de Iniciar/Parar/Reiniciar/Recargar
    3333SMM0028I: mientras est  minimizado
    34 SMM0029?:
     34SMM0029I: Utilizar WPS m‚todo para Iniciar/Parar/Reiniciar/Recargar
    3535SMM0030?:
    3636; Daemons Context menu
  • trunk/guitools/smbmon/rc/lang/smbmon_fr.mkm

    r654 r688  
    3434SMM0027I: Pas de boŒte de message aprŠs d‚marrage/arrˆt/red‚marrage/rechargement
    3535SMM0028I: si r‚duit
    36 SMM0029?:
     36SMM0029I: Utilisez WPS m‚thode pout d‚marrage/arrˆt/red‚marrage/rechargement
    3737SMM0030?:
    3838; Daemons Context menu
  • trunk/guitools/smbmon/rc/lang/smbmon_sv.mkm

    r654 r688  
    3232SMM0027I: Ingen meddelanderuta efter Start/Stop/Omstart/Omladdning
    3333SMM0028I: vid minimerad
    34 SMM0029?:
     34SMM0029I: Anv„nd WPS metod f”r att Start/Stop/Omstart/Omladdning
    3535SMM0030?:
    3636; Daemons Context menu
  • trunk/guitools/smbmon/smbmon.vrp

    r654 r688  
    88VRXWindow: __VREMainWindow,1,2180,3614,915,4216
    99VRXWindow: __VRESectionListWindow,1,3541,11804,7914,3342
    10 VRXWindow: __VREToolsWindow,1,2156,1494,6486,1665
     10VRXWindow: __VREToolsWindow,1,2156,1494,6483,1663
    1111VRXWindow: __VREWindListWindow,1,964,11708,2650,3150
    1212UserFile: 1
  • trunk/guitools/smbmon/smbmon.vrx

    r654 r688  
    209209return
    210210
     211/*:VRX         _CreateSmbStarter
     212*/
     213_CreateSmbStarter:
     214ok = SysFileDelete(samba.!bin'\smbstarter.cmd')
     215call lineout samba.!bin'\smbstarter.cmd', '/* REXX */'
     216call lineout samba.!bin'\smbstarter.cmd', 'signal on failure name CLEANUP'
     217call lineout samba.!bin'\smbstarter.cmd', 'signal on halt name CLEANUP'
     218call lineout samba.!bin'\smbstarter.cmd', 'signal on syntax name CLEANUP'
     219call lineout samba.!bin'\smbstarter.cmd', 'say "Samba Server Starter"'
     220call lineout samba.!bin'\smbstarter.cmd', 'address cmd "@echo off"'
     221call lineout samba.!bin'\smbstarter.cmd', 'home:'
     222call lineout samba.!bin'\smbstarter.cmd', 'select'
     223call lineout samba.!bin'\smbstarter.cmd', 'when VRFileExists("smbstart") then do'
     224call lineout samba.!bin'\smbstarter.cmd', 'say "Start"'
     225call lineout samba.!bin'\smbstarter.cmd', 'address cmd "call 'samba.!bin'\smb.cmd start"'
     226call lineout samba.!bin'\smbstarter.cmd', 'ok = SysFileDelete("smbstart")'
     227call lineout samba.!bin'\smbstarter.cmd', 'end'
     228call lineout samba.!bin'\smbstarter.cmd', 'when VRFileExists("smbstop") then do'
     229call lineout samba.!bin'\smbstarter.cmd', 'say "Stop"'
     230call lineout samba.!bin'\smbstarter.cmd', 'address cmd "call 'samba.!bin'\smb.cmd stop"'
     231call lineout samba.!bin'\smbstarter.cmd', 'ok = SysFileDelete("smbstop")'
     232call lineout samba.!bin'\smbstarter.cmd', 'end'
     233call lineout samba.!bin'\smbstarter.cmd', 'when VRFileExists("restart") then do'
     234call lineout samba.!bin'\smbstarter.cmd', 'say "Restart"'
     235call lineout samba.!bin'\smbstarter.cmd', 'address cmd "call 'samba.!bin'\smb.cmd restart"'
     236call lineout samba.!bin'\smbstarter.cmd', 'ok = SysFileDelete("restart")'
     237call lineout samba.!bin'\smbstarter.cmd', 'end'
     238call lineout samba.!bin'\smbstarter.cmd', 'when VRFileExists("reload") then do'
     239call lineout samba.!bin'\smbstarter.cmd', 'say "Reload"'
     240call lineout samba.!bin'\smbstarter.cmd', 'address cmd "call 'samba.!bin'\smb.cmd reload"'
     241call lineout samba.!bin'\smbstarter.cmd', 'ok = SysFileDelete("reload")'
     242call lineout samba.!bin'\smbstarter.cmd', 'end'
     243call lineout samba.!bin'\smbstarter.cmd', 'when VRFileExists("quit") then do'
     244call lineout samba.!bin'\smbstarter.cmd', 'say "Quit"'
     245call lineout samba.!bin'\smbstarter.cmd', 'ok = SysFileDelete("quit")'
     246call lineout samba.!bin'\smbstarter.cmd', 'signal cleanup'
     247call lineout samba.!bin'\smbstarter.cmd', 'end'
     248call lineout samba.!bin'\smbstarter.cmd', 'otherwise nop'
     249call lineout samba.!bin'\smbstarter.cmd', 'end'
     250call lineout samba.!bin'\smbstarter.cmd', 'ok = SysSleep(1)'
     251call lineout samba.!bin'\smbstarter.cmd', 'signal home'
     252call lineout samba.!bin'\smbstarter.cmd', 'cleanup:'
     253call lineout samba.!bin'\smbstarter.cmd', 'say "Aborting..."'
     254call lineout samba.!bin'\smbstarter.cmd', 'exit'
     255ok = stream(samba.!bin'\smbstarter.cmd','c','close')
     256
     257Setup = 'NOPRINT=YES;DEFAULTVIEW=RUNNING;'||,
     258        'EXENAME='samba.!bin'\smbstarter.cmd;'||,
     259        'STARTUPDIR='samba.!bin';'||,
     260        'TITLE=;'||,
     261        'PROGTYPE=WINDOWABLEVIO;'||,
     262        'MINIMIZED=YES;'||,
     263        'VISIBLE=NO;'||,
     264        'NOAUTOCLOSE=NO;'||,
     265        'OBJECTID=<smbstarter>'
     266
     267rc = SysCreateObject('WPProgram', 'SMBSTARTER', '<WP_NOWHERE>', Setup, 'UPDATE' )
     268If rc <> 1 Then Say ' > failed to create SMBSTARTER Object'
     269else ok = SysOpenObject('<smbstarter>', 'DEFAULT', 1)
     270
     271
     272return
     273
    211274/*:VRX         _GuessIcon
    212275*/
     
    239302        ok = VRset("Main","Height",Height)
    240303    end
    241     ok = VRSet("Main","Font", Font_Main)
    242     ok = VRSet("Main","Statusfont", Font_Status)
    243 /*  ok = VRSet("Page_1","Font", Font_Page_1)
    244     ok = VRSet("Page_2","Font", Font_Page_2)
    245     ok = VRSet("Page_3","Font", Font_Page_3)
    246     ok = VRSet("Page_4","Font", Font_Page_4)
    247     ok = VRSet("Page_5","Font", Font_Page_5)
    248     ok = VRSet("Page_6","Font", Font_Page_6) */
     304    ok = VRSet("Main",        "Font", Font.!Main)
     305    ok = VRSet("DT_StatusBar","Font", Font.!Status)
     306    ok = VRSet("SW_Users",    "Font", Font.!Users)
     307    ok = VRSet("SW_Files",    "Font", Font.!Files)
     308    ok = VRSet("SW_Service",  "Font", Font.!Service)
     309    ok = VRSet("SW_Daemons",  "Font", Font.!Daemons)
     310    ok = VRSet("SW_SMBTree",  "Font", Font.!SMBTree)
     311    ok = VRSet("SW_Settings", "Font", Font.!Settings)
     312
     313    ok = VRSet("CN_Users",    "Font", Font.!Users)
     314    ok = VRSet("CN_Files",    "Font", Font.!Files)
     315    ok = VRSet("CN_Service",  "Font", Font.!Service)
     316    ok = VRSet("CN_Daemons",  "Font", Font.!Daemons)
     317    ok = VRSet("CN_SMBTree",  "Font", Font.!SMBTree)
     318
     319
    249320    Buttonwidth = VRMethod( "Screen", "PixelsToTwips", 32 )
    250321
     
    253324    ok = VRSet("TM_Refresh","Delay", Intervall * 1000)
    254325   
    255     ok = VRSet("PB_START",   "Enabled", VRFileExists(samba.!smbcmd))
     326    ok = VRSet("PB_START",  "Enabled", VRFileExists(samba.!smbcmd))
    256327    ok = VRSet("PB_Restart","Enabled", VRFileExists(samba.!smbcmd))
    257328    ok = VRSet("PB_Reload", "Enabled", VRFileExists(samba.!smbcmd))
     
    260331    ok = VRSet("CN_smbtree", "View", TreeView)
    261332    ok = VRSet("CB_NoMsgBox","Set",  NoMsgBox)
     333    ok = VRSet("CB_WPSStartStop","Set",  WPSStartStop)
    262334
    263335    call _INILayoutRead "CN_Users"
     
    325397    if INIFound.0 = 1 then OurINI = VRParseFileName(INIFound.1,'DPNE')
    326398    say 'OurINI='OurINI
    327     HelpFIle = VRParseFileName(OurINI,'DPN')'.HLP'
    328 say 'HelpFile='HelpFile
     399    HelpFile = VRParseFileName(OurINI,'DPN')'.HLP'
     400    say 'HelpFile='HelpFile
    329401
    330402    Top   = VRGetIni( "Pos", "Top",    OurINI , 'NoClose')
     
    333405    Height= VRGetIni( "Pos", "Height", OurINI , 'NoClose')
    334406
    335     Font_Page_1 = VRGetIni( "Fonts", "Page_1",      OurINI , 'NoClose' )
    336     Font_Page_2 = VRGetIni( "Fonts", "Page_2",      OurINI , 'NoClose' )
    337     Font_Page_3 = VRGetIni( "Fonts", "GB_SERVICE",      OurINI , 'NoClose' )
    338     Font_Page_4 = VRGetIni( "Fonts", "Page_4",      OurINI , 'NoClose' )
    339     Font_Page_5 = VRGetIni( "Fonts", "Page_5",      OurINI , 'NoClose' )
    340     Font_Page_6 = VRGetIni( "Fonts", "Page_6",      OurINI , 'NoClose' )
    341     Font_Main   = VRGetIni( "Fonts", "Main",        OurINI , 'NoClose' )
    342     Font_Status = VRGetIni( "Fonts", "Statusfont",  OurINI , 'NoClose' )
    343 
    344     if Font_Page_1 = "" then Font_Page_1 = "8.Helv"
    345     if Font_Page_2 = "" then Font_Page_2 = "8.Helv"
    346     if Font_Page_3 = "" then Font_Page_3 = "8.Helv"
    347     if Font_Page_4 = "" then Font_Page_4 = "8.Helv"
    348     if Font_Page_5 = "" then Font_Page_5 = "8.Helv"
    349     if Font_Main   = "" then Font_Main   = "8.Helv"
    350     if Font_Status = "" then Font_Status = "8.Helv"
     407    Font.!Users   = VRGetIni( "Fonts", "SW_USERS",    OurINI , 'NoClose' )
     408    Font.!Files   = VRGetIni( "Fonts", "SW_FILES",    OurINI , 'NoClose' )
     409    Font.!Service = VRGetIni( "Fonts", "SW_SERVICE",  OurINI , 'NoClose' )
     410    Font.!Daemons = VRGetIni( "Fonts", "SW_DAEMONS",  OurINI , 'NoClose' )
     411    Font.!SMBTree = VRGetIni( "Fonts", "SW_SMBTREE",  OurINI , 'NoClose' )
     412    Font.!Settings= VRGetIni( "Fonts", "SW_SETTINGS", OurINI , 'NoClose' )
     413    Font.!Main    = VRGetIni( "Fonts", "Main",        OurINI , 'NoClose' )
     414    Font.!Status  = VRGetIni( "Fonts", "Statusfont",  OurINI , 'NoClose' )
     415
     416    if Font.!Users    = "" then Font.!Users    = "9.WarpSans"
     417    if Font.!Files    = "" then Font.!Files    = "9.WarpSans"
     418    if Font.!Service  = "" then Font.!Service  = "9.WarpSans"
     419    if Font.!Daemons  = "" then Font.!Daemons  = "9.WarpSans"
     420    if Font.!SMBTree  = "" then Font.!SMBTree  = "9.WarpSans"
     421    if Font.!Settings = "" then Font.!Settings = "9.WarpSans"
     422    if Font.!Main     = "" then Font.!Main     = "9.WarpSans"
     423    if Font.!Status   = "" then Font.!Status   = "9.WarpSans"
    351424
    352425    Intervall = VRGetIni( "Settings", "Intervall", OurINI)
     
    367440    NoMsgBox = VRGetIni( "Settings", "NoMsgBox", OurINI)
    368441    if NoMsgBox = "" then NoMsgBox = 0
     442
     443    WPSStartStop = VRGetIni( "Settings", "WPSStartStop", OurINI)
     444    if WPSStartStop = "" then WPSStartStop = 0
    369445
    370446    options.!debug = VRGetIni( "Options", "Debug", OurINI)
     
    410486    ok = VRSetIni( "Settings", "CurrentPageNr",CurrentPageNr,                  OurINI,'NoClose')
    411487    ok = VRSetIni( "Settings", "DaemonView",   VRGet("CN_Daemons","View"),     OurINI,'NoClose')
    412     ok = VRSetIni( "Settings", "TreeView",     VRGet("CN_smbtree","View"),        OurINI,'NoClose')
     488    ok = VRSetIni( "Settings", "TreeView",     VRGet("CN_smbtree","View"),     OurINI,'NoClose')
    413489    ok = VRSetIni( "Settings", "NoMsgBox",     NoMsgBox,                       OurINI,'NoClose')
     490    ok = VRSetIni( "Settings", "WPSStartStop", WPSStartStop,                   OurINI,'NoClose')
    414491    ok = VRSetIni( "Settings", "BigIcons",     \VRGet("CN_SMBTREE", "MiniIcons"),OurINI,'NoClose')
    415492
     
    421498    call _INILayoutWrite "CN_Daemons"
    422499    call _INILayoutWrite "CN_smbtree"
     500
     501    if VRGet("CN_USERS",   "Font") <> "<default>" then ok = VRSet("SW_USERS",  "Font", VRGet("CN_USERS",  "Font"))
     502    if VRGet("CN_FILES",   "Font") <> "<default>" then ok = VRSet("SW_FILES",  "Font", VRGet("CN_FILES",  "Font"))
     503    if VRGet("CN_SERVICE", "Font") <> "<default>" then ok = VRSet("SW_SERVICE","Font", VRGet("CN_SERVICE","Font"))
     504    if VRGet("CN_DAEMONS", "Font") <> "<default>" then ok = VRSet("SW_DAEMONS","Font", VRGet("CN_DAEMONS","Font"))
     505    if VRGet("CN_SMBTREE", "Font") <> "<default>" then ok = VRSet("SW_SMBTREE","Font", VRGet("CN_SMBTREE","Font"))
    423506     
    424 /*  ok = VRSetIni( "Fonts", "Page_1",     VRGet("Page_1","Font"),      OurINI, 'NoClose' )
    425     ok = VRSetIni( "Fonts", "Page_2",     VRGet("Page_2","Font"),      OurINI, 'NoClose' )
    426     if VRget("CN_Users", "Font")  <> "<default>"  then ok = VRset("Page_1", "Font", VRget("CN_Users", "Font"))
    427     if VRget("CN_Files", "Font")  <> "<default>"  then ok = VRset("Page_2", "Font", VRget("CN_Files", "Font"))
    428     if VRget("CN_Service", "Font") <> "<default>" then ok = VRset("Page_3", "Font", VRget("CN_Service", "Font"))
    429     if VRget("CN_Daemons", "Font") <> "<default>" then ok = VRset("Page_4", "Font", VRget("CN_Daemons", "Font"))
    430     ok = VRSetIni( "Fonts", "Page_3",     VRGet("Page_3","Font"),      OurINI, 'NoClose' )
    431     ok = VRSetIni( "Fonts", "Page_4",     VRGet("Page_4","Font"),      OurINI, 'NoClose' )
    432     ok = VRSetIni( "Fonts", "Page_5",     VRGet("Page_5","Font"),      OurINI, 'NoClose' )
    433     ok = VRSetIni( "Fonts", "Page_6",     VRGet("Page_6","Font"),      OurINI, 'NoClose' ) */
    434     ok = VRSetIni( "Fonts", "Statusfont", VRGet("Main","Statusfont"),  OurINI, 'NoClose' )
     507    ok = VRSetIni( "Fonts", "SW_USERS",   VRGet("SW_USERS",   "Font"), OurINI, 'NoClose' )
     508    ok = VRSetIni( "Fonts", "SW_FILES",   VRGet("SW_FILES",   "Font"), OurINI, 'NoClose' )
     509    ok = VRSetIni( "Fonts", "SW_SERVICE", VRGet("SW_SERVICE", "Font"), OurINI, 'NoClose' )
     510    ok = VRSetIni( "Fonts", "SW_DAEMONS", VRGet("SW_DAEMONS", "Font"), OurINI, 'NoClose' )
     511    ok = VRSetIni( "Fonts", "SW_SMBTREE", VRGet("SW_SMBTREE", "Font"), OurINI, 'NoClose' )
     512    ok = VRSetIni( "Fonts", "SW_SETTINGS",VRGet("SW_SETTINGS","Font"), OurINI, 'NoClose' )
     513    ok = VRSetIni( "Fonts", "Statusfont", VRGet("DT_StatusBar","Font"),OurINI, 'NoClose' )
    435514    ok = VRSetIni( "Fonts", "Main",       VRGet("Main","Font"),        OurINI )
    436515    say 'done _INIWrite()'
     
    508587    ok = VRSet("DT_IntervallMin","Caption", NLVGetMessage(26)' 'NLVGetMessage(28))
    509588    CALL NLVSetText 'CB_NoMsgBox',    'Caption',  27
     589    CALL NLVSetText 'CB_WPSSTARTSTOP','Caption',  29
    510590
    511591    CALL NLVSetText 'ContextMenu_Daemons_Sort',   'Caption', 35
     
    545625    ok = stream(refreshoutput,'c','close')
    546626
    547     say '  'samba.!smbstatusexe' smbd 'DebugLevel' 2>'refresherr' 1>'refreshoutput
     627    say     '  'samba.!smbstatusexe' smbd 'DebugLevel' 2>'refresherr' 1>'refreshoutput
    548628    address cmd samba.!smbstatusexe' smbd 'DebugLevel' 2>'refresherr' 1>'refreshoutput
    549629
     
    585665    say 'SmbNoInit = 'SmbNoInit
    586666
     667    /* Active users */
    587668    ok = VRSet("CN_Users","Painting", 0)
    588669    ok = VRMethod("CN_Users", "RemoveRecord", "ALL")
     
    640721    ok = VRSet("CN_Service","Painting", 1)
    641722
    642     /* Active Services */
     723    /* Open files */
    643724    Hdr = linein(refreshoutput)
    644725    Hdr = linein(refreshoutput)
     
    11171198return
    11181199
     1200/*:VRX         CB_WPSSTARTSTOP_Click
     1201*/
     1202CB_WPSSTARTSTOP_Click:
     1203    WPSStartStop = VRGet("CB_WPSStartStop","set")
     1204    say 'WPSStartStop = "'WPSStartStop'"'
     1205return
     1206
     1207/*:VRX         CN_Daemons_Click
     1208*/
     1209CN_Daemons_Click:
     1210    ok = VRSet("TM_Refresh","Enabled", 0)
     1211    ok = VRSet("TM_RefreshDaemons","Enabled", 0)
     1212    ok = VRSet("PB_PAUSEDISPLAY","Caption", "Resume")
     1213return
     1214
    11191215/*:VRX         CN_Daemons_ContextMenu
    11201216*/
     
    11221218    if VRInfo("Top") < 400 & VRGet("CN_Daemons", "View") = "Detail" then call _ColumnsMenu "CN_Daemons"
    11231219    else do
    1124         ok = VRSet("TM_refresh","Enabled", 0)
     1220        ok = VRSet("TM_Refresh","Enabled", 0)
     1221        ok = VRSet("TM_RefreshDaemons","Enabled", 0)
     1222        ok = VRSet("PB_PAUSEDISPLAY","Caption", "Resume")
    11251223        DRH = VRInfo("Record")
    11261224        OH = VRInfo("Object")
     
    15351633    call _NLVSetup
    15361634    call _SambaInit
     1635    if \WPSStartStop then call _CreateSmbStarter
    15371636    if _SambaRunning() then call _SambaFindPIDfile
    15381637    call _ContainerInit
     
    16451744    ok = VRSet("PB_Restart","Top",    pbtn_height*4 - marginx2)
    16461745    ok = VRSet("PB_Reload", "Top",    pbtn_height*5 - marginx2)
     1746    ok = VRSet("PB_DelLogs","Top",    pbtn_height*6 - marginx2)
     1747    ok = VRSet("DT_PAUSEDISPLAY","Top",   pane_height - pbtn_height*2 -1020 - marginx2)
     1748    ok = VRSet("PB_PAUSEDISPLAY","Top",   pane_height - pbtn_height -1020 - marginx2)
    16471749
    16481750    ok = VRSet("PB_START",  "Left",   pane_width -  760 - marginx2 - pbtn_width)
     
    16501752    ok = VRSet("PB_Restart","Left",   pane_width -  760 - marginx2 - pbtn_width)
    16511753    ok = VRSet("PB_Reload", "Left",   pane_width -  760 - marginx2 - pbtn_width)
     1754    ok = VRSet("PB_DelLogs","Left",   pane_width -  760 - marginx2 - pbtn_width)
     1755    ok = VRSet("DT_PAUSEDISPLAY","Left",  pane_width -  760 - marginx2 - pbtn_width)
     1756    ok = VRSet("PB_PAUSEDISPLAY","Left",  pane_width -  760 - marginx2 - pbtn_width)
    16521757
    16531758    ok = VRset("GB_SMBTREE","Top",    margin  )
     
    17701875return
    17711876
     1877/*:VRX         PB_DELLOGS_Click
     1878*/
     1879PB_DELLOGS_Click:
     1880    call VRSet VRWindow(), 'Pointer', 'Wait'
     1881
     1882    /* Fixme - this needs to be read from smb.conf */
     1883    samba.!logdir = ETC'\samba\log'
     1884
     1885    ok = SysFileTree(samba.!logdir'\log.*', logs.,'FO')
     1886    do I = 1 to logs.0
     1887        ok = VRMethod( "CN_Daemons", "GetRecordList", "All", "handle." )
     1888        KeepLog = 0
     1889        do J = 1 to handle.0
     1890            CurPID = VRMethod("CN_Daemons", "GetFieldData", handle.J, DPidsFH)
     1891            if pos(CurPID,logs.I) > 0 then KeepLog = 1
     1892        end
     1893        if KeepLog = 0 then ok = SysFileDelete(logs.I)
     1894    end
     1895
     1896    call VRSet VRWindow(), 'Pointer', '<default>'
     1897return
     1898
    17721899/*:VRX         PB_Help_Click
    17731900*/
    17741901PB_Help_Click:
    17751902    ok = VRMethod("Page_"CurrentPageNr, "InvokeHelp" )
     1903return
     1904
     1905/*:VRX         PB_PAUSEDISPLAY_Click
     1906*/
     1907PB_PAUSEDISPLAY_Click:
     1908    if VRGet("TM_RefreshDaemons","Enabled") then do
     1909        ok = VRSet("TM_RefreshDaemons","Enabled", 0)
     1910        ok = VRSet("PB_PAUSEDISPLAY","Caption", "Resume")
     1911    end
     1912    else do
     1913        ok = VRSet("TM_RefreshDaemons","Enabled", 1)
     1914        ok = VRSet("PB_PAUSEDISPLAY","Caption", "Pause")
     1915    end
    17761916return
    17771917
     
    17951935PB_RELOAD_Click:
    17961936    call VRSet VRWindow(), 'Pointer', 'Wait'
    1797 
    1798     call lineout "smbstart", "reload"
    1799     ok = stream("reload","c","close")
    1800 
    1801     ok = VRSet("TM_Refresh","Delay", 1000)
     1937    if WPSStartStop then do
     1938        ok = SysOpenObject('<smb_reload>', 'DEFAULT', 1)
     1939    end
     1940    else do
     1941        call lineout samba.!bin"\smbstart", "reload"
     1942        ok = stream(samba.!bin"\reload","c","close")
     1943    end
     1944    ok = VRSet("TM_Refresh","Delay", 2000)
    18021945    call VRSet VRWindow(), 'Pointer', '<default>'
    18031946return
     
    18071950PB_RESTART_Click:
    18081951    call VRSet VRWindow(), 'Pointer', 'Wait'
    1809 
    1810     call lineout "restart", "restart"
    1811     ok = stream("restart","c","close")
    1812 
     1952    if WPSStartStop then do
     1953        ok = SysOpenObject('<smb_restart>', 'DEFAULT', 1)
     1954    end
     1955    else do
     1956        call lineout samba.!bin"\restart", "restart"
     1957        ok = stream(samba.!bin"\restart","c","close")
     1958    end
    18131959    ok = VRSet("TM_Refresh","Delay", 1000)
    18141960    call VRSet VRWindow(), 'Pointer', '<default>'
     
    18371983    say "IPB_Start_Click started"
    18381984    call VRSet VRWindow(), 'Pointer', 'Wait'
    1839 
    1840     call lineout "smbstart", "smbstart"
    1841     ok = stream("smbstart","c","close")
    1842 
     1985    if WPSStartStop then do
     1986        ok = SysOpenObject('<smb_start>', 'DEFAULT', 1)
     1987    end
     1988    else do
     1989        call lineout samba.!bin"\smbstart", "smbstart"
     1990        ok = stream(samba.!bin"\smbstart","c","close")
     1991    end
    18431992    ok = VRSet("TM_Refresh","Delay", 1000)
    18441993    call VRSet VRWindow(), 'Pointer', '<default>'
     
    18501999    say "IPB_Stop_Click started"
    18512000    call VRSet VRWindow(), 'Pointer', 'Wait'
    1852 
    1853     call lineout "smbstop", "smbstop"
    1854     ok = stream("smbstop","c","close")
    1855 
     2001    if WPSStartStop then do
     2002        ok = SysOpenObject('<smb_stop>', 'DEFAULT', 1)
     2003    end
     2004    else do
     2005        call lineout samba.!bin"\smbstop", "smbstop"
     2006        ok = stream(samba.!bin"\smbstop","c","close")
     2007    end
    18562008    ok = VRSet("TM_Refresh","Delay", 1000)
    1857 
    18582009    call VRSet VRWindow(), 'Pointer', '<default>'
    18592010    say "IPB_Stop_Click done"
     
    18972048*/
    18982049Quit:
     2050    call VRSet VRWindow(), 'Pointer', 'Wait'
    18992051    call _IniWrite
    19002052    ok = VRRedirectStdIO("OFF")
     
    19022054
    19032055    ok = SysFileDelete(smbdoutput)
     2056
     2057    call lineout samba.!bin"\quit", "quit"
     2058    ok = stream(samba.!bin"\quit","c","close")
     2059    ok = SysSleep(1)
     2060    ok = SysDestroyObject('<smbstarter>')
     2061    ok = SysFileDelete(samba.!bin'\smbstarter.cmd')
     2062    ok = SysFileDelete(samba.!bin'\quit')
     2063    call VRSet VRWindow(), 'Pointer', '<default>'
    19042064
    19052065    window = VRWindow()
     
    21952355    page =  VRInfo("Page")
    21962356    CurrentPageNr = page
     2357    ok = VRSet("TM_RefreshDaemons","Enabled", 0)
    21972358    ok = VRSet("DT_STATUSBAR","Caption", VRGet("Main", "HintText"))
    21982359    /* call _TabsStrip */
     
    22082369        end
    22092370        when page = 4 then do /* daemons */
    2210             nop
     2371            ok = VRSet("TM_RefreshDaemons","Enabled", 1)
    22112372        end
    22122373        when page = 5 then do /* smbtree */
    2213             nop
     2374            ok = VRMethod( "CN_SMBTree", "GetRecordList", "All", "handle." )
     2375            /* if the page is empty, populate it */
     2376            if handle.0 = 0 then call PB_Refresh_Click
    22142377        end
    22152378        when page = 6 then do /* Settings */
     
    22232386*/
    22242387TM_Refresh_Trigger:
    2225     call beep 1200, 20
     2388/*  call beep 1200, 20 */
    22262389    ok = VRSet("TM_Refresh","Delay", Intervall * 1000)
    22272390    call _Refresh
     2391return
     2392
     2393/*:VRX         TM_RefreshDaemons_Trigger
     2394*/
     2395TM_RefreshDaemons_Trigger:
     2396    call _RefreshDaemons
    22282397return
    22292398
  • trunk/guitools/sscc/sscc.RC

    r677 r688  
    1 icon 1   .rc\icons\samba_setup.ico
    2 bitmap 2 .rc\icons\choosedir.bmp
    3 bitmap 3 .rc\icons\choosedird.bmp
    4 bitmap 4 .rc\icons\newitem.bmp
    5 bitmap 5 .rc\icons\newitemd.bmp
    6 bitmap 7 .rc\icons\up.bmp
    7 bitmap 8 .rc\icons\down.bmp
    8 bitmap 9 .rc\icons\netlabs.bmp
     1icon 1   .\rc\icons\samba_setup.ico
     2bitmap 2 .\rc\icons\choosedir.bmp
     3bitmap 3 .\rc\icons\choosedird.bmp
     4bitmap 4 .\rc\icons\newitem.bmp
     5bitmap 5 .\rc\icons\newitemd.bmp
     6bitmap 7 .\rc\icons\up.bmp
     7bitmap 8 .\rc\icons\down.bmp
     8bitmap 9 .\rc\icons\netlabs.bmp
  • trunk/guitools/sscc/sscc.vrp

    r677 r688  
    33MacroPath: VRM:U:\Develop\Samba\trunk\guitools\sscc
    44EXEPath:
    5 RunParameters: /install
     5RunParameters:
    66RunDirectory: D:\samba
    77VRXWindow: __VREMainWindow,1,2180,3710,903,8000
     
    1111UserFile: 1
    1212UserWindow: Main,1
    13 UserWindow: Installer,1
  • trunk/guitools/sscc/sscc.vrx

    r677 r688  
    22832283*/
    22842284Main_Create:
    2285     ok = VRREdirectStdIO("OFF")
    2286     options.!debug = 0
     2285    ok = VRREdirectStdIO("ON")
     2286    options.!debug = 1
    22872287
    22882288    call _LoadOtherFuncs
     
    23132313    IF options.!debug == 1 THEN SAY "Main_Resize() started"
    23142314    Ok = VRset("Main", "Painting", 0)
     2315
     2316   /*  /* Basic measurements */
     2317    main_iwidth  = VRGet("Main","InteriorWidth")                /* Width of window client-area */
     2318    main_iheight = VRGet("Main","InteriorHeight")               /* Height of window client-area */
     2319
     2320    if main_iheight < 5500 then ok = VRSet("Main","Height",6200)
     2321    sbar_height  = VRGet("GB_STATUSBAR","Height")               /* Height of status-bar */
     2322    split_left   = VRGet("SPLIT_Main","Left")                   /* Position of the left edge of the split-bar */
     2323    marginx2     = margin * 2                                   /* Common margin around controls */
     2324    pbtn_height  = 400                                          /* Height of the panels' internal button areas */
     2325
     2326    pane_height  = main_iheight - sbar_height - (margin * 4)    /* Height of a split-bar panel */
     2327    lpane_width  = split_left - margin                          /* Width of the left split-bar panel */
     2328    rpane_width  = main_iwidth - split_left - 60 - margin       /* Width of the right split-bar panel */ */
     2329
     2330    /* ab hier alt */
    23152331    ok = VRSet("GB_SmbConfTree","Top",    FWidth)
    23162332    ok = VRSet("GB_SmbConfTree","Left",   FWidth-24)
     
    27812797    IF options.!debug == 1 THEN say 'PB_Cancel_Click() started'   
    27822798    if VRGet("PB_Save","Enabled") then call PB_Save_Click
     2799'pause'
    27832800    call Quit
    27842801    IF options.!debug == 1 THEN say 'PB_Cancel_Click() done'   
     
    29212938return
    29222939
     2940/*:VRX         PB_StartStop_Click
     2941*/
     2942PB_StartStop_Click:
     2943    call PB_Save_Click   
     2944    call beep 960, 1
     2945    address CMD samba.!smbcmd' reload'
     2946return
     2947
    29232948/*:VRX         PB_Undo_Click
    29242949*/
Note: See TracChangeset for help on using the changeset viewer.