Accepting request 974169 from home:pragmalin:branches:devel:languages:pascal
- Add patch to fix Object Inspector visibility: * fix-object-inspector-visible.patch - boo#1197651 OBS-URL: https://build.opensuse.org/request/show/974169 OBS-URL: https://build.opensuse.org/package/show/devel:languages:pascal/lazarus?expand=0&rev=75
This commit is contained in:
parent
d2081e80e0
commit
ddba30ceb4
108
fix-object-inspector-visible.patch
Normal file
108
fix-object-inspector-visible.patch
Normal file
@ -0,0 +1,108 @@
|
|||||||
|
From: PragmaticLinux <info@pragmaticlinux.com>
|
||||||
|
Date: 2022-04-30 22:41:34 +0200
|
||||||
|
Subject: Makes sure the Object Inspector is visible after the first install
|
||||||
|
References: boo#1197651
|
||||||
|
Upstream: merged https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/39328
|
||||||
|
|
||||||
|
With a properly configured system (make, gdb, fpc, fppkg, etc.) Lazarus skips showing
|
||||||
|
the setup dialog, when you first start Lazarus after installation. This is correct.
|
||||||
|
However, in this case the Object Inspector window does not show. This patch fixes
|
||||||
|
this problem.
|
||||||
|
|
||||||
|
---
|
||||||
|
ide/main.pp | 26 +++++++++++++++++---------
|
||||||
|
1 file changed, 17 insertions(+), 9 deletions(-)
|
||||||
|
|
||||||
|
Index: lazarus/ide/main.pp
|
||||||
|
===================================================================
|
||||||
|
--- lazarus.orig/ide/main.pp
|
||||||
|
+++ lazarus/ide/main.pp
|
||||||
|
@@ -649,6 +649,7 @@ type
|
||||||
|
FFixingGlobalComponentLock: integer;
|
||||||
|
OldCompilerFilename, OldLanguage: String;
|
||||||
|
OIChangedTimer: TIdleTimer;
|
||||||
|
+ FEnvOptsCfgExisted: boolean; // tracks if a local or user specific environment options configuration file existed
|
||||||
|
|
||||||
|
FIdentifierWordCompletion: TSourceEditorWordCompletion;
|
||||||
|
FIdentifierWordCompletionWordList: TStringList;
|
||||||
|
@@ -1199,7 +1200,6 @@ procedure TMainIDE.LoadGlobalOptions;
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
- EnvOptsCfgExisted: boolean;
|
||||||
|
s, LastCalled: String;
|
||||||
|
OldVer: String;
|
||||||
|
NowVer: String;
|
||||||
|
@@ -1212,7 +1212,6 @@ begin
|
||||||
|
|
||||||
|
with EnvironmentOptions do
|
||||||
|
begin
|
||||||
|
- EnvOptsCfgExisted := FileExistsCached(GetDefaultConfigFilename);
|
||||||
|
OnBeforeRead := @EnvironmentOptionsBeforeRead;
|
||||||
|
OnBeforeWrite := @EnvironmentOptionsBeforeWrite;
|
||||||
|
OnAfterWrite := @EnvironmentOptionsAfterWrite;
|
||||||
|
@@ -1300,8 +1299,8 @@ begin
|
||||||
|
|
||||||
|
OldVer:=EnvironmentOptions.OldLazarusVersion;
|
||||||
|
NowVer:=GetLazarusVersionString;
|
||||||
|
- //debugln(['TMainIDE.LoadGlobalOptions ',EnvOptsCfgExisted,' diff=',OldVer<>NowVer,' Now=',NowVer,' Old=',OldVer,' Comp=',CompareLazarusVersion(NowVer,OldVer)]);
|
||||||
|
- if EnvOptsCfgExisted and (OldVer<>NowVer) then
|
||||||
|
+ //debugln(['TMainIDE.LoadGlobalOptions ',FEnvOptsCfgExisted,' diff=',OldVer<>NowVer,' Now=',NowVer,' Old=',OldVer,' Comp=',CompareLazarusVersion(NowVer,OldVer)]);
|
||||||
|
+ if FEnvOptsCfgExisted and (OldVer<>NowVer) then
|
||||||
|
begin
|
||||||
|
IsUpgrade:=CompareLazarusVersion(NowVer,OldVer)>0;
|
||||||
|
if OldVer='' then
|
||||||
|
@@ -1387,7 +1386,6 @@ var
|
||||||
|
CfgCache: TPCTargetConfigCache;
|
||||||
|
OldLazDir: String;
|
||||||
|
Note: string;
|
||||||
|
- OI: TSimpleWindowLayout;
|
||||||
|
ConfigFile: string;
|
||||||
|
begin
|
||||||
|
{$IFDEF DebugSearchFPCSrcThread}
|
||||||
|
@@ -1466,10 +1464,6 @@ begin
|
||||||
|
Application.Terminate;
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
- // show OI with empty configuration
|
||||||
|
- OI := IDEWindowIntf.IDEWindowCreators.SimpleLayoutStorage.ItemByFormID(DefaultObjectInspectorName);
|
||||||
|
- if OI<>nil then
|
||||||
|
- OI.Visible := True;
|
||||||
|
EnvironmentOptions.Save(true);
|
||||||
|
if OldLazDir<>EnvironmentOptions.LazarusDirectory then begin
|
||||||
|
// fetch new translations
|
||||||
|
@@ -1510,6 +1504,9 @@ begin
|
||||||
|
// setup macros before loading options
|
||||||
|
MainBuildBoss.SetupTransferMacros;
|
||||||
|
|
||||||
|
+ // set flag to track if a local or user specific environment options configuration file existed
|
||||||
|
+ FEnvOptsCfgExisted := FileExistsCached(EnvironmentOptions.GetDefaultConfigFilename);
|
||||||
|
+
|
||||||
|
// load options
|
||||||
|
CreatePrimaryConfigPath;
|
||||||
|
StartProtocol;
|
||||||
|
@@ -2127,6 +2124,8 @@ begin
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TMainIDE.SetupObjectInspector;
|
||||||
|
+var
|
||||||
|
+ OIWindowLayout: TSimpleWindowLayout;
|
||||||
|
begin
|
||||||
|
IDECmdScopeObjectInspectorOnly.AddWindowClass(TObjectInspectorDlg);
|
||||||
|
|
||||||
|
@@ -2135,6 +2134,15 @@ begin
|
||||||
|
|
||||||
|
ShowAnchorDesigner:=@mnuViewAnchorEditorClicked;
|
||||||
|
ShowTabOrderEditor:=@mnuViewTabOrderClicked;
|
||||||
|
+
|
||||||
|
+ // always show the object inspector in case no local or user specific environment
|
||||||
|
+ // options configuration file existed
|
||||||
|
+ if not FEnvOptsCfgExisted then
|
||||||
|
+ begin
|
||||||
|
+ OIWindowLayout := IDEWindowCreators.SimpleLayoutStorage.ItemByFormID(DefaultObjectInspectorName);
|
||||||
|
+ if OIWindowLayout <> nil then
|
||||||
|
+ OIWindowLayout.Visible := True;
|
||||||
|
+ end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TMainIDE.SetupFormEditor;
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat Apr 30 20:57:54 UTC 2022 - PragmaticLinux <info@pragmaticlinux.com>
|
||||||
|
|
||||||
|
- Add patch to fix Object Inspector visibility:
|
||||||
|
* fix-object-inspector-visible.patch - boo#1197651
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sat Apr 23 10:57:00 UTC 2022 - PragmaticLinux <info@pragmaticlinux.com>
|
Sat Apr 23 10:57:00 UTC 2022 - PragmaticLinux <info@pragmaticlinux.com>
|
||||||
|
|
||||||
|
@ -34,6 +34,8 @@ Source90: %{name}-rpmlintrc
|
|||||||
Patch0: %{name}-Makefile_patch.diff
|
Patch0: %{name}-Makefile_patch.diff
|
||||||
# PATCH-FIX-OPENSUSE lazarus.desktop.patch -- Fix desktop file
|
# PATCH-FIX-OPENSUSE lazarus.desktop.patch -- Fix desktop file
|
||||||
Patch1: lazarus.desktop.patch
|
Patch1: lazarus.desktop.patch
|
||||||
|
# PATCH-FIX-UPSTREAM fix-object-inspector-visible.patch boo#1197651
|
||||||
|
Patch2: fix-object-inspector-visible.patch
|
||||||
BuildRequires: dos2unix
|
BuildRequires: dos2unix
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: fpc >= 3.0.0
|
BuildRequires: fpc >= 3.0.0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user