Changeset 511 for branches


Ignore:
Timestamp:
Jan 5, 2011, 6:18:48 PM (15 years ago)
Author:
Herwig Bauernfeind
Message:

GUI-Tools: EVFSGUI: Fix Ticket #150, plus login box

Location:
branches/guitools-2.0/evfsgui
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/guitools-2.0/evfsgui/changes

    r509 r511  
    1212  to work properly
    1313
    14 Version 2.1 beta3
     14Version 2.1 beta3 2011-XX-XX
     15- Fixed: Behaviour of login box did not work as designed
     16- Fixed: No mount attempt if entering credentials was aborted
     17- Fixed: Do not crash during "Detach all"
    1518- Refactoring: Create Icon. stem in order to ease maintenance of icons
    1619- Refactoring: Common wrapper around all dynamic functions
  • branches/guitools-2.0/evfsgui/evfsgui.VRP

    r509 r511  
    1010VRXWindow: __VREFileListWindow,1,807,11033,1590,3358
    1111VRXWindow: __VRESectionListWindow,1,2674,10648,8696,4794
    12 VRXWindow: __VREToolsWindow,1,2517,7082,6480,1669
     12VRXWindow: __VREToolsWindow,1,2517,7082,6486,1661
    1313VRXWindow: __VREWindListWindow,1,542,8721,2650,3150
    1414UserFile: 1
    1515UserWindow: Main,1
    16 UserWindow: SW_SETTINGS,1
     16UserWindow: SW_LOGIN,1
  • branches/guitools-2.0/evfsgui/evfsgui.VRX

    r509 r511  
    11941194    end
    11951195    window = VRLoadSecondary( "SW_LOGIN", "W" )
    1196     call PB_MOUNT_CLICK
     1196    if credentials.!entered = 1 then call PB_MOUNT_CLICK
    11971197
    11981198    if VRGet(srcCtn,'Name') = "CN_CONDET" & VRMethod( "CN_CONDET", "ValidateRecord", srcRec) = 1 then do
     
    13671367*/
    13681368EF_PASSWORD1_KeyPress:
     1369    IF options.!debug == 1 THEN SAY time()' EF_PASSWORD1_KeyPress started'   
    13691370    obj = VRInfo( "Object" )
    13701371    keystr = VRGet( obj, "KeyString" )
     
    13761377        otherwise nop
    13771378    end
     1379    IF options.!debug == 1 THEN SAY time()' EF_PASSWORD1_KeyPress done'   
    13781380return
    13791381
     
    14551457*/
    14561458EF_USER1_KeyPress:
     1459    IF options.!debug == 1 THEN SAY time()' EF_USER1_KeyPress started'   
    14571460    obj = VRInfo( "Object" )
    14581461    keystr = VRGet( obj, "KeyString" )
    1459 /*  say keystr */
     1462    say keystr
    14601463    select
    14611464        when keystr = "{Enter}" then ok = VRMethod( "EF_Password1", "SetFocus" )
     
    14641467        otherwise nop
    14651468    end
     1469    IF options.!debug == 1 THEN SAY time()' EF_USER1_KeyPress done'   
    14661470return
    14671471
     
    24132417                IF confirm \= 1 THEN RETURN
    24142418
    2415                 CALL _Dynamic "ok = "fs.!prefix"RxUnmount( mountpoint, mpidx )"
     2419                CALL _Dynamic "ok = "fs.!prefix"RxUnmount('"mountpoint"', "mpidx")"
    24162420                CALL VRMethod "CN_CONDET", 'RemoveRecord', selrec.I
    24172421                CALL Refresh
     
    25802584   
    25812585    IF options.!autoload then do
    2582         CALL _Dynamic "ok = "fs.!prefix"RxDetach(vfs.!drive)"
     2586        CALL _Dynamic "ok = "fs.!prefix"RxDetach('"vfs.!drive"')"
    25832587        IF options.!debug == 1 THEN SAY time()' '||'Autoload Detach "'vfs.!drive'" =' ok
    25842588    end */
     
    25862590    /* Attach the virtual drive - only if drive is not already attached */
    25872591    if pos(vfs.!drive,MyFreeDriveMap("C:","FREE")) > 0 then do
    2588         CALL _Dynamic "ok = "fs.!prefix"RxAttach( vfs.!drive )"
     2592        CALL _Dynamic "ok = "fs.!prefix"RxAttach('"vfs.!drive"')"
    25892593
    25902594        IF options.!debug == 1 THEN SAY time()' '||'Attach "'vfs.!drive'" =' ok
     
    25922596
    25932597    /* Create the mount point and store whether it was created or already existed */
    2594     CALL _Dynamic "CreateMP = "fs.!prefix"RxCreateMountPoint( vfs.!mountpoint )"
     2598    CALL _Dynamic "CreateMP = "fs.!prefix"RxCreateMountPoint('"vfs.!mountpoint"')"
    25952599
    25962600    IF options.!debug == 1 THEN SAY time()' '||'Create "'vfs.!mountpoint'" = 'CreateMP
     
    26632667
    26642668    /* Now mount the resource */
    2665     CALL _Dynamic "ok = "fs.!prefix"RxMount('smbfs', vfs.!mountpoint, src, rwFlag)"
     2669    CALL _Dynamic "ok = "fs.!prefix"RxMount('SMBFS','"vfs.!mountpoint"', '"src"', '"rwFlag"')"
    26662670
    26672671    IF options.!debug == 1 THEN SAY time()' '||'Mount "'vfs.!mountpoint'" =' ok
     
    26842688        /* In case the mountpoint was created for this failed operation, it is (optionally) removed again */
    26852689        if CreateMP = 0 & advanced.!alwaysmp <> 1 then do
    2686             CALL _Dynamic "ok = "fs.!prefix"RxDeleteMountPoint( vfs.!mountpoint )"
     2690            CALL _Dynamic "ok = "fs.!prefix"RxDeleteMountPoint('"vfs.!mountpoint"')"
    26872691            IF options.!debug == 1 THEN SAY time()' '||'Remove "'vfs.!mountpoint'" = 'ok
    26882692        end
     
    31793183
    31803184    window = VRLoadSecondary( "SW_LOGIN", "W" )
    3181 
    3182     call PB_MOUNT_CLICK
     3185    if credentials.!entered = 1 then call PB_MOUNT_CLICK
    31833186
    31843187    IF options.!debug == 1 THEN SAY time()' '||"PB_CONNECT_Click done"
     
    32023205    IF confirm \= 1 THEN RETURN
    32033206
    3204     /* TODO: ??  Unmount & delete all child mountpoints? */
    3205 
    3206     /* Unmount any resources */
    3207     DO i = 1 TO mounts
    3208         CALL _Dynamic "ok = "fs.!prefix"RxUnmount( mountpoint, i-1 )"
    3209         /* IF options.!debug == 1 THEN SAY time()' '||'Unmount resource' i-1 '=' ok */
    3210     END
    3211 
    3212     CALL _Dynamic "ok = "fs.!prefix"RxDetach( drive )"
    3213  /* IF options.!debug == 1 THEN SAY time()' '||'Detach' drive '=' ok */
     3207    /* TODO: ??  Unmount & delete all child mountpoints? - Do we need this? */
     3208    /* FIXME: This is potentially dangerous on Netdrive - what happens with unknown mount types? */
     3209    /* FIXME: Unclear under which circumstances we have an alpha value here (which crahed EVFSGUI) */
     3210    if datatype(mounts) = 'NUM' then do
     3211        /* Unmount any resources */
     3212        DO i = 1 TO mounts
     3213            CALL _Dynamic "ok = "fs.!prefix"RxUnmount('"mountpoint"', "i-1")"
     3214        END
     3215    end
     3216    else IF options.!debug == 1 THEN SAY ' '||"mounts = "mounts
     3217
     3218    CALL _Dynamic "ok = "fs.!prefix"RxDetach('"drive"')"
    32143219
    32153220    CALL Refresh
     
    33073312*/
    33083313PB_LOGIN_CANCEL_Click:
     3314    credentials.!entered = 0
    33093315    call SW_LOGIN_Close
    3310 RETURN 0
     3316RETURN
    33113317
    33123318/*:VRX         PB_LOGIN_OK_Click
     
    33153321    ok = VRSet("EF_USER","Value",VRGet("EF_USER1","Value"))
    33163322    ok = VRSet("EF_PASSWORD","Value",VRGet("EF_PASSWORD1","Value"))
     3323    credentials.!entered = 1
    33173324
    33183325    call SW_LOGIN_Close
     
    35973604    /* Unmount any resources */
    35983605    DO i = 1 TO mounts
    3599         CALL _Dynamic "ok = "fs.!prefix"RxUnmount( mountpoint, i-1 )"
    3600         /* IF options.!debug == 1 THEN SAY time()' '||'Unmount resource' i-1 '=' ok */
     3606        CALL _Dynamic "ok = "fs.!prefix"RxUnmount('"mountpoint"', "i-1")"
    36013607    END
    36023608
     
    36043610    parent = VRMethod("CN_CURRENT", 'GetRecordAttr', select.1, 'Parent')
    36053611    IF parent \= '' THEN DO
    3606         CALL _Dynamic "ok = "fs.!prefix"RxDeleteMountPoint( mountpoint )"
    3607         /* IF options.!debug == 1 THEN SAY time()' '||'Delete mountpoint' mountpoint '=' ok */
     3612        CALL _Dynamic "ok = "fs.!prefix"RxDeleteMountPoint('"mountpoint"')"
    36083613    END
    36093614
     
    38003805    credentials.!username = ""
    38013806    credentials.!password = ""
     3807    credentials.!entered  = 0
    38023808
    38033809    UserCred = ""
Note: See TracChangeset for help on using the changeset viewer.