20 Commits

Author SHA1 Message Date
Martijn Laan
3a1914add3
Cleanup a bit more. 2025-02-06 18:24:50 +01:00
Martijn Laan
b9c15a28f1
Small cleanup. 2025-02-06 18:06:35 +01:00
Jordan Russell
974b25887e
Add AppCreateForm wrapper function. 2025-01-02 03:46:28 -06:00
Martijn Laan
7b6a56d383
Update visible copyright dates. 2025-01-02 09:21:00 +01:00
Jordan Russell
4b9b9576aa
Improve OnGetActiveFormHandle handler.
Use GetLastActivePopup instead of Screen.ActiveForm.
- Screen.ActiveForm doesn't support non-VCL windows like the IDE's Find dialog.
- Screen.ActiveForm can be nil if the main form has been shown but never became the active window.
- Screen.ActiveForm can be nil if the active form was destroyed and another form hasn't been activated yet.
2024-12-29 03:41:47 -06:00
Jordan Russell
d5e8603909
Replace "WizardForm.Show" with "WizardForm.Visible := True".
Show has a BringToFront call that we don't need. Changing Visible from False to True already brings the window to the front when not minimized. And when it is minimized, we don't want it becoming the active window.

This works around the same VCL issue as in preceding commits, where the Forms unit's WM_ACTIVATEAPP handler sets FAppIconic=False even though the window may still be minimized, which causes the next Application.Restore call to be a no-op.
2024-12-22 02:02:28 -06:00
Jordan Russell
5e6334e70f
Check if WizardForm is minimized before calling Application.BringToFront.
Works around VCL bug. If Application.BringToFront is called while the app is minimized, the Forms unit's WM_ACTIVATEAPP handler inexplicably sets FAppIconic=False, which causes the next Application.Restore call to be a no-op.
2024-12-18 02:39:45 -06:00
Jordan Russell
ee956ccbb6
Unminimize before displaying message boxes and task dialogs.
Now that MainFormOnTaskBar=True, Application.Restore doesn't steal the foreground anymore.
2024-12-16 02:00:00 -06:00
Jordan Russell
9d52a24040
Setup: De-form TMainForm and set MainFormOnTaskBar=True.
Mostly done, I think. Still need to actually remove shWindowVisible etc. Still some Application.Handle references that need to be cleaned out. Still need to update help.

TMainForm still exists, but is no longer a form. Good enough for now.

With Application.MainFormOnTaskBar=True, we now have a working taskbar thumbnail and proper minimize/restore animations. Finally.
2024-12-14 04:44:08 -06:00
Jordan Russell
ae4769274b
Setup: If minimized, restore before displaying TNewDiskForm.
Displaying dialogs while the app is minimized is a bad idea (see AppMessageBox).

Planning to do the same with message boxes and task dialogs (the workaround in AppMessageBox is icky).

Also, to ensure dialogs have the correct owner when the app is inactive, include the same OnGetActiveFormHandle handler as the IDE.
2024-12-12 03:51:21 -06:00
Martijn Laan
e955344670
Cleanup Compil32 using Shared.SetupTypes since last july: move the required types (TSetupStep and TUninstallStep) into a new unit instead. 2024-09-27 16:07:30 +02:00
Martijn Laan
58b27f351b
Cleanup remaining MD5, SHA1 and Hash unit use. 2024-09-26 11:39:48 +02:00
Martijn Laan
c745379b5f
Split main form and main functions+vars. 2024-08-09 08:22:01 +02:00
Martijn Laan
dd603f785c
Start work on splitting main form and main functions. 2024-08-08 20:51:33 +02:00
Martijn Laan
bd49a504c7
Finish. So now the functions which were in InstFunc but were not used by SetupLdr are in a Setup-only unit (Setup.InstFunc) and the rest is in a shared unit (SetupLdrAndSetup.InstFunc). The former has most of the function and has the Git history. The latter appears as a new file. 2024-08-06 19:12:28 +02:00
Martijn Laan
6f51801a14
IDE.CompileForm -> IDE.MainForm. 2024-08-06 18:36:53 +02:00
Martijn Laan
200901c8b0 Reintroduce SetupLdrAndSetup prefix. 2024-08-06 13:54:25 +02:00
Martijn Laan
e5d46b163d
Move shared but self-contained and generally useful units to Components. 2024-08-05 20:52:57 +02:00
Martijn Laan
7d3b4aa85a
Rename/group the compression units. Stop using Compression.Base (Shared.Compress) in Compil32. 2024-08-05 17:25:42 +02:00
Martijn Laan
6db7a31745
Move the sources back into the Src folder now that they have prefixes. Changed the Shared prefix of the files which were in SetupLdrAndSetup to Setup. Todo: the remaining dirs with helper code. 2024-08-05 16:56:18 +02:00