Index: branches/guitools-2.0/evfsgui/changes
===================================================================
--- branches/guitools-2.0/evfsgui/changes	(revision 323)
+++ branches/guitools-2.0/evfsgui/changes	(revision 324)
@@ -18,4 +18,9 @@
 - Added: Preliminary context menus for Browse View and Connection details view
 - Added: "Retry" for passive connections (only manually for now)
+- Added: Drag and drop for passive connections 
+- Added: Hide columns not useful for endusers
+- Added: NLV enable (parts of) connection details
+- Added: Disabled old profile saving code
+- Added: Sort smbtree view ascending
 - Changed: Several changes in GUI style (as suggested by Alex Taylor)
 - Changed: Left align buttons in current connections panel (as suggested by 
@@ -30,9 +35,9 @@
 - Fixed: Missing NLV aware strings
 ToDo:
-- CltInit requires resync with SambaInit
+- Major code refactoring
 - Create Icon. stem in order to ease maintainance of icons
 - Create mechanism to save passive connections across sessions
 - Debug on/off option is badly implemented (rework required)
-- smbtree.vrs: Sort options
+- Edit and Selected menu easily get out of sync
 - Advanced dialog should be split into connection options and global options
 - smbtree error messages are ignored (requires more code from smbmon)
Index: branches/guitools-2.0/evfsgui/evfsgui.VRP
===================================================================
--- branches/guitools-2.0/evfsgui/evfsgui.VRP	(revision 323)
+++ branches/guitools-2.0/evfsgui/evfsgui.VRP	(revision 324)
@@ -8,6 +8,8 @@
 VRXWindow: __VREMainWindow,1,530,2457,879,4071
 VRXWindow: __VRESectionListWindow,1,337,11708,11623,3686
-VRXWindow: __VREToolsWindow,1,518,530,6984,1659
+VRXWindow: __VREToolsWindow,1,518,530,6993,1665
 VRXWindow: __VREWindListWindow,1,482,7661,2650,3150
 UserFile: 1
 UserWindow: Main,1
+UserWindow: SW_ADVANCED,1
+UserWindow: SW_MOUNTPOINT,1
Index: branches/guitools-2.0/evfsgui/evfsgui.VRX
===================================================================
--- branches/guitools-2.0/evfsgui/evfsgui.VRX	(revision 323)
+++ branches/guitools-2.0/evfsgui/evfsgui.VRX	(revision 324)
@@ -127,6 +127,24 @@
     CD.hashFH      = VRMethod( "CN_CONDET", "AddField", "String", "hash" )
 
-return
-
+    /* Connection details */
+    ok = VRMethod("CN_CONDET", "SetFieldAttr", cd.passwordfh ,    "Visible", 0)
+    ok = VRMethod("CN_CONDET", "SetFieldAttr", cd.spasswordfh ,   "Visible", 0)
+    ok = VRMethod("CN_CONDET", "SetFieldAttr", cd.masterFH ,      "Visible", 0)
+    ok = VRMethod("CN_CONDET", "SetFieldAttr", cd.mtypeFH ,       "Visible", 0)
+    ok = VRMethod("CN_CONDET", "SetFieldAttr", cd.memlenfh ,      "Visible", 0)
+    ok = VRMethod("CN_CONDET", "SetFieldAttr", cd.logfilefh ,     "Visible", 0)
+    ok = VRMethod("CN_CONDET", "SetFieldAttr", cd.loglevelfh ,    "Visible", 0)
+    ok = VRMethod("CN_CONDET", "SetFieldAttr", cd.hashfh ,        "Visible", 0)
+
+    /* NLV columns */
+    ok = VRMethod("CN_CONDET", "SetFieldAttr", cd.statusfh ,      "Title", "Status")
+    ok = VRMethod("CN_CONDET", "SetFieldAttr", cd.mpointfh ,      "Title", strip(NLVGetMessage(27),"T",":"))
+    ok = VRMethod("CN_CONDET", "SetFieldAttr", cd.workgroupfh ,   "Title", strip(NLVGetMessage(21),"T",":"))
+    ok = VRMethod("CN_CONDET", "SetFieldAttr", cd.serverFH ,      "Title", strip(NLVGetMessage(19),"T",":"))
+    ok = VRMethod("CN_CONDET", "SetFieldAttr", cd.shareFH ,       "Title", strip(NLVGetMessage(20),"T",":"))
+    ok = VRMethod("CN_CONDET", "SetFieldAttr", cd.userfh ,        "Title", strip(NLVGetMessage(25),"T",":"))
+    ok = VRMethod("CN_CONDET", "SetFieldAttr", cd.easupportfh ,   "Title", "EA")
+    ok = VRMethod("CN_CONDET", "SetFieldAttr", cd.rwfh ,          "Title", "R/W")  
+return
 /*:VRX         _CreateSmbConf
 */
@@ -436,7 +454,7 @@
 CN_CURRENT_DragDrop: 
 say "settings.!network = "settings.!network
-    NewWG    = ''
-    NewSrv   = ''
-    NewShare = ''
+    p_workgroup    = ''
+    p_server   = ''
+    p_share = ''
 
     srcCtn = VRInfo( "SourceObject" )
@@ -450,57 +468,93 @@
     say "TargetRecord = '"trgRec"'"
 
-    DragCapt = VRMethod(srcCtn, "GetRecordAttr", srcRec, "Caption")
-    parRH = VRMethod(srcCtn, "GetRecordAttr", srcRec, "Parent")
-
-    if parRH = "" then do /* A workgroup was dragged */
-        say "Workgroup dragged!"
-        parse var DragCapt NewWG '0D0A'x .
-        NewWG = strip(NewWG)
-        ok = VRSet("EF_NETWORK","Value",strip(NewWG))
-        ok = VRSet("EF_SERVER","Value","")
-        ok = VRSet("EF_SHARE","Value","")
-
-        ShareLevel = 3
-    end
-    else do
-        ParDragCapt = VRMethod(srcCtn, "GetRecordAttr", ParRH, "Caption")
-        GParRH = VRMethod(srcCtn, "GetRecordAttr", ParRH, "Parent")
-
-        if GParRH = "" then do /* A server was dragged */
-            say "Server dragged!"
-            parse var ParDragCapt NewWG '0D0A'x .
-            ok = VRSet("EF_NETWORK","Value",strip(NewWG))
-            NewWG = strip(NewWG)
-
-            parse var DragCapt NewSrv '0D0A'x .
-            NewSrv = strip(NewSrv)
-            ok = VRSet("EF_SERVER","Value",strip(NewSrv))
-            ok = VRSet("EF_Share","Value","")
-
-            ShareLevel = 2
+    if VRGet(srcCtn,'Name') = "CN_CONDET" then do
+        p_mpoint    = VRMethod("CN_CONDET", "GetFieldData", srcRec, CD.MpointFH)
+
+        p_workgroup = VRMethod("CN_CONDET", "GetFieldData", srcRec, CD.WorkgroupFH)
+        p_server    = VRMethod("CN_CONDET", "GetFieldData", srcRec, CD.ServerFH)
+        p_share     = VRMethod("CN_CONDET", "GetFieldData", srcRec, CD.ShareFH)
+        p_user      = VRMethod("CN_CONDET", "GetFieldData", srcRec, CD.UserFH)
+        p_password  = x2c(VRMethod("CN_CONDET", "GetFieldData", srcRec, CD.SpasswordFH))
+
+        ShareLevel = 1
+        if p_share     = "" then ShareLevel = 2
+        if p_server    = "" then ShareLevel = 3
+        if p_workgroup = "" then ShareLevel = 4
+
+        ok = VRSet( "CB_MOUNT", "Selected", Sharelevel )
+        ok = VRset("CB_MOUNT"  , "Value", mtype.sharelevel)
+
+        ok = VRset("EF_SERVER" ,  "Value", p_server)
+        ok = VRset("EF_SHARE"  ,  "Value", p_share)
+        ok = VRset("EF_NETWORK",  "Value", p_workgroup)
+        ok = VRset("EF_USER"   ,  "Value", p_user)
+        ok = VRset("EF_PASSWORD", "Value", p_password)
+
+        parse var p_mpoint p_drv '\' p_dir
+
+        p_dir = strip(p_dir,'T','\')
+
+        ok = VRset("CB_DRIVES"      ,  "Value", p_drv)
+        ok = VRset("EF_DIRECTORY"   ,  "Value", p_dir)
+
+        ok = VRMethod( srcCtn, "RemoveRecord", srcRec)
+
+
+    end
+    else do /* SmbTree */
+        DragCapt = VRMethod(srcCtn, "GetRecordAttr", srcRec, "Caption")
+        parRH = VRMethod(srcCtn, "GetRecordAttr", srcRec, "Parent")
+
+        if parRH = "" then do /* A workgroup was dragged */
+            say "Workgroup dragged!"
+            parse var DragCapt p_workgroup '0D0A'x .
+            p_workgroup = strip(p_workgroup)
+            ok = VRSet("EF_NETWORK","Value",strip(p_workgroup))
+            ok = VRSet("EF_SERVER","Value","")
+            ok = VRSet("EF_SHARE","Value","")
+
+            ShareLevel = 3
         end
-        else do /* A share was dragged */
-            say "Share dragged!"
-            GParDragCapt = VRMethod(srcCtn, "GetRecordAttr", GParRH, "Caption")
-
-            parse var GParDragCapt NewWG '0D0A'x .
-            NewWG = strip(NewWG)
-            ok = VRSet("EF_NETWORK","Value",strip(NewWG))
-
-            parse var ParDragCapt NewSrv '0D0A'x .
-            NewSrv = strip(NewSrv)
-            ok = VRSet("EF_SERVER","Value",strip(NewSrv))
-
-            parse var DragCapt NewShare '0D0A'x .
-            NewShare = strip(NewShare)
-            ok = VRSet("EF_Share","Value",strip(NewShare))
-
-            ShareLevel = 1
+        else do
+            ParDragCapt = VRMethod(srcCtn, "GetRecordAttr", ParRH, "Caption")
+            GParRH = VRMethod(srcCtn, "GetRecordAttr", ParRH, "Parent")
+    
+            if GParRH = "" then do /* A server was dragged */
+                say "Server dragged!"
+                parse var ParDragCapt p_workgroup '0D0A'x .
+                ok = VRSet("EF_NETWORK","Value",strip(p_workgroup))
+                p_workgroup = strip(p_workgroup)
+
+                parse var DragCapt p_server '0D0A'x .
+                p_server = strip(p_server)
+                ok = VRSet("EF_SERVER","Value",strip(p_server))
+                ok = VRSet("EF_Share","Value","")
+
+                ShareLevel = 2
+            end
+            else do /* A share was dragged */
+                say "Share dragged!"
+                GParDragCapt = VRMethod(srcCtn, "GetRecordAttr", GParRH, "Caption")
+
+                parse var GParDragCapt p_workgroup '0D0A'x .
+                p_workgroup = strip(p_workgroup)
+                ok = VRSet("EF_NETWORK","Value",strip(p_workgroup))
+
+                parse var ParDragCapt p_server '0D0A'x .
+                p_server = strip(p_server)
+                ok = VRSet("EF_SERVER","Value",strip(p_server))
+
+                parse var DragCapt p_share '0D0A'x .
+                p_share = strip(p_share)
+                ok = VRSet("EF_Share","Value",strip(p_share))
+
+                ShareLevel = 1
+            end
         end
     end
 
-    say 'NewWG    = "'NewWG'"'
-    say 'NewSrv   = "'NewSrv'"'
-    say 'NewShare = "'NewShare'"'
+    say 'p_workgroup    = "'p_workgroup'"'
+    say 'p_server   = "'p_server'"'
+    say 'p_share = "'p_share'"'
 
     ok = VRSet( "CB_MOUNT", "Selected", Sharelevel )
@@ -1216,5 +1270,5 @@
 */
 Menu_File_Save_Click: 
-    call PB_SAVE_Click
+    call PB_CONDET_SAVE_Click
 return
 
@@ -1325,10 +1379,7 @@
     ok = VRSet("Menu_View_ConDet", "Checked",  1)
 
-    ok = VRSet("Menu_Selected_Remove", "Visible",  1)
-    ok = VRSet("Menu_Selected_Retry", "Visible",  1)
     ok = VRMethod( "CN_CONDET", "GetRecordList", "All", "records." ) 
-    ok = VRSet("Menu_Selected_Remove", "Enabled",  (records.0 = 0))
-    ok = VRSet("Menu_Selected_Retry", "Enabled",  (records.0 = 0))
-
+    ok = VRSet("Menu_Selected_Remove", "Visible",  (records.0 <> 0))
+    ok = VRSet("Menu_Selected_Retry", "Visible",  (records.0 <> 0))
     ok = VRSet("Menu_Selected_Connect", "Visible",  0)
 return
@@ -1351,5 +1402,5 @@
 
     ok = VRSet("Menu_Selected_Remove", "Visible",  0)
-    ok = VRSet("Menu_Selected_Retry", "Visible",  0)
+    ok = VRSet("Menu_Selected_Retry",  "Visible",  0)
 
     ok = VRSet("Menu_Selected_Connect", "Visible",  0)
@@ -1479,6 +1530,7 @@
         end
         if cd.lastrh <> '' then do
-            ok = VRMethod("CN_CONDET", "SetFieldData", cd.lastrh, cd.statusfh, '#68:PMWP.DLL') /* Passive Connection icon */
-            ok = VRMethod("CN_CONDET", "SetFieldData", cd.lastrh, cd.passwordfh, '') /* remove pain text password */
+            ok = VRMethod("CN_CONDET", "SetFieldData",  cd.lastrh, cd.statusfh, '#68:PMWP.DLL') /* Passive Connection icon */
+            ok = VRMethod("CN_CONDET", "SetRecordAttr", cd.lastrh, "Icon", '#68:PMWP.DLL') /* Passive Connection icon */
+            ok = VRMethod("CN_CONDET", "SetFieldData",  cd.lastrh, cd.passwordfh, '') /* remove pain text password */
         end
 
@@ -1669,5 +1721,4 @@
     CALL NLVSetText 'DT_CONDET',          'Caption', 63
     CALL NLVSetText 'PB_CONDET_SAVE',     'Caption', 30
-    ok = VRSet("PB_CONDET_SAVE","Caption",VRGet("PB_CONDET_SAVE","Caption")||'(2)')
     CALL NLVSetText 'PB_CONDET_LOAD',     'Caption', 31
 
@@ -1785,4 +1836,5 @@
         ok = VRMethod("CN_CONDET", "SetFieldData", cd.lastrh, cd.memlenfh, p_memlen, cd.easupportfh, p_easupport, cd.logfilefh, p_logfile, cd.loglevelfh, p_loglevel, cd.rwfh, p_rw)
         ok = VRMethod("CN_CONDET", "SetFieldData", cd.lastrh, cd.statusfh, '#64:PMWP.DLL') /* Active */
+        ok = VRMethod("CN_CONDET", "SetRecordAttr", cd.lastrh, "Icon", '#64:PMWP.DLL') /* Active */
 
         hashstr = p_mpoint' 'translate(p_domain)' 'translate(p_server)' 'translate(p_share)' 'p_user' 'p_spassword' 'p_easupport' 'p_rw
@@ -1957,4 +2009,7 @@
     END
     CALL STREAM filename, 'C', 'CLOSE'
+
+    if options.!autostart == 0 THEN CALL VRMessage 'Main', NLVGetMessage( 52, filename ), NLVGetMessage( 51 ), 'I'
+
     IF options.!debug == 1 THEN SAY time()' '||"PB_CONDET_SAVE_Click done"
 RETURN
@@ -1964,7 +2019,7 @@
 PB_CONNECT_Click: PROCEDURE EXPOSE settings. options. fs. advanced.
     IF options.!debug == 1 THEN SAY time()' '||"PB_CONNECT_Click started"
-    NewWG    = ''
-    NewSrv   = ''
-    NewShare = ''
+    p_workgroup    = ''
+    p_server   = ''
+    p_share = ''
 
     ok = VRMethod( "CN_SMBTREE", "GetRecordList", "Selected", "handle." ) 
@@ -1989,7 +2044,7 @@
     if parRH = "" then do /* A workgroup was dragged */
         say "Workgroup dragged!"
-        parse var DragCapt NewWG '0D0A'x .
-        NewWG = strip(NewWG)
-        ok = VRSet("EF_NETWORK","Value",strip(NewWG))
+        parse var DragCapt p_workgroup '0D0A'x .
+        p_workgroup = strip(p_workgroup)
+        ok = VRSet("EF_NETWORK","Value",strip(p_workgroup))
         ok = VRSet("EF_SERVER","Value","")
         ok = VRSet("EF_SHARE","Value","")
@@ -2003,11 +2058,11 @@
         if GParRH = "" then do /* A server was dragged */
             say "Server dragged!"
-            parse var ParDragCapt NewWG '0D0A'x .
-            ok = VRSet("EF_NETWORK","Value",strip(NewWG))
-            NewWG = strip(NewWG)
-
-            parse var DragCapt NewSrv '0D0A'x .
-            NewSrv = strip(NewSrv)
-            ok = VRSet("EF_SERVER","Value",strip(NewSrv))
+            parse var ParDragCapt p_workgroup '0D0A'x .
+            ok = VRSet("EF_NETWORK","Value",strip(p_workgroup))
+            p_workgroup = strip(p_workgroup)
+
+            parse var DragCapt p_server '0D0A'x .
+            p_server = strip(p_server)
+            ok = VRSet("EF_SERVER","Value",strip(p_server))
             ok = VRSet("EF_Share","Value","")
 
@@ -2018,15 +2073,15 @@
             GParDragCapt = VRMethod(srcCtn, "GetRecordAttr", GParRH, "Caption")
 
-            parse var GParDragCapt NewWG '0D0A'x .
-            NewWG = strip(NewWG)
-            ok = VRSet("EF_NETWORK","Value",strip(NewWG))
-
-            parse var ParDragCapt NewSrv '0D0A'x .
-            NewSrv = strip(NewSrv)
-            ok = VRSet("EF_SERVER","Value",strip(NewSrv))
-
-            parse var DragCapt NewShare '0D0A'x .
-            NewShare = strip(NewShare)
-            ok = VRSet("EF_Share","Value",strip(NewShare))
+            parse var GParDragCapt p_workgroup '0D0A'x .
+            p_workgroup = strip(p_workgroup)
+            ok = VRSet("EF_NETWORK","Value",strip(p_workgroup))
+
+            parse var ParDragCapt p_server '0D0A'x .
+            p_server = strip(p_server)
+            ok = VRSet("EF_SERVER","Value",strip(p_server))
+
+            parse var DragCapt p_share '0D0A'x .
+            p_share = strip(p_share)
+            ok = VRSet("EF_Share","Value",strip(p_share))
 
             ShareLevel = 1
@@ -2034,7 +2089,7 @@
     end
 
-    say 'NewWG    = "'NewWG'"'
-    say 'NewSrv   = "'NewSrv'"'
-    say 'NewShare = "'NewShare'"'
+    say 'p_workgroup    = "'p_workgroup'"'
+    say 'p_server   = "'p_server'"'
+    say 'p_share = "'p_share'"'
 
     ok = VRSet( "CB_MOUNT", "Selected", Sharelevel )
@@ -2368,6 +2423,7 @@
 */
 PB_SAVE_Click: PROCEDURE EXPOSE settings. options. Profile fs.
-
-    if options.!autostart == 0 THEN filename = VRFileDialog('Main', NLVGetMessage( 50 ), 'S', '*.'fs.!profileext) 
+    call PB_CONDET_SAVE_Click
+
+/*  if options.!autostart == 0 THEN filename = VRFileDialog('Main', NLVGetMessage( 50 ), 'S', '*.'fs.!profileext) 
     ELSE filename = Profile
 
@@ -2403,5 +2459,5 @@
 
     if options.!autostart == 0 THEN CALL VRMessage 'Main', NLVGetMessage( 52, filename ), NLVGetMessage( 51 ), 'I'
-
+*/
 RETURN
 
@@ -2471,5 +2527,12 @@
 say rh.i
 say cd.statusfh
-say VRMethod( "CN_CONDET", "GetFieldData", rh.i, cd.statusfh)
+        /* This catches the bug we observed exactly once and were unable to reproduce! */
+        if cd.statusfh = 'CD.STATUSFH' then do
+            call beep 880, 50
+            call beep 880, 50
+            say "cd.statusfh is undefined - check why!!!!!!"
+            leave
+        end
+        say VRMethod( "CN_CONDET", "GetFieldData", rh.i, cd.statusfh)
         if VRMethod("CN_CONDET","GetFieldData", rh.i, cd.statusfh) = '#64:PMWP.DLL' then CALL VRMethod 'CN_CONDET', 'RemoveRecord', rh.i
     end
@@ -2647,4 +2710,5 @@
     CALL NLVSetText 'CB_BROWSEIMME','Caption', 48
     CALL NLVSetText 'CB_BROWSEAUTH','Caption', 49
+    CALL NLVSetText 'CB_ALWAYSMP',  'Caption', 65
 
     CALL VRSet "SW_ADVANCED", "HelpTag", NLVGetMessage(40)
@@ -2732,5 +2796,5 @@
     call SW_MOUNTPOINT_Init
 /* NLVGetMessage(14)' ' */
-    ok = VRSet("SW_MOUNTPOINT","Caption",strip(NewWG' \\'NewSRV'\'NewShare,'T','\'))
+    ok = VRSet("SW_MOUNTPOINT","Caption",strip(p_workgroup' \\'p_server'\'p_share,'T','\'))
     CALL NLVSetText 'DT_MPOINT1',   'Caption', 27
     CALL NLVSetText 'PB_NEWMOUNTPOINTOK',    'Caption', 2
@@ -2738,4 +2802,5 @@
     CALL NLVSetText 'CB_EAS1',       'Caption', 44
     CALL NLVSetText 'CB_READONLY1',  'Caption', 45
+    CALL NLVSetText 'CB_ALWAYSMP1',  'Caption', 65
     ok = VRMethod( "CB_DRIVES", "GetStringList", "freedrives." ) 
     ok = VRMethod( "CB_DRIVES1", "AddStringList", "freedrives." )
Index: branches/guitools-2.0/evfsgui/evfsi_de.mkm
===================================================================
--- branches/guitools-2.0/evfsgui/evfsi_de.mkm	(revision 323)
+++ branches/guitools-2.0/evfsgui/evfsi_de.mkm	(revision 324)
@@ -57,5 +57,5 @@
 EVG0050I: Profildatei sichern
 EVG0051I: Profil gesichert
-EVG0052I: Profil aller allenfalls momentan aktiven Verbindungen wurde gesichert als %1.
+EVG0052I: Profil aller Verbindungen wurde gesichert als %1.
 EVG0053I: Datei existiert
 EVG0054I: Die Datei %1 existiert bereits. berschreiben?
@@ -70,5 +70,5 @@
 EVG0063I: Verbindungsdetails
 EVG0064I: Diese Verbindung besteht bereits - trotzdem fortfahren?
-EVG0065?:
+EVG0065I: Mountpoint auch bei Fehlschlag anlegen
 EVG0066?:
 EVG0067?:
Index: branches/guitools-2.0/evfsgui/evfsi_en.mkm
===================================================================
--- branches/guitools-2.0/evfsgui/evfsi_en.mkm	(revision 323)
+++ branches/guitools-2.0/evfsgui/evfsi_en.mkm	(revision 324)
@@ -57,5 +57,5 @@
 EVG0050I: Save Profile File
 EVG0051I: Profile Saved
-EVG0052I: Profile of currently active connections (if any) was saved to %1.
+EVG0052I: Profile of connections was saved to %1.
 EVG0053I: File Exists
 EVG0054I: The file %1 already exists. Overwrite it?
@@ -70,5 +70,5 @@
 EVG0063I: Connection details
 EVG0064I: This connection already exists - continue anyway?
-EVG0065?:
+EVG0065I: Create mountpoint, even when connection attempt fails
 EVG0066?:
 EVG0067?:
Index: branches/guitools-2.0/shared/cltinit.vrs
===================================================================
--- branches/guitools-2.0/shared/cltinit.vrs	(revision 323)
+++ branches/guitools-2.0/shared/cltinit.vrs	(revision 324)
@@ -137,5 +137,5 @@
     msg = arg(1)
     say "ERROR: "msg
-    id = VRMessage( VRWindow(), msg, "Samba Installation", "E" )
+    id = VRMessage( VRWindow(), msg, "Samba Client Installation", "E" )
     ErrorState = (1|ErrorState)
 return
