Changeset 1038


Ignore:
Timestamp:
Sep 1, 2017, 9:25:02 AM (8 years ago)
Author:
Herwig Bauernfeind
Message:

SMBMON 2.6: Fix several small bugs, add missing hints

Location:
trunk/guitools/smbmon
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/guitools/smbmon/rc/lang/smbmon_de.mkm

    r1036 r1038  
    2828SMM0023I: Passwort
    2929SMM0024I: Einstellungen
    30 SMM0025I: Erneuern alle
     30SMM0025I: Anzeige erneuern alle
    3131SMM0026I: Sekunden
    3232SMM0027I: Keine Best„tigung nach Start/Stop/Restart/Reload
     
    5858SMM0050I: Bitte warten, w„hrend Daten gesammelt werden...
    5959SMM0051I: Die angezeigten Daten jetzt erneuern.
    60 SMM0052I: Online Hilfe anzeigen lassen.
     60SMM0052I: Ge„nderte Einstellungen sichern.
    6161SMM0053I: šber dieses Programm.
    6262SMM0054I: Einstellungen speichern und verlassen.
     
    8989; Users context menu
    9090SMM0080I: Mitteilung senden
    91 SMM0081?:
    92 SMM0082?:
    93 SMM0083?:
     91SMM0081I: Minisymbole
     92SMM0082I: Anmelden
     93SMM0083I: Abmelden
    9494SMM0084?:
    9595SMM0085I: Bitte, den Mitteilungstext an "%1" eingeben!
     
    103103SMM0093?:
    104104SMM0094?:
    105 SMM0095?:
    106 SMM0096?:
    107 SMM0097?:
    108 SMM0098?:
    109 SMM0099?:
     105SMM0095I: Einen Ordner fr die Protokolldateien w„hlen.
     106SMM0096I: Protokolldateien (soweit wie m”glich) l”schen.
     107SMM0097I: Schriftgr”áe fr externe Skripten
     108SMM0098I: Ausw„hlen
     109SMM0099I: L”schen
    110110; Error messages
    111111SMM0100I: Fehler, kann %1 nicht finden!
     
    163163SMM0151I: Kommentar
    164164SMM0152I: DateigrӇe
    165 SMM0153?:
    166 SMM0154?:
    167 SMM0155?:
    168 SMM0156?:
     165SMM0153I: Benutzerkontext
     166SMM0154I: Objektname
     167SMM0155I: Text
     168SMM0156I: Numerisch
    169169SMM0157?:
    170170SMM0158?:
  • trunk/guitools/smbmon/rc/lang/smbmon_en.mkm

    r1036 r1038  
    2828SMM0023I: Password
    2929SMM0024I: Settings
    30 SMM0025I: Refresh every
     30SMM0025I: Refresh display every
    3131SMM0026I: seconds
    3232SMM0027I: No messagebox after Start/Stop/Restart/Reload
     
    5858SMM0050I: Please stand by, while Samba is collecting data...
    5959SMM0051I: Refresh data now
    60 SMM0052I: Show online help
     60SMM0052I: Save changed settings
    6161SMM0053I: About this program
    6262SMM0054I: Save settings and exit program
     
    8989; User Context menu
    9090SMM0080I: Send message
    91 SMM0081?:
    92 SMM0082?:
    93 SMM0083?:
     91SMM0081I: Mini icons
     92SMM0082I: Logon
     93SMM0083I: Logoff
    9494SMM0084?:
    9595SMM0085I: Please, enter message text to "%1" here
     
    103103SMM0093?:
    104104SMM0094?:
    105 SMM0095?:
    106 SMM0096?:
    107 SMM0097?:
    108 SMM0098?:
    109 SMM0099?:
     105SMM0095I: Choose folder for logfiles.
     106SMM0096I: Erase as many logfiles as possible.
     107SMM0097I: Font size for external scripts
     108SMM0098I: Choose
     109SMM0099I: Erase
    110110; Error messages
    111111SMM0100I: Error, cannot find %1!
     
    163163SMM0151I: Comment
    164164SMM0152I: Filesize
    165 SMM0153?:
    166 SMM0154?:
    167 SMM0155?:
    168 SMM0156?:
     165SMM0153I: User context
     166SMM0154I: Object name
     167SMM0155I: Text
     168SMM0156I: Numeric
    169169SMM0157?:
    170170SMM0158?:
  • trunk/guitools/smbmon/rc/lang/smbmon_es.mkm

    r1036 r1038  
    5858SMM0050I: Por favor, mantengase a la espera, Samba est  recopilando datos...
    5959SMM0051I: Actualizar datos ahora
    60 SMM0052I: Ver ayuda en l¡nea
     60SMM0052I: Save changed settings
    6161SMM0053I: Acerca de este programa
    6262SMM0054I: Guardar cambios y salir del programa
     
    8989; User Context menu
    9090SMM0080I: Enviar mensaje
    91 SMM0081?:
    92 SMM0082?:
    93 SMM0083?:
     91SMM0081I: Mini s¡mbolos
     92SMM0082I: Registro
     93SMM0083I: Finalizar la sesi¢n
    9494SMM0084?:
    9595SMM0085I: Por favor, introduzca en texto para "%1" aqu¡
     
    103103SMM0093?:
    104104SMM0094?:
    105 SMM0095?:
    106 SMM0096?:
    107 SMM0097?:
    108 SMM0098?:
    109 SMM0099?:
     105SMM0095I: Seleccione una carpeta para los archivos de registro.
     106SMM0096I: Eliminar archivos de registro (en la medida de lo posible).
     107SMM0097I: Tama€o de fuente para scripts externos
     108SMM0098I: Elegir
     109SMM0099I: Borrar
    110110; Error messages
    111111SMM0100I: ­Error, no se puede encontrar %1!
     
    163163SMM0151I: Commentario
    164164SMM0152I: Tama€o de archivo
    165 SMM0153?:
    166 SMM0154?:
    167 SMM0155?:
    168 SMM0156?:
     165SMM0153I: Contexto de usuario
     166SMM0154I: Nombre del objeto
     167SMM0155I: Texto
     168SMM0156I: Num‚rico
    169169SMM0157?:
    170170SMM0158?:
  • trunk/guitools/smbmon/rc/lang/smbmon_fr.mkm

    r1036 r1038  
    6060SMM0050I: Veuillez patienter pendant que Samba collecte les donn‚es...
    6161SMM0051I: Actualisation imm‚diate des donn‚es
    62 SMM0052I: Affichage de l'aide en ligne
     62SMM0052I: Save changed settings
    6363SMM0053I: · propos de ce programme
    6464SMM0054I: Sauvegarde des paramŠtres et fermeture du programme
     
    9191; User Context menu
    9292SMM0080I: Message envoy‚
    93 SMM0081?:
    94 SMM0082?:
    95 SMM0083?:
     93SMM0081I: Symboles Mini
     94SMM0082I: Connecter
     95SMM0083I: D‚connecter
    9696SMM0084?:
    9797SMM0085I: Veuillez saisir le message destin‚
     
    106106SMM0093?:
    107107SMM0094?:
    108 SMM0095?:
    109 SMM0096?:
    110 SMM0097?:
    111 SMM0098?:
    112 SMM0099?:
     108SMM0095I: S‚lectionnez un dossier pour les fichiers journaux.
     109SMM0096I: Supprimez les fichiers journaux (dans la mesure du possible).
     110SMM0097I: Taille de police pour les scripts externes
     111SMM0098I: Choisir
     112SMM0099I: Effacer
    113113; Error messages
    114114SMM0100I: Erreur - %1 est introuvable !
     
    168168SMM0151I: Commentaires
    169169SMM0152I: Taille du fichier
    170 SMM0153?:
    171 SMM0154?:
    172 SMM0155?:
    173 SMM0156?:
     170SMM0153I: Contexte utilisateur
     171SMM0154I: Nom de l'objet
     172SMM0155I: Texte
     173SMM0156I: Num‚rique
    174174SMM0157?:
    175175SMM0158?:
  • trunk/guitools/smbmon/rc/lang/smbmon_sv.mkm

    r1036 r1038  
    5858SMM0050I: V„nta medan Samba samlar ihop information...
    5959SMM0051I: Uppdatera data nu.
    60 SMM0052I: Visa hj„lp p† n„tet.
     60SMM0052I: Save changed settings.
    6161SMM0053I: Om detta program.
    6262SMM0054I: Spara inst„llningar och avsluta programmet.
     
    8989; Users context menu
    9090SMM0080I: Skicka meddelande
    91 SMM0081?:
    92 SMM0082?:
    93 SMM0083?:
     91SMM0081I: Mini symboler
     92SMM0082I: Registrera
     93SMM0083I: Logga ut
    9494SMM0084?:
    9595SMM0085I: Ange meddelande till "%1" h„r
     
    103103SMM0093?:
    104104SMM0094?:
    105 SMM0095?:
    106 SMM0096?:
    107 SMM0097?:
    108 SMM0098?:
    109 SMM0099?:
     105SMM0095I: V„lj en mapp f”r loggfilerna.
     106SMM0096I: Ta bort loggfiler (s† l†ngt som m”jligt).
     107SMM0097I: Teckenstorlek f”r externa skript
     108SMM0098I: V„lj
     109SMM0099I: Radera
    110110; Error messages
    111111SMM0100I: Fel, kan inte hitta %1!
     
    163163SMM0151I: Kommentera
    164164SMM0152I: Filstorlek
    165 SMM0153?:
    166 SMM0154?:
    167 SMM0155?:
    168 SMM0156?:
     165SMM0153I: Anv„ndarsammanhang
     166SMM0154I: Objektnamn
     167SMM0155I: Text
     168SMM0156I: Numerisk
    169169SMM0157?:
    170170SMM0158?:
  • trunk/guitools/smbmon/smbmon.rc

    r1036 r1038  
    5454bitmap 158 .\rc\icons\button_accept.bmp
    5555bitmap 159 .\rc\icons\button_cancel.bmp
    56 
     56bitmap 160 .\rc\icons\open.bmp
     57bitmap 161 .\rc\icons\erase.bmp
  • trunk/guitools/smbmon/smbmon.vrp

    r1036 r1038  
    88VRXWindow: __VREMainWindow,1,2168,3614,1024,6769
    99VRXWindow: __VRESectionListWindow,1,3963,14213,10130,5059
    10 VRXWindow: __VREToolsWindow,1,1747,1108,6483,1663
     10VRXWindow: __VREToolsWindow,1,1518,434,6486,1669
    1111VRXWindow: __VREWindListWindow,1,952,11708,5372,3150
    1212UserFile: 1
    1313UserWindow: Main,1
    14 UserWindow: SW_USERS,1
    15 UserWindow: SW_SERVICE,1
    16 UserWindow: SW_LOGIN,1
     14UserWindow: SW_SETTINGS,1
  • trunk/guitools/smbmon/smbmon.vrx

    r1036 r1038  
    495495    ok = VRSet("CN_SMBTREE",  "Font", Font.!SMBTree)
    496496
    497     CALL NLVSetText 'DT_Refresh',      'Caption',  25
    498     CALL NLVSetText 'DT_RefreshMin',   'Caption',  25
    499     CALL NLVSetText 'DT_Intervall',    'Caption',  26
    500     ok = VRSet("DT_IntervallMin",      "Caption", NLVGetMessage(26)' 'NLVGetMessage(28))
    501     CALL NLVSetText 'CB_NoMsgBox',     'Caption',  27
    502     CALL NLVSetText 'CB_WPSSTARTSTOP', 'Caption',  29
    503     CALL NLVSetText 'CB_DetectZombies','Caption',  30
    504 
    505     CALL NLVSetText 'ContextMenu_Daemons_Sort',   'Caption', 35
    506     CALL NLVSetText 'ContextMenu_Daemons_Ping',   'Caption', 32
    507     CALL NLVSetText 'ContextMenu_Daemons_Details','Caption', 118
    508     CALL NLVSetText 'ContextMenu_Daemons_Tree',   'Caption', 120
    509 
    510     CALL NLVSetText 'ContextMenu_Files_Sort',     'Caption', 35
    511 
    512     CALL NLVSetText 'ContextMenu_Service_Sort',   'Caption', 35
    513     CALL NLVSetText 'ContextMenu_Service_CloseSHare', 'Caption', 70
    514 
    515     CALL NLVSetText 'ContextMenu_Users_SendMsg', 'Caption', 80
    516     CALL NLVSetText 'ContextMenu_Users_Sort',    'Caption', 35   
    517 
    518     CALL NLVSetText 'ContextMenu_Tree_SendMsg',  'Caption', 80
    519     CALL NLVSetText 'ContextMenu_Tree_Sort',     'Caption', 35   
    520     CALL NLVSetText 'ContextMenu_Tree_Tree',     'Caption', 120
    521     CALL NLVSetText 'ContextMenu_Tree_Details',  'Caption', 118
     497    ok = VRset("CN_SMBTREE","Caption",NLVGetMessage(153)||': Guest')
     498
     499    CALL NLVSetText 'ContextMenu_Daemons_Sort',      'Caption', 35
     500    CALL NLVSetText 'ContextMenu_Daemons_Ping',      'Caption', 32
     501    CALL NLVSetText 'ContextMenu_Daemons_Details',   'Caption', 118
     502/*  CALL NLVSetText 'ContextMenu_Daemons_Icons',     'Caption', 119 */
     503    CALL NLVSetText 'ContextMenu_Daemons_Tree',      'Caption', 120
     504    CALL NLVSetText 'ContextMenu_Daemons_Miniicons', 'Caption', 81
     505
     506    CALL NLVSetText 'ContextMenu_Files_Sort',        'Caption', 35
     507
     508    CALL NLVSetText 'ContextMenu_Service_Sort',      'Caption', 35
     509    CALL NLVSetText 'ContextMenu_Service_CloseSHare','Caption', 70
     510
     511    CALL NLVSetText 'ContextMenu_Users_SendMsg',     'Caption', 80
     512    CALL NLVSetText 'ContextMenu_Users_Sort',        'Caption', 35   
     513
     514    CALL NLVSetText 'ContextMenu_Tree_SendMsg',      'Caption', 80
     515    CALL NLVSetText 'ContextMenu_Tree_Miniicons',    'Caption', 81
     516    CALL NLVSetText 'ContextMenu_Tree_Login',        'Caption', 82
     517    CALL NLVSetText 'ContextMenu_Tree_Logoff',       'Caption', 83
     518
     519    CALL NLVSetText 'ContextMenu_Tree_Sort',         'Caption', 35   
     520    CALL NLVSetText 'ContextMenu_Tree_Details',      'Caption', 118
     521    CALL NLVSetText 'ContextMenu_Tree_Icons',        'Caption', 119
     522    CALL NLVSetText 'ContextMenu_Tree_Tree',         'Caption', 120
    522523
    523524    Buttonwidth = VRMethod( "Screen", "PixelsToTwips", 32 )
     
    537538    ok = VRSet("CB_DetectZombies","Set",  DetectZombies)
    538539
     540    if VIOFontSize = "" then do
     541        ok = VRSet("DT_FONTSIZE","Enabled", 0)
     542        ok = VRSet("SPIN_FONTSIZE","Enabled", 0)
     543    end
     544    else ok = VRSet("SPIN_FONTSIZE","Value", VIOFontSize)
     545
    539546    call _INILayoutRead "CN_Users"
    540547    call _INILayoutRead "CN_Files"
     
    545552    ok = VRset("CN_DAEMONS", "MiniIcons", \advanced.!bigicons)
    546553    ok = VRset("CN_SMBTREE", "MiniIcons", \advanced.!bigicons)
    547     ok = VRset("ContextMenu_Tree_MiniIcons",  "Checked", \advanced.!bigicons)
    548     ok = VRset("ContextMenu_Daemons_MiniIcons",  "Checked", \advanced.!bigicons)
     554    ok = VRset("ContextMenu_Tree_MiniIcons",    "Checked", \advanced.!bigicons)
     555    ok = VRset("ContextMenu_Daemons_MiniIcons", "Checked", \advanced.!bigicons)
    549556    ok = VRSet("CB_Debug","set",options.!Debug)
    550557
     
    648655    DetectZombies = VRGetIni( "Settings", "DetectZombies", OurINI,'NoClose')
    649656    if DetectZombies = "" then DetectZombies = 0
     657
     658    VIOFontSizeKey = ""
     659
     660    VIOFontSize = VRGetIni( "Settings", "VIOFontsize",  OurINI,'NoClose')
     661    if VIOFontSize = "" then do
     662        say "Undefined VIOFontsize and OldFontSize"
     663        VIOFontSize = _VIOFontSizeGetCurrent()
     664        OldFontSize = VIOFontSize
     665        say "VIOFontSize ="VIOFontSize
     666        say "OldFontSize ="OldFontSize
     667    end
     668    else do
     669        OldFontSize = _VIOFontSizeGetCurrent()
     670        say "Detected OldFontSize = "OldFontSize
     671        say "VIOFontSize from INI = "VIOFontSize
     672    end
     673
    650674
    651675    options.!debug = VRGetIni( "Options", "Debug", OurINI)
     
    707731    ok = VRSetIni( "Settings", "BigIcons",     \VRGet("CN_SMBTREE", "MiniIcons"),OurINI,'NoClose')
    708732    ok = VRSetIni( "Settings", "DetectZombies",DetectZombies,                  OurINI,'NoClose')
    709     call VRSetIni 'Settings', 'StoreCreds',    options.!storecreds  ,          OurINI, 'NoClose'
     733    ok = VRSetIni( "Settings", "StoreCreds",   options.!storecreds  ,          OurINI,'NoClose')
     734    ok = VRSetIni( "Settings", "VIOFontsize",  VIOFontsize,                    OurINI,'NoClose')
    710735
    711736    ok = VRSetIni( "Options",  "Debug",    options.!debug,             OurINI, 'NoClose' )     
     
    11881213return
    11891214
     1215/*:VRX         _SambaCheckFreeSpace
     1216*/
     1217_SambaCheckFreeSpace:
     1218    say time()" _SambaCheckFreeSpace() started"
     1219
     1220    if samba.!logdir = 'SAMBA.!LOGDIR' | samba.!Logdir = "" then do
     1221        log_file     = IniGet('log file',     'global', samba.!smbconf)
     1222        say log_file
     1223        say translate(log_file,'\','/')
     1224        samba.!logdir = VRParseFileName(translate(log_file,'\','/'),"DP")
     1225        say samba.!logdir
     1226    end
     1227    loggingfreespace = word(SysDriveInfo(left(samba.!logdir,2)),2)%1024%1024
     1228    ok = VRSet("DT_FREESPACE", "Caption", " "loggingfreespace' MB')
     1229
     1230    select
     1231        when loggingfreespace <  50 then ok = VRDeleteFile(samba.!logdir'\log.*')
     1232        when loggingfreespace < 100 then ok = VRset("CN_Daemons","BackColor","Red")
     1233        when loggingfreespace < 200 then ok = VRset("CN_Daemons","BackColor","Yellow")
     1234        otherwise ok = VRset("CN_Daemons","BackColor","SystemWindow")       
     1235    end
     1236    CALL VRMethod 'TT_SETTINGS', 'Register', 'DT_FREESPACE', samba.!logdir
     1237    say time()" _SambaCheckFreeSpace() done"
     1238return
     1239
    11901240/*:VRX         _SambaFindPIDfile
    11911241*/
     
    13181368    if uS <> 0 | UpTimeStr = ' 'NlvGetMessage(43)':' then UpTimeStr = UpTimeStr' 'uS' 'NlvGetMessage(49)
    13191369
    1320     loggingfreespace = word(sysdriveinfo(left(samba.!logdir,2)),2)%1024%1024
    1321     ok = VRSet("DT_FREESPACE", "Caption", loggingfreespace' MB')
    13221370    ok = VRset("CN_Daemons", "Caption", UpTimeStr)
    13231371
    1324     select
    1325         when loggingfreespace <  50 then ok = VRDeleteFile(samba.!logdir'\log.*')
    1326         when loggingfreespace < 100 then ok = VRset("CN_Daemons","BackColor","Red")
    1327         when loggingfreespace < 200 then ok = VRset("CN_Daemons","BackColor","Yellow")
    1328         otherwise ok = VRset("CN_Daemons","BackColor","SystemWindow")       
    1329     end
     1372    call _SambaCheckFreeSpace
    13301373
    13311374    IF options.!debug == 1 then say time()' _SambaUptime() done'
     
    13951438    if options.!debug == 1 then say time()' _UserCredUpdate done'
    13961439return
     1440/*:VRX         _VIOFontSizeGetCurrent
     1441*/
     1442_VIOFontSizeGetCurrent: procedure expose VIOFontSizeKey
     1443    say '_VIOFontSizeGetCurrent() started'
     1444    if VIOFontSizeKey = "" then do
     1445        ok = SysIni("USER", "Shield", 'ALL:', 'stem.')
     1446        say "SysIni ="ok
     1447        say "Shield keys: "stem.0
     1448        do I = 1 to stem.0
     1449            say I': 'stem.I
     1450            Wert = c2x(strip(SysIni("USER", "Shield", stem.I),,'00'x))
     1451            say I': 'Wert' ('length(Wert)')'
     1452            if length(Wert) = 4 & pos('~',stem.I) > 0 then do
     1453                VIOFontSizeKey = stem.I
     1454                say "VIOFontSizeKey = "VIOFontSizeKey
     1455                leave
     1456            end
     1457        end
     1458    end
     1459    else do
     1460        Wert = c2x(strip(SysIni("USER", "Shield", VIOFontSizeKey),,'00'x))
     1461    end
     1462    if VIOFontSizeKey <> "" then FontSize = x2d(right(Wert,2))||'x'||x2d(left(Wert,2))
     1463                            else FontSize = ""
     1464    say '_VIOFontSizeGetCurrent() started, done 'FontSize', 'Wert
     1465return FontSize
     1466
     1467/*:VRX         _VIOFontSizeSetCurrent
     1468*/
     1469_VIOFontSizeSetCurrent: procedure expose VIOFontSizeKey OldFontSize
     1470    say '_VIOFontSizeSetCurrent() started'
     1471    FontSize = arg(1)
     1472    say 'FontSize als arg = 'FontSize
     1473    if FontSize = 'OLDFONTSIZE' then FontSize = ''
     1474    if VIOFontSizeKey = '' then FontSize = ''
     1475
     1476    if pos('x',FontSize) > 0 then do
     1477        parse var FontSize HH'x'BB
     1478say 'HH = 'HH
     1479say 'BB = 'BB
     1480        Wert = d2c(BB)||d2c(HH)
     1481say 'Wert = 'Wert
     1482        ok = SysIni("USER","Shield",VIOFontSizeKey, Wert||d2c(0))
     1483    end
     1484    say '_VIOFontSizeSetCurrent() done, 'FontSize', 'Wert
     1485return FontSize
     1486
    13971487/*:VRX         About_Close
    13981488*/
     
    16791769                OpenOk = _browseobjectopen(machine,sharename,browsepath)
    16801770            end
    1681             if \OpenOk then do
    1682                 Msg.Text = "Not connected - cannot open - aborting!"
    1683                 Msg.Type = "E"
    1684                 call _ShowMsg
     1771            if \OpenOk then do /* We cannot browse file content in smbmon (we are not a client) */
     1772                               /* Instead we open the ACLS Browser */
     1773                call ContextMenu_Tree_ACLS_Click
    16851774            end
    16861775        end
     
    18311920    ok = VRset("CN_DAEMONS", "MiniIcons", \advanced.!bigicons)
    18321921    ok = VRset("CN_SMBTREE", "MiniIcons", \advanced.!bigicons)
    1833     ok = VRset("ContextMenu_Tree_MiniIcons",  "Checked", \advanced.!bigicons)
    1834     ok = VRset("ContextMenu_Daemons_MiniIcons",  "Checked", \advanced.!bigicons)
     1922    ok = VRset("ContextMenu_Tree_MiniIcons",   "Checked", \advanced.!bigicons)
     1923    ok = VRset("ContextMenu_Daemons_MiniIcons","Checked", \advanced.!bigicons)
    18351924return
    18361925
     
    19632052/*:VRX         ContextMenu_Tree_MiniIcons_Click
    19642053*/
    1965 ContextMenu_Tree_MiniIcons_Click: 
     2054ContextMenu_Tree_MiniIcons_Click:
    19662055    advanced.!bigicons = \advanced.!bigicons
    19672056    ok = VRset("CN_DAEMONS", "MiniIcons", \advanced.!bigicons)
    19682057    ok = VRset("CN_SMBTREE", "MiniIcons", \advanced.!bigicons)
    1969     ok = VRset("ContextMenu_Tree_MiniIcons",  "Checked", \advanced.!bigicons)
    1970     ok = VRset("ContextMenu_Daemons_MiniIcons",  "Checked", \advanced.!bigicons)
     2058    ok = VRset("ContextMenu_Tree_MiniIcons",   "Checked", \advanced.!bigicons)
     2059    ok = VRset("ContextMenu_Daemons_MiniIcons","Checked", \advanced.!bigicons)
    19712060return
    19722061
     
    20492138return
    20502139
     2140/*:VRX         ICB_ACLS_OK_Click
     2141*/
     2142ICB_ACLS_OK_Click:
     2143    call SW_ACLS_close
     2144return
     2145
    20512146/*:VRX         ICB_APPLY_Click
    20522147*/
     
    20692164    say 'DetectZombies = "'DetectZombies'"'
    20702165
     2166    VIOFontsize = VRGet("SPIN_FONTSIZE","Value")
     2167    say "VIOFontsize = "VIOFontsize
     2168
    20712169    options.!storecreds = VRGet("CB_STORECREDS","Set")
    20722170    say "options.!storecreds = "options.!storecreds
     
    20762174        log_file     = VRGet("EF_log_file","Value")
    20772175        max_protocol = VRGet("SPIN_max_protocol","Value")
     2176        max_log_size = VRGet("SPIN_max_log_size","Value")
    20782177
    20792178        handle = IniOpen('global', samba.!smbconf)
     
    20812180        ok = IniSet('log level',    log_level,    handle)
    20822181        ok = IniSet('log file',     log_file,     handle)
     2182        ok = IniSet('max log size', max_log_size, handle)
    20832183        ok = IniSet('max protocol', max_protocol, handle)
    20842184
     
    20882188    end
    20892189    IF options.!debug == 1 then say time()' PB_Apply_Click() done'
     2190return
     2191
     2192/*:VRX         ICB_CHOOSE_Click
     2193*/
     2194ICB_CHOOSE_Click:
     2195    FileName = VRFileDialog( VRWindow(), "Choose location for log files", "Open", VRGet("EF_LOG_FILE","Value"))
     2196    if Filename <> "" then ok = VRSet("EF_LOG_FILE","Value", FIleName)
     2197    drop Filename
     2198return
     2199
     2200/*:VRX         ICB_DELLOGS_Click
     2201*/
     2202ICB_DELLOGS_Click:
     2203    call VRSet VRWindow(), 'Pointer', 'Wait'
     2204
     2205    call _SambaCheckFreeSpace
     2206
     2207    ok = SysFileTree(samba.!logdir'\log.*', logs.,'FO')
     2208    do I = 1 to logs.0
     2209        ok = VRMethod( "CN_Daemons", "GetRecordList", "All", "handle." )
     2210        KeepLog = 0
     2211        do J = 1 to handle.0
     2212            CurPID = VRMethod("CN_Daemons", "GetFieldData", handle.J, DPidsFH)
     2213            if pos(CurPID,logs.I) > 0 then KeepLog = 1
     2214        end
     2215        if KeepLog = 0 then do
     2216            say "Delete "logs.I
     2217            ok = SysFileDelete(logs.I)
     2218        end
     2219    end
     2220
     2221    call _SambaCheckFreeSpace
     2222
     2223    call VRSet VRWindow(), 'Pointer', '<default>'
    20902224return
    20912225
     
    21352269
    21362270        if word(ok,1) = "1" then do
    2137             call _StatusBarWrapper NLVGetMessage(107, rpc.queryuser.FULL_NAME)
     2271            call _StatusBarReset
     2272            call _StatusBarWrapper NLVGetMessage(15)' "'VRGet("EF_USER1","Value")'" 'rpc.queryuser.LOGONSTATUS
    21382273            say 'rpc.queryuser.DIR_DRIVE    = "'rpc.queryuser.DIR_DRIVE'"'
    21392274            say 'rpc.queryuser.LOGON_SCRIPT = "'rpc.queryuser.LOGON_SCRIPT'"'
    21402275            call _UserCredUpdate
     2276            Usercontext = VRGet("CN_SMBTREE","Caption")
     2277            parse var Usercontext Usercontext':'.
     2278            Usercontext = Usercontext': 'VRGet("EF_USER1","Value")
     2279            ok = VRSet("CN_SMBTREE","Caption",Usercontext)
    21412280        end
    21422281        else do
     
    21732312ICB_RELOAD_Click:
    21742313    call VRSet VRWindow(), 'Pointer', 'Wait'
     2314    OldFontSize = _VIOFontSizeGetCurrent()
     2315    say 'OldFontSize = 'OldFontSize
     2316    if OldFontSize <> VIOFontSize then ok = _VIOFontSizeSetCurrent(VIOFontSize)
     2317
    21752318    if WPSStartStop then do
    21762319        ok = SysOpenObject('<smb_reload>', 'DEFAULT', 1)
     
    21882331ICB_RESTART_Click:
    21892332    call VRSet VRWindow(), 'Pointer', 'Wait'
     2333    OldFontSize = _VIOFontSizeGetCurrent()
     2334    say 'OldFontSize = 'OldFontSize
     2335    if OldFontSize <> VIOFontSize then ok = _VIOFontSizeSetCurrent(VIOFontSize)
     2336
    21902337    if WPSStartStop then do
    21912338        ok = SysOpenObject('<smb_restart>', 'DEFAULT', 1)
     
    22042351    say "IPB_Start_Click started"
    22052352    call VRSet VRWindow(), 'Pointer', 'Wait'
     2353    OldFontSize = _VIOFontSizeGetCurrent()
     2354    say 'OldFontSize = 'OldFontSize
     2355    if OldFontSize <> VIOFontSize then ok = _VIOFontSizeSetCurrent(VIOFontSize)
    22062356    if WPSStartStop then do
    22072357        ok = SysOpenObject('<smb_start>', 'DEFAULT', 1)
     
    22212371    say "IPB_Stop_Click started"
    22222372    call VRSet VRWindow(), 'Pointer', 'Wait'
     2373    OldFontSize = _VIOFontSizeGetCurrent()
     2374    say 'OldFontSize = 'OldFontSize
     2375    if OldFontSize <> VIOFontSize then ok = _VIOFontSizeSetCurrent(VIOFontSize)
     2376
    22232377    if WPSStartStop then do
    22242378        ok = SysOpenObject('<smb_stop>', 'DEFAULT', 1)
     
    22982452Main_Resize:
    22992453    IF options.!debug == 1 THEN SAY time()' Main_Resize started'
     2454    if TrashedSize = 1 then do
     2455        IF options.!debug == 1 THEN SAY time()' Main_Resize aborted, already in progress'
     2456    end
    23002457    ok = VRSet("Main","Painting", 0)
    23012458
     
    24222579    ok = VRSet("ICB_Reload", "Height",    pbtn_Height)
    24232580
     2581    ok = VRSet("ICB_CHOOSE",  "Width",    pbtn_width)   
     2582    ok = VRSet("ICB_CHOOSE",  "Height",   pbtn_Height)
     2583
     2584    ok = VRSet("ICB_DELLOGS",  "Width",    pbtn_width)   
     2585    ok = VRSet("ICB_DELLOGS",  "Height",   pbtn_Height)
    24242586
    24252587    ok = VRset("GB_SMBTREE","Top",    margin  )
     
    25322694PB_AboutOK_Click:
    25332695    call About_Close
    2534 return
    2535 
    2536 /*:VRX         PB_ACLS_OK_Click
    2537 */
    2538 PB_ACLS_OK_Click:
    2539     call SW_ACLS_close
    2540 return
    2541 
    2542 /*:VRX         PB_DELLOGS_Click
    2543 */
    2544 PB_DELLOGS_Click:
    2545     call VRSet VRWindow(), 'Pointer', 'Wait'
    2546 say VRGet("EF_LOG_FILE","Value")
    2547 say translate(VRGet("EF_LOG_FILE","Value"),'\','/')
    2548     samba.!logdir = VRParseFileName(translate(VRGet("EF_LOG_FILE","Value"),'\','/'),"DP")
    2549 say samba.!logdir
    2550 
    2551     loggingfreespace = word(sysdriveinfo(left(samba.!logdir,2)),2)%1024%1024
    2552     ok = VRSet("DT_FREESPACE", "Caption", loggingfreespace' MB')
    2553 
    2554 
    2555     ok = SysFileTree(samba.!logdir'\log.*', logs.,'FO')
    2556     do I = 1 to logs.0
    2557         ok = VRMethod( "CN_Daemons", "GetRecordList", "All", "handle." )
    2558         KeepLog = 0
    2559         do J = 1 to handle.0
    2560             CurPID = VRMethod("CN_Daemons", "GetFieldData", handle.J, DPidsFH)
    2561             if pos(CurPID,logs.I) > 0 then KeepLog = 1
    2562         end
    2563         if KeepLog = 0 then do
    2564             say "Delete "logs.I
    2565             ok = SysFileDelete(logs.I)
    2566         end
    2567     end
    2568 
    2569     loggingfreespace = word(sysdriveinfo(left(samba.!logdir,2)),2)%1024%1024
    2570     ok = VRSet("DT_FREESPACE", "Caption", loggingfreespace' MB')   
    2571 
    2572     call VRSet VRWindow(), 'Pointer', '<default>'
    25732696return
    25742697
     
    26952818return
    26962819
     2820/*:VRX         SPIN_FONTSIZE_Change
     2821*/
     2822SPIN_FONTSIZE_Change:
     2823return
     2824
    26972825/*:VRX         SPIN_Intervall_Change
    26982826*/
     
    27112839return
    27122840
     2841/*:VRX         SPIN_MAX_LOG_SIZE_Change
     2842*/
     2843SPIN_MAX_LOG_SIZE_Change:
     2844    advanced.!smbconfchanged = 1
     2845return
     2846
    27132847/*:VRX         SPIN_max_protocol_Change
    27142848*/
     
    27272861SW_ACLS_Create:
    27282862    call SW_ACLS_Init
     2863    CALL NLVSetText 'ICB_ACLS_OK',    "Caption", 2
     2864    CALL NLVSetText 'RB_ACLS_TEXT'    "Caption", 155
     2865    CALL NLVSetText 'RB_ACLS_NUMERIC' "Caption", 156
     2866
    27292867    ACL.typeFH   = VRMethod( "CN_ACLS", "AddField", "String", "Type" )
    27302868    ACL.groupFH  = VRMethod( "CN_ACLS", "AddField", "String", "Group" )
     
    27362874    aclsnumeric = ''
    27372875    call _ACLSBrowse
     2876    ACLSObj = VRGet("SW_ACLS","Caption")
     2877    parse var ACLSObj .'\\'ACLSObj
     2878    ACLSObj = NLVGetMessage(154)' \\'ACLSOBj
     2879    ok = VRSet("SW_ACLS","Caption",ACLSObj)
     2880    drop ACLSObj
    27382881return
    27392882/*:VRX         SW_ACLS_Fini
     
    29583101    call SW_SETTINGS_Init
    29593102
    2960     call SW_SETTINGS_Init_Content
    2961 
    2962 say VRGet("EF_LOG_FILE","Value")
    2963 say translate(VRGet("EF_LOG_FILE","Value"),'\','/')
    2964     samba.!logdir = VRParseFileName(translate(VRGet("EF_LOG_FILE","Value"),'\','/'),"DP")
    2965 say samba.!logdir
    2966     CALL VRMethod 'TT_SETTINGS', 'Register', 'DT_FREESPACE', samba.!logdir' blums'
     3103    CALL NLVSetText 'DT_Refresh',      'Caption',  25
     3104    CALL NLVSetText 'DT_RefreshMin',   'Caption',  25
     3105    ok = VRSet("DT_REFRESH","AutoSize", 1)
     3106    ok = VRSet("DT_REFRESH","AutoSize", 0)
     3107    ok = VRSet("DT_REFRESH","Height", 253)
     3108    ok = VRSet("DT_REFRESHMIN","Width", VRGet("DT_REFRESH","width"))
     3109
     3110    ok = VRSet("SPIN_Intervall","Left",VRGet("DT_REFRESH","Left")+VRGet("DT_REFRESH","Width")+marginx2)
     3111    ok = VRSet("SPIN_IntervallMin","Left",VRGet("DT_REFRESH","Left")+VRGet("DT_REFRESH","Width")+marginx2)
     3112
     3113    CALL NLVSetText 'DT_Intervall',    'Caption',  26
     3114    ok = VRSet("DT_IntervallMin",      "Caption", NLVGetMessage(26)', 'NLVGetMessage(28))
     3115    ok = VRSet("DT_IntervallMin","AutoSize", 1)
     3116    ok = VRSet("DT_IntervallMin","AutoSize", 0)
     3117    ok = VRSet("DT_IntervallMin","Height", 253)
     3118
     3119    ok = VRSet("DT_Intervall",   "Left",VRGet("SPIN_Intervall","Left")+VRGet("SPIN_Intervall","Width")+marginx2)
     3120    ok = VRSet("DT_IntervallMin","Left",VRGet("SPIN_Intervall","Left")+VRGet("SPIN_Intervall","Width")+marginx2)
     3121   
     3122    CALL NLVSetText 'CB_NoMsgBox',     'Caption',  27
     3123    CALL NLVSetText 'CB_WPSSTARTSTOP', 'Caption',  29
     3124    CALL NLVSetText 'CB_DetectZombies','Caption',  30
     3125
     3126    CALL NLVSetText 'DT_FONTSIZE', 'Caption', 97
     3127    CALL NLVSetText 'ICB_CHOOSE',  'Caption', 98
     3128    CALL NLVSetText 'ICB_DELLOGS', 'Caption', 99
     3129   
     3130    log_level    = IniGet('log level',    'global', samba.!smbconf)
     3131    log_file     = IniGet('log file',     'global', samba.!smbconf)
     3132    log_file     = translate(log_file,'\','/')
     3133    max_protocol = IniGet('max protocol', 'global', samba.!smbconf)
     3134    max_log_size = IniGet('max log size', 'global', samba.!smbconf)
     3135
     3136    if log_level = "" then log_level = 2
     3137    if max_protocol = "" then max_protocol = "NT1"
     3138
     3139    ok = VRSet("SPIN_LOG_LEVEL","Value",log_level)
     3140    ok = VRSet("SPIN_MAX_LOG_SIZE","Value",max_log_size)
     3141    ok = VRSet("SPIN_MAX_PROTOCOL","Value",max_protocol)
     3142    ok = VRSet("EF_LOG_FILE","Value",log_file)
     3143    ok = VRSet("EF_LOG_FILE","Width",length(log_file) * 100 + 300)
     3144    ok = VRSet("DT_FREESPACE","Left",VRGet("EF_LOG_FILE","Width")+VRGet("EF_LOG_FILE","Left") + marginx2)
     3145    ok = VRSet("ICB_DELLOGS","Left",VRGet("DT_FREESPACE","Left"))
     3146
     3147    ok = VRSet("DT_FONTSIZE","AutoSize", 1)
     3148    ok = VRSet("DT_FONTSIZE","AutoSize", 0)
     3149    ok = VRSet("DT_FONTSIZE","Height", 253)
     3150    ok = VRSet("SPIN_FONTSIZE", "Left", VRGet("DT_FONTSIZE","Left")+VRGet("DT_FONTSIZE","Width")+marginx2)
     3151
     3152    CALL VRMethod 'TT_SETTINGS', 'Register', 'ICB_CHOOSE',  NLVGetMessage(95)
     3153    CALL VRMethod 'TT_SETTINGS', 'Register', 'ICB_DELLOGS', NLVGetMessage(96)
     3154    CALL VRMethod 'TT_SETTINGS', 'Register', 'DT_LOG_LEVEL', samba.!smbconf
     3155    CALL VRMethod 'TT_SETTINGS', 'Register', 'SPIN_LOG_LEVEL', samba.!smbconf
     3156    CALL VRMethod 'TT_SETTINGS', 'Register', 'DT_LOG_FILE', samba.!smbconf
     3157    CALL VRMethod 'TT_SETTINGS', 'Register', 'EF_LOG_FILE', samba.!smbconf
     3158    CALL VRMethod 'TT_SETTINGS', 'Register', 'DT_MAX_LOG_SIZE', samba.!smbconf
     3159    CALL VRMethod 'TT_SETTINGS', 'Register', 'SPIN_MAX_LOG_SIZE', samba.!smbconf
     3160    CALL VRMethod 'TT_SETTINGS', 'Register', 'DT_MAX_PROTOCOL', samba.!smbconf
     3161    CALL VRMethod 'TT_SETTINGS', 'Register', 'SPIN_MAX_PROTOCOL', samba.!smbconf
     3162
     3163    call _SambaCheckFreeSpace
    29673164return
    29683165
     
    29843181    end
    29853182    drop window
    2986 return
    2987 
    2988 /*:VRX         SW_SETTINGS_Init_Content
    2989 */
    2990 SW_SETTINGS_Init_Content:
    2991    
    2992     log_level    = IniGet('log level',    'global', samba.!smbconf)
    2993     log_file     = IniGet('log file',     'global', samba.!smbconf)
    2994     max_protocol = IniGet('max_protocol', 'global', samba.!smbconf)
    2995 
    2996     if log_level = "" then log_level = 2
    2997     if max_protocol = "" then max_protocol = "NT1"
    2998 
    2999     ok = VRSet("SPIN_LOG_LEVEL","Value",log_level)
    3000     ok = VRSet("EF_LOG_FILE","Value",log_file)
    30013183return
    30023184
     
    31333315    ok = VRSet("TM_RefreshDaemons","Enabled", 0)
    31343316    ok = VRSet("DT_STATUSBAR","Caption", VRGet("Main", "HintText"))
    3135     ok = VRSet("CN_DAEMONS","Visible", 0)
     3317
     3318    ok = VRSet("CN_DAEMONS", "Visible", 0)
     3319    ok = VRSet("ICB_START",  "Visible", 0)
     3320    ok = VRSet("ICB_STOP",   "Visible", 0)
     3321    ok = VRSet("ICB_RESTART","Visible", 0)
     3322    ok = VRSet("ICB_RELOAD", "Visible", 0)
     3323
    31363324    ok = VRSet("CN_SMBTREE","Visible", 0)
    31373325    ok = VRSet("CN_USERS",  "Visible", 0)
     
    31393327    ok = VRSet("CN_SERVICE","Visible", 0)
    31403328    ok = VRSet("CN_CHKTDB", "Visible", 0)
    3141     ok = VRSet("GB_SETTINGS","Visible", 0)
     3329
     3330    ok = VRSet("GB_SETTINGS",       "Visible", 0)
     3331    ok = VRSet("ICB_CHOOSE",        "Visible", 0)
     3332    ok = VRSet("ICB_DELLOGS",       "Visible", 0)
     3333    ok = VRSet('ICB_CHOOSE',        "Visible", 0)
     3334    ok = VRSet('ICB_DELLOGS',       "Visible", 0)
     3335    ok = VRSet('DT_LOG_LEVEL',      "Visible", 0)
     3336    ok = VRSet('SPIN_LOG_LEVEL',    "Visible", 0)
     3337    ok = VRSet('DT_LOG_FILE',       "Visible", 0)
     3338    ok = VRSet('EF_LOG_FILE',       "Visible", 0)
     3339    ok = VRSet('DT_MAX_LOG_SIZE',   "Visible", 0)
     3340    ok = VRSet('SPIN_MAX_LOG_SIZE', "Visible", 0)
     3341    ok = VRSet('DT_MAX_PROTOCOL',   "Visible", 0)
     3342    ok = VRSet('SPIN_MAX_PROTOCOL', "Visible", 0)
    31423343
    31433344    select
    31443345        when page = 1 then do /* daemons */
    31453346            ok = VRSet("CN_DAEMONS","Visible", 1)
     3347            ok = VRSet("ICB_START",  "Visible", 1)
     3348            ok = VRSet("ICB_STOP",   "Visible", 1)
     3349            ok = VRSet("ICB_RESTART","Visible", 1)
     3350            ok = VRSet("ICB_RELOAD", "Visible", 1)
    31463351            ok = VRSet("Main","WindowIcon","$46")
    31473352            ok = VRSet("TM_RefreshDaemons","Enabled", 1)
     
    31743379        end
    31753380        when page = 7 then do /* Settings */
    3176             ok = VRSet("GB_SETTINGS","Visible", 1)
    3177             ok = VRSet("Main","WindowIcon","$53")
    3178             call SW_SETTINGS_Init_Content
     3381            ok = VRSet("GB_SETTINGS",       "Visible", 1)
     3382            ok = VRSet("ICB_CHOOSE",        "Visible", 1)
     3383            ok = VRSet("ICB_DELLOGS",       "Visible", 1)
     3384            ok = VRSet('DT_LOG_LEVEL',      "Visible", 1)
     3385            ok = VRSet('SPIN_LOG_LEVEL',    "Visible", 1)
     3386            ok = VRSet('DT_LOG_FILE',       "Visible", 1)
     3387            ok = VRSet('EF_LOG_FILE',       "Visible", 1)
     3388            ok = VRSet('DT_MAX_LOG_SIZE',   "Visible", 1)
     3389            ok = VRSet('SPIN_MAX_LOG_SIZE', "Visible", 1)
     3390            ok = VRSet('DT_MAX_PROTOCOL',   "Visible", 1)
     3391            ok = VRSet('SPIN_MAX_PROTOCOL', "Visible", 1)
     3392            ok = VRSet("Main","WindowIcon", "$53")
    31793393        end
    31803394        otherwise nop
     
    31873401/*  call beep 1200, 20 */
    31883402    ok = VRSet("TM_Refresh","Delay", Intervall * 1000)
     3403    if _VIOFontSizeGetCurrent() <> OldFontSize then ok = _VIOFontSizeSetCurrent(OldFontSize)
    31893404    call _Refresh
    31903405return
Note: See TracChangeset for help on using the changeset viewer.