groffstudio

Check-in [f7adaf4d43]
Login
Overview
Comment:[Changed] On platforms which probably use a package manager (currently, Linux and BSDs), the "update check" checkbox is disabled and the related libraries are not referenced. [Improved] When exiting groffstudio, the Save function from the "save" button is reused.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: f7adaf4d433e690f4428a768b407b48c3db5e42cb8944cc59531e1324a0a5e54
User & Date: Cthulhux on 2022-03-13 19:29:41
Other Links: manifest | tags
Context
2022-03-14
16:41
[Changed] Less capital letters. check-in: fde38e0222 user: Cthulhux tags: trunk
2022-03-13
19:29
[Changed] On platforms which probably use a package manager (currently, Linux and BSDs), the "update check" checkbox is disabled and the related libraries are not referenced. [Improved] When exiting groffstudio, the Save function from the "save" button is reused. check-in: f7adaf4d43 user: Cthulhux tags: trunk
2022-03-12
11:17
[Feature] The update check was made optional (default: false). check-in: a21e9e8fc9 user: Cthulhux tags: trunk
Changes

Modified CHANGES.txt from [34c632ec7b] to [bee525469b].








1
2
3
4
5
6
7







Version 0.11.0
2022-03-12

[Feature] The update check was made optional (default: false).
[Changed] Rearranged the build options panel so it won't look as misaligned as it actually was.
[Changed] The required SSL libraries are shipped with the Windows package now.

>
>
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
Version [next]

[Changed] On platforms which probably use a package manager (currently, Linux and BSDs), the "update check" checkbox is disabled and the related libraries are not referenced.
[Improved] When exiting groffstudio, the Save function from the "save" button is reused.

-------------------------------

Version 0.11.0
2022-03-12

[Feature] The update check was made optional (default: false).
[Changed] Rearranged the build options panel so it won't look as misaligned as it actually was.
[Changed] The required SSL libraries are shipped with the Windows package now.

Modified src/groffstudio.lpi from [c42a030e94] to [e16da16e5f].

19
20
21
22
23
24
25

26
27
28
29
30
31
32
        <Resource_0 FileName="..\LICENSE" Type="RCDATA" ResourceName="LICENSE"/>
      </Resources>
    </General>
    <VersionInfo>
      <UseVersionInfo Value="True"/>
      <AutoIncrementBuild Value="True"/>
      <MinorVersionNr Value="11"/>

      <Attributes pvaPreRelease="True"/>
      <StringTable ProductName="groffstudio"/>
    </VersionInfo>
    <BuildModes>
      <Item Name="Default" Default="True"/>
    </BuildModes>
    <PublishOptions>







>







19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
        <Resource_0 FileName="..\LICENSE" Type="RCDATA" ResourceName="LICENSE"/>
      </Resources>
    </General>
    <VersionInfo>
      <UseVersionInfo Value="True"/>
      <AutoIncrementBuild Value="True"/>
      <MinorVersionNr Value="11"/>
      <BuildNr Value="1"/>
      <Attributes pvaPreRelease="True"/>
      <StringTable ProductName="groffstudio"/>
    </VersionInfo>
    <BuildModes>
      <Item Name="Default" Default="True"/>
    </BuildModes>
    <PublishOptions>

Modified src/unit1.pas from [ac7a628a1a] to [1be6f508b0].

17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ComCtrls, StdCtrls,
  ExtCtrls, Buttons, ExtendedNotebook, SynEdit, fphttpclient, opensslsockets,
  RegExpr, LCLIntf, LCLType, IniPropStorage, Process, Helpers, fileinfo,
  {$IF DEFINED(WINDOWS)}
  winpeimagereader,
  {$ELSEIF DEFINED(DARWIN)}
  machoreader, ssockets, sslsockets, sslbase,
  {$ELSEIF DEFINED(LINUX)}
  elfreader,
  {$ENDIF}
  BuildOutputWindow;

type








|


|

|







17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ComCtrls, StdCtrls,
  ExtCtrls, Buttons, ExtendedNotebook, SynEdit, fphttpclient,
  RegExpr, LCLIntf, LCLType, IniPropStorage, Process, Helpers, fileinfo,
  {$IF DEFINED(WINDOWS)}
  winpeimagereader, opensslsockets,
  {$ELSEIF DEFINED(DARWIN)}
  machoreader, ssockets, sslsockets, sslbase, opensslsockets,
  {$ELSEIF DEFINED(LINUX)}
  elfreader,
  {$ENDIF}
  BuildOutputWindow;

