Changeset 492
- Timestamp:
- Dec 28, 2023, 3:58:08 AM (20 months ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NewView/MainForm.pas
r489 r492 520 520 Procedure DoFind( FindOrigin: TFindOrigin ); 521 521 522 // ALT 2023-12-24 523 Procedure CheckSetSysModal(FormWindow: TForm); 524 Procedure CheckUnsetSysModal; 525 522 526 // Bookmarks ------------------------------------------ 523 527 … … 3736 3740 3737 3741 // [20231023 ALT] Restore any previous system-modal window state 3742 { 3738 3743 if g_LastSysModalWindow <> NULLHANDLE then 3739 3744 begin 3740 3745 WinSetSysModalWindow( HWND_DESKTOP, g_LastSysModalWindow ); 3741 3746 end; 3747 } 3748 CheckUnsetSysModal; 3742 3749 3743 3750 // TODO rbri maybe we have to do this … … 4363 4370 StartingUp := false; 4364 4371 4365 // ALT 20231023handle system modal owner4372 // [ALT 20231023] handle system modal owner 4366 4373 g_LastSysModalWindow := WinQuerySysModalWindow( HWND_DESKTOP ); 4374 { 4367 4375 if g_LastSysModalWindow <> NULLHANDLE then 4368 4376 begin 4369 4377 WinSetSysModalWindow( HWND_DESKTOP, Frame.Handle ); 4370 4378 end; 4379 } 4380 // [ALT 2023-12-26] move above to procedure 4381 CheckSetSysModal(Self); 4371 4382 4372 4383 LogEvent(LogStartup, 'RUN PROGRAM'); … … 4690 4701 EndUpdate; 4691 4702 end; 4703 // CheckSetSysModal(InformationForm); 4692 4704 InformationForm.ShowModal; 4705 // CheckSetSysModal(Self); 4693 4706 End; 4694 4707 … … 5152 5165 end; 5153 5166 5167 // [ALT 2023-12-26] Disable certain items when running sysmodal 5168 if g_LastSysModalWindow <> NULLHANDLE then 5169 begin 5170 OpenMI.Enabled := false; 5171 OpenSpecialMI.Enabled := false; 5172 FileSaveAsMI.Enabled := false; 5173 PrintMI.Enabled := false; 5174 // FileInformationMI.Enabled := false; 5175 SaveAsIPFMI.Enabled := false; 5176 EditGlobalSearchMI.Enabled := false; 5177 GlobalSearchMI.Enabled := false; 5178 AddNoteMI.Enabled := false; 5179 DebugSaveLanguageFileMI.Enabled := false; 5180 DebugLoadLanguageMI.Enabled := false; 5181 5182 Coolbar.Sections[ ciOpen ].Disabled := true; 5183 Coolbar.Sections[ ciPrint ].Disabled := true; 5184 Coolbar.Sections[ ciAddNote ].Disabled := true; 5185 end; 5154 5186 5155 5187 end; … … 6201 6233 begin 6202 6234 NoteSelected:= NotesListBox.ItemIndex <> -1; 6203 EditNoteButton.Enabled:= NoteSelected;6204 6235 GotoNoteButton.Enabled:= NoteSelected; 6205 DeleteNoteButton.Enabled:= NoteSelected; 6206 AddNoteButton.Enabled := CurrentOpenFiles.Count > 0; 6236 if g_LastSysModalWindow <> NULLHANDLE then 6237 begin 6238 AddNoteButton.Enabled := false; 6239 EditNoteButton.Enabled := false; 6240 DeleteNoteButton.Enabled := false; 6241 end 6242 else 6243 begin 6244 EditNoteButton.Enabled:= NoteSelected; 6245 DeleteNoteButton.Enabled:= NoteSelected; 6246 AddNoteButton.Enabled := CurrentOpenFiles.Count > 0; 6247 end; 6207 6248 end; 6208 6249 … … 7176 7217 end; 7177 7218 7219 7220 Procedure TMainForm.CheckSetSysModal(FormWindow: TForm); 7221 begin 7222 // Override any existing system-modal state 7223 if g_LastSysModalWindow <> NULLHANDLE then 7224 begin 7225 WinSetSysModalWindow( HWND_DESKTOP, FormWindow.Frame.Handle ); 7226 end; 7227 end; 7228 7229 7230 Procedure TMainForm.CheckUnsetSysModal; 7231 begin 7232 // Restore any previous system-modal window state 7233 if g_LastSysModalWindow <> NULLHANDLE then 7234 begin 7235 WinSetSysModalWindow( HWND_DESKTOP, g_LastSysModalWindow ); 7236 end; 7237 end; 7238 7178 7239 Initialization 7179 7240 RegisterClasses ([TMainForm, TSplitBar, -
trunk/NewView/VersionUnit.pas
r488 r492 17 17 18 18 const 19 Version = 'V2.19.8 b'; // $SS_REQUIRE_NEW_VERSION$20 BldLevelVersion = '2.19.8 b'; // Embedded for IBM BLDLEVEL tool19 Version = 'V2.19.8d'; // $SS_REQUIRE_NEW_VERSION$ 20 BldLevelVersion = '2.19.8d'; // Embedded for IBM BLDLEVEL tool 21 21 CopyrightMsg = 'Copyright 2005 Aaron Lawrence; 2006-2019 Ronald Brill'; 22 22 LicenseMsg = 'Licensed under the GNU Public License'; -
trunk/Sibyl/SPCC/FORMS.PAS
r7 r492 7 7 º º 8 8 ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍŒ} 9 9 10 10 Unit Forms; 11 11 … … 2057 2057 FOnCreate:TNotifyEvent; 2058 2058 FOnDestroy:TNotifyEvent; 2059 FSysModalWin:HWnd; // [ALT 2023-12-27] 2059 2060 Procedure CMRelease(Var Msg:TMessage); Message CM_RELEASE; 2060 2061 Procedure CMEndModalState(Var Msg:TMessage); Message CM_ENDMODALSTATE; … … 2464 2465 // This is not functionally needed but prevents unnecessary GpiDeleteSetId calls 2465 2466 // which fail and therefore make it more difficult to test for real problems. 2466 // Probably not safe to leave in due to incompatibility between components 2467 // Probably not safe to leave in due to incompatibility between components 2467 2468 // and IDE - AaronL 2468 2469 // FFontSet:boolean; … … 5416 5417 Begin 5417 5418 FFont.Destroy; 5418 FFont := nil; // AaronL - need to set ffont to nil 5419 FFont := nil; // AaronL - need to set ffont to nil 5419 5420 End; 5420 5421 End; … … 6213 6214 CurrentModalFrame:HWND=0; 6214 6215 DesktopHWND:HWND=0; 6215 ModalList:TList=NIL; 6216 ModalList:TList=NIL; 6216 6217 6217 6218 {$HINTS OFF} … … 6274 6275 Begin 6275 6276 MyPID := GetCurrentProcessID; 6276 6277 6277 6278 // Get the count of switch list items 6278 6279 SwitchListCount := WinQuerySwitchList( AppHandle, nil, 0 ); … … 6281 6282 // Allocate buffer 6282 6283 GetMem( pSwitchListInfo, BufferSize ); 6283 6284 6284 6285 // Call WinQuerySwitchList again to get the switch list items 6285 6286 WinQuerySwitchList( AppHandle, pSwitchListInfo^, BufferSize ); 6286 6287 6287 6288 for i := 0 to SwitchListCount - 1 do 6288 6289 begin … … 6293 6294 // This switch entry is for this application 6294 6295 if swctl.hwnd = Exclude.FFrame.Handle then 6295 continue; 6296 continue; 6296 6297 // so show/hide it 6297 6298 if Show then … … 6301 6302 WinChangeSwitchEntry( hswitch, 6302 6303 swctl ); 6303 6304 6304 6305 end; 6305 6306 end; … … 7965 7966 If OnDismissDlg <> Nil Then OnDismissDlg(Self); 7966 7967 If FModalResult <> cmNull Then EndModalState; 7968 7969 // [20231227 ALT] Restore any previous system-modal window 7970 if FSysModalWin <> NULLHANDLE then 7971 WinSetSysModalWindow( HWND_DESKTOP, FSysModalWin ); 7967 7972 End; 7968 7973 End; … … 8508 8513 Show; 8509 8514 BringToFront; 8515 8516 // [ALT 20231227] 8517 FSysModalWin := WinQuerySysModalWindow( HWND_DESKTOP ); 8518 if FSysModalWin <> NULLHANDLE then 8519 WinSetSysModalWindow( HWND_DESKTOP, Frame.Handle ); 8510 8520 8511 8521 again:
Note:
See TracChangeset
for help on using the changeset viewer.