diff options
Diffstat (limited to 'UQuickConnect.pas')
| -rw-r--r-- | UQuickConnect.pas | 11 |
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; |
