diff options
| author | Tomas Bzatek <tbzatek@users.sourceforge.net> | 2009-12-13 14:32:58 +0100 |
|---|---|---|
| committer | Tomas Bzatek <tbzatek@users.sourceforge.net> | 2009-12-13 14:32:58 +0100 |
| commit | 0f7616a007edaa1d19c4672a4fd390c072b1eba6 (patch) | |
| tree | a1524927d8986bb54345c47ded84bb3c2a9559c2 /UQuickConnect.pas | |
| parent | ae0047b8a5fa76ea76c66d8c5c580eba39178755 (diff) | |
| download | tuxcmd-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.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; |
