fixed bug at48201
This commit is contained in:
parent
c5dc780635
commit
0c345ceebc
Binary file not shown.
|
@ -3,7 +3,7 @@ unit UnitInstall;
|
|||
interface
|
||||
|
||||
uses SysUtils, Classes, Windows, Graphics, Forms, ShellAPI, Controls, Messages,
|
||||
TlHelp32, IdFTPCommon, ComCtrls, JclFileUtils, Dialogs;
|
||||
TlHelp32, IdFTPCommon, ComCtrls, Dialogs, JclFileUtils;
|
||||
|
||||
type TMod = (modNone, modCS, modDoD, modTFC, modNS, modTS, modESF);
|
||||
type TOS = (osWindows, osLinux32, osLinux64);
|
||||
|
@ -614,10 +614,12 @@ begin
|
|||
|
||||
ePath := '/';
|
||||
CurNode := frmMain.trvDirectories.Selected;
|
||||
if (Assigned(CurNode)) then begin
|
||||
repeat
|
||||
ePath := '/' + CurNode.Text + ePath;
|
||||
CurNode := CurNode.Parent;
|
||||
until (not Assigned(CurNode));
|
||||
end;
|
||||
|
||||
Screen.Cursor := crAppStart;
|
||||
frmMain.cmdCancel.Show;
|
||||
|
|
|
@ -6340,11 +6340,12 @@ object frmMain: TfrmMain
|
|||
BorderStyle = bsNone
|
||||
Images = ilImages
|
||||
Indent = 19
|
||||
ReadOnly = True
|
||||
TabOrder = 0
|
||||
OnChange = trvDirectoriesChange
|
||||
OnCollapsing = trvDirectoriesCollapsing
|
||||
OnExpanding = trvDirectoriesExpanding
|
||||
OnExpanded = trvDirectoriesExpanded
|
||||
OnMouseDown = trvDirectoriesMouseDown
|
||||
end
|
||||
end
|
||||
object cboGameAddon: TFlatComboBox
|
||||
|
@ -6769,6 +6770,7 @@ object frmMain: TfrmMain
|
|||
object IdFTP: TIdFTP
|
||||
Intercept = IdLogFile
|
||||
MaxLineAction = maException
|
||||
ReadTimeout = 0
|
||||
RecvBufferSize = 1024
|
||||
SendBufferSize = 1024
|
||||
OnWork = IdFTPWork
|
||||
|
|
|
@ -123,7 +123,6 @@ type
|
|||
procedure cmdProxySettingsClick(Sender: TObject);
|
||||
procedure txtPortChange(Sender: TObject);
|
||||
procedure trvDirectoriesExpanded(Sender: TObject; Node: TTreeNode);
|
||||
procedure trvDirectoriesChange(Sender: TObject; Node: TTreeNode);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure IdFTPWork(Sender: TObject; AWorkMode: TWorkMode;
|
||||
const AWorkCount: Integer);
|
||||
|
@ -137,6 +136,8 @@ type
|
|||
procedure frbFTPClick(Sender: TObject);
|
||||
procedure frbLocalClick(Sender: TObject);
|
||||
procedure trvModsClick(Sender: TObject);
|
||||
procedure trvDirectoriesMouseDown(Sender: TObject;
|
||||
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||
private
|
||||
OldProgress: Integer;
|
||||
CurrProgress: Integer;
|
||||
|
@ -214,10 +215,12 @@ begin
|
|||
eStr := TStringList.Create;
|
||||
ePath := '/';
|
||||
CurNode := trvDirectories.Selected;
|
||||
if (Assigned(CurNode)) then begin
|
||||
repeat
|
||||
ePath := '/' + CurNode.Text + ePath;
|
||||
CurNode := CurNode.Parent;
|
||||
until (not Assigned(CurNode));
|
||||
end;
|
||||
|
||||
try
|
||||
IdFTP.ChangeDir(ePath);
|
||||
|
@ -236,6 +239,7 @@ begin
|
|||
if eStr.IndexOf('liblist.gam') = -1 then begin
|
||||
MessageBox(Handle, 'Invalid directory. Please select your mod directory and try again.', PChar(Application.Title), MB_ICONWARNING);
|
||||
eStr.Free;
|
||||
Screen.Cursor := crDefault;
|
||||
exit;
|
||||
end
|
||||
else
|
||||
|
@ -639,6 +643,7 @@ begin
|
|||
cmdConnect.Enabled := True;
|
||||
cmdConnect.Caption := 'Disconnect';
|
||||
cmdCancel.Caption := '&Close';
|
||||
cmdNext.Enabled := True;
|
||||
|
||||
CurNode := nil;
|
||||
if eStr.Count <> 0 then begin
|
||||
|
@ -816,10 +821,12 @@ begin
|
|||
// get complete path
|
||||
ePath := '/';
|
||||
CurNode := Node;
|
||||
if (Assigned(CurNode)) then begin
|
||||
repeat
|
||||
ePath := '/' + CurNode.Text + ePath;
|
||||
CurNode := CurNode.Parent;
|
||||
until (not Assigned(CurNode));
|
||||
end;
|
||||
// change dir and add directories in it
|
||||
try
|
||||
Repaint;
|
||||
|
@ -838,11 +845,6 @@ begin
|
|||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmMain.trvDirectoriesChange(Sender: TObject; Node: TTreeNode);
|
||||
begin
|
||||
cmdNext.Enabled := Assigned(trvDirectories.Selected);
|
||||
end;
|
||||
|
||||
procedure TfrmMain.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
FileList.Free;
|
||||
|
@ -936,4 +938,15 @@ begin
|
|||
cmdNext.Enabled := (Assigned(trvMods.Selected));
|
||||
end;
|
||||
|
||||
procedure TfrmMain.trvDirectoriesMouseDown(Sender: TObject;
|
||||
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||
var Node: TTreeNode;
|
||||
begin
|
||||
Node := trvDirectories.GetNodeAt(X, Y);
|
||||
if (Assigned(Node)) then begin
|
||||
if (Node.DisplayRect(True).Right < X) then
|
||||
trvDirectories.Selected := nil;
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
|
Loading…
Reference in New Issue
Block a user