From 7a2696850bf538fff83cc4e208287f96168a7e3c Mon Sep 17 00:00:00 2001 From: Tomas Bzatek Date: Tue, 2 Sep 2008 17:06:27 +0200 Subject: Block UI when opening remote location --- UMain.pas | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'UMain.pas') diff --git a/UMain.pas b/UMain.pas index 114ad55..2696263 100644 --- a/UMain.pas +++ b/UMain.pas @@ -5886,8 +5886,12 @@ var Engine: TVFSEngine; begin try InternalLock; + ConnInfo := nil; + FConnectionManager := TFConnectionManager.Create(Self); b := FConnectionManager.Run = mbOK; + if FConnectionManager.ListView.Selected <> nil + then ConnInfo := FConnectionManager.ListView.Selected.AsPointer(0); WriteConnections; // Save the list to the file if b then begin @@ -5895,8 +5899,6 @@ begin Application.MessageBox(LANGThereIsNoModuleAvailable, [mbOK], mbError, mbOK, mbOK); Exit; end; - if FConnectionManager.ListView.Selected = nil then Exit; - ConnInfo := FConnectionManager.ListView.Selected.AsPointer(0); if ConnInfo = nil then Exit; // Find the VFS module to use for this connection @@ -5932,7 +5934,14 @@ begin Engine := TVFSEngine.Create(VFSPlugin); Engine.ParentEngine := SourceEngine; Engine.SavePath := SourceEngine.Path; - if not Engine.VFSOpenURI(UTF8ToStr(ConnInfo.URI)) then begin + + FRemoteWait := TFRemoteWait.Create(Application); + FRemoteWait.ParentForm := FConnectionManager; + FRemoteWait.ShowModal; + Application.ProcessMessages; + b := Engine.VFSOpenURI(UTF8ToStr(ConnInfo.URI)); + FRemoteWait.Free; + if not b then begin Application.MessageBox(LANGCouldntOpenURI, [mbOK], mbError, mbOK, mbOK); Exit; end; -- cgit v1.2.3