summaryrefslogtreecommitdiff
path: root/UQuickConnect.pas
diff options
context:
space:
mode:
authorTomas Bzatek <tbzatek@users.sourceforge.net>2009-12-13 14:32:58 +0100
committerTomas Bzatek <tbzatek@users.sourceforge.net>2009-12-13 14:32:58 +0100
commit0f7616a007edaa1d19c4672a4fd390c072b1eba6 (patch)
treea1524927d8986bb54345c47ded84bb3c2a9559c2 /UQuickConnect.pas
parentae0047b8a5fa76ea76c66d8c5c580eba39178755 (diff)
downloadtuxcmd-0f7616a007edaa1d19c4672a4fd390c072b1eba6.tar.xz
Error system transformation to GErrorv0.6.74
Note that most coreworkers are broken at the moment.
Diffstat (limited to 'UQuickConnect.pas')
-rw-r--r--UQuickConnect.pas11
1 files changed, 8 insertions, 3 deletions
diff --git a/UQuickConnect.pas b/UQuickConnect.pas
index e6d7d5f..89a2439 100644
--- a/UQuickConnect.pas
+++ b/UQuickConnect.pas
@@ -63,7 +63,7 @@ var
implementation
-uses ULocale, UCoreUtils, UConfig, UConnectionProperties, UGnome, uVFSprototypes;
+uses ULocale, UCoreUtils, UConfig, UConnectionProperties, UGnome, UError, uVFSprototypes;
procedure TFQuickConnect.FormCreate(Sender: TObject);
@@ -273,6 +273,7 @@ var Engine: TVFSEngine;
URI, Scheme: string;
DontShowAgain: boolean;
res: TMessageButton;
+ Error: PGError;
begin
if ConnectionManager <> nil then AFConnectionManager := ConnectionManager
else AFConnectionManager := TFConnectionManager.Create(Self);
@@ -332,8 +333,10 @@ begin
URI := URIComboBox.Entry.Text;
Engine.Password := URIRipPassword(URI, True);
- if not AFConnectionManager.DoConnectInternal(URI, Engine, FWidget, True) then begin
- if not AFConnectionManager.FSilenceError then Application.MessageBox(PGtkWindow(FWidget), LANGCouldntOpenURI, [mbOK], mbError, mbOK, mbOK);
+ Error := nil;
+ if not AFConnectionManager.DoConnectInternal(URI, Engine, FWidget, True, @Error) then begin
+ if not AFConnectionManager.FSilenceError then
+ ShowError(Self, 'Couldn''t open the URI specified', Error);
Table.Enabled := True;
CloseButton.Enabled := True;
ConnectButton.Enabled := True;
@@ -342,6 +345,8 @@ begin
StopButton.Enabled := False;
URIComboBox.Entry.SetFocus;
Engine.Free;
+ if Error <> nil then
+ g_error_free(Error);
Exit;
end;