type

169
170
171
172
173
174
175





176
177

178
179
180
181
182
183
184
  end;

  // Restore the settings
  iniStorage.Restore;
  storeBuildSettings := iniStorage.ReadBoolean('AutoSaveBuildSettings', False);
  chkAutoSaveBuildSettings.Checked := storeBuildSettings;






  updateCheck := iniStorage.ReadBoolean('UpdateCheckOnStart', False);
  chkUpdateCheckOnStart.Checked := updateCheck;


  if storeBuildSettings then
  begin
       chkLogFile.Checked := iniStorage.ReadBoolean('BuildLogFile', False);
       cmbMacro.Text := iniStorage.ReadString('BuildChosenMacro', '[ select ]');
       chkChem.Checked := iniStorage.ReadBoolean('BuildUseChem', False);
       chkEqn.Checked := iniStorage.ReadBoolean('BuildUseEqn', False);







>
>
>
>
>


>







169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
  end;

  // Restore the settings
  iniStorage.Restore;
  storeBuildSettings := iniStorage.ReadBoolean('AutoSaveBuildSettings', False);
  chkAutoSaveBuildSettings.Checked := storeBuildSettings;

{$IF DEFINED(LINUX) OR DEFINED(BSD)}
  // On platforms which probably use a package manager (currently, Linux and
  // BSDs), the "update check" checkbox is disabled.
  chkUpdateCheckOnStart.Enabled := False;
{$ELSE}
  updateCheck := iniStorage.ReadBoolean('UpdateCheckOnStart', False);
  chkUpdateCheckOnStart.Checked := updateCheck;
{$ENDIF}

  if storeBuildSettings then
  begin
       chkLogFile.Checked := iniStorage.ReadBoolean('BuildLogFile', False);
       cmbMacro.Text := iniStorage.ReadString('BuildChosenMacro', '[ select ]');
       chkChem.Checked := iniStorage.ReadBoolean('BuildUseChem', False);
       chkEqn.Checked := iniStorage.ReadBoolean('BuildUseEqn', False);
306
307
308
309
310
311
312

313
314
315
316
317
318
319
  MainStatusBar.Panels[0].Text := '* ' + currentGroffFileName;
  unsavedChanges := True;
end;

procedure TMainForm.btnDownloadGroffWindowsClick(Sender: TObject);
begin
   {$IFDEF WINDOWS}

   OpenURL(latestGroffWindowsUrl);
   {$ENDIF}
end;

procedure TMainForm.btnBuildClick(Sender: TObject);
var
  buildSuccess: Boolean;







>







312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
  MainStatusBar.Panels[0].Text := '* ' + currentGroffFileName;
  unsavedChanges := True;
end;

procedure TMainForm.btnDownloadGroffWindowsClick(Sender: TObject);
begin
   {$IFDEF WINDOWS}
   // On other systems, the button is disabled anyway.
   OpenURL(latestGroffWindowsUrl);
   {$ENDIF}
end;

procedure TMainForm.btnBuildClick(Sender: TObject);
var
  buildSuccess: Boolean;
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
  Reply, BoxStyle: Integer;
begin
  // If the current file has unsaved changes, ask first.
  if unsavedChanges then
  with Application do begin
    BoxStyle := MB_ICONQUESTION + MB_YESNO;
    Reply := MessageBox('Do you want to save the document first?', 'UnsavedChanges', BoxStyle);
    if Reply = IDYES then SynEdit1.Lines.SaveToFile(currentGroffFilePath);
  end;
end;

{$IFDEF DARWIN}
// Fix HTTPS on macOS:
procedure TMainForm.GetSocketHandler(Sender: TObject; const UseSSL: Boolean; out AHandler: TSocketHandler);
begin







|







457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
  Reply, BoxStyle: Integer;
begin
  // If the current file has unsaved changes, ask first.
  if unsavedChanges then
  with Application do begin
    BoxStyle := MB_ICONQUESTION + MB_YESNO;
    Reply := MessageBox('Do you want to save the document first?', 'UnsavedChanges', BoxStyle);
    if Reply = IDYES then btnSaveGroffClick(Sender);
  end;
end;

{$IFDEF DARWIN}
// Fix HTTPS on macOS:
procedure TMainForm.GetSocketHandler(Sender: TObject; const UseSSL: Boolean; out AHandler: TSocketHandler);
begin