Ignore:
Timestamp:
Nov 15, 2009, 7:02:45 PM (16 years ago)
Author:
Herwig Bauernfeind
Message:

GUI-Tools: EVFSGUI Version 2.0 beta5 level code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/guitools-2.0/shared/smbtree.vrs

    r346 r347  
    136136                end
    137137            end
     138            when smbtreeline.sl = "" then nop
    138139            otherwise do
    139                 say "Workgroup: "smbtreeline.sl
     140                say 'Workgroup: "'smbtreeline.sl'"'
    140141                if pos("RECEIVING",translate(smbtreeline.sl)) > 0 then do
    141142                    Msg.Type = "W"
     
    207208        stat = stream(smbmachine.I,'c','open read')
    208209        if stat = "READY:" then do /* we found a readable output file */
    209             Machine = VRParseFilename(smbmachine.I,'E')
     210            /* Machine = VRParseFilename(smbmachine.I,'E') */
     211            Machine = substr(smbmachine.I,pos('.',smbmachine.I)+1)
     212
    210213            smbtree.!machine = _GetMachinehandle(Machine)
    211214            say '  Machine (handle) = "'machine'" ('smbtree.!machine')'
     
    272275            end
    273276
     277            do until left(line,10) = '09'x||'Workgroup'
     278                line = linein(smbmachine.I)
     279            end
     280            line = linein(smbmachine.I)
     281            /* Reading workgroup and master - eventually both empty */
     282            line = linein(smbmachine.I)
     283            parse var line '09'x workgroup master
     284            master = strip(master)
     285
     286            /* we use this to set the workgroup for manually added servers */
     287            if workgroup <> "" then do
     288                wgh = _GetMachinehandle(workgroup)
     289                if wgh = "" then do /* This machine is in a new workgroup - add it as well */
     290                    wgh = VRMethod( "CN_smbtree", "AddRecord",,, workgroup,"#62:PMWP.DLL")
     291                    ok = VRMethod( "CN_smbtree", "SetFieldData", wgh, WorkGroupFH, workgroup)
     292                    ok = VRMethod( "CN_smbtree", "SetRecordAttr", wgh, "Collapsed", 0)
     293                    ok = VRMethod( "CN_smbtree", "SetRecordAttr", wgh, "ReadOnly", 1)
     294                    ok = VRMethod( "CN_smbtree", 'SetRecordAttr', wgh, "UserData", "WORKGROUP|")
     295                end
     296                if wgh <> "" then ok = VRMethod('CN_smbtree', 'SetRecordAttr', smbtree.!machine, 'Parent', wgh)
     297            end
     298
    274299            say "_AddSharesDisplay() success and cleanup"
    275300            ok = stream(smbmachine.I,'c','close')
     
    279304        else say '  Got "'stat'" for "'smbmachine.I'"'
    280305    end
    281     say "_AddSharesDisplay() loop finished"
     306    say "_AddSharesDisplay() loop end"
    282307return
    283308
     
    285310*/
    286311
    287 _GetMachinehandle: procedure
     312_GetMachinehandle: procedure /* get recordhandle by machine name (also works for workgroups) */
    288313    Machine = translate(arg(1))
    289314
Note: See TracChangeset for help on using the changeset viewer.