summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Bzatek <tbzatek@tbzatek.englab.brq.redhat.com>2008-09-02 17:06:27 +0200
committerTomas Bzatek <tbzatek@tbzatek.englab.brq.redhat.com>2008-09-02 17:06:27 +0200
commit7a2696850bf538fff83cc4e208287f96168a7e3c (patch)
treed50bacf1a8d09d1b1c9598de8d8074574da65f16
parent14c2d4bbee1f217402af5b7830562d899e234216 (diff)
downloadtuxcmd-0.6.47.tar.xz
Block UI when opening remote locationv0.6.47
-rw-r--r--UConfig.pas4
-rw-r--r--UMain.pas15
-rw-r--r--libgtk_kylix/GTKForms.pas6
3 files changed, 17 insertions, 8 deletions
diff --git a/UConfig.pas b/UConfig.pas
index d1ca13a..f95321e 100644
--- a/UConfig.pas
+++ b/UConfig.pas
@@ -25,8 +25,8 @@ uses Classes, ULocale;
resourcestring
ConstAppTitle = 'Tux Commander';
- ConstAboutVersion = '0.6.46-dev';
- ConstAboutBuildDate = '2008-08-21';
+ ConstAboutVersion = '0.6.47-dev';
+ ConstAboutBuildDate = '2008-09-02';
{$IFDEF FPC}
{$INCLUDE fpcver.inc}
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;
diff --git a/libgtk_kylix/GTKForms.pas b/libgtk_kylix/GTKForms.pas
index ba0e8b4..167db27 100644
--- a/libgtk_kylix/GTKForms.pas
+++ b/libgtk_kylix/GTKForms.pas
@@ -149,7 +149,7 @@ type // Some basic types
procedure SetShowSeparator(Value: boolean);
procedure SetModalResult(Value: TMessageButton);
procedure SetDefaultButton(Value: TMessageButton);
- procedure SetParentForm(Value: TGTKForm);
+ procedure SetParentForm(Value: TCustomGTKForm);
public
ClientArea: TGTKVBox;
ActionArea: TGTKHBox;
@@ -164,7 +164,7 @@ type // Some basic types
property DefaultButton: TMessageButton write SetDefaultButton;
property Caption;
property OnResponse: TGTKDialogResponseEvent read FOnResponse write FOnResponse;
- property ParentForm: TGTKForm write SetParentForm;
+ property ParentForm: TCustomGTKForm write SetParentForm;
end;
(****************************************** TGTKAPPLICATION *********************************************************************)
@@ -853,7 +853,7 @@ begin
gtk_dialog_set_response_sensitive(PGtkDialog(FWidget), ButtonID, Sensitive);
end;
-procedure TGTKDialog.SetParentForm(Value: TGTKForm);
+procedure TGTKDialog.SetParentForm(Value: TCustomGTKForm);
begin
if Value <> nil then gtk_window_set_transient_for(PGtkWindow(FWidget), PGtkWindow(Value.FWidget));
end;