Changeset 784 for trunk/guitools/smbmon


Ignore:
Timestamp:
Aug 8, 2013, 9:56:12 AM (12 years ago)
Author:
Herwig Bauernfeind
Message:

GUI-Tools: Changes in order to work around % issue

Location:
trunk/guitools/smbmon
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/guitools/smbmon/smbmon.vrp

    r770 r784  
    88VRXWindow: __VREMainWindow,1,2180,3614,1024,6769
    99VRXWindow: __VRESectionListWindow,1,4083,11226,7372,6589
    10 VRXWindow: __VREToolsWindow,1,2156,1494,6489,1659
     10VRXWindow: __VREToolsWindow,1,2156,1494,4968,1665
    1111VRXWindow: __VREWindListWindow,1,964,11708,3132,3150
    1212UserFile: 1
  • trunk/guitools/smbmon/smbmon.vrx

    r770 r784  
    12531253
    12541254        call _RefreshDaemonsDelay
    1255 
    12561255        DRH = VRInfo("Record")
     1256        DaemonName = ""
     1257
    12571258        OH = VRInfo("Object")
    1258         ok = VRset("ContextMenu_Daemons_Sep1","Visible", 0 )
    1259         ok = VRset("ContextMenu_Daemons_Ping","Visible", (DRH <> "") )
    1260         ok = VRset("ContextMenu_Daemons_Shutdown","Visible", 0 )
    1261         DaemonName = ""
    1262         if DRH <> "" then DaemonName = VRMethod("CN_Daemons", "GetRecordAttr", DRH, "Caption")
     1259        ok = VRset("ContextMenu_Daemons_Details",   "Visible", 1 )
     1260        ok = VRset("ContextMenu_Daemons_Tree",      "Visible", 1 )
     1261        ok = VRset("MItem_9",                       "Visible", 1 )
     1262        ok = VRset("ContextMenu_Daemons_Sort",      "Visible", 1 )
     1263        ok = VRset("ContextMenu_Daemons_MiniIcons", "Visible", 1 )
     1264        ok = VRset("MItem_13",                      "Visible", 1 )
     1265        ok = VRset("ContextMenu_Daemons_Ping",      "Visible", 1 )
     1266        ok = VRset("ContextMenu_Daemons_KillPID",   "Visible", 1 )
     1267        ok = VRset("ContextMenu_Daemons_Start",     "Visible", 1 )
     1268        ok = VRset("ContextMenu_Daemons_Shutdown",  "Visible", 1 )
     1269
     1270        if DRH <> "" then do
     1271            DaemonName = VRMethod("CN_Daemons", "GetRecordAttr", DRH, "Caption")
     1272            ok = VRset("ContextMenu_Daemons_Ping","Visible", 1 )
     1273        end
     1274
    12631275        select
    1264             when Words(DaemonName) = 3 then do /* a child process with PID in name */
     1276            when Words(DaemonName) = 3 & pos("PID ",DaemonName) > 0 then do /* a child process with PID in name */
    12651277                DaemonName = word(DaemonName,2)
    1266                 ok = VRset("ContextMenu_Daemons_Sep1","Visible", 1 )
    12671278                ok = VRSet("ContextMenu_Daemons_KillPID", "Caption", NLVGetMessage( 38, DaemonName))
    1268                 ok = VRset("ContextMenu_Daemons_KillPID",  "Visible", 1 )
    12691279                ok = VRset("ContextMenu_Daemons_Start", "Visible", 0 )
    1270                 ok = VRset("ContextMenu_Daemons_Ping",  "Visible", 1 )
    1271                 ok = VRset("ContextMenu_Daemons_Sep1",  "Visible", 1 )
    12721280            end
    1273             when Words(DaemonName) = 1 then do /* on smbd.exe or nmbd.exe root processes */
     1281            when Words(DaemonName) = 1 & (pos("mbd.exe",Daemonname) > 0 | pos("winbindd.exe",Daemonname) > 0) then do /* on root process */
    12741282                parse var DaemonName DaemonName'.exe'
    12751283                if strip(VRMethod("CN_Daemons", "GetFieldData", DRH, DPidsFH)) <> "" then do
    1276                     ok = VRSet("ContextMenu_Daemons_Shutdown", "Caption", NLVGetMessage( 33, DaemonName))
    1277                     ok = VRset("ContextMenu_Daemons_Shutdown", "Visible", 1 )
    1278                     ok = VRset("ContextMenu_Daemons_Start", "Visible", 0 )
    1279                     ok = VRset("ContextMenu_Daemons_Sep1",  "Visible", 1 )
    1280                 end
    1281                 else do
    1282                     ok = VRSet("ContextMenu_Daemons_Start", "Caption", NLVGetMessage( 36, DaemonName))
    1283                     ok = VRset("ContextMenu_Daemons_Start", "Visible", 1 )
    1284                     ok = VRset("ContextMenu_Daemons_KillPID","Visible", 0 )
    1285                     ok = VRset("ContextMenu_Daemons_Ping",  "Visible", 0 )
    1286                     ok = VRset("ContextMenu_Daemons_Sep1",  "Visible", 1 )
     1284                    ok = VRSet("ContextMenu_Daemons_Shutdown",  "Caption", NLVGetMessage( 33, DaemonName))
     1285                    ok = VRset("ContextMenu_Daemons_KillPID",   "Visible", 0 )
     1286                    ok = VRset("ContextMenu_Daemons_Start",     "Visible", 0 )
    12871287                end
    12881288            end
    1289             otherwise nop
     1289            when pos("\", DaemonName) > 0 then do /* we are on a file */
     1290                ok = VRset("MItem_13",                      "Visible", 0 )
     1291                ok = VRset("ContextMenu_Daemons_Ping",      "Visible", 0 )
     1292                ok = VRset("ContextMenu_Daemons_KillPID",   "Visible", 0 )
     1293                ok = VRset("ContextMenu_Daemons_Start",     "Visible", 0 )
     1294                ok = VRset("ContextMenu_Daemons_Shutdown",  "Visible", 0 )
     1295            end
     1296            otherwise do /* we are on a user */
     1297                ok = VRset("MItem_13",                      "Visible", 0 )
     1298                ok = VRset("ContextMenu_Daemons_Ping",      "Visible", 0 )
     1299                ok = VRset("ContextMenu_Daemons_KillPID",   "Visible", 0 )
     1300                ok = VRset("ContextMenu_Daemons_Start",     "Visible", 0 )
     1301                ok = VRset("ContextMenu_Daemons_Shutdown",  "Visible", 0 )
     1302            end
    12901303        end
    12911304        say '  Daemon is "'DaemonName'"'
Note: See TracChangeset for help on using the changeset viewer.