Changeset 1028
- Timestamp:
- Jun 7, 2017, 5:14:10 PM (8 years ago)
- Location:
- trunk/guitools/smbmon
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/guitools/smbmon/smbmon.rc
r990 r1028 15 15 icon 52 .\rc\icons\share.ico 16 16 icon 53 .\rc\icons\settings.ico 17 icon 80 .\rc\icons\PDF.ICO 18 icon 81 .\rc\icons\ooo_base_doc.ico 19 icon 82 .\rc\icons\ooo_calc_doc.ico 20 icon 83 .\rc\icons\ooo_draw_doc.ico 21 icon 84 .\rc\icons\ooo_impress_doc.ico 22 icon 85 .\rc\icons\ooo_math_doc.ico 23 icon 86 .\rc\icons\ooo_writer_doc.ico 24 icon 87 .\rc\icons\fw.ico 25 icon 88 .\rc\icons\image.ico 26 icon 89 .\rc\icons\movie.ico 27 icon 90 .\rc\icons\snd.ico 28 icon 91 .\rc\icons\wpi.ico 29 icon 92 .\rc\icons\zip.ico 30 icon 93 .\rc\icons\inf.ico 31 icon 94 .\rc\icons\txt.ico 17 32 BITMAP 111 ..\shared\rc\throbber\frame_01.bmp 18 33 BITMAP 112 ..\shared\rc\throbber\frame_02.bmp -
trunk/guitools/smbmon/smbmon.vrp
r991 r1028 6 6 RunParameters: 7 7 RunDirectory: U:\Develop\Samba\trunk\guitools\smbmon 8 VRXWindow: __VREMainWindow,1,21 80,3614,1024,67699 VRXWindow: __VRESectionListWindow,1, 4252,9010,7372,768510 VRXWindow: __VREToolsWindow,1,2 156,1494,6992,166111 VRXWindow: __VREWindListWindow,1,9 64,11708,5372,31508 VRXWindow: __VREMainWindow,1,2168,3614,1024,6769 9 VRXWindow: __VRESectionListWindow,1,3963,14213,10130,5059 10 VRXWindow: __VREToolsWindow,1,2879,1975,6989,1659 11 VRXWindow: __VREWindListWindow,1,952,11708,5372,3150 12 12 UserFile: 1 13 13 UserWindow: Main,1 14 UserWindow: About,115 UserWindow: SW_FILES,116 14 UserWindow: SW_SETTINGS,1 15 UserWindow: SW_LOGIN,1 -
trunk/guitools/smbmon/smbmon.vrx
r1024 r1028 107 107 __VXREXX____APPENDS__: 108 108 /* 109 #append U:\Develop\Samba\trunk\guitools\shared\inittempdir.vrs 110 #append U:\Develop\Samba\trunk\guitools\shared\sambainit.vrs 111 #append U:\Develop\Samba\trunk\guitools\shared\nlv.vrs 112 #append U:\Develop\Samba\trunk\guitools\shared\smbtree.vrs 109 #append ..\shared\inittempdir.vrs 110 #append ..\shared\sambainit.vrs 111 #append ..\shared\nlv.vrs 112 #append ..\shared\smbtree.vrs 113 #append ..\shared\browse.VRS 114 #append ..\shared\usercredmem.vrs 115 #append ..\shared\rxrpclib.vrs 113 116 */ 114 117 return … … 293 296 294 297 /* SMBTree */ 295 WorkgroupFH = VRMethod( "CN_ smbtree", "AddField", "String", NLVGetMessage(150) )296 NBFH = VRMethod( "CN_ smbtree", "AddField", "String", "NetBIOS name" )297 IpFH = VRMethod( "CN_ smbtree", "AddField", "String", NLVGetMessage(147) )298 MBFH = VRMethod( "CN_ smbtree", "AddField", "String", "DMB/LMB" )299 OSFH = VRMethod( "CN_ smbtree", "AddField", "String", "OS" )298 WorkgroupFH = VRMethod( "CN_SMBTREE", "AddField", "String", NLVGetMessage(150) ) 299 NBFH = VRMethod( "CN_SMBTREE", "AddField", "String", "NetBIOS name" ) 300 IpFH = VRMethod( "CN_SMBTREE", "AddField", "String", NLVGetMessage(147) ) 301 MBFH = VRMethod( "CN_SMBTREE", "AddField", "String", "DMB/LMB" ) 302 OSFH = VRMethod( "CN_SMBTREE", "AddField", "String", "OS" ) 300 303 /* VersionFH = VRMethod( "CN_SmbTree", "AddField", "String", "Version" ) */ 301 CommentFH = VRMethod( "CN_ smbtree", "AddField", "String", NLVGetMessage(151) )302 MacFH = VRMethod( "CN_ smbtree", "AddField", "String", "MAC" )303 304 ok = VRMethod("CN_ smbtree","SetfieldAttr",IPFH, "ReadOnly", 1)305 ok = VRMethod("CN_ smbtree","SetfieldAttr",NBFH, "ReadOnly", 1)306 ok = VRMethod("CN_ smbtree","SetfieldAttr",MBFH, "ReadOnly", 1)307 ok = VRMethod("CN_ smbtree","SetfieldAttr",WorkGroupFH,"ReadOnly", 1)308 ok = VRMethod("CN_ smbtree","SetfieldAttr",OSFH, "ReadOnly", 1)309 ok = VRMethod("CN_ smbtree","SetfieldAttr",MacFH, "ReadOnly", 1)304 CommentFH = VRMethod( "CN_SMBTREE", "AddField", "String", NLVGetMessage(151) ) 305 MacFH = VRMethod( "CN_SMBTREE", "AddField", "String", "MAC" ) 306 307 ok = VRMethod("CN_SMBTREE","SetfieldAttr",IPFH, "ReadOnly", 1) 308 ok = VRMethod("CN_SMBTREE","SetfieldAttr",NBFH, "ReadOnly", 1) 309 ok = VRMethod("CN_SMBTREE","SetfieldAttr",MBFH, "ReadOnly", 1) 310 ok = VRMethod("CN_SMBTREE","SetfieldAttr",WorkGroupFH,"ReadOnly", 1) 311 ok = VRMethod("CN_SMBTREE","SetfieldAttr",OSFH, "ReadOnly", 1) 312 ok = VRMethod("CN_SMBTREE","SetfieldAttr",MacFH, "ReadOnly", 1) 310 313 311 314 /* ChkTdb */ … … 330 333 ok = VRSet( Container, "Sort", SortOrder ) 331 334 ok = VRMethod( Container, "SortRecords" ) 335 return 336 337 /*:VRX _ContextMenuSelectedSet 338 */ 339 _ContextMenuSelectedSet: 340 ok = VRSet("ContextMenu_Tree_Tree", "Visible", 0) 341 ok = VRSet("ContextMenu_Tree_Details", "Visible", 0) 342 ok = VRSet("ContextMenu_Tree_Icons", "Visible", 0) 343 ok = VRSet("ContextMenu_Tree_Sort", "Visible", 0) 344 ok = VRSet("ContextMenu_Tree_MiniIcons", "Visible", 0) 345 ok = VRSet("ContextMenu_Tree_Login", "Visible", 0) 346 ok = VRSet("ContextMenu_Tree_ACLS", "Visible", 0) 347 ok = VRSet("ContextMenu_Tree_SendMsg", "Visible", 0) 348 say SMBObj.udatatype 349 select 350 when SMBObj.udatatype = "WORKGROUP" then do 351 ok = VRSet("ContextMenu_Tree_MiniIcons", "Visible", 1) 352 end 353 when SMBObj.udatatype = "SERVER" then do 354 ok = VRSet("ContextMenu_Tree_Login", "Visible", 1) 355 ok = VRSet("ContextMenu_Tree_SendMsg", "Visible", 1) 356 end 357 when SMBObj.udatatype = "DISK" then do 358 ok = VRSet("ContextMenu_Tree_MiniIcons", "Visible", 1) 359 end 360 when SMBObj.udatatype = "PRINTER" then do 361 ok = VRSet("ContextMenu_Tree_MiniIcons", "Visible", 1) 362 end 363 when SMBObj.udatatype = "DIRECTORY" then do 364 ok = VRSet("ContextMenu_Tree_ACLS", "Visible", 1) 365 end 366 when SMBObj.udatatype = "FILE" then do 367 ok = VRSet("ContextMenu_Tree_ACLS", "Visible", 1) 368 end 369 otherwise do /* No other value known - default */ 370 ok = VRSet("ContextMenu_Tree_Tree", "Visible", 1) 371 ok = VRSet("ContextMenu_Tree_Details", "Visible", 1) 372 ok = VRSet("ContextMenu_Tree_Icons", "Visible", 1) 373 ok = VRSet("ContextMenu_Tree_Sort", "Visible", 1) 374 end 375 end 332 376 return 333 377 … … 439 483 ok = VRSet("CN_Service", "Font", Font.!Service) 440 484 ok = VRSet("CN_Daemons", "Font", Font.!Daemons) 441 ok = VRSet("CN_SMBT ree", "Font", Font.!SMBTree)485 ok = VRSet("CN_SMBTREE", "Font", Font.!SMBTree) 442 486 443 487 CALL NLVSetText 'DT_Refresh', 'Caption', 25 … … 478 522 479 523 ok = VRSet("CN_Daemons", "View", DaemonView) 480 ok = VRSet("CN_ smbtree", "View", TreeView)524 ok = VRSet("CN_SMBTREE", "View", TreeView) 481 525 ok = VRSet("CB_NoMsgBox", "Set", NoMsgBox) 482 526 ok = VRSet("CB_WPSStartStop", "Set", WPSStartStop) … … 487 531 call _INILayoutRead "CN_Service" 488 532 call _INILayoutRead "CN_Daemons" 489 call _INILayoutRead "CN_ smbtree"533 call _INILayoutRead "CN_SMBTREE" 490 534 491 535 ok = VRset("CN_DAEMONS", "MiniIcons", \advanced.!bigicons) … … 600 644 if options.!Debug then ok = VRRedirectStdIO("ON") 601 645 else ok = VRRedirectStdIO("OFF") 646 options.!storecreds = VRGetIni('Settings', 'StoreCreds', OurINI, 'NoClose') 647 say "options.!storecreds = "options.!storecreds 648 IF options.!storecreds == '' then options.!storecreds = 1 649 say "options.!storecreds = "options.!storecreds 650 IF _ucChkObj() = 0 then options.!storecreds = 0 651 say "options.!storecreds = "options.!storecreds 652 602 653 603 654 advanced.!bigicons = VRGetIni( "Settings", "BigIcons", OurINI) … … 613 664 /* For Refresh tree display code */ 614 665 RefreshMode ="" 666 667 call _BrowseIconsInit 615 668 616 669 smbdpidhandle.0 = 0 … … 639 692 ok = VRSetIni( "Settings", "CurrentPageNr",CurrentPageNr, OurINI,'NoClose') 640 693 ok = VRSetIni( "Settings", "DaemonView", VRGet("CN_Daemons","View"), OurINI,'NoClose') 641 ok = VRSetIni( "Settings", "TreeView", VRGet("CN_ smbtree","View"), OurINI,'NoClose')694 ok = VRSetIni( "Settings", "TreeView", VRGet("CN_SMBTREE","View"), OurINI,'NoClose') 642 695 ok = VRSetIni( "Settings", "NoMsgBox", NoMsgBox, OurINI,'NoClose') 643 696 ok = VRSetIni( "Settings", "WPSStartStop", WPSStartStop, OurINI,'NoClose') 644 697 ok = VRSetIni( "Settings", "BigIcons", \VRGet("CN_SMBTREE", "MiniIcons"),OurINI,'NoClose') 645 698 ok = VRSetIni( "Settings", "DetectZombies",DetectZombies, OurINI,'NoClose') 699 call VRSetIni 'Settings', 'StoreCreds', options.!storecreds , OurINI, 'NoClose' 646 700 647 701 ok = VRSetIni( "Options", "Debug", options.!debug, OurINI, 'NoClose' ) … … 651 705 call _INILayoutWrite "CN_Service" 652 706 call _INILayoutWrite "CN_Daemons" 653 call _INILayoutWrite "CN_ smbtree"707 call _INILayoutWrite "CN_SMBTREE" 654 708 655 709 if VRGet("CN_USERS", "Font") <> "<default>" then ok = VRSet("SW_USERS", "Font", VRGet("CN_USERS", "Font")) … … 1343 1397 return 1344 1398 1399 /*:VRX _UserCredUpdate 1400 */ 1401 _UserCredUpdate: 1402 if options.!debug == 1 then say time()' _UserCredUpdate started' 1403 credentials.!username = VRGet("EF_USER1","Value") 1404 credentials.!password = VRGet("EF_PASSWORD1","Value") 1405 1406 if pos("4OS2", value("COMSPEC",,"OS2ENVIRONMENT")) = 1 | pos(left(credentials.!password,1),'01234567890') > 0 1407 then UserCred = '--user='Credentials.!username'%%'Credentials.!password 1408 else UserCred = '--user='Credentials.!username'%'Credentials.!password 1409 1410 if options.!storecreds = 1 & \(UserCred = 'USERCRED' | UserCred = '' | UserCred = '--user=%' | UserCred = '--user=%%' | UserCred = '-N') then do 1411 ok = _ucSetUc() 1412 /* ok = VRSet("Pict_PWINMEM","PicturePath","#36") */ 1413 if options.!debug == 1 then call beep 2400, 10 1414 end 1415 else do 1416 if options.!debug == 1 then call beep 200, 20 1417 /* ok = VRSet("Pict_PWINMEM","PicturePath","#37") */ 1418 end 1419 if options.!debug == 1 then say time()' _UserCredUpdate done' 1420 return 1345 1421 /*:VRX About_Close 1346 1422 */ … … 1543 1619 return 1544 1620 1545 /*:VRX CN_ smbtree_Click1546 */ 1547 CN_ smbtree_Click:1621 /*:VRX CN_SMBTREE_Click 1622 */ 1623 CN_SMBTREE_Click: 1548 1624 rh = VRInfo('Record') 1549 1625 if VRMethod( 'CN_SMBTREE', "ValidateRecord", rh) <> 1 then return 1550 userdata = VRMethod('CN_ smbtree', 'GetRecordAttr', rh, 'UserData')1626 userdata = VRMethod('CN_SMBTREE', 'GetRecordAttr', rh, 'UserData') 1551 1627 parse var userdata . '|' userdata 1552 1628 ok = VRset("Main","StatusText", userdata) … … 1555 1631 return 1556 1632 1557 /*:VRX CN_smbtree_ContextMenu 1558 */ 1559 CN_smbtree_ContextMenu: 1560 if VRInfo("Top") < 400 & VRGet("CN_smbtree", "View") = "Detail" then call _ColumnsMenu "CN_smbtree" 1633 /*:VRX CN_SMBTREE_ContextMenu 1634 */ 1635 CN_SMBTREE_ContextMenu: 1636 if options.!debug == 1 then say time()' CN_SMBTREE_ContextMenu started' 1637 if VRInfo("Top") < 400 & VRGet("CN_SMBTREE", "View") = "Detail" then call _ColumnsMenu "CN_SMBTREE" 1561 1638 else do 1639 call _dropdeprecated 1562 1640 RH = VRInfo("Record") 1563 1641 if RH <> "" then do 1564 CurMachine = word(VRMethod( "CN_smbtree", "GetRecordAttr", RH, "Caption" ),1) 1642 call _GetSmbObjectProperties RH 1643 call _ContextMenuSelectedSet 1644 1645 BrowsePath = _browsebuildpath(SMBObj.rh) 1646 1647 /* call _BrowseResetObject(SmbObj.rh) */ 1648 1649 parse var browsepath '\\'machine'\'sharename '\' browsepath 1650 1651 CurMachine = SMBObj.Resname 1565 1652 ok = VRMethod( "Contextmenu_Tree", "Popup", , , "", "PositionOnItem" ) 1566 1653 end 1567 end 1568 return 1569 1654 else do 1655 call _ContextMenuSelectedSet 1656 end 1657 end 1658 if options.!debug == 1 then say time()' CN_SMBTREE_ContextMenu done' 1659 return 1660 1661 /*:VRX CN_SMBTREE_DoubleClick 1662 */ 1663 CN_SMBTREE_DoubleClick: 1664 if options.!debug == 1 then say time()' CN_SMBTREE_DoubleClick started' 1665 1666 call _dropdeprecated 1667 call _GetSmbObjectProperties VRInfo('Record') 1668 1669 /* if options.!debug == 1 then say time()' CN_SMBTREE_DoubleClick done' 1670 return */ 1671 /* Enable last 2 lines for 2.0.x (to disable on the fly browsing) */ 1672 1673 if options.!debug == 1 then say ' Browsing "'SMBObj.udatatype'"' 1674 1675 If SMBObj.udatatype = "DIRECTORY" then do 1676 BrowsePath = _browsebuildpath(SMBObj.rh) 1677 1678 call _BrowseResetObject(SmbObj.rh) 1679 1680 parse var browsepath '\\'machine'\'sharename '\' browsepath 1681 browsepath = browsepath'\*' 1682 1683 call _BrowseDirectory 1684 end 1685 1686 If SMBObj.udatatype = "FILE" then do 1687 BrowsePath = _browsebuildpath(SMBObj.rh) 1688 call _BrowseResetObject(SmbObj.rh) 1689 1690 parse var browsepath '\\'machine'\'sharename '\' browsepath 1691 1692 OpenOk = _browseobjectopen(machine,sharename,browsepath) 1693 1694 if \OpenOK then do 1695 say " Not connected - trying to connect" 1696 ok = VRMethod( "CN_SMBTREE", "SetRecordAttr", sharerh, "Selected", 1) 1697 call PB_SMBTREE_CONNECT_Click 1698 ok = VRMethod( "CN_SMBTREE", "SetRecordAttr", SMBObj.rh, "Selected", 1) 1699 1700 OpenOk = _browseobjectopen(machine,sharename,browsepath) 1701 1702 if \OpenOk then do 1703 say " Not connected - cannot open - aborting!" 1704 end 1705 end 1706 end 1707 1708 if SMBObj.udatatype = "DISK" then do 1709 machine = VRMethod("CN_SMBTREE","GetRecordAttr",SMBObj.parentrh,"Caption") 1710 parse var machine machine '0D0A'x . 1711 machine = strip(machine) 1712 1713 call _BrowseResetObject(SmbObj.rh) 1714 1715 sharename = SMBObj.resname 1716 BrowsePath = "" 1717 1718 call _BrowseDirectory 1719 end 1720 if options.!debug == 1 then say time()' CN_SMBTREE_DoubleClick done' 1721 return 1570 1722 /*:VRX CN_Users_ContextMenu 1571 1723 */ … … 1782 1934 return 1783 1935 1936 /*:VRX ContextMenu_Tree_ACLS_Click 1937 */ 1938 ContextMenu_Tree_ACLS_Click: 1939 if options.!debug == 1 then say ' List ACLS for "'SMBObj.udatatype'"' 1940 window = VRLoadSecondary( "SW_ACLS", "W" ) 1941 return 1942 1784 1943 /*:VRX ContextMenu_Tree_Details_Click 1785 1944 */ 1786 1945 ContextMenu_Tree_Details_Click: 1787 ok = VRset("CN_ smbtree","View","Detail")1946 ok = VRset("CN_SMBTREE","View","Detail") 1788 1947 ok = VRset("ContextMenu_Tree_Tree","Enabled",1) 1789 1948 ok = VRset("ContextMenu_Tree_Details","Enabled",0) … … 1797 1956 */ 1798 1957 ContextMenu_Tree_Icons_Click: 1799 ok = VRset("CN_ smbtree","View","Icon")1958 ok = VRset("CN_SMBTREE","View","Icon") 1800 1959 ok = VRset("ContextMenu_Tree_Icons","Enabled",0) 1801 1960 ok = VRset("ContextMenu_Tree_Tree","Enabled",1) … … 1806 1965 return 1807 1966 1967 /*:VRX ContextMenu_Tree_LOGIN_Click 1968 */ 1969 ContextMenu_Tree_LOGIN_Click: 1970 window = VRLoadSecondary( "SW_LOGIN", "W" ) 1971 1972 /* call _UserCredUpdate */ 1973 1974 return 1975 1808 1976 /*:VRX ContextMenu_Tree_MiniIcons_Click 1809 1977 */ … … 1831 1999 */ 1832 2000 ContextMenu_Tree_Tree_Click: 1833 ok = VRset("CN_ smbtree","View","IconTree")2001 ok = VRset("CN_SMBTREE","View","IconTree") 1834 2002 ok = VRset("ContextMenu_Tree_Tree","Enabled",0) 1835 2003 ok = VRset("ContextMenu_Tree_Details","Enabled",1) … … 2007 2175 2008 2176 ok = VRSet("PB_Refresh","left",pbtn_pos + pbtn_dist * (pbtn_nr - 5)) 2009 ok = VRSet("PB_ Help","left",pbtn_pos + pbtn_dist * (pbtn_nr - 4))2010 ok = VRSet("PB_ About","left",pbtn_pos + pbtn_dist * (pbtn_nr - 3))2011 ok = VRSet("PB_A pply", "left",pbtn_pos + pbtn_dist * (pbtn_nr - 2))2177 ok = VRSet("PB_Apply", "left",pbtn_pos + pbtn_dist * (pbtn_nr - 4)) 2178 ok = VRSet("PB_Help", "left",pbtn_pos + pbtn_dist * (pbtn_nr - 3)) 2179 ok = VRSet("PB_About", "left",pbtn_pos + pbtn_dist * (pbtn_nr - 2)) 2012 2180 ok = VRSet("PB_Cancel", "left",pbtn_pos + pbtn_dist * (pbtn_nr - 1)) 2013 2181 … … 2186 2354 return 2187 2355 2356 /*:VRX PB_ACLS_OK_Click 2357 */ 2358 PB_ACLS_OK_Click: 2359 call SW_ACLS_close 2360 return 2361 2188 2362 /*:VRX PB_Apply_Click 2189 2363 */ … … 2206 2380 say 'DetectZombies = "'DetectZombies'"' 2207 2381 2382 options.!storecreds = VRGet("CB_STORECREDS","Set") 2383 say "options.!storecreds = "options.!storecreds 2384 2208 2385 if advanced.!smbconfchanged = 1 then do 2209 2386 log_level = VRGet("SPIN_log_level","Value") … … 2258 2435 PB_Help_Click: 2259 2436 ok = VRMethod("Main", "InvokeHelp" ) 2437 return 2438 2439 /*:VRX PB_LOGIN_CANCEL_Click 2440 */ 2441 PB_LOGIN_CANCEL_Click: 2442 credentials.!entered = 0 2443 call SW_LOGIN_Close 2444 return 2445 2446 /*:VRX PB_LOGIN_OK_Click 2447 */ 2448 PB_LOGIN_OK_Click: 2449 /* ok = VRSet("EF_USER","Value",VRGet("EF_USER1","Value")) 2450 ok = VRSet("EF_PASSWORD","Value",VRGet("EF_PASSWORD1","Value")) */ 2451 options.!storecreds = VRGet("CB_STORECREDS1","Set") 2452 credentials.!entered = 1 2453 p_server = SMBObj.resname 2454 if p_server <> "" then do 2455 ok = _rpcqueryuser(p_server, VRGet("EF_USER1","Value"), VRGet("EF_PASSWORD1","Value"), VRGet("EF_USER1","Value")) 2456 2457 if word(ok,1) = "1" then do 2458 call _StatusBarWrapper NLVGetMessage(107, rpc.queryuser.FULL_NAME) 2459 say 'rpc.queryuser.DIR_DRIVE = "'rpc.queryuser.DIR_DRIVE'"' 2460 say 'rpc.queryuser.LOGON_SCRIPT = "'rpc.queryuser.LOGON_SCRIPT'"' 2461 call _UserCredUpdate 2462 end 2463 else do 2464 call _StatusBarWrapper VRGet("EF_USER1","Value")" \\"p_server": "rpc.queryuser.LOGONSTATUS 2465 end 2466 end 2467 2468 call SW_LOGIN_Close 2260 2469 return 2261 2470 … … 2461 2670 return 2462 2671 2672 /*:VRX SW_ACLS_Close 2673 */ 2674 SW_ACLS_Close: 2675 call SW_ACLS_Fini 2676 return 2677 2678 /*:VRX SW_ACLS_Create 2679 */ 2680 SW_ACLS_Create: 2681 call SW_ACLS_Init 2682 2683 ok = VRSet("SW_ACLS","Caption",'ACLS \\'machine'\'sharename' "'browsepath'"') 2684 2685 ACL.typeFH = VRMethod( "CN_ACLS", "AddField", "String", "Type" ) 2686 ACL.valueFH = VRMethod( "CN_ACLS", "AddField", "String", "Value" ) 2687 2688 /* Make sure credentials are usable */ 2689 if UserCred = 'USERCRED' | UserCred = '' | UserCred = '--user=%' then UserCred = '-N' 2690 2691 /* We have to remove the double % for smbclient.exe - not entirely clear why */ 2692 OldUserCred = "" 2693 if pos('%%',UserCred) > 0 & pos("4OS2", value("COMSPEC",,"OS2ENVIRONMENT")) = 0 then do 2694 OldUserCred = UserCred 2695 parse var UserCred '--user='username'%%'password 2696 UserCred = '--user='username'%'password 2697 say " Strip double %%!!!" 2698 end 2699 2700 say ' 'samba.!smbcaclsexe' \\'machine'\'sharename' "'browsepath'" 'UserCred 2701 address cmd samba.!smbcaclsexe' \\'machine'\'sharename' "'browsepath'" 'UserCred' 'debuglevel' 2>'samba.!error' 1>'samba.!msg 2702 2703 ok = file2stem(samba.!error,"aclserror.","DEL") 2704 2705 if aclserror.0 = 0 then do 2706 call _StatusBarWrapper "NT_STATUS_OK" 2707 2708 ok = file2stem(samba.!msg,"aclsmsg.","DEL") 2709 do I = 1 to aclsmsg.0 2710 parse var aclsmsg.I aclstype':'aclsvalue 2711 DummyRH = VRMethod('CN_ACLS', 'AddRecord') 2712 ok = VRMethod("CN_ACLS", "SetFieldData", DummyRH, ACL.typeFH, aclstype, ACL.valueFH, aclsvalue) 2713 end 2714 end 2715 else do 2716 call _StatusBarWrapper aclserror.1 2717 call SW_ACLS_close 2718 end 2719 return 2720 /*:VRX SW_ACLS_Fini 2721 */ 2722 SW_ACLS_Fini: 2723 window = VRInfo( "Window" ) 2724 call VRDestroy window 2725 drop window 2726 return 2727 /*:VRX SW_ACLS_Init 2728 */ 2729 SW_ACLS_Init: 2730 window = VRInfo( "Object" ) 2731 if( \VRIsChildOf( window, "Notebook" ) ) then do 2732 call VRMethod window, "CenterWindow" 2733 call VRSet window, "Visible", 1 2734 call VRMethod window, "Activate" 2735 end 2736 drop window 2737 return 2738 2463 2739 /*:VRX SW_CHKTDB_Close 2464 2740 */ … … 2547 2823 window = VRInfo( "Object" ) 2548 2824 if( \VRIsChildOf( window, "TDL" ) ) then do 2825 call VRMethod window, "CenterWindow" 2826 call VRSet window, "Visible", 1 2827 call VRMethod window, "Activate" 2828 end 2829 drop window 2830 return 2831 2832 /*:VRX SW_LOGIN_Close 2833 */ 2834 SW_LOGIN_Close: 2835 call SW_LOGIN_Fini 2836 return 2837 2838 /*:VRX SW_LOGIN_Create 2839 */ 2840 SW_LOGIN_Create: 2841 call SW_LOGIN_Init 2842 /* ok = VRSet("SW_LOGIN","Caption",NLVGetMessage(136)' 'strip(p_workgroup' \\'p_server'\'p_share,'T','\')) 2843 CALL NLVSetText 'DT_USER1', "Caption", 25 2844 CALL NLVSetText 'DT_PASSWORD1', "Caption", 26 2845 CALL NLVSetText 'CB_STORECREDS1', "Caption", 135 2846 CALL NLVSetText 'PB_LOGIN_OK', "Caption", 2 2847 CALL NLVSetText 'PB_LOGIN_CANCEL',"Caption", 3 */ 2848 2849 if VRIsValidObject(SMBObj.rh) then do 2850 select 2851 when pos("PDC",VRMethod("CN_smbtree", "GetFieldData", SMBObj.rh, MBFH)) > 0 then LoginIcon = "#63:PMWP.DLL" /* icons.!pdc */ 2852 when SMBObj.udatatype = "WORKGROUP" then LoginIcon = SMBObj.Icon 2853 when SMBObj.udatatype = "SERVER" then LoginIcon = SMBObj.Icon 2854 when SMBObj.udatatype = "DISK" then do 2855 if pos("PDC",VRMethod("CN_smbtree", "GetFieldData", SMBObj.parentrh, MBFH)) > 0 2856 then LoginIcon = "#63:PMWP.DLL" /* icons.!pdc */ 2857 else LoginIcon = "#35:PMWP.DLL" /* icons.!pdc */ 2858 end 2859 otherwise LoginIcon = "#35:PMWP.DLL" /* icons.!machine_awake */ 2860 end 2861 say loginicon 2862 ok = VRSet("Pict_Login","PicturePath", LoginIcon) 2863 end 2864 /* ok = VRSet("EF_USER1","Value",VRGet("EF_USER","Value")) 2865 ok = VRSet("EF_PASSWORD1","Value",VRGet("EF_PASSWORD","Value")) */ 2866 say options.!storecreds 2867 ok = VRSet("CB_STORECREDS1","Set",options.!storecreds) 2868 return 2869 2870 /*:VRX SW_LOGIN_Fini 2871 */ 2872 SW_LOGIN_Fini: 2873 window = VRInfo( "Window" ) 2874 call VRDestroy window 2875 drop window 2876 return 2877 /*:VRX SW_LOGIN_Init 2878 */ 2879 SW_LOGIN_Init: 2880 window = VRInfo( "Object" ) 2881 if( \VRIsChildOf( window, "Notebook" ) ) then do 2549 2882 call VRMethod window, "CenterWindow" 2550 2883 call VRSet window, "Visible", 1 … … 2771 3104 when page = 2 then do /* smbtree */ 2772 3105 ok = VRSet("Main","WindowIcon","$1") 2773 ok = VRMethod( "CN_SMBT ree", "GetRecordList", "All", "handle." )3106 ok = VRMethod( "CN_SMBTREE", "GetRecordList", "All", "handle." ) 2774 3107 /* if the page is empty, populate it */ 2775 3108 if handle.0 = 0 then call PB_Refresh_Click … … 2824 3157 otherwise say "RefreshMode = "RefreshMode 2825 3158 end 3159 return 3160 3161 /*:VRX TM_STATUSBAR_Trigger 3162 */ 3163 TM_STATUSBAR_Trigger: 3164 call _StatusBarReset 2826 3165 return 2827 3166
Note:
See TracChangeset
for help on using the changeset viewer.