Changeset 639


Ignore:
Timestamp:
Sep 18, 2011, 6:51:02 PM (14 years ago)
Author:
Herwig Bauernfeind
Message:

GUI-Tools: EVFSGUI 2.5.x: More work done

Location:
trunk/guitools/evfsgui
Files:
7 edited

Legend:

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

    r638 r639  
    1010VRXWindow: __VREMainWindow,1,1482,915,891,8034
    1111VRXWindow: __VREFileListWindow,1,807,11033,1590,3358
    12 VRXWindow: __VRESectionListWindow,1,2674,10648,8696,4794
    13 VRXWindow: __VREToolsWindow,1,2529,723,6483,1659
    14 VRXWindow: __VREWindListWindow,1,542,8721,2951,3150
     12VRXWindow: __VRESectionListWindow,1,2674,10648,8696,4782
     13VRXWindow: __VREToolsWindow,1,2529,723,6486,1665
     14VRXWindow: __VREWindListWindow,1,542,8721,3770,3150
    1515UserFile: 1
    1616UserWindow: Main,1
     17UserWindow: SW_MOUNTPOINT,1
    1718UserWindow: SW_SMBTREE,1
    1819UserWindow: SW_CONDET,1
    19 UserWindow: SW_DIALOG,1
  • trunk/guitools/evfsgui/evfsgui.vrx

    r638 r639  
    278278*/
    279279_ContainersInit:
    280 
     280    IF options.!debug == 1 THEN SAY time()' _ContainersInit started'
    281281    /* Connection details */
    282282    CD.StatusFH    = VRMethod( "CN_CONDET", "AddField", "Icon", "Status" )
     
    324324    ok = VRMethod("CN_CONDET", "SetFieldAttr", cd.easupportFH ,   "Title", strip(NLVGetMessage(68),"T",":"))
    325325    ok = VRMethod("CN_CONDET", "SetFieldAttr", cd.rwfh ,          "Title", strip(NLVGetMessage(69),"T",":"))
     326    IF options.!debug == 1 THEN SAY time()' _ContainersInit done'
    326327return
    327328/*:VRX         _CreateSmbConf
     
    447448*/
    448449_GUIInit:
     450    IF options.!debug == 1 THEN SAY time()' _GUIInit started'
    449451    CALL VRSet 'Main', 'HelpFile', settings.!helpfile
    450452
     453    /* Main Window */
    451454    CALL NLVSetText 'Main',        "Caption", 1
    452     CALL NLVSetText 'DT_CURRENT',  "Caption", 10
    453     CALL NLVSetText 'PB_DETACH',   "Caption", 11
    454     CALL NLVSetText 'PB_UNMOUNT',  "Caption", 12
    455     CALL NLVSetText 'DT_DIALOG',   "Caption", 13
    456     CALL NLVSetText 'DT_MOUNT',    "Caption", 14
    457 
    458     CALL NLVSetText 'DT_SERVER',   "Caption", 19
    459     CALL NLVSetText 'DT_SHARE',    "Caption", 20
    460     CALL NLVSetText 'DT_NETWORK',  "Caption", 21
    461     CALL NLVSetText 'CHK_MTYPE',   "Caption", 23
    462     CALL NLVSetText 'PB_ADVANCED', "Caption", 24
    463     CALL NLVSetText 'DT_USER',     "Caption", 25
    464     CALL NLVSetText 'DT_PASSWORD', "Caption", 26
    465     CALL NLVSetText 'DT_MPOINT',   "Caption", 27
    466     CALL NLVSetText 'PB_MOUNT',    "Caption", 28
    467     CALL NLVSetText 'PB_EDITCANCEL',"Caption", 3
    468     CALL NLVSetText 'PB_DIALOGHELP',"Caption", 4
    469 
    470     CALL NLVSetText 'PB_AUTOSTART',"Caption", 35
    471     CALL NLVSetText 'PB_CLOSE',    "Caption", 29
    472     CALL NLVSetText 'PB_SAVE',     "Caption", 30
    473     CALL NLVSetText 'PB_LOAD',     "Caption", 31
    474     CALL NLVSetText 'PB_HELP',     "Caption", 4
    475     CALL NLVSetText 'PB_CONDET_HELP',"Caption", 4
    476     CALL NLVSetText 'PB_SMBTREE_HELP',"Caption", 4
    477 
    478     CALL NLVSetText 'MENU_CONTEXT_DETACH',        "Caption", 11
    479     CALL NLVSetText 'MENU_CONTEXT_DETACH_ALL',    "Caption", 120
    480     CALL NLVSetText 'MENU_CONTEXT_REFRESH',       "Caption", 38
    481     CALL NLVSetText 'MENU_CONTEXT_UNMOUNT',       "Caption", 12
    482     CALL NLVSetText 'MENU_CONTEXT_EDIT',          "Caption", 32
    483     CALL NLVSetText 'MENU_CONTEXT_OPEN',          "Caption", 94
    484     CALL NLVSetText 'MENU_CONTEXT_OPEN_ICON',     "Caption", 95
    485     CALL NLVSetText 'MENU_CONTEXT_OPEN_TREE',     "Caption", 96
    486     CALL NLVSetText 'MENU_CONTEXT_OPEN_DETAIL',   "Caption", 97
    487     CALL NLVSetText 'MENU_CONTEXT_OPEN_SETTINGS', "Caption", 98
    488     CALL NLVSetText 'MENU_CONTEXT_OPEN_SPLITVIEW',"Caption", 99
    489 
    490     CALL NLVSetText 'Menu_File',                  "Caption", 80
    491     CALL NLVSetText 'Menu_Context',               "Caption", 81
    492     CALL NLVSetText 'Menu_View',                  "Caption", 82
    493     CALL NLVSetText 'Menu_Selected',              "Caption", 83
    494     CALL NLVSetText 'Menu_Help',                  "Caption", 84
    495 
    496     CALL NLVSetText 'Menu_View_Dialog',   "Caption", 85
    497     CALL NLVSetText 'Menu_View_SmbTree',  "Caption", 86
    498     CALL NLVSetText 'Menu_View_Buttons',  "Caption", 87
    499     CALL NLVSetText 'Menu_View_ConDet',   "Caption", 88
    500     CALL NLVSetText 'Menu_View_MiniIcons',"Caption", 70
    501 
    502     CALL NLVSetText 'Menu_File_Autostart',           "Caption", 35
    503     CALL NLVSetText 'Menu_File_Autostart_Activate',  "Caption", 76
    504     CALL NLVSetText 'Menu_File_Autostart_Deactivate',"Caption", 77
    505     CALL NLVSetText 'Menu_File_CLOSE',               "Caption", 29
    506     CALL NLVSetText 'Menu_File_SAVE',                "Caption", 30
    507     CALL NLVSetText 'Menu_File_LOAD',                "Caption", 31
    508     CALL NLVSetText 'Menu_File_SETTINGS',            "Caption", 47
    509     CALL NLVSetText 'Menu_File_ADVANCED',            "Caption", 40
    510 
    511     CALL NLVSetText 'Menu_Selected_Connect', "Caption", 28
    512     CALL NLVSetText 'Menu_Selected_Remove',  "Caption", 12
    513     CALL NLVSetText 'Menu_Selected_Retry',   "Caption", 90
    514     CALL NLVSetText 'Menu_Selected_Info',    "Caption", 92
    515     CALL NLVSetText 'Menu_Selected_Default_Workgroup',"Caption",75
    516 
    517     CALL NLVSetText 'Menu_Help_Extended', "Caption", 4
    518     CALL NLVSetText 'Menu_Help_About', "Caption", 91
    519 
    520     CALL NLVSetText 'DT_SMBTREE',          "Caption", 39
    521     CALL NLVSetText 'PB_CONNECT',          "Caption", 28
    522     CALL NLVSetText 'PB_REFRESH',          "Caption", 38
    523 
    524     CALL NLVSetText 'DT_CONDET',          "Caption", 63
    525     CALL NLVSetText 'PB_CONDET_SAVE',     "Caption", 30
    526     CALL NLVSetText 'PB_CONDET_LOAD',     "Caption", 31
    527 
    528 
    529     mtype.0 = 4
    530     mtype.1 = NLVGetMessage( 15 )
    531     mtype.2 = NLVGetMessage( 16 )
    532     mtype.3 = NLVGetMessage( 17 )
    533     mtype.4 = NLVGetMessage( 18 )
     455
     456    CALL NLVSetText 'Menu_File',                      "Caption", 80
     457    CALL NLVSetText 'Menu_Context',                   "Caption", 81
     458    CALL NLVSetText 'Menu_Selected',                  "Caption", 83
     459    CALL NLVSetText 'Menu_Help',                      "Caption", 84
     460
     461    CALL NLVSetText 'Menu_File_LOAD',                 "Caption", 31
     462    CALL NLVSetText 'Menu_File_SAVE',                 "Caption", 30
     463    CALL NLVSetText 'Menu_File_Autostart',            "Caption", 35
     464    CALL NLVSetText 'Menu_File_Autostart_Activate',   "Caption", 76
     465    CALL NLVSetText 'Menu_File_Autostart_Deactivate', "Caption", 77
     466    CALL NLVSetText 'Menu_File_CLOSE',                "Caption", 29
     467
     468    CALL NLVSetText 'Menu_Context_DETACH',            "Caption", 11
     469    CALL NLVSetText 'Menu_Context_DETACH_ALL',        "Caption", 120
     470    CALL NLVSetText 'Menu_Context_REFRESH',           "Caption", 38
     471    CALL NLVSetText 'Menu_Context_UNMOUNT',           "Caption", 12
     472    CALL NLVSetText 'Menu_Context_EDIT',              "Caption", 32
     473    CALL NLVSetText 'Menu_Context_OPEN',              "Caption", 94
     474    CALL NLVSetText 'Menu_Context_OPEN_ICON',         "Caption", 95
     475    CALL NLVSetText 'Menu_Context_OPEN_TREE',         "Caption", 96
     476    CALL NLVSetText 'Menu_Context_OPEN_DETAIL',       "Caption", 97
     477    CALL NLVSetText 'Menu_Context_OPEN_SETTINGS',     "Caption", 98
     478    CALL NLVSetText 'Menu_Context_OPEN_SPLITVIEW',    "Caption", 99
     479
     480    CALL NLVSetText 'Menu_Selected_Connect',          "Caption", 28
     481    CALL NLVSetText 'Menu_Selected_Remove',           "Caption", 12
     482    CALL NLVSetText 'Menu_Selected_Retry',            "Caption", 90
     483    CALL NLVSetText 'Menu_Selected_Info',             "Caption", 92
     484    CALL NLVSetText 'Menu_Selected_Default_Workgroup',"Caption", 75
     485
     486    CALL NLVSetText 'Menu_Help_Extended',             "Caption", 4
     487    CALL NLVSetText 'Menu_Help_About',                "Caption", 91
     488
     489    /* Left pane */
     490    CALL NLVSetText 'DT_CURRENT',                     "Caption", 10
     491    CALL NLVSetText 'PB_DETACH',                      "Caption", 11
     492    CALL NLVSetText 'PB_UNMOUNT',                     "Caption", 12
     493
     494    /* Dialog window */
     495    CALL NLVSetText 'DT_MOUNT',                       "Caption", 14
     496    CALL NLVSetText 'DT_SERVER',                      "Caption", 19
     497    CALL NLVSetText 'DT_SHARE',                       "Caption", 20
     498    CALL NLVSetText 'DT_NETWORK',                     "Caption", 21
     499    CALL NLVSetText 'CHK_MTYPE',                      "Caption", 23
     500    CALL NLVSetText 'DT_USER',                        "Caption", 25
     501    CALL NLVSetText 'DT_PASSWORD',                    "Caption", 26
     502    CALL NLVSetText 'DT_MPOINT',                      "Caption", 27
     503    CALL NLVSetText 'PB_MOUNT',                       "Caption", 28
     504    CALL NLVSetText 'PB_EDIT_CANCEL',                 "Caption", 3
     505    CALL NLVSetText 'PB_DIALOG_HELP',                 "Caption", 4
     506
    534507    IF (mtype.1 \= '' & mtype.2 \= '' & mtype.3 \= '' & mtype.4 \= '') THEN DO
    535508        CALL VRMethod CB_MOUNT, 'Clear'
     
    537510    END
    538511
    539     ok = VRSet("Main","Width", 8200)
    540     ok = VRseT("Pict_Throbber","Width",  VRMethod( "Screen", "PixelsToTwips", 32 ))
    541     ok = VRseT("Pict_Throbber","Height", VRMethod( "Screen", "PixelsToTwips", 32 ))
    542 
    543     /* Setup SmbTree View */
    544     ok = VRset("GB_SMBTREE","Painting", 0)
     512    /* SMBTree */
     513    CALL NLVSetText 'PB_SMBTREE_CONNECT',             "Caption", 28
     514    CALL NLVSetText 'PB_SMBTREE_REFRESH',             "Caption", 38
     515    CALL NLVSetText 'PB_SMBTREE_HELP',                "Caption", 4
     516    ok = VRSet("Pict_Throbber","Width",  VRMethod( "Screen", "PixelsToTwips", 32 ))
     517    ok = VRSet("Pict_Throbber","Height", VRMethod( "Screen", "PixelsToTwips", 32 ))
     518
     519    /* Condet */
     520    CALL NLVSetText 'PB_CONDET_SAVE',     "Caption", 30
     521    CALL NLVSetText 'PB_CONDET_LOAD',     "Caption", 31
     522    CALL NLVSetText 'PB_CONDET_HELP',"Caption", 4
     523
     524    /* Statusbar */
     525    ok = VRSet("DT_STATUSBAR", "Caption", VRGet("Main", "HintText"))
    545526
    546527    /* Common margin around controls */
    547528    margin = ((VRGet("Main", "InteriorLeft") / 3) * 2) + 2
    548529
    549     ok = VRSet("DT_STATUSBAR", "Caption", VRGet("Main", "HintText"))
    550     call Main_Resize
     530    IF options.!debug == 1 THEN SAY time()' _GUIInit done'
     531return
     532
     533/*:VRX         _INILoad
     534*/
     535_INILoad:
     536    IF options.!debug == 1 THEN SAY time()' _INILoad started'
     537
     538    /* Locate the profile */
     539    os2_ini = VALUE('USER_INI',,'OS2ENVIRONMENT')
     540    inipath = VRParseFilePath( os2_ini, 'DP')
     541    IF inipath == '' THEN inipath = SysBootDrive() || '\OS2'
     542    settings.!ini = inipath'\evfsgui.ini'
     543    drop os2_ini inipath
     544    IF options.!debug == 1 THEN SAY '  EVFSGUI INIfile = "'settings.!ini'"'
     545
     546    settings.!network = ""
     547    /* Create default smb.conf if none exists */
     548    if \VRFileExists( samba.!smbconf ) then call _CreateSmbConf
     549
     550    IF STREAM( settings.!ini, 'C', 'QUERY EXISTS') == '' THEN DO
     551        /* First start */
     552        IF options.!debug == 1 THEN say "  First start!"
     553
     554        advanced.!browseauth = 0
     555        advanced.!browseimme = 1
     556        advanced.!broadcast  = 0
     557        advanced.!special    = 0
     558        advanced.!savepassive= 0
     559
     560        advanced.!miniicons  = 0
     561
     562        advanced.!easupport  = 1
     563        advanced.!readonly   = 0
     564        advanced.!alwaysmp   = 0
     565        advanced.!cachetimeout  = 10
     566        advanced.!cachelistings = 32
     567
     568        CALL VRSet "Main", 'Height', 7576
     569        CALL VRSet "Main", 'Width',  8200
     570        CALL VRSet "SPLIT_MAIN", 'Left',  2915
     571        CALL VRMethod "Main", 'CenterWindow'
     572        call VRSet 'Main',    'Visible', 1
     573        call Main_Resize
     574    END
     575    ELSE DO
     576        /* Subsequent start */
     577        /* Load window position settings */
     578        settings.!x = VRGetIni('Settings', 'X', settings.!ini, 'NoClose')
     579        settings.!y = VRGetIni('Settings', 'Y', settings.!ini, 'NoClose')
     580        settings.!h = VRGetIni('Settings', 'H', settings.!ini, 'NoClose')
     581        settings.!w = VRGetIni('Settings', 'W', settings.!ini, 'NoClose')
     582        settings.!s = VRGetIni('Settings', 'S', settings.!ini, 'NoClose')
     583
     584        IF settings.!x == '' THEN settings.!x = -1
     585        IF settings.!y == '' THEN settings.!y = -1
     586        IF settings.!h == '' THEN settings.!h = -1
     587        IF settings.!w == '' THEN settings.!w = -1
     588        IF settings.!s == '' THEN settings.!s = -1
     589
     590        /* Titlebar settings */
     591        settings.!curbcolor = VRGetIni('Settings', 'TitleBarBackground', settings.!ini, 'NoClose')
     592        settings.!curfcolor = VRGetIni('Settings', 'TitleBarForeground', settings.!ini, 'NoClose')
     593        IF (settings.!curbcolor = '' | settings.!curbcolor = '<default>') THEN settings.!curbcolor = 'SystemActiveTitle'
     594        IF (settings.!curfcolor = '' | settings.!curfcolor = '<default>') THEN settings.!curfcolor = 'SystemActiveTitleText'
     595
     596        /* Load font settings */
     597        IF VRFileExists( SysBootDrive() || '\OS2DBCS') == 1
     598            THEN default_font = '9.WarpSans Combined'
     599            ELSE default_font = '9.WarpSans'
     600
     601        settings.!cfont = VRGetIni('Settings', 'ContainerFont', settings.!ini, 'NoClose')
     602        settings.!wfont = VRGetIni('Settings', 'WindowFont',    settings.!ini, 'NoClose')
     603        IF settings.!cfont  == '' THEN settings.!cfont  = default_font
     604        IF settings.!wfont  == '' THEN settings.!wfont  = default_font
     605
     606        /* Current page */
     607        settings.!curpage = VRGetIni('Settings', 'CurrentPage', settings.!ini, 'NoClose')
     608        IF settings.!curpage == '' THEN settings.!curpage = 1
     609
     610        /* Global settings */
     611        advanced.!browseauth = VRGetIni('Settings', 'BrowseAuth',      settings.!ini, 'NoClose')
     612        advanced.!browseimme = VRGetIni('Settings', 'BrowseImme',      settings.!ini, 'NoClose')
     613        advanced.!broadcast  = VRGetIni('Settings', 'Broadcast',       settings.!ini, 'NoClose')
     614        advanced.!special    = VRGetIni('Settings', 'SpecialShares',   settings.!ini, 'NoClose')
     615        advanced.!savepassive= VRGetIni('Settings', 'SavePassive',     settings.!ini, 'NoClose')
     616        advanced.!miniicons  = VRGetIni('Settings', 'MiniIcons',       settings.!ini, 'NoClose')
     617
     618        advanced.!easupport  = VRGetIni('Settings', 'EAS',             settings.!ini, 'NoClose')
     619        advanced.!readonly   = VRGetIni('Settings', 'ReadOnly',        settings.!ini, 'NoClose')
     620        advanced.!alwaysmp   = VRGetIni('Settings', 'AlwaysMP',        settings.!ini, 'NoClose')
     621        advanced.!cachetimeout  = VRGetIni('Settings', 'CacheTimeOut', settings.!ini, 'NoClose')
     622        advanced.!cachelistings = VRGetIni('Settings', 'CacheListings',settings.!ini, 'NoClose')
     623
     624        IF advanced.!browseauth == '' THEN advanced.!browseauth = 0
     625        IF advanced.!browseimme == '' THEN advanced.!browseimme = 1
     626        IF advanced.!broadcast  == '' THEN advanced.!broadcast  = 0
     627        IF advanced.!special    == '' THEN advanced.!special    = 0
     628        IF advanced.!savepassive== '' THEN advanced.!savepassive= 0
     629
     630        options.!debug = VRGetIni('Settings', 'Debug', settings.!ini)
     631        IF options.!debug == '' THEN options.!debug = 0       /* Turn off debug by default for release builds */
     632        IF options.!debug == 1 THEN ok = VRRedirectStdIO("ON")
     633                               else ok = VRRedirectStdio("OFF")
     634
     635        IF advanced.!miniicons  == '' THEN advanced.!miniicons  = 0
     636
     637        /* Advanced */
     638        IF advanced.!easupport     == '' THEN advanced.!easupport  = 1
     639        IF advanced.!readonly      == '' THEN advanced.!readonly   = 0
     640        IF advanced.!alwaysmp      == '' THEN advanced.!alwaysmp   = 0
     641        IF advanced.!cachetimeout  == '' THEN advanced.!cachetimeout  = 10
     642        IF advanced.!cachelistings == '' THEN advanced.!cachelistings = 32
     643
     644        /* Apply the settings */
     645        ok = VRSet("DT_CURRENT","BACKCOLOR", settings.!curbcolor )
     646        ok = VRSet("DT_CURRENT","FORECOLOR", settings.!curfcolor )
     647
     648        ok = VRset("CN_CURRENT", "MiniIcons", advanced.!miniicons)
     649        ok = VRset("CN_SMBTREE", "MiniIcons", advanced.!miniicons)
     650        ok = VRset("CN_CONDET",  "MiniIcons", advanced.!miniicons)
     651
     652        IF ( settings.!x >= 0 ) & ( settings.!y >= 0 ) & ( settings.!l >= 0 ) & ( settings.!w >= 0 ) & ( settings.!s >= 0 ) THEN DO
     653            CALL VRSet VRWindow(), 'Left',   settings.!x
     654            CALL VRSet VRWindow(), 'Top',    settings.!y
     655            CALL VRSet VRWindow(), 'Height', settings.!h
     656            CALL VRSet VRWindow(), 'Width',  settings.!w
     657            CALL VRSet "SPLIT_MAIN", 'Left',  settings.!s
     658        END
     659        ELSE CALL VRMethod VRWindow(), 'CenterWindow'
     660
     661        CALL VRSet "CN_CURRENT", 'Font',       settings.!cfont
     662        CALL VRSet "CN_CONDET",  'Font',       settings.!cfont
     663        CALL VRSet "CN_SMBTREE", 'Font',       settings.!cfont
     664
     665        CALL VRSet 'Main',       'Font',       settings.!wfont
     666        CALL VRSet 'Main',       'StatusFont', settings.!wfont
     667
     668        ok = VRSet("TDL_1","Selected", settings.!curpage)
     669    END
     670
     671    if options.!nogui == 1 then CALL VRLoadSecondary "SW_PROGRESS","W"
     672    else do
     673        if options.!delay > 0 then do
     674            /* Set mouse pointer to wait - this operation might take a few seconds */
     675            call VRSet VRWindow(), 'Pointer', 'Wait'
     676            call Main_Resize
     677            ok = SysSleep(options.!delay)
     678            options.!delay = 0
     679            /* Set mouse pointer to default again */
     680            call VRSet VRWindow(), 'Pointer', '<default>'
     681        end
     682    end
     683
     684    /* SambaInit.VRS needs these 2 */
     685    ShowHidden = advanced.!special
     686    Broadcast  = advanced.!broadcast
     687
     688    /* in non debug versions this is normally not visible */
     689    IF options.!debug == 1 THEN SAY '  NLV MessageFile = "'settings.!messages'"'
     690    IF options.!debug == 1 THEN SAY '  NLV HelpFile    = "'settings.!helpfile'"'
     691
     692    IF options.!debug == 1 THEN SAY time()' _INILoad done'
     693RETURN
     694
     695/*:VRX         _INISave
     696*/
     697_INISave: PROCEDURE EXPOSE settings. options. icons. fs. advanced. cd. samba.
     698    IF options.!debug == 1 THEN SAY time()' '||"SaveSettings started"
     699
     700    if advanced.!savepassive then call _PassiveSave
     701
     702/* This does not make sense anymore
     703    settings.!network = VRGet("EF_NETWORK","Value")
     704    CALL VRSetIni 'Settings', 'Network', settings.!network, settings.!ini, 'NoClose'
     705 */
     706
     707    font = VRGet("CN_CURRENT", 'Font')
     708    CALL VRSetIni 'Settings', 'ContainerFont', font, settings.!ini, 'NoClose'
     709
     710    font = VRGet('Main', 'Font')
     711    CALL VRSetIni 'Settings', 'WindowFont', font, settings.!ini, 'NoClose'
     712
     713    settings.!curbcolor = VRGet("DT_CURRENT","BackColor")
     714    CALL VRSetIni 'Settings', 'TitleBarBackground', settings.!curbcolor, settings.!ini, 'NoClose'
     715
     716    settings.!curfcolor = VRGet("DT_CURRENT","ForeColor")
     717    CALL VRSetIni 'Settings', 'TitleBarForeground', settings.!curfcolor, settings.!ini, 'NoClose'
     718
     719    /* Global options */
     720    CALL VRSetIni 'Settings', 'BrowseAuth',    advanced.!browseauth , settings.!ini, 'NoClose'
     721    CALL VRSetIni 'Settings', 'BrowseImme',    advanced.!browseimme , settings.!ini, 'NoClose'
     722    CALL VRSetIni 'Settings', 'Broadcast',     advanced.!broadcast  , settings.!ini, 'NoClose'
     723    CALL VRSetIni 'Settings', 'SpecialShares', advanced.!special    , settings.!ini, 'NoClose'
     724    CALL VRSetIni 'Settings', 'SavePassive',   advanced.!savepassive, settings.!ini, 'NoClose'
     725
     726    CALL VRSetIni 'Settings', 'Debug',         options.!debug       , settings.!ini, 'NoClose'
     727    CALL VRSetIni 'Settings', 'MiniIcons',     advanced.!miniicons  , settings.!ini, 'NoClose'
     728
     729    /* Advanced */
     730    CALL VRSetIni 'Settings', 'EAS',           advanced.!eas          , settings.!ini, 'NoClose'
     731    CALL VRSetIni 'Settings', 'ReadOnly',      advanced.!readonly     , settings.!ini, 'NoClose'
     732    CALL VRSetIni 'Settings', 'AlwaysMP',      advanced.!alwaysmp     , settings.!ini, 'NoClose'
     733    CALL VRSetIni 'Settings', 'CacheTimeOut',  advanced.!cachetimeout , settings.!ini, 'NoClose'
     734    CALL VRSetIni 'Settings', 'CacheListings', advanced.!cachelistings, settings.!ini, 'NoClose'
     735
     736    /* Current page */
     737    settings.!curpage = VRget("TDL_1","Selected")
     738    CALL VRSetIni 'Settings', 'CurrentPage',   settings.!curpage      , settings.!ini, 'NoClose'
     739
     740    /* Save position and size */
     741    settings.!l = VRGet("Main",       'Left'  )
     742    settings.!t = VRGet("Main",       'Top'   )
     743    settings.!h = VRGet("Main",       'Height')
     744    settings.!w = VRGet("Main",       'Width' )
     745    settings.!s = VRGet("SPLIT_Main", 'Left'  )
     746
     747    CALL VRSetIni 'Settings', 'X', settings.!l, settings.!ini, 'NoClose'
     748    CALL VRSetIni 'Settings', 'Y', settings.!t, settings.!ini, 'NoClose'
     749    CALL VRSetIni 'Settings', 'H', settings.!h, settings.!ini, 'NoClose'
     750    CALL VRSetIni 'Settings', 'W', settings.!w, settings.!ini, 'NoClose'
     751    CALL VRSetIni 'Settings', 'S', settings.!s, settings.!ini
     752
     753    IF options.!debug == 1 THEN SAY time()' '||"SaveSettings done"
     754RETURN
     755
     756/*:VRX         _LoadOtherFuncs
     757*/
     758_LoadOtherFuncs:
     759    CALL RxFuncAdd 'SysLoadFuncs', 'REXXUTIL', 'SysLoadFuncs'
     760    CALL SysLoadFuncs
     761
     762    call RxFuncAdd 'PRLoadFuncs',  'PR1UTIL', 'PRLoadFuncs'
     763    call PRLoadFuncs
     764return
     765
     766/*:VRX         _ParseCommandLine
     767*/
     768_ParseCommandLine:
     769    IF options.!debug == 1 THEN SAY time()' _ParseCommandLine() started'
     770    CmdLine = VRGet("Application","Commandline")
     771    upCmdLine = translate(CmdLine)
     772    IF options.!debug == 1 THEN SAY '  Commandline = "'CmdLine'"'
     773
     774    ForceNDFS = 0
     775    if wordpos('-NDFS',upCmdLine) > 0 then do
     776        IF options.!debug == 1 THEN SAY "  NDFS switch detected"
     777        CmdLine = delWord(CmdLine,wordpos('-NDFS',upCmdLine),1)
     778        upCmdLine = translate(CmdLine)
     779        ForceNDFS = 1
     780        CALL VRSet "PB_AutoStart","Visible", 0
     781    end
     782
     783    if wordpos('-AUTOCLOSE',upCmdLine) > 0 then do
     784        options.!autoclose = 1
     785        IF options.!debug == 1 THEN SAY "  AutoClose switch detected"
     786        CmdLine = delWord(CmdLine,wordpos('-AUTOCLOSE',upCmdLine),1)
     787        upCmdLine = translate(CmdLine)
     788    end
     789    if wordpos('-NOGUI',upCmdLine) > 0 then do
     790        options.!nogui = 1
     791        options.!autoclose = 1
     792        IF options.!debug == 1 THEN SAY "  -NOGUI switch detected"
     793        CmdLine = delWord(CmdLine,wordpos('-NOGUI',upCmdLine),1)
     794        upCmdLine = translate(CmdLine)
     795    end
     796
     797    if wordpos('-DELAY',upCmdLine) > 0 then do
     798        IF options.!debug == 1 THEN SAY "  DELAY switch detected"
     799        dwpos = wordpos('-DELAY',upCmdLine)
     800        if dwpos = words(upCmdLine) then do /* DELAY was last parm - assume 60 seconds */
     801            options.!delay = 60
     802            CmdLine = delWord(CmdLine,dwpos,1)
     803        end
     804        else do
     805            options.!delay = word(upCmdLine,dwpos+1)
     806            if datatype(options.!delay) <> "NUM" then do /* No number of seconds specified */
     807                options.!delay = 60
     808                CmdLine = delWord(CmdLine,dwpos,1)
     809            end
     810            else do
     811                CmdLine = delWord(CmdLine,dwpos,2)
     812            end
     813        end
     814        upCmdLine = translate(CmdLine)
     815        IF options.!debug == 1 THEN SAY "  DELAY set to "options.!delay" seconds."
     816    end
     817
     818    Profile = strip(CmdLine,,'"')
     819    if Profile <> "" then do
     820        Profile = strip(VRParseFilename(Profile,"DPNE"))
     821        options.!autoload   = 1
     822        IF options.!debug == 1 THEN SAY '  Profile = "'Profile'"'
     823        if \VRFileExists(Profile) then do
     824            CALL VRMessage 'Main', NLVGetMessage( 102, Profile ), NLVGetMessage( 1 ), 'E'
     825            /* Disable all switches in case of an error */
     826            options.!autoload  = 0
     827            options.!autoclose = 0
     828            options.!nogui     = 0
     829            options.!delay     = 0
     830        end
     831    end
     832    IF options.!debug == 1 THEN SAY time()' _ParseCommandLine done'
    551833return
    552834
     
    7331015    ok = VRGetINI("PM_PORT_DRIVER","SMB","SYSTEM")
    7341016return (ok <> "")
     1017
     1018/*:VRX         _StemsInit
     1019*/
     1020_StemsInit:
     1021    IF options.!debug == 1 THEN SAY time()' _StemsInit started'
     1022    IF options.!debug == 1 THEN SAY '  initializing options.'
     1023    options.!workgroup  = ''
     1024    options.!server     = ''
     1025    options.!share      = ''
     1026    options.!user       = ''
     1027    options.!password   = ''
     1028    options.!spassword  = ''
     1029    options.!master     = ''
     1030    options.!mastertype = ''
     1031    options.!memlen     = '2'
     1032    options.!cachetimeout  = '10'
     1033    options.!cachelistings = '32'
     1034    options.!easupport  = '1'
     1035    options.!readonly   = ''
     1036    options.!loglevel   = 0
     1037    options.!logfile    = ''
     1038
     1039    options.!autoload   = 0
     1040    options.!autoclose  = 0
     1041    options.!nogui      = 0
     1042    options.!autostart  = 0
     1043    options.!editmode   = 0
     1044    options.!delay      = 0
     1045
     1046    IF options.!debug == 1 THEN SAY '  initializing vfs. '
     1047    vfs.!drive      = ''
     1048    vfs.!mountpoint = ''
     1049
     1050    IF options.!debug == 1 THEN SAY '  initializing advanced. '
     1051    advanced.!browseauth = ''
     1052    advanced.!browseimme = ''
     1053    advanced.!broadcast  = ''
     1054    advanced.!special    = ''
     1055    advanced.!savepassive= ''
     1056    advanced.!miniicons  = ''
     1057
     1058    advanced.!easupport  = 1
     1059    advanced.!readonly   = ''
     1060    advanced.!alwaysmp   = ''
     1061    advanced.!cachetimeout  = '10'
     1062    advanced.!cachelistings = '32'
     1063
     1064    /* Obsolete */
     1065    advanced.!memlen     = ''
     1066    advanced.!loglevel   = '0'
     1067    advanced.!logfile    = ''
     1068
     1069    IF options.!debug == 1 THEN SAY '  initializing credentials. '
     1070    credentials.!username = ""
     1071    credentials.!password = ""
     1072    credentials.!entered  = 0
     1073
     1074    UserCred = ""
     1075    RefreshMode = ""
     1076
     1077    IF options.!debug == 1 THEN SAY '  initializing mtype. '
     1078    mtype.0 = 4
     1079    mtype.1 = NLVGetMessage( 15 )
     1080    mtype.2 = NLVGetMessage( 16 )
     1081    mtype.3 = NLVGetMessage( 17 )
     1082    mtype.4 = NLVGetMessage( 18 )
     1083
     1084    IF options.!debug == 1 THEN SAY '  initializing icons. '
     1085    icons.!bat              = '#1:PMWP.DLL'
     1086    icons.!cmd              = '#2:PMWP.DLL'
     1087    icons.!exe              = '#3:PMWP.DLL'
     1088    icons.!template         = '#10:PMWP.DLL'
     1089    icons.!drive            = '#16:PMWP.DLL'
     1090    icons.!defaultfile      = '#24:PMWP.DLL'
     1091    icons.!folder           = '#26:PMWP.DLL'
     1092    icons.!folder_open      = '#34:PMWP.DLL'
     1093    icons.!machine_sleeping = '#61:PMWP.DLL'
     1094    icons.!active           = '#64:PMWP.DLL'
     1095    icons.!passive          = '#68:PMWP.DLL'
     1096    icons.!printer          = '#65:PMWP.DLL'
     1097    icons.!drive_inactive   = '#70:PMWP.DLL'
     1098    icons.!pdf              = '#80'
     1099    icons.!spreadsheet      = '#82'
     1100    icons.!textdocument     = '#86'
     1101    icons.!framework        = '#87'
     1102    icons.!image            = '#88'
     1103    icons.!movie            = '#89'
     1104    icons.!sound            = '#90'
     1105    icons.!warpin           = '#91'
     1106    icons.!zip              = '#92'
     1107    icons.!view             = '#93'
     1108    icons.!plaintext        = '#94'
     1109
     1110    IF options.!debug == 1 THEN SAY time()' _StemsInit done'
     1111return
     1112/*:VRX         _TabbedDialogSetup
     1113*/
     1114_TabbedDialogSetup:
     1115    IF options.!debug == 1 THEN SAY time()' _TabbedDialogSetup started'
     1116    w = VRLoad( "TDL_1", VRWindowPath(), "SW_DIALOG" )
     1117    ok = VRMethod( "TDL_1", "InsertPage", w,"+ "NLVGetMessage(13)" ")
     1118    ok = VRMethod( "TDL_1", "SetStatusText", 1, NLVGetMessage(132,"1","2"))
     1119    w = VRLoad( "TDL_1", VRWindowPath(), "SW_ADVANCED" )
     1120    ok = VRMethod( "TDL_1", "InsertPage", w,"- "NLVGetMessage(40)" ")
     1121    ok = VRMethod( "TDL_1", "SetStatusText", 2, NLVGetMessage(132,"2","2"))
     1122    w = VRLoad( "TDL_1", VRWindowPath(), "SW_SMBTREE" )
     1123    ok = VRMethod( "TDL_1", "InsertPage", w,"+ "NLVGetMessage(39)" ")
     1124    w = VRLoad( "TDL_1", VRWindowPath(), "SW_CONDET" )
     1125    ok = VRMethod( "TDL_1", "InsertPage", w,"+ "NLVGetMessage(63)" ")
     1126    w = VRLoad( "TDL_1", VRWindowPath(), "SW_SETTINGS" )
     1127    ok = VRMethod( "TDL_1", "InsertPage", w,"+ "NLVGetMessage(47)" ")
     1128    IF options.!debug == 1 THEN SAY time()' _TabbedDialogSetup done'
     1129return
     1130
     1131
     1132/*:VRX         _TabFix
     1133*/
     1134_TabFix:
     1135    ok = VRMethod( "TDL_1", "SetTabText", arg(1), " "strip(VRMethod( "TDL_1", "GetTabText", arg(1)))" ")     
     1136return
     1137
     1138/*:VRX         _TabsStrip
     1139*/
     1140_TabsStrip:
     1141    ok = VRMethod( "TDL_1", "SetTabText", 1, strip(VRMethod( "TDL_1", "GetTabText", 1)))
     1142    ok = VRMethod( "TDL_1", "SetTabText", 2, strip(VRMethod( "TDL_1", "GetTabText", 2)))
     1143    ok = VRMethod( "TDL_1", "SetTabText", 3, strip(VRMethod( "TDL_1", "GetTabText", 3)))
     1144    ok = VRMethod( "TDL_1", "SetTabText", 4, strip(VRMethod( "TDL_1", "GetTabText", 4)))
     1145    ok = VRMethod( "TDL_1", "SetTabText", 5, strip(VRMethod( "TDL_1", "GetTabText", 5)))
     1146return
    7351147
    7361148/*:VRX         _UserCredUpdate
     
    13231735            say "  Not connected - trying to connect"
    13241736            ok = VRMethod( "CN_SMBTREE", "SetRecordAttr", sharerh, "Selected", 1)
    1325             call PB_CONNECT_Click
     1737            call PB_SMBTREE_CONNECT_Click
    13261738            ok = VRMethod( "CN_SMBTREE", "SetRecordAttr", SMBObj.rh, "Selected", 1)
    13271739
     
    14531865    ok = SysSleep(1)
    14541866    if Now <> VRGet("EF_SERVER","value") then return
     1867
     1868    IF options.!editmode = 1 then return
    14551869
    14561870    /* Do nothing for incomplete IP addresses */
     
    17372151return
    17382152
    1739 /*:VRX         LoadSettings
    1740 */
    1741 LoadSettings: PROCEDURE EXPOSE settings. options. icons. fs. advanced. samba. ShowHidden margin
    1742     IF options.!debug == 1 THEN SAY time()' LoadSettings started'
    1743 
    1744     /* Locate the profile.
    1745      */
    1746     os2_ini = VALUE('USER_INI',,'OS2ENVIRONMENT')
    1747     inipath = VRParseFilePath( os2_ini, 'DP')
    1748     IF inipath == '' THEN inipath = SysBootDrive() || '\OS2'
    1749 
    1750     settings.!ini = inipath'\evfsgui.ini'
    1751     IF options.!debug == 1 THEN SAY '  EVFSGUI INIfile = "'settings.!ini'"'
    1752 
    1753     IF STREAM( settings.!ini, 'C', 'QUERY EXISTS') == '' THEN DO
    1754         IF options.!debug == 1 THEN say "  First start!"
    1755         settings.!network = ""
    1756         settings.!buttonson = 1
    1757         settings.!smbtreeon = 1
    1758         advanced.!browseimme = 1
    1759         advanced.!savepassive = 0
    1760         advanced.!broadcast = 0
    1761         advanced.!bigicons = 1
    1762 
    1763         ShowHidden = 0
    1764 
    1765         CALL VRSet VRWindow(), 'Height', 7576
    1766         CALL VRSet VRWindow(), 'Width',  8200
    1767         CALL VRSet "SPLIT_MAIN", 'Left',  2915
    1768         CALL VRMethod VRWindow(), 'CenterWindow'
    1769         call Menu_View_Buttons_Click
    1770         call Menu_View_SmbTree_Click
    1771         ok = VRset("GB_SMBTREE","Painting", 1)
    1772         ok = VRset("GB_SMBTREE","Visible", 1)
    1773 
    1774         call VRSet 'Main',    'Visible', 1
    1775         call Main_Resize
    1776     END
    1777     ELSE DO
    1778 
    1779         /* Load window position settings.
    1780          */
    1781         settings.!x = VRGetIni('Settings', 'X', settings.!ini, 'NoClose')
    1782         settings.!y = VRGetIni('Settings', 'Y', settings.!ini, 'NoClose')
    1783         IF settings.!x == '' THEN settings.!x = -1
    1784         IF settings.!y == '' THEN settings.!y = -1
    1785 
    1786         settings.!h = VRGetIni('Settings', 'H', settings.!ini, 'NoClose')
    1787         settings.!w = VRGetIni('Settings', 'W', settings.!ini, 'NoClose')
    1788         IF settings.!h == '' THEN settings.!h = -1
    1789         IF settings.!w == '' THEN settings.!w = -1
    1790 
    1791         settings.!s = VRGetIni('Settings', 'S', settings.!ini, 'NoClose')
    1792         IF settings.!s == '' THEN settings.!s = -1
    1793 
    1794         /* Herwig B. */
    1795         settings.!curbcolor = VRGetIni('Settings', 'TitleBarBackground', settings.!ini, 'NoClose')
    1796         settings.!curfcolor = VRGetIni('Settings', 'TitleBarForeground', settings.!ini, 'NoClose')
    1797         IF (settings.!curbcolor = '' | settings.!curbcolor = '<default>') THEN settings.!curbcolor = 'SystemActiveTitle'
    1798         IF (settings.!curfcolor = '' | settings.!curfcolor = '<default>') THEN settings.!curfcolor = 'SystemActiveTitleText'
    1799 
    1800         settings.!buttonson = VRGetIni('Settings', 'ButtonsOn', settings.!ini, 'NoClose')
    1801         IF settings.!buttonson = "" then settings.!buttonson = 1
    1802 
    1803         settings.!smbtreeon = VRGetIni('Settings', 'SmbtreeOn', settings.!ini, 'NoClose')
    1804         IF settings.!smbtreeon = "" then settings.!smbtreeon = 0
    1805 
    1806         settings.!dialogon = VRGetIni('Settings', 'DialogOn', settings.!ini, 'NoClose')
    1807         IF settings.!dialogon = "" then settings.!dialogon = 1
    1808 
    1809         settings.!condeton = VRGetIni('Settings', 'ConDetOn', settings.!ini, 'NoClose')
    1810         IF settings.!condeton = "" then settings.!condeton = 1
    1811 
    1812         /* Load network - does not make sense anymore
    1813         settings.!network = VRGetIni('Settings', 'Network', settings.!ini, 'NoClose')
    1814         IF settings.!network == '' THEN settings.!network = '' */
    1815         settings.!network = ''
    1816 
    1817         if \VRFileExists( samba.!smbconf ) then call _CreateSmbConf
    1818 
    1819         /* Load font settings.
    1820          */
    1821         IF VRFileExists( SysBootDrive() || '\OS2DBCS') == 1 THEN
    1822             default_font = '9.WarpSans Combined'
    1823         ELSE
    1824             default_font = '9.WarpSans'
    1825         settings.!cfont = VRGetIni('Settings', 'ContainerFont', settings.!ini, 'NoClose')
    1826         settings.!wfont = VRGetIni('Settings', 'WindowFont',    settings.!ini, 'NoClose' )
    1827         IF settings.!cfont  == '' THEN settings.!cfont  = default_font
    1828         IF settings.!wfont  == '' THEN settings.!wfont  = default_font
    1829 
    1830         advanced.!browseauth = VRGetIni('Settings', 'BrowseAuth', settings.!ini, 'NoClose')
    1831         IF advanced.!browseauth == '' THEN advanced.!browseauth = 0
    1832 
    1833         advanced.!browseimme = VRGetIni('Settings', 'BrowseImme', settings.!ini)
    1834         IF advanced.!browseimme == '' THEN advanced.!browseimme = 1
    1835 
    1836         options.!debug = VRGetIni('Settings', 'Debug', settings.!ini)
    1837         IF options.!debug == '' THEN options.!debug = 0       /* Turn off debug by default for release builds */
    1838         IF options.!debug <> 1 THEN ok = VRRedirectStdIO("OFF")
    1839 
    1840         advanced.!alwaysmp = VRGetIni('Settings', 'AlwaysMP', settings.!ini)
    1841         IF advanced.!alwaysmp == '' THEN advanced.!alwaysmp = 1
    1842 
    1843         advanced.!special = VRGetIni('Settings', 'SpecialShares', settings.!ini)
    1844         IF advanced.!special == '' THEN advanced.!special = 0
    1845 
    1846         advanced.!bigicons = VRGetIni('Settings', 'BigIcons', settings.!ini)
    1847         IF advanced.!bigicons == '' THEN advanced.!bigicons = 1
    1848 
    1849         advanced.!savepassive = VRGetIni('Settings', 'SavePassive', settings.!ini)
    1850         IF advanced.!savepassive == '' THEN advanced.!savepassive = 0
    1851 
    1852         advanced.!broadcast = VRGetIni('Settings', 'Broadcast', settings.!ini)
    1853         IF advanced.!broadcast == '' THEN advanced.!broadcast = 0
    1854 
    1855         /* Apply the settings
    1856          */
    1857         /* Does not make sense anymore
    1858         ok = VRSet("EF_NETWORK","Value", settings.!network)
    1859          */
    1860         ok = VRSet("DT_CURRENT","BACKCOLOR", settings.!curbcolor )
    1861         ok = VRSet("DT_CURRENT","FORECOLOR", settings.!curfcolor )
    1862         ok = VRSet("DT_DIALOG","BACKCOLOR",  settings.!curbcolor )
    1863         ok = VRSet("DT_DIALOG","FORECOLOR",  settings.!curfcolor )
    1864         ok = VRSet("DT_SMBTREE","BACKCOLOR", settings.!curbcolor )
    1865         ok = VRSet("DT_SMBTREE","FORECOLOR", settings.!curfcolor )
    1866         ok = VRSet("DT_CONDET","BACKCOLOR", settings.!curbcolor )
    1867         ok = VRSet("DT_CONDET","FORECOLOR", settings.!curfcolor )
    1868 
    1869         ok = VRset("CN_CURRENT", "MiniIcons", \advanced.!bigicons)
    1870         ok = VRset("CN_SMBTREE", "MiniIcons", \advanced.!bigicons)
    1871         ok = VRset("CN_CONDET",  "MiniIcons", \advanced.!bigicons)
    1872         ok = VRset("Menu_View_MiniIcons",  "Checked", \advanced.!bigicons)
    1873 
    1874         ok = VRSet("Menu_View_Buttons","Checked", settings.!buttonson)
    1875         ok = VRset("GB_Buttons","Visible", settings.!buttonson)
    1876         ok = VRset("PB_DIALOGHELP","Visible", \settings.!buttonson)
    1877         ok = VRset("PB_CONDET_HELP","Visible", \settings.!buttonson)
    1878         ok = VRset("PB_SMBTREE_HELP","Visible", \settings.!buttonson)
    1879 
    1880         options.!buttondelta = 440 * settings.!buttonson
    1881 
    1882         ok = VRSet("Menu_View_Dialog","Checked", settings.!dialogon)
    1883         if settings.!dialogon then call Menu_View_Dialog_Click
    1884 
    1885         ok = VRSet("Menu_View_ConDet","Checked", settings.!condeton)
    1886         if settings.!condeton then do
    1887             call Menu_View_ConDet_Click
    1888             ok = VRset("GB_CONDET","Painting", 1)
    1889             ok = VRset("GB_CONDET","Visible", 1)
    1890         end
    1891 
    1892 
    1893         ok = VRSet("Menu_View_Smbtree","Checked", settings.!smbtreeon)
    1894         if settings.!smbtreeon then do
    1895             call Menu_View_SmbTree_Click
    1896             ok = VRset("GB_SMBTREE","Painting", 1)
    1897             ok = VRset("GB_SMBTREE","Visible", 1)
    1898         end
    1899 
    1900         if options.!debug == 1 then ok = VRRedirectStdio("ON")
    1901 
    1902         IF ( settings.!x >= 0 ) & ( settings.!y >= 0 ) & ( settings.!l >= 0 ) & ( settings.!w >= 0 ) & ( settings.!s >= 0 ) THEN DO
    1903             CALL VRSet VRWindow(), 'Left',   settings.!x
    1904             CALL VRSet VRWindow(), 'Top',    settings.!y
    1905             CALL VRSet VRWindow(), 'Height', settings.!h
    1906             CALL VRSet VRWindow(), 'Width',  settings.!w
    1907             CALL VRSet "SPLIT_MAIN", 'Left',  settings.!s
    1908         END
    1909         ELSE
    1910             CALL VRMethod VRWindow(), 'CenterWindow'
    1911 
    1912         CALL VRSet "CN_CURRENT", 'Font',       settings.!cfont
    1913         CALL VRSet 'Main',       'Font',       settings.!wfont
    1914         CALL VRSet 'Main',       'StatusFont', settings.!wfont
    1915 
    1916     END
    1917 
    1918     if options.!nogui == 1 then CALL VRLoadSecondary "SW_PROGRESS","W"
    1919     else do
    1920         if options.!delay > 0 then do
    1921             /* Set mouse pointer to wait - this operation might take a few seconds */
    1922             call VRSet VRWindow(), 'Pointer', 'Wait'
    1923             call Main_Resize
    1924             ok = SysSleep(options.!delay)
    1925             options.!delay = 0
    1926             /* Set mouse pointer to default again */
    1927             call VRSet VRWindow(), 'Pointer', '<default>'
    1928         end
    1929     end
    1930     /* This is too early if a profile was loaded and Main_Resize does it anyway */
    1931     /* else call VRSet 'Main',    'Visible', 1 */
    1932 
    1933     /* in non debug versions this is normally not visible */
    1934     IF options.!debug == 1 THEN SAY '  NLV MessageFile = "'settings.!messages'"'
    1935     IF options.!debug == 1 THEN SAY '  NLV HelpFile    = "'settings.!helpfile'"'
    1936 
    1937     IF options.!debug == 1 THEN SAY time()' LoadSettings done'
    1938 RETURN
    1939 
    19402153/*:VRX         Main_Close
    19412154*/
     
    19472160*/
    19482161Main_Create:
    1949     ok = VRRedirectStdIO("OFF")
    1950     options.!debug    = 0
    1951 
    1952     IF options.!debug == 1 THEN ok = VRREdirectStdIO("ON")
    1953     IF options.!debug == 1 THEN SAY time()' Main_Create started'
    1954 
    1955     CALL RxFuncAdd 'SysLoadFuncs', 'REXXUTIL', 'SysLoadFuncs'
    1956     CALL SysLoadFuncs
    1957 
    1958     call RxFuncAdd 'PRLoadFuncs',  'PR1UTIL', 'PRLoadFuncs'
    1959     call PRLoadFuncs
    1960 
    1961     CALL _InitTempDir
    1962 
    1963     CALL NLVSetup
    1964 
    1965     CALL StemsInit
    1966 
    1967     w = VRLoad( "TDL_1", VRWindowPath(), "SW_DIALOG" )
    1968     ok = VRMethod( "TDL_1", "InsertPage", w,"+"NLVGetMessage(13))
    1969     w = VRLoad( "TDL_1", VRWindowPath(), "SW_SMBTREE" )
    1970     ok = VRMethod( "TDL_1", "InsertPage", w,"+"NLVGetMessage(39))
    1971     w = VRLoad( "TDL_1", VRWindowPath(), "SW_CONDET" )
    1972     ok = VRMethod( "TDL_1", "InsertPage", w,"+"NLVGetMessage(63))
    1973 
    1974 
    1975     CALL _ContainersInit
    1976 
    1977     CALL _GUIInit
    1978 
    1979     CALL ParseCommandLine
     2162    options.!debug    = 1
     2163    IF options.!debug == 1 THEN do
     2164        ok = VRREdirectStdIO("ON")
     2165        say time()' Main_Create started'
     2166    end
     2167    else ok = VRREdirectStdIO("OFF")
     2168
     2169    call _LoadOtherFuncs
     2170    call _InitTempDir
     2171    call NLVSetup
     2172    call _StemsInit
     2173
     2174    call _TabbedDialogSetup
     2175    call _ContainersInit
     2176    call _GUIInit
     2177
     2178    CALL _ParseCommandLine
    19802179
    19812180    CALL LoadFileSysFuncs
     
    19832182    CALL _CltInit
    19842183
    1985     CALL LoadSettings
     2184    CALL _INILoad
    19862185
    19872186    CALL Refresh
     
    19892188    if advanced.!savepassive == 1 then CALL _PassiveLoad
    19902189
    1991     IF options.!autoload == 1 THEN CALL PB_LOAD_Click
     2190    IF options.!autoload == 1 THEN CALL Menu_File_Load_Click
    19922191
    19932192    CALL VRSet "CB_MOUNT",  "Selected", 1
    19942193    CALL VRSet "CB_DRIVES", "Selected", 1
    1995     IF options.!autoclose == 1 THEN CALL TM_AutoClose_Trigger
    1996     /* For whatever reason the timer is not triggered anymore....
    1997     CALL VRSet "TM_AUTOCLOSE", "ENABLED", 1 */
     2194    IF options.!autoclose == 1
     2195    THEN CALL TM_AutoClose_Trigger
    19982196    ELSE do
    19992197        if advanced.!browseauth == 1 then do
     
    20012199            call Main_Resize
    20022200        end
    2003         if advanced.!browseimme == 1 then call PB_REFRESH_Click
     2201        if advanced.!browseimme == 1 then call PB_SMBTREE_REFRESH_Click
    20042202    end
    20052203
     
    20172215*/
    20182216Main_Resize:
    2019 
    2020     if datatype(options.!buttondelta) = 'CHAR' then return
    2021 
    20222217    IF options.!debug == 1 THEN SAY time()' Main_Resize started'
    20232218    ok = VRset("Main","Painting", 0)
     
    20322227    marginx2     = margin * 2                                   /* Common margin around controls */
    20332228    pbtn_height  = 400                                          /* Height of the panels' internal button areas */
    2034     buttons_top  = main_iheight - sbar_height - margin - options.!buttondelta         /* Top of the common button area */
    2035     pane_height  = buttons_top - (margin * 3)                                         /* Height of a split-bar panel */
    2036     lpane_width  = split_left - margin                                                /* Width of the left split-bar panel */
    2037     rpane_width  = main_iwidth - split_left - 60 - margin                             /* Width of the right split-bar panel */
    2038 
    2039     /* Tabbed Dialig = right pane */
     2229
     2230    pane_height  = main_iheight - sbar_height - (margin * 4)    /* Height of a split-bar panel */
     2231    lpane_width  = split_left - margin                          /* Width of the left split-bar panel */
     2232    rpane_width  = main_iwidth - split_left - 60 - margin       /* Width of the right split-bar panel */
     2233
     2234    /* Tabbed Dialog = right pane */
    20402235    ok = VRset("TDL_1", "Left",   split_left + 60)
    20412236    ok = VRset("TDL_1", "Width",  rpane_width    )
    20422237    ok = VRset("TDL_1", "Height", pane_height    )
    2043 
    2044     /* Button bar */
    2045     ok = VRSet("GB_BUTTONS",  "Top",   buttons_top )
    2046     ok = VRSet("GB_BUTTONS",  "Left",  main_iwidth - VRGet("GB_Buttons","Width") - margin )
    20472238
    20482239    /* Current Panel */
     
    20802271    ok = VRset("PB_UNMOUNT", "Width",  min((lpane_width-margin*3) % 2, 1313)    )
    20812272
     2273    /* Splitbar - reduced in size to make it more noticable */
    20822274    ok = VRset("SPLIT_Main", "Visible", 1           )
    2083     ok = VRset("SPLIT_Main", "Top",     marginx2  )
    2084     ok = VRset("SPLIT_Main", "Height",  pane_height )
    2085 
     2275    ok = VRset("SPLIT_Main", "Top",     marginx2 + (pane_height-1200)%2  )
     2276    ok = VRset("SPLIT_Main", "Height",  1200 /* pane_height */ )
     2277
     2278    /* Statusbar */
    20862279    ok = VRSet("GB_STATUSBAR", "Left",  margin )
    20872280    ok = VRSet("GB_STATUSBAR", "Top",   main_iheight - sbar_height - margin )
     
    20902283    ok = VRset("DT_STATUSBAR", "Top",   12 )
    20912284    ok = VRset("DT_STATUSBAR", "Left",  12 )
     2285    ok = VRset("DT_STATUSBAR", "Height", VRGet("GB_STATUSBAR","Height") -24 )
    20922286    ok = VRset("DT_STATUSBAR", "Width", (lpane_width + 50 + rpane_width) - 24 )
    20932287
    2094     pane_height =     pane_height -1020
    2095     rpane_width =     rpane_width -620
    2096 
    2097     /* SMBTree stuff */
    2098     ok = VRSet("GB_SMBTREE", "Top",     marginx2      )
    2099     ok = VRSet("GB_SMBTREE", "Left",    marginx2 /* split_left + 60 */ )
     2288    /* Modified for notebook pages */
     2289    pane_height = marginx2 + pane_height -1020
     2290    rpane_width = marginx2 + rpane_width -760
     2291
     2292    /* Dialog page */
     2293    ok = VRSet("GB_DIALOG", "Top",    margin /* marginx2 */ )
     2294    ok = VRSet("GB_DIALOG", "Left",   margin /* marginx2 */ /* split_left + 60 */ )
     2295    ok = VRset("GB_DIALOG", "Height", pane_height )
     2296    ok = VRset("GB_DIALOG", "Width",  rpane_width )
     2297
     2298    ok = VRset("PB_MOUNT",      "Left", margin )
     2299    ok = VRset("PB_MOUNT",      "Top",  pane_height - pbtn_height - marginx2)
     2300    ok = VRset("PB_EDIT_CANCEL", "Left", VRGet("PB_MOUNT","Width") + marginx2)
     2301    ok = VRset("PB_EDIT_CANCEL", "Top",  pane_height - pbtn_height - marginx2)
     2302
     2303    ok = VRset("PB_DIALOG_HELP", "Left", rpane_width - marginx2 - VRGet("PB_DIALOG_HELP","Width") + 24)
     2304    ok = VRset("PB_DIALOG_HELP", "Top",  pane_height - pbtn_height - marginx2)
     2305
     2306    ok = VRset("GB_SHARE", "Left",  margin )
     2307    ok = VRset("GB_SHARE", "Top",   marginx2 /* 245 + marginx2 */ )
     2308    ok = VRset("GB_SHARE", "Width", rpane_width - marginx2 )
     2309
     2310    ok = VRset("GB_AUTH", "Left",  margin )
     2311    ok = VRset("GB_AUTH", "Top",   margin * 3 + VRGet("GB_SHARE","Height") /* 245 + (margin * 3) + VRGet("GB_SHARE","Height") */ )
     2312    ok = VRset("GB_AUTH", "Width", rpane_width - marginx2 )
     2313
     2314    ok = VRset("GB_MPOINT","Left",   margin )
     2315    ok = VRset("GB_MPOINT","Top",    /* 245 + */ (margin * 4) + VRGet("GB_SHARE","Height") + VRGet("GB_AUTH","Height"))
     2316    ok = VRset("GB_MPOINT","Width",  rpane_width - marginx2 )
     2317
     2318    /* Advanced page */
     2319    ok = VRSet("GB_ADVANCED", "Top",    margin /* marginx2 */ )
     2320    ok = VRSet("GB_ADVANCED", "Left",   margin /* marginx2 */ /* split_left + 60 */ )
     2321    ok = VRset("GB_ADVANCED", "Height", pane_height )
     2322    ok = VRset("GB_ADVANCED", "Width",  rpane_width )
     2323
     2324    ok = VRset("GB_ADVANCED2", "Left",   margin )
     2325    ok = VRset("GB_ADVANCED2", "Top",    /* 245 + */ marginx2)
     2326    ok = VRset("GB_ADVANCED2", "Width",  rpane_width - marginx2)
     2327    ok = VRset("GB_ADVANCED2", "Height", pane_height - (margin * 5) - pbtn_height /* - 245 */ )
     2328
     2329    ok = VRset("PB_ADVANCED_APPLY", "Left",   margin )
     2330    ok = VRset("PB_ADVANCED_APPLY", "Top",    pane_height - pbtn_height   - marginx2)
     2331    ok = VRset("PB_ADVANCED_UNDO", "Left",   VRGet("PB_SMBTREE_CONNECT","Width") + marginx2)
     2332    ok = VRset("PB_ADVANCED_UNDO", "Top",    pane_height - pbtn_height   - marginx2)
     2333    ok = VRset("PB_ADVANCED_HELP", "Left", rpane_width - marginx2 - VRGet("PB_SMBTREE_HELP","Width") + 24)
     2334    ok = VRset("PB_ADVANCED_HELP", "Top",  pane_height - pbtn_height - marginx2)
     2335
     2336    /* SMBTree page */
     2337    ok = VRSet("GB_SMBTREE", "Top",     margin /* x2 */     )
     2338    ok = VRSet("GB_SMBTREE", "Left",    margin /* x2 */ /* split_left + 60 */ )
    21002339    ok = VRset("GB_SMBTREE", "Height",  pane_height     )
    21012340    ok = VRset("GB_SMBTREE", "Width",   rpane_width     )
    21022341
    2103     ok = VRset("GB_SMBTREE3","Top",     margin )
    2104     ok = VRset("GB_SMBTREE3","Left",    margin )
    2105     ok = VRset("GB_SMBTREE3","Height",  245    )
    2106     ok = VRset("GB_SMBTREE3","Width",   rpane_width - marginx2)
    2107 
    2108     ok = VRset("DT_SMBTREE", "Top",     8 )
    2109     ok = VRset("DT_SMBTREE", "Left",    8 )
    2110     ok = VRset("DT_SMBTREE", "Width",   (rpane_width - marginx2) - 24 )
    2111 
    21122342    ok = VRset("GB_SMBTREE2","Left",    margin                    )
    2113     ok = VRset("GB_SMBTREE2","Top",     245 + marginx2        )
     2343    ok = VRset("GB_SMBTREE2","Top",     /* 45 + */ marginx2        )
    21142344    ok = VRset("GB_SMBTREE2","Width",   rpane_width - marginx2)
    2115     ok = VRset("GB_SMBTREE2","Height",  pane_height - (margin * 5) - pbtn_height - 245 )
     2345    ok = VRset("GB_SMBTREE2","Height",  pane_height - (margin * 5) - pbtn_height /* - 245 */ )
    21162346
    21172347    ok = VRset("CN_SMBTREE",  "Top",    margin )
     
    21202350    ok = VRset("CN_SMBTREE",  "Height", VRGet("GB_SMBTREE2","Height") - marginx2)
    21212351
    2122     ok = VRset("PB_CONNECT", "Left",   margin )
    2123     ok = VRset("PB_CONNECT", "Top",    pane_height - pbtn_height   - marginx2)
    2124     ok = VRset("PB_REFRESH", "Left",   VRGet("PB_CONNECT","Width") + marginx2)
    2125     ok = VRset("PB_REFRESH", "Top",    pane_height - pbtn_height   - marginx2)
     2352    ok = VRset("PB_SMBTREE_CONNECT", "Left",   margin )
     2353    ok = VRset("PB_SMBTREE_CONNECT", "Top",    pane_height - pbtn_height   - marginx2)
     2354    ok = VRset("PB_SMBTREE_REFRESH", "Left",   VRGet("PB_SMBTREE_CONNECT","Width") + marginx2)
     2355    ok = VRset("PB_SMBTREE_REFRESH", "Top",    pane_height - pbtn_height   - marginx2)
    21262356    ok = VRset("PB_SMBTREE_HELP", "Left", rpane_width - marginx2 - VRGet("PB_SMBTREE_HELP","Width") + 24)
    21272357    ok = VRset("PB_SMBTREE_HELP", "Top",  pane_height - pbtn_height - marginx2)
    21282358
    2129     ok = VRset("PICT_THROBBER", "Top",  VRGet("CN_SMBTREE","Height") % 2 + 100 )
     2359    ok = VRset("PICT_THROBBER", "Top",  VRGet("CN_SMBTREE","Height") % 2 - 100 )
    21302360    ok = VRset("PICT_THROBBER", "Left", VRGet("CN_SMBTREE","Width")  % 2 - 200 )
    21312361
    2132     /* Connection details stuff */
    2133     ok = VRSet("GB_CONDET", "Top",     marginx2      )
    2134     ok = VRSet("GB_CONDET", "Left",    marginx2  /* split_left + 60 */ )
     2362    /* Connection details page */
     2363    ok = VRSet("GB_CONDET", "Top",     margin /* x2 */     )
     2364    ok = VRSet("GB_CONDET", "Left",    margin /* x2 */  /* split_left + 60 */ )
    21352365    ok = VRset("GB_CONDET", "Height",  pane_height     )
    21362366    ok = VRset("GB_CONDET", "Width",   rpane_width     )
    21372367
    2138     ok = VRset("GB_CONDET3","Top",     margin )
    2139     ok = VRset("GB_CONDET3","Left",    margin )
    2140     ok = VRset("GB_CONDET3","Height",  245    )
    2141     ok = VRset("GB_CONDET3","Width",   rpane_width - marginx2)
    2142 
    2143     ok = VRset("DT_CONDET", "Top",     8 )
    2144     ok = VRset("DT_CONDET", "Left",    8 )
    2145     ok = VRset("DT_CONDET", "Width",   (rpane_width - marginx2) - 24 )
    2146 
    21472368    ok = VRset("GB_CONDET2", "Left",   margin )
    2148     ok = VRset("GB_CONDET2", "Top",    245 + marginx2)
     2369    ok = VRset("GB_CONDET2", "Top",    /* 245 + */ marginx2)
    21492370    ok = VRset("GB_CONDET2", "Width",  rpane_width - marginx2)
    2150     ok = VRset("GB_CONDET2", "Height", pane_height - (margin * 5) - pbtn_height - 245 )
     2371    ok = VRset("GB_CONDET2", "Height", pane_height - (margin * 5) - pbtn_height /* - 245 */ )
    21512372
    21522373    ok = VRset("CN_CONDET",  "Top",    margin )
     
    21622383    ok = VRset("PB_CONDET_HELP", "Top",  pane_height - pbtn_height - marginx2)
    21632384
    2164 
    2165     /* Dialog stuff */
    2166     ok = VRSet("GB_DIALOG", "Top",    marginx2      )
    2167     ok = VRSet("GB_DIALOG", "Left",   marginx2 /* split_left + 60 */ )
    2168     ok = VRset("GB_DIALOG", "Height", pane_height     )
    2169     ok = VRset("GB_DIALOG", "Width",  rpane_width     )
    2170 
    2171     ok = VRset("GB_DIALOG3", "Top",    margin )
    2172     ok = VRset("GB_DIALOG3", "Left",   margin )
    2173     ok = VRset("GB_DIALOG3", "Height", 245    )
    2174     ok = VRset("GB_DIALOG3", "Width",  rpane_width - marginx2)
    2175 
    2176     ok = VRset("DT_DIALOG", "Top",   8 )
    2177     ok = VRset("DT_DIALOG", "Left",  8 )
    2178     ok = VRset("DT_DIALOG", "Width", (rpane_width - marginx2) - 24 )
    2179 
    2180     ok = VRset("PB_MOUNT",      "Left", margin )
    2181     ok = VRset("PB_MOUNT",      "Top",  pane_height - pbtn_height - marginx2)
    2182     ok = VRset("PB_EDITCANCEL", "Left", VRGet("PB_MOUNT","Width") + marginx2)
    2183     ok = VRset("PB_EDITCANCEL", "Top",  pane_height - pbtn_height - marginx2)
    2184 
    2185     ok = VRset("PB_DIALOGHELP", "Left", rpane_width - marginx2 - VRGet("PB_DIALOGHELP","Width") + 24)
    2186     ok = VRset("PB_DIALOGHELP", "Top",  pane_height - pbtn_height - marginx2)
    2187 
    2188 
    2189     ok = VRset("GB_SHARE", "Left",  margin )
    2190     ok = VRset("GB_SHARE", "Top",   245 + marginx2)
    2191     ok = VRset("GB_SHARE", "Width", rpane_width - marginx2)
    2192 
    2193     ok = VRset("GB_AUTH", "Left",  margin )
    2194     ok = VRset("GB_AUTH", "Top",   245 + (margin * 3) + VRGet("GB_SHARE","Height"))
    2195     ok = VRset("GB_AUTH", "Width", rpane_width - marginx2)
    2196 
    2197     ok = VRset("GB_MPOINT","Left",   margin )
    2198     ok = VRset("GB_MPOINT","Top",    245 + (margin * 4) + VRGet("GB_SHARE","Height") + VRGet("GB_AUTH","Height"))
    2199     ok = VRset("GB_MPOINT","Width",  rpane_width - marginx2)
    2200 
     2385    /* Global settings page */
     2386    ok = VRSet("GB_GLOBAL", "Top",     margin /* x2 */     )
     2387    ok = VRSet("GB_GLOBAL", "Left",    margin /* x2 */  /* split_left + 60 */ )
     2388    ok = VRset("GB_GLOBAL", "Height",  pane_height     )
     2389    ok = VRset("GB_GLOBAL", "Width",   rpane_width     )
     2390
     2391    ok = VRset("GB_GLOBAL2", "Left",  margin )
     2392    ok = VRset("GB_GLOBAL2", "Top",   marginx2 /* 245 + marginx2 */ )
     2393    ok = VRset("GB_GLOBAL2", "Width", rpane_width - marginx2 )
     2394
     2395    ok = VRset("GB_LOGGING", "Left",  margin )
     2396    ok = VRset("GB_LOGGING", "Top",   margin * 3 + VRGet("GB_GLOBAL2","Height") /* 245 + (margin * 3) + VRGet("GB_GLOBAL2","Height") */ )
     2397    ok = VRset("GB_LOGGING", "Width", rpane_width - marginx2 )
     2398
     2399    ok = VRset("GB_GUI","Left",   margin )
     2400    ok = VRset("GB_GUI","Top",    /* 245 + */ (margin * 4) + VRGet("GB_GLOBAL2","Height") + VRGet("GB_LOGGING","Height"))
     2401    ok = VRset("GB_GUI","Width",  rpane_width - marginx2 )
     2402
     2403    ok = VRset("PB_SETTINGS_APPLY", "Left", margin )
     2404    ok = VRset("PB_SETTINGS_APPLY", "Top",  pane_height - pbtn_height - marginx2      )
     2405    ok = VRset("PB_SETTINGS_APPLY", "Height", pbtn_height)
     2406    ok = VRset("PB_SETTINGS_UNDO", "Left", VRGet("PB_CONDET_SAVE","Width") + marginx2)
     2407    ok = VRset("PB_SETTINGS_UNDO", "Top",  pane_height - pbtn_height - marginx2      )
     2408    ok = VRset("PB_SETTINGS_UNDO", "Height", pbtn_height)
     2409    ok = VRset("PB_SETTINGS_HELP", "Left", rpane_width - marginx2 - VRGet("PB_CONDET_HELP","Width") + 24)
     2410    ok = VRset("PB_SETTINGS_HELP", "Top",  pane_height - pbtn_height - marginx2)
     2411    ok = VRset("PB_SETTINGS_HELP", "Height", pbtn_height)
     2412
     2413    /* DOne with pages */
    22012414    ok = VRset("Main","Painting", 1)
    22022415
     
    22432456Menu_Context_Edit_Click:
    22442457    IF options.!debug == 1 THEN SAY time()' Menu_Context_Edit_Click started'
     2458    /* call VRMethod "TDL_1", 'PostEvent', 'PageSelected', 'Page', 1 */
     2459    ok = VRset("TDL_1", 'Selected', 1)
    22452460    options.!editmode = 1
    2246     if \VRGet("Menu_View_Dialog","Checked") then call Menu_View_Dialog_Click
    2247     CALL VRSet "PB_EDITCANCEL","Visible", 1
     2461    CALL VRSet "PB_EDIT_CANCEL","Visible", 1
    22482462    CALL VRSet "PB_UNMOUNT","Enabled", 0
    2249     CALL VRSet "PB_SAVE","Enabled", 0
    2250     CALL VRSet "PB_LOAD","Enabled", 0
    2251     CALL NLVSetText "DT_DIALOG","Caption",33
     2463
     2464    ok = VRMethod( "TDL_1", "SetTabText", 1, " "NLVGetMessage(33)" " )
     2465/*  CALL NLVSetText "DT_DIALOG","Caption",33 */
    22522466    CALL VRSet "GB_CURRENT", "ENABLED", 0
    22532467
     
    23802594return
    23812595
    2382 /*:VRX         Menu_File_Advanced_Click
    2383 */
    2384 Menu_File_Advanced_Click:
    2385     CALL VRLoadSecondary "SW_ADVANCED", "W"
    2386 return
    2387 
    23882596/*:VRX         Menu_File_Autostart_Activate_Click
    23892597*/
    23902598Menu_File_Autostart_Activate_Click:
    2391     call PB_AUTOSTART_Click
    2392 return
    2393 
     2599    options.!autostart = 1
     2600
     2601    Profile    = VRParseFilename(settings.!ini,'DPN')'.'fs.!profileext
     2602    ExeName    = VRParseFileName(VRget("Application","Program"),'DPNE')
     2603    if ExeName = "" then do
     2604        parse source . . script
     2605        ExeName = VRParseFilename(script,'DP')'\EVFSGUI.EXE'
     2606    end
     2607    StartupDir = VRParseFileName(VRget("Application","Program"),'DP')
     2608    if StartupDir = "" then do
     2609        parse source . . script
     2610        StartUpDir = VRParseFilename(script,'DP')
     2611    end
     2612   
     2613    ObjTitle   = NLVGetMessage( 59 )
     2614    if ObjTitle = "" then ObjTitle = '[EVFS LAN-Connections]'
     2615
     2616    CALL PB_SAVE_Click
     2617
     2618    rc = CreateObject( 'WPProgram', ObjTitle,'<WP_START>',,
     2619            'EXENAME='||ExeName||';'||,
     2620            'PROGTYPE=PM;'||,
     2621            'TITLE='ObjTitle';'||,
     2622            'PARAMETERS='Profile' -AUTOCLOSE -NOGUI;'||,
     2623            'STARTUPDIR='StartupDir';'||,
     2624            'NOPRINT=YES;'||,
     2625            'HIDEBUTTON=DEFAULT;'||,
     2626            'MINWIN=DEFAULT;'||,
     2627            'CCVIEW=DEFAULT;'||,
     2628            'DEFAULTVIEW=DEFAULT;'||,
     2629            'OBJECTID=<EVFSGUI_AUTOSTART>',,
     2630        'REPLACE' )
     2631
     2632    IF rc == 1 THEN do
     2633        Text = NLVGetMessage( 60 )
     2634        if Text = "" then Text = '[Created object in Autostart-Folder]'
     2635        CALL VRMessage 'Main', Text, VRGet("Main", "Caption")
     2636    end
     2637    ELSE do
     2638        Text = NLVGetMessage( 61 )
     2639        if Text = "" then Text = '[Could not create object in Autostart-Folder]'
     2640        Title = NLVGetMessage( 5 )
     2641        if Title = "" then Title = '[Error]'
     2642        CALL VRMessage 'Main', Text, Title, 'E'
     2643    end
     2644
     2645    options.!autostart = 0
     2646return
    23942647/*:VRX         Menu_File_Autostart_Click
    23952648*/
     
    24192672*/
    24202673Menu_File_Close_Click:
    2421     call PB_CLOSE_Click
     2674    call Quit
    24222675return
    24232676
    24242677/*:VRX         Menu_File_Load_Click
    24252678*/
    2426 Menu_File_Load_Click:
    2427     call PB_LOAD_Click
    2428 return
    2429 
     2679Menu_File_Load_Click: PROCEDURE EXPOSE settings. options. icons. advanced. vfs. Profile fs. cd. samba.
     2680    IF options.!autoload == 1 then filename = Profile
     2681    else filename = VRFileDialog('Main', NLVGetMessage( 55 ), 'L', '*.'fs.!profileext)
     2682    IF filename == '' THEN RETURN
     2683    IF STREAM( filename, 'C', 'QUERY EXISTS') == '' THEN DO
     2684        CALL VRMessage 'Main', NLVGetMessage( 56, filename ), NLVGetMessage( 5 ), 'E'
     2685        RETURN
     2686    END
     2687
     2688    CALL LINEIN filename, 1, 0
     2689    DO WHILE LINES( filename )
     2690        PARSE VALUE LINEIN( filename ) WITH node resource rwFlag
     2691
     2692        vfs.!drive      = FILESPEC('DRIVE', node )
     2693        vfs.!mountpoint = STRIP( node, 'T', '\')
     2694
     2695        /* In case we only have a volume we reattach the backslash, otherwise restore will fail */
     2696        if vfs.!drive = vfs.!mountpoint then vfs.!mountpoint = vfs.!mountpoint||'\'
     2697
     2698        call ParseResParmString
     2699
     2700        options.!workgroup  = p_workgroup
     2701        options.!server     = p_server
     2702        options.!share      = p_share
     2703        options.!user       = p_user
     2704        options.!password   = p_password
     2705        options.!spassword  = p_spassword
     2706        options.!master     = p_master
     2707        options.!mastertype = p_mtype
     2708/*      options.!memlen     = p_memlen
     2709        options.!logfile    = p_logfile
     2710        options.!loglevel   = p_loglevel */
     2711        options.!cachetimeout = p_cachetimeout
     2712        options.!cachelistings = p_cachelistings
     2713        options.!easupport  = p_easupport
     2714
     2715        IF rwFlag == 'R' THEN
     2716            options.!readonly = 1
     2717        ELSE
     2718            options.!readonly = 0
     2719
     2720        CALL Mount
     2721
     2722    END
     2723    CALL STREAM filename, 'C', 'CLOSE'
     2724
     2725    options.!autoload = 0
     2726
     2727    CALL Refresh
     2728RETURN
    24302729/*:VRX         Menu_File_Save_Click
    24312730*/
     
    24342733return
    24352734
    2436 /*:VRX         Menu_File_Settings_Click
    2437 */
    2438 Menu_File_Settings_Click:
    2439     CALL VRLoadSecondary "SW_SETTINGS", "W"
    2440 return
    2441 
    24422735/*:VRX         Menu_Help_About_Click
    24432736*/
     
    24552748*/
    24562749Menu_Selected_Connect_Click:
    2457     call PB_CONNECT_Click
     2750    call PB_SMBTREE_CONNECT_Click
    24582751return
    24592752
     
    25682861        if VRMethod("CN_CONDET", "GetRecordAttr", srcRec, "Icon") = icons.!passive then ok = VRMethod( "CN_CONDET", "RemoveRecord", srcRec)
    25692862    end
    2570 return
    2571 
    2572 /*:VRX         Menu_View_Buttons_Click
    2573 */
    2574 Menu_View_Buttons_Click:
    2575     current_height = VRGet("Main", "Height")
    2576     buttons_height = margin * 2 + 400
    2577     if settings.!buttonson = 1 then do
    2578         ok = VRSet("Menu_View_Buttons","Checked",0)
    2579         ok = VRset("GB_Buttons","Visible", 0)
    2580         ok = VRset("PB_DIALOGHELP","Visible", 1)
    2581         ok = VRset("PB_CONDET_HELP","Visible", 1)
    2582         ok = VRset("PB_SMBTREE_HELP","Visible", 1)
    2583         options.!buttondelta = 0
    2584         settings.!buttonson = 0
    2585         new_height = current_height - buttons_height
    2586     end
    2587     else do
    2588         ok = VRSet("GB_Buttons","Visible", 1)
    2589         ok = VRset("PB_DIALOGHELP","Visible", 0)
    2590         ok = VRset("PB_CONDET_HELP","Visible", 0)
    2591         ok = VRset("PB_SMBTREE_HELP","Visible", 0)
    2592         ok = VRSet("Menu_View_Buttons","Checked",1)
    2593         options.!buttondelta = buttons_height
    2594         settings.!buttonson = 1
    2595         new_height = current_height + buttons_height
    2596     end
    2597 
    2598     ok = VRSet("Main", "Height", new_height )
    2599 return
    2600 
    2601 /*:VRX         Menu_View_ConDet_Click
    2602 */
    2603 Menu_View_ConDet_Click:
    2604     if VRGet("TM_Throbber","Enabled") = 1 then ok = VRset("Pict_Throbber", "Visible", 0)
    2605 
    2606     ok = VRset("GB_SMBTREE","Visible",  0)
    2607     ok = VRset("GB_SMBTREE","Painting", 0)
    2608     ok = VRset("GB_Dialog", "Visible",  0)
    2609     ok = VRset("GB_Dialog", "Painting", 0)
    2610     ok = VRset("GB_CONDET", "Visible",  1)
    2611     ok = VRset("GB_CONDET", "Painting", 1)
    2612 
    2613     ok = VRSet("Menu_View_SmbTree","Checked",  0)
    2614     ok = VRSet("Menu_View_Dialog", "Checked",  0)
    2615     ok = VRSet("Menu_View_ConDet", "Checked",  1)
    2616 
    2617     /* Hide any "foreign" menu entries */
    2618     ok = VRSet("Menu_Selected_Connect", "Visible", 0)
    2619 return
    2620 
    2621 /*:VRX         Menu_View_Dialog_Click
    2622 */
    2623 Menu_View_Dialog_Click:
    2624     if VRGet("TM_Throbber","Enabled") = 1 then ok = VRset("Pict_Throbber", "Visible", 0)
    2625 
    2626     ok = VRset("GB_SMBTREE","Visible", 0)
    2627     ok = VRset("GB_SMBTREE","Painting", 0)
    2628     ok = VRset("GB_CONDET", "Visible",  0)
    2629     ok = VRset("GB_CONDET", "Painting", 0)
    2630     ok = VRset("GB_Dialog", "Visible", 1)
    2631     ok = VRset("GB_Dialog", "Painting", 1)
    2632 
    2633     ok = VRSet("Menu_View_SmbTree","Checked", 0)
    2634     ok = VRSet("Menu_View_ConDet", "Checked", 0)
    2635     ok = VRSet("Menu_View_Dialog", "Checked", 1)
    2636 
    2637     ok = VRSet("Menu_Selected_Remove", "Visible",  0)
    2638     ok = VRSet("Menu_Selected_Retry",  "Visible",  0)
    2639 
    2640     ok = VRSet("Menu_Selected_Connect", "Visible",  0)
    2641 
    2642     call _DialogPopulate
    2643 return
    2644 
    2645 /*:VRX         Menu_View_MiniIcons_Click
    2646 */
    2647 Menu_View_MiniIcons_Click:
    2648     advanced.!bigicons = \advanced.!bigicons
    2649     ok = VRset("CN_CURRENT", "MiniIcons", \advanced.!bigicons)
    2650     ok = VRset("CN_SMBTREE", "MiniIcons", \advanced.!bigicons)
    2651     ok = VRset("CN_CONDET",  "MiniIcons", \advanced.!bigicons)
    2652     ok = VRset("Menu_View_MiniIcons",  "Checked", \advanced.!bigicons)
    2653 return
    2654 
    2655 /*:VRX         Menu_View_SmbTree_Click
    2656 */
    2657 Menu_View_SmbTree_Click:
    2658     if VRGet("TM_Throbber","Enabled") = 1 then ok = VRset("Pict_Throbber", "Visible", 1)
    2659 
    2660     ok = VRset("GB_Dialog",  "Visible", 0)
    2661     ok = VRset("GB_Dialog", "Painting", 0)
    2662     ok = VRset("GB_CONDET", "Visible",  0)
    2663     ok = VRset("GB_CONDET", "Painting", 0)
    2664     ok = VRset("GB_SMBTREE","Painting", 1)
    2665     ok = VRset("GB_SMBTREE","Visible",  1)
    2666 
    2667     ok = VRSet("Menu_View_Dialog","Checked",  0)
    2668     ok = VRSet("Menu_View_ConDet","Checked",  0)
    2669     ok = VRSet("Menu_View_SmbTree","Checked", 1)
    2670 
    2671     /* Hide any "foreign" menu entries */
    2672     ok = VRSet("Menu_Selected_Remove", "Visible", 0)
    2673     ok = VRSet("Menu_Selected_Retry",  "Visible", 0)
    26742863return
    26752864
     
    28413030RETURN
    28423031
    2843 /*:VRX         ParseCommandLine
    2844 */
    2845 ParseCommandLine:
    2846     IF options.!debug == 1 THEN SAY time()' ParseCommandLine() started'
    2847     CmdLine = VRGet("Application","Commandline")
    2848     upCmdLine = translate(CmdLine)
    2849     IF options.!debug == 1 THEN SAY '  Commandline = "'CmdLine'"'
    2850 
    2851     ForceNDFS = 0
    2852     if wordpos('-NDFS',upCmdLine) > 0 then do
    2853         IF options.!debug == 1 THEN SAY "  NDFS switch detected"
    2854         CmdLine = delWord(CmdLine,wordpos('-NDFS',upCmdLine),1)
    2855         upCmdLine = translate(CmdLine)
    2856         ForceNDFS = 1
    2857         CALL VRSet "PB_AutoStart","Visible", 0
    2858     end
    2859 
    2860     if wordpos('-AUTOCLOSE',upCmdLine) > 0 then do
    2861         options.!autoclose = 1
    2862         IF options.!debug == 1 THEN SAY "  AutoClose switch detected"
    2863         CmdLine = delWord(CmdLine,wordpos('-AUTOCLOSE',upCmdLine),1)
    2864         upCmdLine = translate(CmdLine)
    2865     end
    2866     if wordpos('-NOGUI',upCmdLine) > 0 then do
    2867         options.!nogui = 1
    2868         options.!autoclose = 1
    2869         IF options.!debug == 1 THEN SAY "  -NOGUI switch detected"
    2870         CmdLine = delWord(CmdLine,wordpos('-NOGUI',upCmdLine),1)
    2871         upCmdLine = translate(CmdLine)
    2872     end
    2873 
    2874     options.!delay     = 0
    2875 
    2876     if wordpos('-DELAY',upCmdLine) > 0 then do
    2877         IF options.!debug == 1 THEN SAY "  DELAY switch detected"
    2878         dwpos = wordpos('-DELAY',upCmdLine)
    2879         if dwpos = words(upCmdLine) then do /* DELAY was last parm - assume 60 seconds */
    2880             options.!delay = 60
    2881             CmdLine = delWord(CmdLine,dwpos,1)
    2882         end
    2883         else do
    2884             options.!delay = word(upCmdLine,dwpos+1)
    2885             if datatype(options.!delay) <> "NUM" then do /* No number of seconds specified */
    2886                 options.!delay = 60
    2887                 CmdLine = delWord(CmdLine,dwpos,1)
    2888             end
    2889             else do
    2890                 CmdLine = delWord(CmdLine,dwpos,2)
    2891             end
    2892         end
    2893         upCmdLine = translate(CmdLine)
    2894         IF options.!debug == 1 THEN SAY "  DELAY set to "options.!delay" seconds."
    2895     end
    2896 
    2897     Profile = strip(CmdLine,,'"')
    2898     if Profile <> "" then do
    2899         Profile = strip(VRParseFilename(Profile,"DPNE"))
    2900         options.!autoload   = 1
    2901         IF options.!debug == 1 THEN SAY '  Profile = "'Profile'"'
    2902         if \VRFileExists(Profile) then do
    2903             CALL VRMessage 'Main', NLVGetMessage( 102, Profile ), NLVGetMessage( 1 ), 'E'
    2904             /* Disable all switches in case of an error */
    2905             options.!autoload  = 0
    2906             options.!autoclose = 0
    2907             options.!nogui     = 0
    2908             options.!delay     = 0
    2909         end
    2910     end
    2911     IF options.!debug == 1 THEN SAY time()' ParseCommandLine done'
    2912 return
    2913 
    29143032/*:VRX         ParseResourceData
    29153033*/
     
    30293147return
    30303148
    3031 /*:VRX         PB_ADVANCED_Click
    3032 */
    3033 PB_ADVANCED_Click:
    3034     CALL Menu_File_Advanced_Click
    3035 RETURN
    3036 
    3037 /*:VRX         PB_ADVCANCEL_Click
    3038 */
    3039 PB_ADVCANCEL_Click:
    3040     CALL SW_ADVANCED_Close
    3041 RETURN
    3042 
    3043 /*:VRX         PB_ADVHELP_Click
    3044 */
    3045 PB_ADVHELP_Click:
    3046     CALL VRMethod 'SW_ADVANCED', 'InvokeHelp'
    3047 return
    3048 
    3049 /*:VRX         PB_ADVOK_Click
    3050 */
    3051 PB_ADVOK_Click:
    3052     advanced.!memlen    = VRGet( "SPB_MEMLEN",   "Value" )
    3053     advanced.!easupport = VRGet( "CB_EAS",       "Set" )
    3054     advanced.!readonly  = VRGet( "CB_READONLY",  "Set" )
    3055     advanced.!alwaysmp  = VRGet( "CB_ALWAYSMP",  "Set" )
     3149/*:VRX         PB_ADVANCED_APPLY_Click
     3150*/
     3151PB_ADVANCED_APPLY_Click:
     3152    advanced.!easupport     = VRGet( "CB_EAS",             "Set"   )
     3153    advanced.!readonly      = VRGet( "CB_READONLY",        "Set"   )
     3154    advanced.!alwaysmp      = VRGet( "CB_ALWAYSMP",        "Set"   )
    30563155    advanced.!cachetimeout  = VRGet( "SPIN_CACHETIMEOUT",  "Value" )
    30573156    advanced.!cachelistings = VRGet( "SPIN_CACHELISTINGS", "Value" )
    30583157
    3059     CALL SW_ADVANCED_Close
    3060 return
    3061 
    3062 /*:VRX         PB_AUTOSTART_Click
    3063 */
    3064 PB_AUTOSTART_Click: /* PROCEDURE EXPOSE settings. options. icons. Profile fs. cd. advanced. samba. */
    3065     options.!autostart = 1
    3066 
    3067     Profile    = VRParseFilename(settings.!ini,'DPN')'.'fs.!profileext
    3068     ExeName    = VRParseFileName(VRget("Application","Program"),'DPNE')
    3069     if ExeName = "" then do
    3070         parse source . . script
    3071         ExeName = VRParseFilename(script,'DP')'\EVFSGUI.EXE'
    3072     end
    3073     StartupDir = VRParseFileName(VRget("Application","Program"),'DP')
    3074     if StartupDir = "" then do
    3075         parse source . . script
    3076         StartUpDir = VRParseFilename(script,'DP')
    3077     end
    3078    
    3079     ObjTitle   = NLVGetMessage( 59 )
    3080     if ObjTitle = "" then ObjTitle = '[EVFS LAN-Connections]'
    3081 
    3082     CALL PB_SAVE_Click
    3083 
    3084     rc = CreateObject( 'WPProgram', ObjTitle,'<WP_START>',,
    3085             'EXENAME='||ExeName||';'||,
    3086             'PROGTYPE=PM;'||,
    3087             'TITLE='ObjTitle';'||,
    3088             'PARAMETERS='Profile' -AUTOCLOSE -NOGUI;'||,
    3089             'STARTUPDIR='StartupDir';'||,
    3090             'NOPRINT=YES;'||,
    3091             'HIDEBUTTON=DEFAULT;'||,
    3092             'MINWIN=DEFAULT;'||,
    3093             'CCVIEW=DEFAULT;'||,
    3094             'DEFAULTVIEW=DEFAULT;'||,
    3095             'OBJECTID=<EVFSGUI_AUTOSTART>',,
    3096         'REPLACE' )
    3097 
    3098     IF rc == 1 THEN do
    3099         Text = NLVGetMessage( 60 )
    3100         if Text = "" then Text = '[Created object in Autostart-Folder]'
    3101         CALL VRMessage 'Main', Text, VRGet("Main", "Caption")
    3102     end
    3103     ELSE do
    3104         Text = NLVGetMessage( 61 )
    3105         if Text = "" then Text = '[Could not create object in Autostart-Folder]'
    3106         Title = NLVGetMessage( 5 )
    3107         if Title = "" then Title = '[Error]'
    3108         CALL VRMessage 'Main', Text, Title, 'E'
    3109     end
    3110 
    3111     options.!autostart = 0
     3158    /* Obsolete */
     3159    advanced.!memlen        = VRGet( "SPB_MEMLEN",         "Value" )
     3160return
     3161
     3162/*:VRX         PB_ADVANCED_HELP_Click
     3163*/
     3164PB_ADVANCED_HELP_Click:
     3165    CALL VRMethod 'SW_ADVANCED', 'InvokeHelp'
     3166return
     3167
     3168/*:VRX         PB_ADVANCED_UNDO_Click
     3169*/
     3170PB_ADVANCED_UNDO_Click:
     3171    CALL SW_ADVANCED_Init_Content
    31123172RETURN
    3113 
    3114 /*:VRX         PB_CLOSE_Click
    3115 */
    3116 PB_CLOSE_Click:
    3117     CALL Quit
    3118 return
    31193173
    31203174/*:VRX         PB_CONDET_HELP_Click
     
    31973251RETURN
    31983252
    3199 /*:VRX         PB_CONNECT_Click
    3200 */
    3201 PB_CONNECT_Click: PROCEDURE EXPOSE settings. options. icons. fs. advanced. cd. samba.
    3202     IF options.!debug == 1 THEN SAY time()' '||"PB_CONNECT_Click started"
    3203 
    3204     ok = VRMethod( "CN_SMBTREE", "GetRecordList", "SourceOrSelected", "SelRH." )
    3205 
    3206     if SelRH.0 = 0 then do
    3207         IF options.!debug == 1 THEN SAY time()' '||"PB_CONNECT_Click aborted"
    3208         return
    3209     end
    3210 
    3211     p_workgroup = ''
    3212     p_server    = ''
    3213     p_share     = ''
    3214 
    3215     srcFile = ""
    3216     srcCtn  = VRGet("CN_SMBTREE","Self")
    3217     srcRec  = SelRH.1
    3218     trgCtn  = VRGet("CN_CURRENT","Self")
    3219     trgRec  = ""
    3220 
    3221     IF options.!debug == 1 THEN do
    3222         say '  srcCtn      = "'srcCtn'"'
    3223         if srcCtn <> "" then say '  srcCtn name = "'VRGet(srcCtn,'Name')'"'
    3224         say '  srcRec      = "'srcRec'"'
    3225         say '  trgCtn      = "'trgCtn'"'
    3226         if trgCtn <> "" then say '  trgCtn name = "'VRGet(trgCtn,'Name')'"'
    3227         say '  trgRec      = "'trgRec'"'
    3228     end
    3229 
    3230     ok = VRMethod("CB_MOUNT", "GetStringList", "ShareLevels." )
    3231 
    3232     DragCapt = VRMethod(srcCtn, "GetRecordAttr", srcRec, "Caption")
    3233     ParentRH = VRMethod(srcCtn, "GetRecordAttr", srcRec, "Parent")
    3234 
    3235     if ParentRH = "" then do /* A workgroup was dragged */
    3236         say "Workgroup dragged!"
    3237         parse var DragCapt p_workgroup '0D0A'x .
    3238         p_workgroup = strip(p_workgroup)
    3239         ok = VRSet("EF_NETWORK","Value",strip(p_workgroup))
    3240         ok = VRSet("EF_SERVER","Value","")
    3241         ok = VRSet("EF_SHARE","Value","")
    3242 
    3243         ShareLevel = 3
    3244     end
    3245     else do
    3246         ParDragCapt = VRMethod(srcCtn, "GetRecordAttr", ParentRH, "Caption")
    3247         GParentRH = VRMethod(srcCtn, "GetRecordAttr", ParentRH, "Parent")
    3248 
    3249         if GParentRH = "" then do /* A server was dragged */
    3250             say "Server dragged!"
    3251             parse var ParDragCapt p_workgroup '0D0A'x .
    3252             ok = VRSet("EF_NETWORK","Value",strip(p_workgroup))
    3253             p_workgroup = strip(p_workgroup)
    3254 
    3255             parse var DragCapt p_server '0D0A'x .
    3256             p_server = strip(p_server)
    3257             ok = VRSet("EF_SERVER","Value",strip(p_server))
    3258             ok = VRSet("EF_Share","Value","")
    3259 
    3260             ShareLevel = 2
    3261         end
    3262         else do /* A share was dragged */
    3263             say "Share dragged!"
    3264             GParDragCapt = VRMethod(srcCtn, "GetRecordAttr", GParentRH, "Caption")
    3265 
    3266             parse var GParDragCapt p_workgroup '0D0A'x .
    3267             p_workgroup = strip(p_workgroup)
    3268             ok = VRSet("EF_NETWORK","Value",strip(p_workgroup))
    3269 
    3270             parse var ParDragCapt p_server '0D0A'x .
    3271             p_server = strip(p_server)
    3272             ok = VRSet("EF_SERVER","Value",strip(p_server))
    3273 
    3274             parse var DragCapt p_share '0D0A'x .
    3275             p_share = strip(p_share)
    3276             ok = VRSet("EF_Share","Value",strip(p_share))
    3277 
    3278             ShareLevel = 1
    3279         end
    3280     end
    3281 
    3282     say 'p_workgroup = "'p_workgroup'"'
    3283     say 'p_server   = "'p_server'"'
    3284     say 'p_share = "'p_share'"'
    3285 
    3286     ok = VRSet( "CB_MOUNT", "Selected", Sharelevel )
    3287     call CB_MOUNT_Change
    3288 
    3289     if trgRec = "" then do
    3290         window = VRLoadSecondary( "SW_MOUNTPOINT", "W" )
    3291         if VRGet("CB_DRIVES","Value") = "" then return
    3292     end
    3293     else do
    3294 
    3295         TargetString = VRMethod(trgCtn, "GetRecordAttr", trgRec, "Caption")
    3296 
    3297         parTrgRH = VRMethod(trgCtn, "GetRecordAttr", trgRec, "Parent")
    3298 
    3299         do while parTrgRH <> ""
    3300             partrgCapt = VRMethod(trgCtn, "GetRecordAttr", partrgRH, "Caption")
    3301             TargetString = partrgCapt||'\'||TargetString
    3302             parTrgRH = VRMethod(trgCtn, "GetRecordAttr", partrgRH , "Parent")
    3303         end
    3304         say 'TargetString = "'TargetString'"'
    3305         ok = VRSet("CB_DRIVES","Value", left(TargetString,2))
    3306         ok = VRSet("EF_DIRECTORY","Value", substr(TargetString,4))
    3307     end
    3308 
    3309     window = VRLoadSecondary( "SW_LOGIN", "W" )
    3310     if credentials.!entered = 1 then call PB_MOUNT_CLICK
    3311 
    3312     IF options.!debug == 1 THEN SAY time()' '||"PB_CONNECT_Click done"
    3313 RETURN
    3314 
    33153253/*:VRX         PB_DETACH_Click
    33163254*/
     
    33473285RETURN
    33483286
    3349 /*:VRX         PB_DIALOGHELP_Click
    3350 */
    3351 PB_DIALOGHELP_Click:
     3287/*:VRX         PB_DIALOG_HELP_Click
     3288*/
     3289PB_DIALOG_HELP_Click:
    33523290    CALL VRMethod 'GB_DIALOG', 'InvokeHelp'
    33533291return
    33543292
    3355 /*:VRX         PB_EDITCANCEL_Click
    3356 */
    3357 PB_EDITCANCEL_Click:
     3293/*:VRX         PB_EDIT_CANCEL_Click
     3294*/
     3295PB_EDIT_CANCEL_Click:
    33583296    options.!editmode = 0
    33593297    CALL VRSet "PB_UNMOUNT","Enabled", 1
    3360     CALL VRSet "PB_SAVE","Enabled", 1
    3361     CALL VRSet "PB_LOAD","Enabled", 1
    33623298    CALL VRSet "GB_CURRENT", "ENABLED", 1
    3363     ok = VRSet("PB_EDITCANCEL","Visible", 0)
    3364     CALL NLVSetText 'DT_DIALOG',        "Caption", 13
     3299    ok = VRSet("PB_EDIT_CANCEL","Visible", 0)
     3300    ok = VRMethod( "TDL_1", "SetTabText", 1, " "NLVGetMessage(13)" " )
     3301/*  CALL NLVSetText 'DT_DIALOG',        "Caption", 13 */
    33653302RETURN 0
    3366 
    3367 /*:VRX         PB_HELP_Click
    3368 */
    3369 PB_HELP_Click:
    3370     CALL VRMethod 'Main', 'InvokeHelp'
    3371 return
    33723303
    33733304/*:VRX         PB_INFO_OK_Click
     
    33753306PB_INFO_OK_Click:
    33763307    call SW_INFO_Close
    3377 RETURN
    3378 
    3379 /*:VRX         PB_LOAD_Click
    3380 */
    3381 PB_LOAD_Click: PROCEDURE EXPOSE settings. options. icons. advanced. vfs. Profile fs. cd. samba.
    3382     IF options.!autoload == 1 then filename = Profile
    3383     else filename = VRFileDialog('Main', NLVGetMessage( 55 ), 'L', '*.'fs.!profileext)
    3384     IF filename == '' THEN RETURN
    3385     IF STREAM( filename, 'C', 'QUERY EXISTS') == '' THEN DO
    3386         CALL VRMessage 'Main', NLVGetMessage( 56, filename ), NLVGetMessage( 5 ), 'E'
    3387         RETURN
    3388     END
    3389 
    3390     CALL LINEIN filename, 1, 0
    3391     DO WHILE LINES( filename )
    3392         PARSE VALUE LINEIN( filename ) WITH node resource rwFlag
    3393 
    3394         vfs.!drive      = FILESPEC('DRIVE', node )
    3395         vfs.!mountpoint = STRIP( node, 'T', '\')
    3396 
    3397         /* In case we only have a volume we reattach the backslash, otherwise restore will fail */
    3398         if vfs.!drive = vfs.!mountpoint then vfs.!mountpoint = vfs.!mountpoint||'\'
    3399 
    3400         call ParseResParmString
    3401 
    3402         options.!workgroup  = p_workgroup
    3403         options.!server     = p_server
    3404         options.!share      = p_share
    3405         options.!user       = p_user
    3406         options.!password   = p_password
    3407         options.!spassword  = p_spassword
    3408         options.!master     = p_master
    3409         options.!mastertype = p_mtype
    3410 /*      options.!memlen     = p_memlen
    3411         options.!logfile    = p_logfile
    3412         options.!loglevel   = p_loglevel */
    3413         options.!cachetimeout = p_cachetimeout
    3414         options.!cachelistings = p_cachelistings
    3415         options.!easupport  = p_easupport
    3416 
    3417         IF rwFlag == 'R' THEN
    3418             options.!readonly = 1
    3419         ELSE
    3420             options.!readonly = 0
    3421 
    3422         CALL Mount
    3423 
    3424     END
    3425     CALL STREAM filename, 'C', 'CLOSE'
    3426 
    3427     options.!autoload = 0
    3428 
    3429     CALL Refresh
    34303308RETURN
    34313309
     
    34563334        CALL PB_UNMOUNT_Click
    34573335        options.!editmode = 0
    3458         CALL NLVSetText 'DT_DIALOG',        "Caption", 13
     3336        ok = VRMethod("TDL_1","SetTabText", " "NLVGetMessage(13)" ")
     3337/*      CALL NLVSetText 'DT_DIALOG',        "Caption", 13 */
     3338
    34593339        CALL VRSet "PB_UNMOUNT","Enabled", 1
    34603340        CALL VRSet "PB_SAVE","Enabled", 1
     
    36233503return
    36243504
    3625 /*:VRX         PB_REFRESH_Click
    3626 */
    3627 PB_REFRESH_Click: PROCEDURE EXPOSE settings. options. icons. fs. samba. debuglevel advanced. UserCred Refreshmode
    3628     IF options.!debug == 1 THEN SAY time()' '||"PB_REFRESH_Click started"
    3629 
    3630     if advanced.!browseauth = 1 & (UserCred = "--user=%" | UserCred = "" ) then do
    3631         window = VRLoadSecondary( "SW_LOGIN", "W" )
    3632     end
    3633 
    3634     call _UserCredUpdate
    3635     ok = VRset("Pict_Throbber", "Visible", 1)
    3636     ok = VRset("Menu_Selected_Connect", "Visible", 0)
    3637     ok = VRset("TM_Throbber", "Enabled", 1)
    3638     ShowHidden = advanced.!special
    3639     BroadCast = advanced.!broadcast
    3640     ok = time('R')
    3641     call _RefreshTree
    3642     IF options.!debug == 1 THEN SAY time()' '||"PB_REFRESH_Click done"
    3643 RETURN
    3644 
    3645 /*:VRX         PB_SAVE_Click
    3646 */
    3647 PB_SAVE_Click: PROCEDURE EXPOSE settings. options. icons. Profile fs. cd. advanced. samba.
    3648     call PB_CONDET_SAVE_Click
    3649 RETURN
    3650 
    3651 /*  Old deprecated code:
    3652 
    3653     if options.!autostart == 0 THEN filename = VRFileDialog('Main', NLVGetMessage( 50 ), 'S', '*.'fs.!profileext)
    3654     ELSE filename = Profile
    3655 
    3656     IF filename == '' THEN RETURN
    3657 
    3658     IF STREAM( filename, 'C', 'QUERY EXISTS') \= '' THEN DO
    3659         btns.0 = 2
    3660         btns.1 = NLVGetMessage( 6 )
    3661         btns.2 = NLVGetMessage( 7 )
    3662         confirm = VRMessage('Main', NLVGetMessage( 54, filename ), NLVGetMessage( 53 ), 'W', 'btns.', 1, 2 )
    3663         IF confirm \= 1 THEN RETURN
    3664         CALL VRChAttr filename,, 'HSR'
    3665         CALL VRDeleteFile filename
    3666     END
    3667 
    3668     CALL VRMethod "CN_CURRENT", 'GetRecordList', 'All', 'records.'
    3669     DO i = 1 TO records.0
    3670         data = VRMethod("CN_CURRENT", 'GetRecordAttr', records.i, 'UserData')
    3671         IF data == '' THEN ITERATE
    3672         PARSE VAR data node ';' mounts ';' .
    3673 
    3674         CALL _Dynamic "ok = "fs.!prefix"RxGetMount( node, 'info.', 'mounts.', 'resource.')"
    3675         IF ok \= 0 THEN ITERATE
    3676 
    3677         DO j = 1 TO resource.0
    3678             CALL LINEOUT filename, node SUBWORD( resource.j, 3 )
    3679         END
    3680 
    3681     END
    3682     CALL STREAM filename, 'C', 'CLOSE'
    3683 
    3684     if options.!autostart == 0 THEN CALL VRMessage 'Main', NLVGetMessage( 52, filename ), NLVGetMessage( 51 ), 'I'
    3685 */
    3686 
    3687 /*:VRX         PB_SETTINGS_CANCEL_Click
    3688 */
    3689 PB_SETTINGS_CANCEL_Click:
    3690     CALL SW_SETTINGS_Close
    3691 return
    3692 
    3693 /*:VRX         PB_SETTINGS_HELP_Click
    3694 */
    3695 PB_SETTINGS_HELP_Click:
    3696     CALL VRMethod 'SW_SETTINGS', 'InvokeHelp'
    3697 return
    3698 
    3699 /*:VRX         PB_SETTINGS_OK_Click
    3700 */
    3701 PB_SETTINGS_OK_Click:
     3505/*:VRX         PB_SETTINGS_APPLY_Click
     3506*/
     3507PB_SETTINGS_APPLY_Click:
    37023508    advanced.!loglevel    = VRGet("SPIN_LOGLEVEL", "Value" )
    37033509    advanced.!logfile     = VRGet("EF_LOGFILE",    "Value" )
     
    37073513    advanced.!savepassive = VRGet("CB_SAVEPASSIVE","Set" )
    37083514    advanced.!broadcast   = VRGet("CB_BROADCAST",  "Set" )
     3515    advanced.!miniicons   = VRGet("CB_MINIICONS",  "Set" )
    37093516
    37103517    options.!debug        = VRGet("CB_DEBUG",      "Set" )
     
    37353542    end
    37363543
    3737     CALL SW_SETTINGS_Close
    3738 return
     3544    ok = VRset("CN_CURRENT", "MiniIcons", advanced.!miniicons)
     3545    ok = VRset("CN_SMBTREE", "MiniIcons", advanced.!miniicons)
     3546    ok = VRset("CN_CONDET",  "MiniIcons", advanced.!miniicons)
     3547return
     3548
     3549/*:VRX         PB_SETTINGS_HELP_Click
     3550*/
     3551PB_SETTINGS_HELP_Click:
     3552    CALL VRMethod 'SW_SETTINGS', 'InvokeHelp'
     3553return
     3554
     3555/*:VRX         PB_SETTINGS_UNDO_Click
     3556*/
     3557PB_SETTINGS_UNDO_Click:
     3558    call SW_SETTINGS_Init_Content
     3559return
     3560
     3561/*:VRX         PB_SMBTREE_CONNECT_Click
     3562*/
     3563PB_SMBTREE_CONNECT_Click: PROCEDURE EXPOSE settings. options. icons. fs. advanced. cd. samba.
     3564    IF options.!debug == 1 THEN SAY time()' '||"PB_CONNECT_Click started"
     3565
     3566    ok = VRMethod( "CN_SMBTREE", "GetRecordList", "SourceOrSelected", "SelRH." )
     3567
     3568    if SelRH.0 = 0 then do
     3569        IF options.!debug == 1 THEN SAY time()' '||"PB_CONNECT_Click aborted"
     3570        return
     3571    end
     3572
     3573    p_workgroup = ''
     3574    p_server    = ''
     3575    p_share     = ''
     3576
     3577    srcFile = ""
     3578    srcCtn  = VRGet("CN_SMBTREE","Self")
     3579    srcRec  = SelRH.1
     3580    trgCtn  = VRGet("CN_CURRENT","Self")
     3581    trgRec  = ""
     3582
     3583    IF options.!debug == 1 THEN do
     3584        say '  srcCtn      = "'srcCtn'"'
     3585        if srcCtn <> "" then say '  srcCtn name = "'VRGet(srcCtn,'Name')'"'
     3586        say '  srcRec      = "'srcRec'"'
     3587        say '  trgCtn      = "'trgCtn'"'
     3588        if trgCtn <> "" then say '  trgCtn name = "'VRGet(trgCtn,'Name')'"'
     3589        say '  trgRec      = "'trgRec'"'
     3590    end
     3591
     3592    ok = VRMethod("CB_MOUNT", "GetStringList", "ShareLevels." )
     3593
     3594    DragCapt = VRMethod(srcCtn, "GetRecordAttr", srcRec, "Caption")
     3595    ParentRH = VRMethod(srcCtn, "GetRecordAttr", srcRec, "Parent")
     3596
     3597    if ParentRH = "" then do /* A workgroup was dragged */
     3598        say "Workgroup dragged!"
     3599        parse var DragCapt p_workgroup '0D0A'x .
     3600        p_workgroup = strip(p_workgroup)
     3601        ok = VRSet("EF_NETWORK","Value",strip(p_workgroup))
     3602        ok = VRSet("EF_SERVER","Value","")
     3603        ok = VRSet("EF_SHARE","Value","")
     3604
     3605        ShareLevel = 3
     3606    end
     3607    else do
     3608        ParDragCapt = VRMethod(srcCtn, "GetRecordAttr", ParentRH, "Caption")
     3609        GParentRH = VRMethod(srcCtn, "GetRecordAttr", ParentRH, "Parent")
     3610
     3611        if GParentRH = "" then do /* A server was dragged */
     3612            say "Server dragged!"
     3613            parse var ParDragCapt p_workgroup '0D0A'x .
     3614            ok = VRSet("EF_NETWORK","Value",strip(p_workgroup))
     3615            p_workgroup = strip(p_workgroup)
     3616
     3617            parse var DragCapt p_server '0D0A'x .
     3618            p_server = strip(p_server)
     3619            ok = VRSet("EF_SERVER","Value",strip(p_server))
     3620            ok = VRSet("EF_Share","Value","")
     3621
     3622            ShareLevel = 2
     3623        end
     3624        else do /* A share was dragged */
     3625            say "Share dragged!"
     3626            GParDragCapt = VRMethod(srcCtn, "GetRecordAttr", GParentRH, "Caption")
     3627
     3628            parse var GParDragCapt p_workgroup '0D0A'x .
     3629            p_workgroup = strip(p_workgroup)
     3630            ok = VRSet("EF_NETWORK","Value",strip(p_workgroup))
     3631
     3632            parse var ParDragCapt p_server '0D0A'x .
     3633            p_server = strip(p_server)
     3634            ok = VRSet("EF_SERVER","Value",strip(p_server))
     3635
     3636            parse var DragCapt p_share '0D0A'x .
     3637            p_share = strip(p_share)
     3638            ok = VRSet("EF_Share","Value",strip(p_share))
     3639
     3640            ShareLevel = 1
     3641        end
     3642    end
     3643
     3644    say 'p_workgroup = "'p_workgroup'"'
     3645    say 'p_server   = "'p_server'"'
     3646    say 'p_share = "'p_share'"'
     3647
     3648    ok = VRSet( "CB_MOUNT", "Selected", Sharelevel )
     3649    call CB_MOUNT_Change
     3650
     3651    if trgRec = "" then do
     3652        window = VRLoadSecondary( "SW_MOUNTPOINT", "W" )
     3653        if VRGet("CB_DRIVES","Value") = "" then return
     3654    end
     3655    else do
     3656
     3657        TargetString = VRMethod(trgCtn, "GetRecordAttr", trgRec, "Caption")
     3658
     3659        parTrgRH = VRMethod(trgCtn, "GetRecordAttr", trgRec, "Parent")
     3660
     3661        do while parTrgRH <> ""
     3662            partrgCapt = VRMethod(trgCtn, "GetRecordAttr", partrgRH, "Caption")
     3663            TargetString = partrgCapt||'\'||TargetString
     3664            parTrgRH = VRMethod(trgCtn, "GetRecordAttr", partrgRH , "Parent")
     3665        end
     3666        say 'TargetString = "'TargetString'"'
     3667        ok = VRSet("CB_DRIVES","Value", left(TargetString,2))
     3668        ok = VRSet("EF_DIRECTORY","Value", substr(TargetString,4))
     3669    end
     3670
     3671    window = VRLoadSecondary( "SW_LOGIN", "W" )
     3672    if credentials.!entered = 1 then call PB_MOUNT_CLICK
     3673
     3674    IF options.!debug == 1 THEN SAY time()' '||"PB_CONNECT_Click done"
     3675RETURN
    37393676
    37403677/*:VRX         PB_SMBTREE_HELP_Click
     
    37433680    CALL VRMethod 'GB_SMBTREE', 'InvokeHelp'
    37443681return
     3682
     3683/*:VRX         PB_SMBTREE_REFRESH_Click
     3684*/
     3685PB_SMBTREE_REFRESH_Click: PROCEDURE EXPOSE settings. options. icons. fs. samba. debuglevel advanced. UserCred Refreshmode
     3686    IF options.!debug == 1 THEN SAY time()' '||"PB_REFRESH_Click started"
     3687
     3688    if advanced.!browseauth = 1 & (UserCred = "--user=%" | UserCred = "" ) then do
     3689        window = VRLoadSecondary( "SW_LOGIN", "W" )
     3690    end
     3691
     3692    call _UserCredUpdate
     3693    ok = VRset("Pict_Throbber", "Visible", 1)
     3694    ok = VRset("Menu_Selected_Connect", "Visible", 0)
     3695    ok = VRset("TM_Throbber", "Enabled", 1)
     3696    ShowHidden = advanced.!special
     3697    BroadCast = advanced.!broadcast
     3698    ok = time('R')
     3699    call _RefreshTree
     3700    IF options.!debug == 1 THEN SAY time()' '||"PB_REFRESH_Click done"
     3701RETURN
    37453702
    37463703/*:VRX         PB_UNMOUNT_Click
     
    37813738*/
    37823739Quit:
    3783     if Fatal <> 1 then CALL SaveSettings
     3740    if Fatal <> 1 then CALL _INISave
    37843741    ok = VRREdirectSTdio("OFF")
    37853742    window = VRWindow()
    37863743    call VRSet window, "Shutdown", 1
    37873744    drop window
    3788 
    37893745RETURN
    37903746
     
    38293785    CALL VRMethod 'CB_DRIVES', 'Clear'
    38303786
    3831 /* Herwig B.
    3832     CALL VRSet 'Main', 'StatusText', ' ' */
    38333787    CALL VRSet "CN_CURRENT", "Caption", ' '
    3834 /* Herwig B. */
    3835 
    3836 /* Herwig B.: Attention! The SysDrivemap function with the "free" parameter causes hangs in case it is called repeatedly! */
     3788
     3789    /* Herwig B.: Attention! The SysDrivemap function with the "free" parameter causes hangs in case it is called repeatedly! */
    38373790    drvs = MyFreeDriveMap('C:', 'FREE')
    38383791
     
    38503803    IF options.!debug == 1 THEN SAY time()' '||"Refresh done"
    38513804RETURN 0
    3852 
    3853 /*:VRX         SaveSettings
    3854 */
    3855 SaveSettings: PROCEDURE EXPOSE settings. options. icons. fs. advanced. cd. samba.
    3856     IF options.!debug == 1 THEN SAY time()' '||"SaveSettings started"
    3857 
    3858     if advanced.!savepassive then call _PassiveSave
    3859 
    3860 /* This does not make sense anymore
    3861     settings.!network = VRGet("EF_NETWORK","Value")
    3862     CALL VRSetIni 'Settings', 'Network', settings.!network, settings.!ini, 'NoClose'
    3863  */
    3864 
    3865     font = VRGet("CN_CURRENT", 'Font')
    3866     CALL VRSetIni 'Settings', 'ContainerFont', font, settings.!ini, 'NoClose'
    3867 
    3868     font = VRGet('Main', 'Font')
    3869     CALL VRSetIni 'Settings', 'WindowFont', font, settings.!ini, 'NoClose'
    3870 
    3871     settings.!curbcolor = VRGet("DT_CURRENT","BackColor")
    3872     CALL VRSetIni 'Settings', 'TitleBarBackground', settings.!curbcolor, settings.!ini, 'NoClose'
    3873 
    3874     settings.!curfcolor = VRGet("DT_CURRENT","ForeColor")
    3875     CALL VRSetIni 'Settings', 'TitleBarForeground', settings.!curfcolor, settings.!ini, 'NoClose'
    3876 
    3877     settings.!buttonson = VRGet("Menu_View_Buttons","Checked")
    3878     CALL VRSetIni 'Settings', 'ButtonsOn', settings.!buttonson, settings.!ini, 'NoClose'
    3879 
    3880     settings.!smbtreeon = VRGet("Menu_View_Smbtree","Checked")
    3881     CALL VRSetIni 'Settings', 'SmbtreeOn', settings.!smbtreeon, settings.!ini, 'NoClose'
    3882 
    3883     settings.!dialogon = VRGet("Menu_View_Dialog","Checked")
    3884     CALL VRSetIni 'Settings', 'DialogOn', settings.!dialogon, settings.!ini, 'NoClose'
    3885 
    3886     settings.!condeton = VRGet("Menu_View_ConDet","Checked")
    3887     CALL VRSetIni 'Settings', 'ConDetOn', settings.!condeton, settings.!ini, 'NoClose'
    3888 
    3889     CALL VRSetIni 'Settings', 'BrowseAuth',    advanced.!browseauth , settings.!ini, 'NoClose'
    3890     CALL VRSetIni 'Settings', 'BrowseImme',    advanced.!browseimme , settings.!ini, 'NoClose'
    3891     CALL VRSetIni 'Settings', 'AlwaysMP',      advanced.!alwaysmp   , settings.!ini, 'NoClose'
    3892     CALL VRSetIni 'Settings', 'SpecialShares', advanced.!special    , settings.!ini, 'NoClose'
    3893     CALL VRSetIni 'Settings', 'BigIcons',      advanced.!bigicons   , settings.!ini, 'NoClose'
    3894     CALL VRSetIni 'Settings', 'SavePassive',   advanced.!savepassive, settings.!ini, 'NoClose'
    3895     CALL VRSetIni 'Settings', 'Broadcast',     advanced.!broadcast  , settings.!ini, 'NoClose'
    3896 
    3897     CALL VRSetIni 'Settings', 'Debug',         options.!debug       , settings.!ini, 'NoClose'
    3898 
    3899     /* Save position and size */
    3900     settings.!l = VRGet("Main",       'Left'  )
    3901     settings.!t = VRGet("Main",       'Top'   )
    3902     settings.!h = VRGet("Main",       'Height')
    3903     settings.!w = VRGet("Main",       'Width' )
    3904     settings.!s = VRGet("SPLIT_Main", 'Left'  )
    3905 
    3906     CALL VRSetIni 'Settings', 'X', settings.!l, settings.!ini, 'NoClose'
    3907     CALL VRSetIni 'Settings', 'Y', settings.!t, settings.!ini, 'NoClose'
    3908     CALL VRSetIni 'Settings', 'H', settings.!h, settings.!ini, 'NoClose'
    3909     CALL VRSetIni 'Settings', 'W', settings.!w, settings.!ini, 'NoClose'
    3910     CALL VRSetIni 'Settings', 'S', settings.!s, settings.!ini
    3911 
    3912     IF options.!debug == 1 THEN SAY time()' '||"SaveSettings done"
    3913 RETURN
    39143805
    39153806/*:VRX         SPLIT_Main_Move
     
    39253816return
    39263817
    3927 /*:VRX         StemsInit
    3928 */
    3929 StemsInit:
    3930     options.!workgroup  = ''
    3931     options.!server     = ''
    3932     options.!share      = ''
    3933     options.!user       = ''
    3934     options.!password   = ''
    3935     options.!spassword  = ''
    3936     options.!master     = ''
    3937     options.!mastertype = ''
    3938     options.!memlen     = '2'
    3939     options.!cachetimeout  = '10'
    3940     options.!cachelistings = '32'
    3941     options.!easupport  = '1'
    3942     options.!readonly   = ''
    3943     options.!loglevel   = 0
    3944     options.!logfile    = ''
    3945 
    3946     options.!autoload   = 0
    3947     options.!autoclose  = 0
    3948     options.!nogui      = 0
    3949     options.!autostart  = 0
    3950     options.!editmode   = 0
    3951 
    3952     vfs.!drive      = ''
    3953     vfs.!mountpoint = ''
    3954 
    3955     advanced.!memlen     = ''
    3956 
    3957 
    3958     advanced.!loglevel   = '0'
    3959     advanced.!logfile    = ''
    3960     advanced.!browseauth = ''
    3961     advanced.!browseimme = ''
    3962     advanced.!broadcast  = ''
    3963     advanced.!savepassive= ''
    3964     advanced.!special    = ''
    3965     advanced.!bigicons   = ''
    3966 
    3967     advanced.!easupport  = '1'
    3968     advanced.!readonly   = ''
    3969     advanced.!alwaysmp   = ''
    3970     advanced.!cachetimeout  = '10'
    3971     advanced.!cachelistings = '32'
    3972 
    3973     credentials.!username = ""
    3974     credentials.!password = ""
    3975     credentials.!entered  = 0
    3976 
    3977     UserCred = ""
    3978     RefreshMode = ""
    3979 
    3980     icons.!bat              = '#1:PMWP.DLL'
    3981     icons.!cmd              = '#2:PMWP.DLL'
    3982     icons.!exe              = '#3:PMWP.DLL'
    3983     icons.!template         = '#10:PMWP.DLL'
    3984     icons.!drive            = '#16:PMWP.DLL'
    3985     icons.!defaultfile      = '#24:PMWP.DLL'
    3986     icons.!folder           = '#26:PMWP.DLL'
    3987     icons.!folder_open      = '#34:PMWP.DLL'
    3988     icons.!machine_sleeping = '#61:PMWP.DLL'
    3989     icons.!active           = '#64:PMWP.DLL'
    3990     icons.!passive          = '#68:PMWP.DLL'
    3991     icons.!printer          = '#65:PMWP.DLL'
    3992     icons.!drive_inactive   = '#70:PMWP.DLL'
    3993     icons.!pdf              = '#80'
    3994     icons.!spreadsheet      = '#82'
    3995     icons.!textdocument     = '#86'
    3996     icons.!framework        = '#87'
    3997     icons.!image            = '#88'
    3998     icons.!movie            = '#89'
    3999     icons.!sound            = '#90'
    4000     icons.!warpin           = '#91'
    4001     icons.!zip              = '#92'
    4002     icons.!view             = '#93'
    4003     icons.!plaintext        = '#94'
    4004 return
    40053818/*:VRX         SW_ABOUT_Close
    40063819*/
     
    41423955
    41433956    /* Options */
    4144     CALL NLVSetText "GB_MISC",          "Caption", 43
     3957    CALL NLVSetText "GB_ADVANCED",          "Caption", 43
    41453958    CALL NLVSetText "CB_EAS",           "Caption", 44
    41463959    CALL NLVSetText "CB_READONLY",      "Caption", 45
     
    41503963
    41513964    /* Buttons */
    4152     CALL NLVSetText "PB_ADVOK",     "Caption", 2
    4153     CALL NLVSetText "PB_ADVCANCEL", "Caption", 3
    4154     CALL NLVSetText "PB_ADVHELP",   "Caption", 4
    4155     CALL NLVSetText "GB_MEM",       "Caption", 41     /* Obsolete */
     3965    CALL NLVSetText "PB_ADVANCED_APPLY",     "Caption", 122
     3966    CALL NLVSetText "PB_ADVANCED_UNDO", "Caption", 123
     3967    CALL NLVSetText "PB_ADVANCED_HELP",   "Caption", 4
    41563968
    41573969    CALL VRSet "SW_ADVANCED", "HelpTag", NLVGetMessage(40)
    41583970
    4159     IF advanced.!memlen    \= "" THEN ok = VRSet("SPB_MEMLEN", "Value", advanced.!memlen)
    4160     IF advanced.!easupport \= "" THEN ok = VRSet("CB_EAS",     "Set",   advanced.!easupport)
    4161     IF advanced.!readonly  \= "" THEN ok = VRSet("CB_READONLY","Set",   advanced.!readonly)
    4162     IF advanced.!alwaysmp  \= "" THEN ok = VRSet("CB_ALWAYSMP","Set",   advanced.!alwaysmp)
    4163     IF advanced.!cachetimeout  \= "" THEN ok = VRSet("SPIN_CACHETIMEOUT", "Value", advanced.!cachetimeout)
    4164     IF advanced.!cachelistings \= "" THEN ok = VRSet("SPIN_CACHELISTINGS","Value", advanced.!cachelistings)
    4165 
    4166     call VRMethod "SW_ADVANCED", "CenterWindow"
     3971/*  call VRMethod "SW_ADVANCED", "CenterWindow" */
    41673972    ok = VRSet("SW_ADVANCED", "Visible", 1)
    4168     call VRMethod "SW_ADVANCED", "Activate"
     3973/*  call VRMethod "SW_ADVANCED", "Activate" */
     3974return
     3975
     3976/*:VRX         SW_ADVANCED_Init_Content
     3977*/
     3978SW_ADVANCED_Init_Content:
     3979    IF advanced.!easupport     \= "" THEN ok = VRSet("CB_EAS",     "Set",   advanced.!easupport)
     3980    IF advanced.!readonly      \= "" THEN ok = VRSet("CB_READONLY","Set",   advanced.!readonly)
     3981    IF advanced.!alwaysmp      \= "" THEN ok = VRSet("CB_ALWAYSMP","Set",   advanced.!alwaysmp)
     3982    IF advanced.!cachetimeout  \= "" THEN ok = VRSet("SPIN_CACHETIMEOUT",   "Value", advanced.!cachetimeout)
     3983    IF advanced.!cachelistings \= "" THEN ok = VRSet("SPIN_CACHELISTINGS",  "Value", advanced.!cachelistings)
     3984
     3985    /* Obsolete */
     3986    IF advanced.!memlen        \= "" THEN ok = VRSet("SPB_MEMLEN", "Value", advanced.!memlen)
    41693987return
    41703988
     
    41914009*/
    41924010SW_CONDET_Init:
    4193     window = VRInfo( "Object" )
    4194     if( \VRIsChildOf( window, "Notebook" ) ) then do
    4195         call VRMethod window, "CenterWindow"
    4196         call VRSet window, "Visible", 1
    4197         call VRMethod window, "Activate"
    4198     end
    4199     drop window
     4011
     4012return
     4013
     4014/*:VRX         SW_CONDET_Init_Content
     4015*/
     4016SW_CONDET_Init_Content:
     4017    if VRGet("TM_Throbber","Enabled") = 1 then ok = VRset("Pict_Throbber", "Visible", 0)
     4018
     4019    /* Hide any "foreign" menu entries */
     4020    ok = VRSet("Menu_Selected_Connect", "Visible", 0)
    42004021return
    42014022
     
    42224043*/
    42234044SW_DIALOG_Init:
    4224     window = VRInfo( "Object" )
    4225     if( \VRIsChildOf( window, "Notebook" ) ) then do
    4226         call VRMethod window, "CenterWindow"
    4227         call VRSet window, "Visible", 1
    4228         call VRMethod window, "Activate"
    4229     end
    4230     drop window
     4045
     4046return
     4047
     4048/*:VRX         SW_DIALOG_Init_Content
     4049*/
     4050SW_DIALOG_Init_Content:
     4051    if VRGet("TM_Throbber","Enabled") = 1 then ok = VRset("Pict_Throbber", "Visible", 0)
     4052
     4053    ok = VRSet("Menu_Selected_Remove",  "Visible",  0)
     4054    ok = VRSet("Menu_Selected_Retry",   "Visible",  0)
     4055    ok = VRSet("Menu_Selected_Connect", "Visible",  0)
     4056
     4057    call _DialogPopulate
    42314058return
    42324059
     
    43514178    CALL NLVSetText "DT_CACHELISTINGS1", "Caption", 131
    43524179
    4353     ok = VRMethod( "CB_DRIVES", "GetStringList", "freedrives." )
     4180    ok = VRMethod( "CB_DRIVES",  "GetStringList", "freedrives." )
    43544181    ok = VRMethod( "CB_DRIVES1", "AddStringList", "freedrives." )
    4355     ok = VRSet("CB_DRIVES1", "Value", VRGet("CB_Drives","Value"))
     4182    ok = VRSet("CB_DRIVES1", "Value", freedrives.1)  /* VRGet("CB_Drives","Value") */
    43564183    ok = VRSet("EF_DIRECTORY1", "Value", VRGet("EF_Directory","Value"))
    43574184    ok = VRMethod("EF_DIRECTORY1","AddString",p_share)
     
    45074334    call NLVSetText "CB_SAVEPASSIVE",    "Caption", 73
    45084335    call NLVSetText "CB_BROADCAST",      "Caption", 74
     4336    call NLVSetText "CB_MINIICONS",       "Caption", 70
    45094337
    45104338    /* Buttons */
    4511     call NLVSetText "PB_SETTINGS_OK",    "Caption", 2
    4512     call NLVSetText "PB_SETTINGS_CANCEL","Caption", 3
    4513     call NLVSetText "PB_SETTINGS_HELP",  "Caption", 4
     4339    call NLVSetText "PB_SETTINGS_APPLY",  "Caption", 122
     4340    call NLVSetText "PB_SETTINGS_UNDO",   "Caption", 123
     4341    call NLVSetText "PB_SETTINGS_HELP",   "Caption", 4
    45144342
    45154343/*  call VRSet "SW_ADVANCED", "HelpTag", NLVGetMessage(40) */
    45164344
    4517     /* Init GUI from status variables */
     4345/*  call VRMethod "SW_SETTINGS", "CenterWindow" */
     4346    ok = VRSet("SW_SETTINGS", "Visible", 1)
     4347/*  call VRMethod "SW_SETTINGS", "Activate" */
     4348return
     4349
     4350/*:VRX         SW_SETTINGS_Init_Content
     4351*/
     4352SW_SETTINGS_Init_Content:
     4353    if advanced.!browseauth  \= ""  then ok = VRSet("CB_BROWSEAUTH", "Set",   advanced.!browseauth)
     4354    if advanced.!browseimme  \= ""  then ok = VRSet("CB_BROWSEIMME", "Set",   advanced.!browseimme)
     4355    if advanced.!broadcast   \= ""  then ok = VRSet("CB_BROADCAST",  "Set",   advanced.!broadcast)
     4356    if advanced.!special     \= ""  then ok = VRSet("CB_SPECIAL",    "Set",   advanced.!special)
     4357    if advanced.!savepassive \= ""  then ok = VRSet("CB_SAVEPASSIVE","Set",   advanced.!savepassive)
     4358
    45184359    call VRSet "CB_LOGGING", "Set", VRFileExists(SysBootDrive()"\ndpsmb.dbg")
     4360    if options.!debug        \= ""  then ok = VRSet("CB_debug",      "Set",   options.!debug)
     4361
     4362    if advanced.!miniicons   \= ""  then ok = VRSet("CB_MINIICONS",  "Set",   advanced.!miniicons)
     4363
     4364    /* Obsolete */
    45194365    if advanced.!logfile     \= ""  then ok = VRSet("EF_LOGFILE",    "Value", advanced.!logfile)
    45204366    if advanced.!loglevel    \= "0" then ok = VRSet("SPIN_LOGLEVEL", "Value", advanced.!loglevel)
    4521     if advanced.!browseauth  \= ""  then ok = VRSet("CB_BROWSEAUTH", "Set",   advanced.!browseauth)
    4522     if advanced.!browseimme  \= ""  then ok = VRSet("CB_BROWSEIMME", "Set",   advanced.!browseimme)
    4523     if advanced.!special     \= ""  then ok = VRSet("CB_SPECIAL",    "Set",   advanced.!special)
    4524     if advanced.!savepassive \= ""  then ok = VRSet("CB_SAVEPASSIVE","Set",   advanced.!savepassive)
    4525     if advanced.!broadcast   \= ""  then ok = VRSet("CB_BROADCAST",  "Set",   advanced.!broadcast)
    4526 
    4527     if options.!debug        \= ""  then ok = VRSet("CB_debug",      "Set",   options.!debug)
    4528 
    4529     call VRMethod "SW_SETTINGS", "CenterWindow"
    4530     ok = VRSet("SW_SETTINGS", "Visible", 1)
    4531     call VRMethod "SW_SETTINGS", "Activate"
    45324367return
    45334368
     
    45544389*/
    45554390SW_SMBTREE_Init:
    4556     window = VRInfo( "Object" )
    4557     if( \VRIsChildOf( window, "Notebook" ) ) then do
    4558         call VRMethod window, "CenterWindow"
    4559         call VRSet window, "Visible", 1
    4560         call VRMethod window, "Activate"
    4561     end
    4562     drop window
     4391
     4392return
     4393
     4394/*:VRX         SW_SMBTREE_Init_Content
     4395*/
     4396SW_SMBTREE_Init_Content:
     4397    if VRGet("TM_Throbber","Enabled") = 1 then ok = VRset("Pict_Throbber", "Visible", 1)
     4398
     4399    /* Hide any "foreign" menu entries */
     4400    ok = VRSet("Menu_Selected_Remove", "Visible", 0)
     4401    ok = VRSet("Menu_Selected_Retry",  "Visible", 0)
    45634402return
    45644403
     
    45664405*/
    45674406TDL_1_PageSelected:
    4568     page =  VRINfo("Page")
     4407    page =  VRInfo("Page")
     4408say "Page="page
     4409    /* call _TabsStrip */
    45694410    select
    4570         when page = 1 then call Menu_View_Dialog_Click
    4571         when page = 2 then call Menu_View_SMBTREE_Click
    4572         when page = 3 then call Menu_View_CONDET_Click
     4411        when page = 1 then do /* dialog */
     4412            call _TabFix 1
     4413        end
     4414        when page = 2 then do /* advanced */
     4415            call SW_ADVANCED_Init_Content
     4416        end
     4417        when page = 3 then do /* smbtree */
     4418            call SW_SMBTREE_Init_Content
     4419        end
     4420        when page = 4 then do /* condet */
     4421            call SW_CONDET_Init_Content
     4422        end
     4423        when page = 5 then do /* Settings */
     4424            call SW_SETTINGS_Init_Content
     4425        end
     4426        otherwise nop
    45734427    end
    45744428return
     
    45774431*/
    45784432TM_AutoClose_Trigger:
    4579     call PB_CLOSE_Click
     4433    call Quit
    45804434return
    45814435
     
    46064460            call _RefreshTreeDisplay
    46074461
    4608             if VRget("Menu_View_SmbTree", "Checked") then do
    4609                 if smbtree.!workgroup <> 'SMBTREE.!WORKGROUP' then do
    4610                     ok = VRset("Menu_Selected_Connect", "Visible", VRMethod("CN_SMBTREE", "ValidateRecord", smbtree.!workgroup ) )
    4611                 end
     4462            if smbtree.!workgroup <> 'SMBTREE.!WORKGROUP' then do
     4463                ok = VRset("Menu_Selected_Connect", "Visible", VRMethod("CN_SMBTREE", "ValidateRecord", smbtree.!workgroup ) )
    46124464            end
    46134465        end
  • trunk/guitools/evfsgui/evfsi_de.mkm

    r638 r639  
    130130EVG0120I: A~lle abh„ngen
    131131EVG0121I: ~Kopieren
    132 EVG0122?:
    133 EVG0123?:
     132EVG0122I: ~Anwenden
     133EVG0123I: ~Zurck
    134134EVG0124?:
    135135EVG0125?:
     
    141141EVG0130I: Zeitablauf Cache
    142142EVG0131I: Verzeichnisse cachen
     143EVG0132I: Seite %1 von %2
  • trunk/guitools/evfsgui/evfsi_en.mkm

    r638 r639  
    130130EVG0120I: Detach a~ll
    131131EVG0121I: To c~lipboard
    132 EVG0122?:
    133 EVG0123?:
     132EVG0122I: ~Apply
     133EVG0123I: ~Undo
    134134EVG0124?:
    135135EVG0125?:
     
    141141EVG0130I: sec. cache timeout
    142142EVG0131I: listings to cache
     143EVG0132I: Page %1 of %2
  • trunk/guitools/evfsgui/evfsi_fr.mkm

    r638 r639  
    136136EVG0120I: Tout D‚tache~r
    137137EVG0121I: ~Copier
    138 EVG0122?:
    139 EVG0123?:
     138EVG0122I: ~Appliquer
     139EVG0123I: A~nnuler
    140140EVG0124?:
    141141EVG0125?:
     
    147147EVG0130I: D‚lai du cache
    148148EVG0131I: Listes en cache
     149EVG0132I: Page %1 sur %2
  • trunk/guitools/evfsgui/evfsi_it.mkm

    r638 r639  
    134134EVG0120I: Rimuovi ~tutti
    135135EVG0121I: ~Copia
    136 EVG0122?:
    137 EVG0123?:
     136EVG0122I: ~Applicare
     137EVG0123I: ~Disfare
    138138EVG0124?:
    139139EVG0125?:
     
    145145EVG0130I: Cache timeout
    146146EVG0131I: Cache listings
     147EVG0132I: Pagina %1 di %2
Note: See TracChangeset for help on using the changeset viewer.