FIX: Bug [0001301] DC tabs not restored after PC reboot

This commit is contained in:
Alexander Koblov 2016-02-23 10:26:02 +00:00
commit c9958c17dc

View file

@ -691,6 +691,8 @@ type
procedure SetPanelDrive(aPanel: TFilePanelSelect; Drive: PDrive; ActivateIfNeeded: Boolean);
procedure OnDriveWatcherEvent(EventType: TDriveWatcherEvent; const ADrive: PDrive);
procedure AppActivate(Sender: TObject);
procedure AppEndSession(Sender: TObject);
procedure AppQueryEndSession(var Cancel: Boolean);
procedure AppException(Sender: TObject; E: Exception);
procedure AppShowHint(var HintStr: string; var CanShow: Boolean; var HintInfo: THintInfo);
{en
@ -927,6 +929,8 @@ begin
Application.OnException := @AppException;
Application.OnActivate := @AppActivate;
Application.OnShowHint := @AppShowHint;
Application.OnEndSession := @AppEndSession;
Application.OnQueryEndSession := @AppQueryEndSession;
// Use LCL's method of dropping files from external
// applications if we don't support it ourselves.
@ -5907,6 +5911,21 @@ begin
FrameRight.ReloadIfNeeded;
end;
procedure TfrmMain.AppEndSession(Sender: TObject);
var
CloseAction: TCloseAction;
begin
frmMainClose(Sender, CloseAction);
end;
procedure TfrmMain.AppQueryEndSession(var Cancel: Boolean);
var
CanClose: Boolean = True;
begin
FormCloseQuery(Self, CanClose);
Cancel := not CanClose;
end;
{$IFDEF LCLQT}
function TfrmMain.QObjectEventFilter(Sender: QObjectH; Event: QEventH): Boolean; cdecl;
begin