Skip to content
Permalink
Browse files

LogSQL: move MainFormCreated flag activation above first wanted debug…

… messages, and include client's time zone offset in log panel
  • Loading branch information...
ansgarbecker committed Sep 13, 2019
1 parent acfc5bc commit d6373f2c3844a32c29c1d745780b6e0ad3364220
Showing with 5 additions and 3 deletions.
  1. +5 −3 source/main.pas
@@ -2009,14 +2009,15 @@ procedure TMainForm.FormCreate(Sender: TObject);
actWebDownloadpage.Hint := 'ms-windows-store://pdp/?PRODUCTID=9NXPRT2T0ZJF';
end;

// Now we are free to use certain methods, which are otherwise fired too early
MainFormCreated := True;

// Log some application details - useful when analyzing session logs
LogSQL(f_('App path: "%s"', [Application.ExeName]), lcDebug);
LogSQL(f_('Version: "%s"', [AppVersion]), lcDebug);
LogSQL(f_('Theme: "%s"', [TStyleManager.ActiveStyle.Name]), lcDebug);
LogSQL(f_('Pixels per inch on current monitor: %d', [Monitor.PixelsPerInch]), lcDebug);

// Now we are free to use certain methods, which are otherwise fired too early
MainFormCreated := True;
LogSQL(f_('Timezone offset: %d', [FTimeZoneOffset]), lcDebug);
end;


@@ -6564,6 +6565,7 @@ procedure TMainForm.SynMemoQueryMouseWheel(Sender: TObject; Shift: TShiftState;
NewFontSize: Integer;
begin
// Change font size with MouseWheel
// TODO: broken in high-dpi mode, just zooms in
if KeyPressed(VK_CONTROL) and AppSettings.ReadBool(asWheelZoom) then begin
Editor := TSynEdit(Sender);
NewFontSize := Editor.Font.Size;

0 comments on commit d6373f2

Please sign in to comment.
You can’t perform that action at this time.