Changeset 675 for trunk/guitools/evfsgui


Ignore:
Timestamp:
Jan 1, 2012, 4:47:09 PM (14 years ago)
Author:
Herwig Bauernfeind
Message:

GUI-Tools: EVFSGUI 2.5.x: Several fixes and additions (including fix for Ticket #185)

Location:
trunk/guitools/evfsgui
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/guitools/evfsgui/changes

    r665 r675  
    1515  to work properly
    1616 
    17 Version 2.5.x 2011-??-??
     17Version 2.5.x 2012-??-??
     18+ Added: -timesync switch, allows time sync using commandline
     19+ Added: Support time synchronisation (requires new net.exe)
    1820+ Added: Error handler for missing REXX DLLs
    1921+ Added: Identify user using RPC library
     
    3941           convert global settings and advanced connection options
    4042           from windows into notebook pages
     43! Fixed: Ticket #185 (create %ETC%/samba/pid and fix the EA of
     44         %ETC%/samba/lock)
     45! Fixed: Context menu in connection details view could show wrong menu items           
    4146! Fixed: Do not add a *-"server" to the networkneighbourhood if a workgroup
    4247         was mounted.
     
    4853! Fixed: "Creating lame upcase tables" filtered
    4954! Fixed: Do not run nmblookup.exe twice in the foreground
     55! Fixed: Errorhandler for parsing errors in RPC library (still not perfect)
    5056- Removed: Bottom button row
    5157- Removed: View Menu
  • trunk/guitools/evfsgui/evfsgui.vrp

    r665 r675  
    1515UserFile: 1
    1616UserWindow: Main,1
    17 UserWindow: SW_LOGIN,1
     17UserWindow: SW_SMBTREE,1
     18UserWindow: SW_DIALOG,1
  • trunk/guitools/evfsgui/evfsgui.vrx

    r665 r675  
    443443*/
    444444_ContextMenuSelectedSet:
     445    /* Fixme: This routine only works for CN_SMBTREE right now */
     446
    445447    /* Hide all context menu entries */
    446448    ok = VRSet("Menu_Selected_Remove",           "Visible", 0) /* CN_CONDET */
     
    449451    ok = VRSet("Menu_Selected_Sep1",             "Visible", 0) /* CN_SMBTREE */
    450452    ok = VRSet("Menu_Selected_Info",             "Visible", 0) /* CN_SMBTREE */
     453    ok = VRSet("Menu_Selected_TimeSync",         "Visible", 0) /* CN_SMBTREE */
    451454    ok = VRSet("Menu_Selected_Refresh",          "Visible", 0) /* CN_SMBTREE */
    452455    ok = VRSet("Menu_Selected_Default_Workgroup","Visible", 0) /* CN_SMBTREE */
    453456
    454457
    455 ok = VRSet("Menu_Selected_TreeView","Visible",1)
    456 ok = VRSet("Menu_Selected_DetailsView","Visible",1)
     458/*  ok = VRSet("Menu_Selected_TreeView","Visible",1)
     459    ok = VRSet("Menu_Selected_DetailsView","Visible",1)
     460 */
    457461    select
    458462        when SMBObj.udatatype = "DISK" then do
     
    463467            ok = VRSet("Menu_Selected_Sep1",             "Visible", 1)
    464468            ok = VRSet("Menu_Selected_Info",             "Visible", 1)
     469            ok = VRSet("Menu_Selected_TimeSync",         "Visible", 1)
    465470            ok = VRSet("Menu_Selected_Refresh",          "Visible", 1)
    466471        end
     
    718723    CALL NLVSetText 'Menu_Selected_Retry',            "Caption", 90
    719724    CALL NLVSetText 'Menu_Selected_Info',             "Caption", 92
     725    CALL NLVSetText 'Menu_Selected_TimeSync',         "Caption", 129
    720726    CALL NLVSetText 'Menu_Selected_Refresh',          "Caption", 38
    721727    CALL NLVSetText 'Menu_Selected_Default_Workgroup',"Caption", 75
     
    11461152        IF options.!debug == 1 THEN SAY "  -NOGUI switch detected"
    11471153        CmdLine = delWord(CmdLine,wordpos('-NOGUI',upCmdLine),1)
     1154        upCmdLine = translate(CmdLine)
     1155    end
     1156
     1157    if wordpos('-TIMESYNC',upCmdLine) > 0 then do
     1158        options.!timesync = 1
     1159        IF options.!debug == 1 THEN SAY "  -TIMESYNC switch detected"
     1160        dwpos = wordpos('-TIMESYNC',upCmdLine)
     1161        if dwpos = words(upCmdLine) then do /* TIMESYNC was last parm - assume automatic */
     1162            options.!timesrv = ""
     1163            CmdLine = delWord(CmdLine,wordpos('-TIMESYNC',upCmdLine),1)
     1164        end
     1165        else do
     1166            options.!timesrv = word(upCmdLine,dwpos+1)
     1167            if left(options.!timesrv,1) = "-" then do /* other parameter detected */
     1168                options.!timesrv = ""
     1169                CmdLine = delWord(CmdLine,wordpos('-TIMESYNC',upCmdLine),1)
     1170            end
     1171            else do /* seems we have a timeserver - IP or name - no further check */
     1172                CmdLine = delWord(CmdLine,wordpos('-TIMESYNC',upCmdLine),2)
     1173            end
     1174        end
    11481175        upCmdLine = translate(CmdLine)
    11491176    end
     
    14111438    options.!delay      = 0
    14121439    options.!storecreds = 0
     1440    options.!timesync   = 0
     1441    options.!timesrv    = ''
    14131442
    14141443    IF options.!debug == 1 THEN SAY '  initializing vfs. '
     
    14871516_TabbedDialogSetup:
    14881517    IF options.!debug == 1 THEN SAY time()' _TabbedDialogSetup started'
     1518
    14891519    w = VRLoad( "TDL_1", VRWindowPath(), "SW_DIALOG" )
    14901520    ok = VRMethod( "TDL_1", "InsertPage", w,"+ "NLVGetMessage(13)" ")
     
    14931523    ok = VRMethod( "TDL_1", "InsertPage", w,"- "NLVGetMessage(40)" ")
    14941524    ok = VRMethod( "TDL_1", "SetStatusText", 2, NLVGetMessage(132,"2","2"))
     1525
    14951526    w = VRLoad( "TDL_1", VRWindowPath(), "SW_SMBTREE" )
    14961527    ok = VRMethod( "TDL_1", "InsertPage", w,"+ "NLVGetMessage(39)" ")
     1528
    14971529    w = VRLoad( "TDL_1", VRWindowPath(), "SW_CONDET" )
    14981530    ok = VRMethod( "TDL_1", "InsertPage", w,"+ "NLVGetMessage(63)" ")
     
    15171549    ok = VRMethod( "TDL_1", "SetTabText", 4, strip(VRMethod( "TDL_1", "GetTabText", 4)))
    15181550    ok = VRMethod( "TDL_1", "SetTabText", 5, strip(VRMethod( "TDL_1", "GetTabText", 5)))
     1551return
     1552
     1553/*:VRX         _TimeSync
     1554*/
     1555_TimeSync:
     1556    IF options.!debug == 1 THEN SAY time()' _TimeSync started, "'options.!timesrv'"'
     1557    if options.!timesrv <> '' then do
     1558        say     '  'samba.!netexe' time set -S 'options.!timesrv
     1559        address cmd samba.!netexe' time set -S 'options.!timesrv
     1560    end
     1561    else do
     1562        say     '  'samba.!netexe' time set'
     1563        address cmd samba.!netexe' time set'
     1564    end
     1565    options.!timesync = ''
     1566    IF options.!debug == 1 THEN SAY time()' _TimeSync done'
    15191567return
    15201568
     
    16211669    if VRMethod( "CN_CONDET", "ValidateRecord", rh) <> 1 then return
    16221670
     1671    /* Hide all context menu entries */
     1672    ok = VRSet("Menu_Selected_Remove",           "Visible", 0) /* CN_CONDET */
     1673    ok = VRSet("Menu_Selected_Retry",            "Visible", 0) /* CN_CONDET */
     1674    ok = VRSet("Menu_Selected_Connect",          "Visible", 0) /* CN_SMBTREE */
     1675    ok = VRSet("Menu_Selected_Sep1",             "Visible", 0) /* CN_SMBTREE */
     1676    ok = VRSet("Menu_Selected_Info",             "Visible", 0) /* CN_SMBTREE */
     1677    ok = VRSet("Menu_Selected_TimeSync",         "Visible", 0) /* CN_SMBTREE */
     1678    ok = VRSet("Menu_Selected_Refresh",          "Visible", 0) /* CN_SMBTREE */
     1679    ok = VRSet("Menu_Selected_Default_Workgroup","Visible", 0) /* CN_SMBTREE */
     1680
    16231681    /* This is the place to enable specific context menu entries */
    16241682    ok = VRMethod( "CN_CONDET", "GetRecordList", "All", "records." )
     
    25242582    if advanced.!savepassive == 1 then CALL _PassiveLoad
    25252583
     2584    IF options.!timesync == 1 THEN CALL _TimeSync
     2585
    25262586    IF options.!autoload == 1 THEN CALL Menu_File_Load_Click
    25272587
     
    32713331        if VRMethod("CN_CONDET", "GetRecordAttr", srcRec, "Icon") = icons.!passive then ok = VRMethod( "CN_CONDET", "RemoveRecord", srcRec)
    32723332    end
     3333return
     3334
     3335/*:VRX         Menu_Selected_TimeSync_Click
     3336*/
     3337Menu_Selected_TimeSync_Click:
     3338    IF options.!debug == 1 THEN SAY time()' Menu_Selected_TimeSync_Click started'
     3339
     3340    ok = VRMethod( "CN_SMBTREE", "GetRecordList", "SourceOrSelected", "SelRH." )
     3341    if SelRH.0 = 0 then do
     3342        IF options.!debug == 1 THEN SAY time()' Menu_Selected_TimeSync_Click aborted'
     3343        return
     3344    end
     3345
     3346    call _GetSMBObjectProperties SelRH.1
     3347
     3348    options.!timesrv = SMBObj.resname
     3349    call _TimeSync
     3350
     3351    IF options.!debug == 1 THEN SAY time()' Menu_Selected_TimeSync_Click done'
    32733352return
    32743353
     
    34023481            CALL _Dynamic "ok = "fs.!prefix"RxDeleteMountPoint('"vfs.!mountpoint"')"
    34033482            IF options.!debug == 1 THEN SAY time()' '||'Remove "'vfs.!mountpoint'" = 'ok
     3483        end
     3484    end
     3485    else do
     3486        if options.!storecreds = 1 then do
     3487            ok = VRSet("EF_User",    "Value",options.!user)
     3488            ok = VRSet("EF_Password","Value",x2c(options.!spassword))
    34043489        end
    34053490    end
     
    44864571    end
    44874572
    4488     ok = _rpcsrvinfo(SMBObj.resname,credentials.!username,credentials.!password)
     4573    rpc_success = _rpcsrvinfo(SMBObj.resname,credentials.!username,credentials.!password)
    44894574
    44904575    Info.!nbname       = VRMethod( "CN_INFO", "AddRecord")
     
    44924577    Info.!domain       = VRMethod( "CN_INFO", "AddRecord")
    44934578    Info.!DMBLMB       = VRMethod( "CN_INFO", "AddRecord")
    4494     Info.!capabilities = VRMethod( "CN_INFO", "AddRecord")
     4579    if rpc_success = 1 then Info.!capabilities = VRMethod( "CN_INFO", "AddRecord")
    44954580    Info.!os           = VRMethod( "CN_INFO", "AddRecord")
    44964581    Info.!server       = VRMethod( "CN_INFO", "AddRecord")
    4497     Info.!version      = VRMethod( "CN_INFO", "AddRecord")
     4582    if rpc_success = 1 then Info.!version      = VRMethod( "CN_INFO", "AddRecord")
    44984583    Info.!status       = VRMethod( "CN_INFO", "AddRecord")
    44994584    Info.!IP           = VRMethod( "CN_INFO", "AddRecord")
    45004585    Info.!MAC          = VRMethod( "CN_INFO", "AddRecord")
    45014586
    4502     ok = VRMethod( "CN_INFO", "SetFieldData", Info.!nbname, Info.TypeFH, strip(NLVGetMessage(137),'T',':'),Info.ValueFH, rpc.srvinfo.NETBIOSNAME)
    4503     ok = VRMethod( "CN_INFO", "SetFieldData", Info.!comment,Info.TypeFH, strip(NLVGetMessage(125),'T',':'),Info.ValueFH, rpc.srvinfo.SERVERSTRING)
     4587    if rpc_success = 1 then do
     4588        ok = VRMethod( "CN_INFO", "SetFieldData", Info.!nbname, Info.TypeFH, strip(NLVGetMessage(137),'T',':'),Info.ValueFH, rpc.srvinfo.NETBIOSNAME)
     4589        ok = VRMethod( "CN_INFO", "SetFieldData", Info.!comment,Info.TypeFH, strip(NLVGetMessage(125),'T',':'),Info.ValueFH, rpc.srvinfo.SERVERSTRING)
     4590        ok = VRMethod( "CN_INFO", "SetFieldData", Info.!capabilities, Info.TypeFH, strip(NLVGetMessage(138),'T',':'),Info.ValueFH, rpc.srvinfo.CAPABILITIES)
     4591        ok = VRMethod( "CN_INFO", "SetFieldData", Info.!version,Info.TypeFH, strip(NLVGetMessage(139),'T',':'),Info.ValueFH, rpc.srvinfo.OS_VERSION)
     4592        ok = VRMethod( "CN_INFO", "SetFieldData", Info.!status, Info.TypeFH, strip(NLVGetMessage(67),'T',':'),Info.ValueFH, rpc.srvinfo.LOGONSTATUS )
     4593    end
     4594    else do
     4595        ok = VRMethod( "CN_INFO", "SetFieldData", Info.!nbname, Info.TypeFH, strip(NLVGetMessage(137),'T',':'),Info.ValueFH, SMBObj.resname)
     4596        ok = VRMethod( "CN_INFO", "SetFieldData", Info.!comment,Info.TypeFH, strip(NLVGetMessage(125),'T',':'),Info.ValueFH, SMBObj.comment)
     4597        ok = VRMethod( "CN_INFO", "SetFieldData", Info.!status, Info.TypeFH, strip(NLVGetMessage(67),'T',':'), Info.ValueFH, SMBObj.udatamsg)
     4598    end
     4599
    45044600    ok = VRMethod( "CN_INFO", "SetFieldData", Info.!domain, Info.TypeFH, strip(NLVGetMessage(21), 'T',':'),Info.ValueFH, VRMethod("CN_SMBTREE", "GetFieldData", SMBObj.RH, WorkGroupFH ))
    45054601    ok = VRMethod( "CN_INFO", "SetFieldData", Info.!os,     Info.TypeFH, strip(NLVGetMessage(93), 'T',':'),Info.ValueFH, VRMethod("CN_SMBTREE", "GetFieldData", SMBObj.RH, OSFH  ))
    45064602    ok = VRMethod( "CN_INFO", "SetFieldData", Info.!server, Info.TypeFH, strip(NLVGetMessage(19), 'T',':'),Info.ValueFH, VRMethod("CN_SMBTREE", "GetFieldData", SMBObj.RH, VersionFH  ))
    4507     ok = VRMethod( "CN_INFO", "SetFieldData", Info.!version,Info.TypeFH, strip(NLVGetMessage(139),'T',':'),Info.ValueFH, rpc.srvinfo.OS_VERSION)
    4508     ok = VRMethod( "CN_INFO", "SetFieldData", Info.!capabilities, Info.TypeFH, strip(NLVGetMessage(138),'T',':'),Info.ValueFH, rpc.srvinfo.CAPABILITIES)
    45094603    ok = VRMethod( "CN_INFO", "SetFieldData", Info.!DMBLMB, Info.TypeFH, strip(NLVGetMessage(124),'T',':'),Info.ValueFH, VRMethod("CN_SMBTREE", "GetFieldData", SMBObj.RH, MBFH  ))
    45104604    ok = VRMethod( "CN_INFO", "SetFieldData", Info.!IP,     Info.TypeFH, "IP"  ,Info.ValueFH, VRMethod("CN_SMBTREE", "GetFieldData", SMBObj.RH, IPFH  ))
    45114605    ok = VRMethod( "CN_INFO", "SetFieldData", Info.!MAC,    Info.TypeFH, "MAC" ,Info.ValueFH, VRMethod("CN_SMBTREE", "GetFieldData", SMBObj.RH, MacFH ))
    45124606
    4513     ok = VRMethod( "CN_INFO", "SetFieldData", Info.!status, Info.TypeFH, strip(NLVGetMessage(67),'T',':'),Info.ValueFH, rpc.srvinfo.LOGONSTATUS ) /* SMBObj.udatamsg */
    45144607    IF options.!debug == 1 THEN SAY time()' SW_INFO_Create done'   
    45154608return
  • trunk/guitools/evfsgui/rc/lang/evfsi_de.mkm

    r665 r675  
    137137EVG0127I: LMHosts zurcksetzen
    138138EVG0128I: Anmeldeinformationen l”schen
    139 EVG0129?:
     139EVG0129I: Zeit synchronisieren
    140140;More advanced properties
    141141EVG0130I: Zeitablauf Cache
  • trunk/guitools/evfsgui/rc/lang/evfsi_en.mkm

    r665 r675  
    137137EVG0127I: ~Reset LMHosts
    138138EVG0128I: Rese~t stored credentials
    139 EVG0129?:
     139EVG0129I: Synchronize time
    140140;More advanced properties
    141141EVG0130I: sec. cache timeout
  • trunk/guitools/evfsgui/rc/lang/evfsi_fr.mkm

    r665 r675  
    143143EVG0127I: R‚initialiser LMHosts
    144144EVG0128I: A~nnuler utilisateur et mot de passe
    145 EVG0129?:
     145EVG0129I: Synchroniser l'heure
    146146;More advanced properties
    147147EVG0130I: D‚lai du cache
  • trunk/guitools/evfsgui/rc/lang/evfsi_it.mkm

    r665 r675  
    141141EVG0127I: Cancellare LMHosts
    142142EVG0128I: ~Disfare credenziali di memorizzare
    143 EVG0129?:
     143EVG0129I: Sincrinozzare l'ora
    144144;More advanced properties
    145145EVG0130I: Cache timeout
Note: See TracChangeset for help on using the changeset viewer.