ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/public/ibx/trunk/runtime/IBDialogs.pas
(Generate patch)

Comparing ibx/trunk/runtime/IBDialogs.pas (file contents):
Revision 45 by tony, Tue Dec 6 10:33:46 2016 UTC vs.
Revision 80 by tony, Mon Jan 1 11:31:07 2018 UTC

# Line 38 | Line 38 | uses
38   {$ELSE}
39    unix,
40   {$ENDIF}
41 <  SysUtils, Classes, Graphics, Controls,
41 >  SysUtils, Classes,  Controls,
42    Forms, StdCtrls, ExtCtrls, IB, IBTypes;
43  
44   type
# Line 83 | Line 83 | type
83  
84   function TIBLCLInterface.ServerLoginDialog(var AServerName: string;
85    var AUserName, APassword: string): Boolean;
86 + var ActiveForm: TCustomForm;
87   begin
88 +  ActiveForm := Screen.ActiveCustomForm;
89    with TIBXLoginDlg.Create(nil) do
90    try
91      Caption := 'Firebird Server Login';
# Line 101 | Line 103 | begin
103    finally
104      Free;
105    end;
106 +  if ActiveForm <> nil then
107 +  begin
108 +    ActiveForm.SetFocus;
109 +    Application.ProcessMessages;
110 +  end;
111   end;
112  
113   function TIBLCLInterface.LoginDialogEx(var ADatabaseName: string;
114    var AUserName, APassword: string; NameReadOnly: Boolean): Boolean;
115 + var ActiveForm: TCustomForm;
116   begin
117 +  ActiveForm := Screen.ActiveCustomForm;
118    with TIBXLoginDlg.Create(Application) do
119    try
120      DatabaseName.Caption := ADatabaseName;
# Line 124 | Line 133 | begin
133    finally
134      Free;
135    end;
136 +  if (ActiveForm <> nil) and ActiveForm.CanFocus then
137 +  begin
138 +    ActiveForm.SetFocus;
139 +    Application.ProcessMessages;
140 +  end;
141   end;
142  
143   procedure TIBLCLInterface.SetCursor;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines