mirror of
https://github.com/rejetto/hfs2.git
synced 2025-12-19 10:03:56 +01:00
quit if 'shell' dialog is closed at start
This commit is contained in:
parent
fdef1fe319
commit
f1f5446b0d
31
main.pas
31
main.pas
@ -5105,7 +5105,6 @@ var
|
|||||||
FAILED = 'Login failed';
|
FAILED = 'Login failed';
|
||||||
var
|
var
|
||||||
m: TStringDynArray;
|
m: TStringDynArray;
|
||||||
fTemp: Tfile;
|
|
||||||
begin
|
begin
|
||||||
result:=FALSE;
|
result:=FALSE;
|
||||||
if assigned(forceFile) then f:=forceFile;
|
if assigned(forceFile) then f:=forceFile;
|
||||||
@ -7974,11 +7973,14 @@ var
|
|||||||
if userIcsBuffer > 0 then
|
if userIcsBuffer > 0 then
|
||||||
data.conn.sock.bufSize:=userIcsBuffer;
|
data.conn.sock.bufSize:=userIcsBuffer;
|
||||||
|
|
||||||
size:=minmax(8192, MEGA, round(data.averageSpeed));
|
|
||||||
if userSocketBuffer > 0 then
|
if userSocketBuffer > 0 then
|
||||||
data.conn.sndBuf:=userSocketBuffer
|
data.conn.sndBuf:=userSocketBuffer
|
||||||
else if highSpeedChk.checked and (safeDiv(0.0+size, data.conn.sndbuf, 2) > 2) then
|
else
|
||||||
|
begin
|
||||||
|
size:=minmax(8192, MEGA, round(data.averageSpeed));
|
||||||
|
if highSpeedChk.checked and (safeDiv(0.0+size, data.conn.sndbuf, 2) > 2) then
|
||||||
data.conn.sndBuf:=size;
|
data.conn.sndBuf:=size;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// connection inactivity timeout
|
// connection inactivity timeout
|
||||||
@ -10602,9 +10604,12 @@ begin VFSmodified:=TRUE end;
|
|||||||
procedure TmainFrm.FormClose(Sender: TObject; var Action: TCloseAction);
|
procedure TmainFrm.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
begin
|
begin
|
||||||
quitting:=TRUE;
|
quitting:=TRUE;
|
||||||
runEventScript('quit');
|
if applicationFullyInitialized then
|
||||||
timer.enabled:=FALSE;
|
begin
|
||||||
if autosaveOptionsChk.checked then saveCFG();
|
runEventScript('quit');
|
||||||
|
timer.enabled:=FALSE;
|
||||||
|
if autosaveOptionsChk.checked then saveCFG();
|
||||||
|
end;
|
||||||
// we disconnectAll() before srv.free, so we can purgeConnections()
|
// we disconnectAll() before srv.free, so we can purgeConnections()
|
||||||
if assigned(srv) then srv.disconnectAll(TRUE);
|
if assigned(srv) then srv.disconnectAll(TRUE);
|
||||||
purgeConnections();
|
purgeConnections();
|
||||||
@ -11945,9 +11950,17 @@ if not quitASAP then
|
|||||||
if not isIntegratedInShell() then
|
if not isIntegratedInShell() then
|
||||||
with TshellExtFrm.create(mainfrm) do
|
with TshellExtFrm.create(mainfrm) do
|
||||||
try
|
try
|
||||||
if showModal() = mrYes then
|
case showModal() of
|
||||||
if not integrateInShell() then
|
mrYes:
|
||||||
msgDlg(MSG_ERROR_REGISTRY, MB_ICONERROR);
|
if not integrateInShell() then
|
||||||
|
msgDlg(MSG_ERROR_REGISTRY, MB_ICONERROR);
|
||||||
|
mrNo:;
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
application.terminate();
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
finally free end;
|
finally free end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user