From: <ob...@us...> - 2011-08-24 08:25:30
|
Revision: 13097 http://jvcl.svn.sourceforge.net/jvcl/?rev=13097&view=rev Author: obones Date: 2011-08-24 08:25:24 +0000 (Wed, 24 Aug 2011) Log Message: ----------- More generic computation, easier migration to newer versions of Delphi Modified Paths: -------------- trunk/jvcl/run/JvBandForms.pas Modified: trunk/jvcl/run/JvBandForms.pas =================================================================== --- trunk/jvcl/run/JvBandForms.pas 2011-08-24 08:10:06 UTC (rev 13096) +++ trunk/jvcl/run/JvBandForms.pas 2011-08-24 08:25:24 UTC (rev 13097) @@ -454,24 +454,12 @@ Installations := TJclBorRADToolInstallations.Create; try - if CompilerVersion = 22 then - DelphiVersion := 15 - else if CompilerVersion = 21 then - DelphiVersion := 14 - else if CompilerVersion = 20 then - DelphiVersion := 12 + if CompilerVersion >= 21 then + DelphiVersion := Trunc(CompilerVersion - 7) else if CompilerVersion = 18.5 then DelphiVersion := 11 - else if CompilerVersion = 18 then - DelphiVersion := 10 - else if CompilerVersion = 17 then - DelphiVersion := 9 - else if CompilerVersion = 16 then - DelphiVersion := 8 - else if CompilerVersion = 15 then - DelphiVersion := 7 - else if CompilerVersion = 14 then - DelphiVersion := 6; + else + DelphiVersion := Trunc(CompilerVersion - 8); RunningInIDE := SameText(ParamStr(0), Installations.DelphiInstallationFromVersion[DelphiVersion].IdeExeFileName); finally This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ob...@us...> - 2011-08-25 10:36:31
|
Revision: 13098 http://jvcl.svn.sourceforge.net/jvcl/?rev=13098&view=rev Author: obones Date: 2011-08-25 10:36:25 +0000 (Thu, 25 Aug 2011) Log Message: ----------- merge gone bad Modified Paths: -------------- trunk/jvcl/run/JvBandForms.pas Modified: trunk/jvcl/run/JvBandForms.pas =================================================================== --- trunk/jvcl/run/JvBandForms.pas 2011-08-24 08:25:24 UTC (rev 13097) +++ trunk/jvcl/run/JvBandForms.pas 2011-08-25 10:36:25 UTC (rev 13098) @@ -450,8 +450,6 @@ DelphiVersion: Integer; RunningInIDE: Boolean; begin - RunningInIDE := False; - Installations := TJclBorRADToolInstallations.Create; try if CompilerVersion >= 21 then This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ah...@us...> - 2012-09-07 22:31:50
|
Revision: 13411 http://jvcl.svn.sourceforge.net/jvcl/?rev=13411&view=rev Author: ahuser Date: 2012-09-07 22:31:43 +0000 (Fri, 07 Sep 2012) Log Message: ----------- Don't install the WH_GETMESSAGE hook into the IDE. It will make the mouse partly unresponsive (especially in the SystemMenu) under XE2 and Win7. Modified Paths: -------------- trunk/jvcl/run/JvBandForms.pas Modified: trunk/jvcl/run/JvBandForms.pas =================================================================== --- trunk/jvcl/run/JvBandForms.pas 2012-09-05 22:07:59 UTC (rev 13410) +++ trunk/jvcl/run/JvBandForms.pas 2012-09-07 22:31:43 UTC (rev 13411) @@ -310,17 +310,24 @@ GlobalBandFormMessageHook: HHook; GlobalBandForms: TList; +procedure InstallHook; forward; +procedure UninstallHook; forward; + //=== { TJvBandForm } ======================================================== procedure TJvBandForm.AfterConstruction; begin inherited AfterConstruction; GlobalBandForms.Add(Self); + if (GlobalBandForms.Count = 1) and not (csDesigning in ComponentState) then + InstallHook; end; procedure TJvBandForm.BeforeDestruction; begin GlobalBandForms.Remove(Self); + if (GlobalBandForms.Count = 0) and not (csDesigning in ComponentState) then + UninstallHook; inherited BeforeDestruction; end; @@ -425,26 +432,27 @@ I: Integer; Msg: PMsg; begin - try - lOk := False; - Msg := PMsg(Pointer(lParam)); - if (((Msg^.message = WM_KEYDOWN) or (Msg^.message = WM_KEYUP)) and - ((Msg^.wParam = VK_BACK))) then - lOk := True - else - if Msg^.message = WM_MOUSEMOVE then //Enable Flat effects! - Application.HandleMessage; - if lOk then - begin - for I := 0 to GlobalBandForms.Count - 1 do - if IsDialogMessage(TJvBandForm(GlobalBandForms.Items[I]).Handle, Msg^) then - begin - Msg^.message := WM_NULL; - Break; - end; + if nCode >= 0 then + try + lOk := False; + Msg := PMsg(Pointer(lParam)); + if (((Msg^.message = WM_KEYDOWN) or (Msg^.message = WM_KEYUP)) and + ((Msg^.wParam = VK_BACK))) then + lOk := True + else + if Msg^.message = WM_MOUSEMOVE then //Enable Flat effects! + Application.HandleMessage; + if lOk then + begin + for I := 0 to GlobalBandForms.Count - 1 do + if IsDialogMessage(TJvBandForm(GlobalBandForms.Items[I]).Handle, Msg^) then + begin + Msg^.message := WM_NULL; + Break; + end; + end; + except end; - except - end; Result := CallNextHookEx(GlobalBandFormMessageHook, nCode, wParam, lParam); end; @@ -487,10 +495,8 @@ RegisterUnitVersion(HInstance, UnitVersioning); {$ENDIF UNITVERSIONING} GlobalBandForms := TList.Create; - InstallHook; finalization - UninstallHook; GlobalBandForms.Free; {$IFDEF UNITVERSIONING} UnregisterUnitVersion(HInstance); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |