diff -Nru lazarus-0.9.30/components/codetools/allcodetoolunits.pp lazarus-0.9.30.2/components/codetools/allcodetoolunits.pp --- lazarus-0.9.30/components/codetools/allcodetoolunits.pp 2009-05-22 14:19:54.000000000 +0000 +++ lazarus-0.9.30.2/components/codetools/allcodetoolunits.pp 2011-11-23 16:14:29.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: allcodetoolunits.pp 20124 2009-05-22 14:19:54Z mattias $ } +{ $Id$ } { /*************************************************************************** allcodetoolunits.pp diff -Nru lazarus-0.9.30/components/codetools/codecompletiontool.pas lazarus-0.9.30.2/components/codetools/codecompletiontool.pas --- lazarus-0.9.30/components/codetools/codecompletiontool.pas 2011-01-18 07:35:11.000000000 +0000 +++ lazarus-0.9.30.2/components/codetools/codecompletiontool.pas 2011-11-23 16:14:29.000000000 +0000 @@ -6294,7 +6294,7 @@ Result:=false; Code:=ExtractClassName(CodeCompleteClassNode,false); // search the comment - Result:=FindCommentInFront(StartPos,Code,false,true,false,true,true, + Result:=FindCommentInFront(StartPos,Code,false,false,false,true,true, CommentStart,CommentEnd) end; diff -Nru lazarus-0.9.30/components/codetools/codetools.pas lazarus-0.9.30.2/components/codetools/codetools.pas --- lazarus-0.9.30/components/codetools/codetools.pas 2010-11-28 11:58:01.000000000 +0000 +++ lazarus-0.9.30.2/components/codetools/codetools.pas 2011-11-23 16:14:29.000000000 +0000 @@ -7,7 +7,7 @@ interface uses - BasicCodeTools, CacheCodeTools, CCodeParserTool, CodeAtom, CodeBeautifier, + BasicCodeTools, CacheCodeTools, CCodeParserTool, CodeAtom, CodeBeautifier, CodeCache, CodeCompletionTool, CodeGraph, CodeIndex, CodeTemplatesTool, CodeToolManager, CodeToolMemManager, CodeToolsConfig, CodeToolsStrConsts, CodeToolsStructs, CodeTree, CustomCodeTool, DefineTemplates, DirectivesTree, diff -Nru lazarus-0.9.30/components/codetools/codetoolsstructs.pas lazarus-0.9.30.2/components/codetools/codetoolsstructs.pas --- lazarus-0.9.30/components/codetools/codetoolsstructs.pas 2010-07-04 09:10:59.000000000 +0000 +++ lazarus-0.9.30.2/components/codetools/codetoolsstructs.pas 2011-11-23 16:14:29.000000000 +0000 @@ -172,7 +172,7 @@ constructor Create; destructor Destroy; override; function GetComponents(RootComponent: TComponent; AddRoot: boolean = true): TFPList; - property Childs: TFPList read FChilds; + property Children: TFPList read FChilds; property Root: TComponent read FRoot; end; @@ -699,7 +699,7 @@ OldRoot: TComponent; begin //debugln(['TComponentChildCollector.AddChildComponent ',DbgSName(Child)]); - Childs.Add(Child); + Children.Add(Child); OldRoot := Root; try if csInline in Child.ComponentState then @@ -724,12 +724,12 @@ function TComponentChildCollector.GetComponents(RootComponent: TComponent; AddRoot: boolean): TFPList; begin - Childs.Clear; + Children.Clear; if AddRoot then - Childs.Add(RootComponent); + Children.Add(RootComponent); FRoot:=RootComponent; TCTComponentAccess(RootComponent).GetChildren(@AddChildComponent,FRoot); - Result:=Childs; + Result:=Children; end; end. diff -Nru lazarus-0.9.30/components/codetools/eventcodetool.pas lazarus-0.9.30.2/components/codetools/eventcodetool.pas --- lazarus-0.9.30/components/codetools/eventcodetool.pas 2011-01-08 19:17:26.000000000 +0000 +++ lazarus-0.9.30.2/components/codetools/eventcodetool.pas 2011-11-23 16:14:29.000000000 +0000 @@ -120,11 +120,11 @@ MethodKindAsString: array[TMethodKind] of shortstring = ( 'procedure', 'function', 'constructor', 'destructor', 'class procedure', 'class function' - {$IFNDEF VER2_4} - ,'class constructor', 'class destructor' - {$ENDIF} - {$IFDEF VER2_5} - ,'operator overload' + {$IF high(TMethodKind)<> mkClassFunction} + ,'class constructor', 'class destructor' + {$IF high(TMethodKind)<> mkClassDestructor} + ,'operator overload' + {$ENDIF} {$ENDIF} ); diff -Nru lazarus-0.9.30/components/codetools/finddeclarationtool.pas lazarus-0.9.30.2/components/codetools/finddeclarationtool.pas --- lazarus-0.9.30/components/codetools/finddeclarationtool.pas 2011-02-10 22:22:30.000000000 +0000 +++ lazarus-0.9.30.2/components/codetools/finddeclarationtool.pas 2011-11-23 16:14:29.000000000 +0000 @@ -67,6 +67,7 @@ { $DEFINE ShowCollect} { $DEFINE ShowProcSearch} { $DEFINE DebugAddToolDependency} +{ $DEFINE VerboseFindDeclarationOfPropertyPath} {$IFDEF CTDEBUG}{$DEFINE DebugPrefix}{$ENDIF} {$IFDEF ShowTriedIdentifiers}{$DEFINE DebugPrefix}{$ENDIF} @@ -1617,13 +1618,15 @@ begin Result:=false; NewContext:=CleanFindContext; - //DebugLn('TFindDeclarationTool.FindDeclarationOfPropertyPath PropertyPath="',PropertyPath,'"'); + {$IFDEF VerboseFindDeclarationOfPropertyPath} + DebugLn('TFindDeclarationTool.FindDeclarationOfPropertyPath MainFilename=',MainFilename,' PropertyPath="',PropertyPath,'"'); + {$ENDIF} if PropertyPath='' then exit; ActivateGlobalWriteLock; Params:=TFindDeclarationParams.Create; try BuildTree(false); - + //debugln(['TFindDeclarationTool.FindDeclarationOfPropertyPath MainFilename=',MainFilename]); //DebugLn(['TFindDeclarationTool.FindDeclarationOfPropertyPath ',Src]); // first search the class/variable in the interface @@ -1631,7 +1634,8 @@ Identifier:=GetNextIdentifier; if Identifier='' then exit; Context.Tool:=Self; - Context.Node:=FindDeclarationNodeInInterface(Identifier,true); + //debugln(['TFindDeclarationTool.FindDeclarationOfPropertyPath MainFilename=',MainFilename,' Identifier=',Identifier]); + Context.Node:=FindDeclarationNodeInInterface(Identifier,false); if Context.Node=nil then begin DebugLn(['TFindDeclarationTool.FindDeclarationOfPropertyPath Identifier not found in interface ',Identifier]); exit; @@ -1645,7 +1649,9 @@ repeat Identifier:=GetNextIdentifier; IsLastProperty:=StartPos>length(PropertyPath); - //DebugLn('TFindDeclarationTool.FindDeclarationOfPropertyPath Context=',Context.Node.DescAsString,' Identifier=',Identifier); + {$IFDEF VerboseFindDeclarationOfPropertyPath} + DebugLn('TFindDeclarationTool.FindDeclarationOfPropertyPath Context=',Context.Node.DescAsString,' Identifier=',Identifier); + {$ENDIF} if Identifier='' then exit; if Context.Node.Desc=ctnSetType then begin // set @@ -1663,7 +1669,9 @@ Context.Node:=Params.NewNode; // search enum base type Context:=Context.Tool.FindBaseTypeOfNode(Params,Context.Node); - //debugln(['TFindDeclarationTool.FindDeclarationOfPropertyPath enum base type ',FindContextToString(Context)]); + {$IFDEF VerboseFindDeclarationOfPropertyPath} + debugln(['TFindDeclarationTool.FindDeclarationOfPropertyPath enum base type ',FindContextToString(Context)]); + {$ENDIF} if (Context.Node=nil) or (Context.Node.Desc<>ctnEnumerationType) then exit; // search enum @@ -1671,10 +1679,14 @@ while Node<>nil do begin if CompareIdentifiers(PChar(Pointer(Identifier)),@Context.Tool.Src[Node.StartPos])=0 then begin - //debugln(['TFindDeclarationTool.FindDeclarationOfPropertyPath identifier=',Identifier]); + {$IFDEF VerboseFindDeclarationOfPropertyPath} + debugln(['TFindDeclarationTool.FindDeclarationOfPropertyPath identifier=',Identifier]); + {$ENDIF} NewContext.Tool:=Context.Tool; NewContext.Node:=Node; - //debugln(['TFindDeclarationTool.FindDeclarationOfPropertyPath FOUND ',FindContextToString(NewContext)]); + {$IFDEF VerboseFindDeclarationOfPropertyPath} + debugln(['TFindDeclarationTool.FindDeclarationOfPropertyPath FOUND ',FindContextToString(NewContext)]); + {$ENDIF} exit(true); end; Node:=Node.NextBrother; @@ -1687,7 +1699,9 @@ debugln(['TFindDeclarationTool.FindDeclarationOfPropertyPath failed Context=',Context.Node.DescAsString]); exit; end; - //DebugLn('TFindDeclarationTool.FindDeclarationOfPropertyPath Identifier="',identifier,'"'); + {$IFDEF VerboseFindDeclarationOfPropertyPath} + DebugLn('TFindDeclarationTool.FindDeclarationOfPropertyPath Identifier="',identifier,'"'); + {$ENDIF} Params.Flags:=[fdfExceptionOnNotFound,fdfSearchInAncestors]; Params.SetIdentifier(Self,PChar(Pointer(Identifier)),nil); Params.ContextNode:=Context.Node; @@ -1707,21 +1721,27 @@ and Context.Tool.PropNodeIsTypeLess(Context.Node) then IsTypeLess:=true; if not IsTypeLess then break; - //DebugLn(['TFindDeclarationTool.FindDeclarationOfPropertyPath has not type, searching next ...']); + {$IFDEF VerboseFindDeclarationOfPropertyPath} + DebugLn(['TFindDeclarationTool.FindDeclarationOfPropertyPath has not type, searching next ...']); + {$ENDIF} Params.SetIdentifier(Self,PChar(Pointer(Identifier)),nil); Params.ContextNode:=Context.Tool.FindClassOrInterfaceNode(Context.Node); if Params.ContextNode=nil then Params.ContextNode:=Context.Node; Params.Flags:=[fdfExceptionOnNotFound,fdfSearchInAncestors, fdfFindVariable,fdfIgnoreCurContextNode]; - //DebugLn(['TFindDeclarationTool.FindDeclarationOfPropertyPath ',Context.Tool.MainFilename,' ',Params.ContextNode.DescAsString,' ',Context.Tool.CleanPosToStr(Params.ContextNode.StartPos)]); + {$IFDEF VerboseFindDeclarationOfPropertyPath} + DebugLn(['TFindDeclarationTool.FindDeclarationOfPropertyPath ',Context.Tool.MainFilename,' ',Params.ContextNode.DescAsString,' ',Context.Tool.CleanPosToStr(Params.ContextNode.StartPos)]); + {$ENDIF} if not Context.Tool.FindIdentifierInContext(Params) then exit; Context.Tool:=Params.NewCodeTool; Context.Node:=Params.NewNode; if Context.Node=nil then exit; until false; end; - //DebugLn(['TFindDeclarationTool.FindDeclarationOfPropertyPath FOUND']); + {$IFDEF VerboseFindDeclarationOfPropertyPath} + DebugLn(['TFindDeclarationTool.FindDeclarationOfPropertyPath FOUND']); + {$ENDIF} NewContext:=Context; Result:=true; exit; diff -Nru lazarus-0.9.30/components/codetools/laz_dom.pas lazarus-0.9.30.2/components/codetools/laz_dom.pas --- lazarus-0.9.30/components/codetools/laz_dom.pas 2011-02-10 22:22:30.000000000 +0000 +++ lazarus-0.9.30.2/components/codetools/laz_dom.pas 2011-11-23 16:14:29.000000000 +0000 @@ -5,7 +5,7 @@ } { - $Id: laz_dom.pas 29456 2011-02-10 22:22:30Z vincents $ + $Id$ This file is part of the Free Component Library Implementation of DOM interfaces diff -Nru lazarus-0.9.30/components/codetools/laz_xmlcfg.pas lazarus-0.9.30.2/components/codetools/laz_xmlcfg.pas --- lazarus-0.9.30/components/codetools/laz_xmlcfg.pas 2010-12-17 19:12:20.000000000 +0000 +++ lazarus-0.9.30.2/components/codetools/laz_xmlcfg.pas 2011-11-23 16:14:29.000000000 +0000 @@ -1,5 +1,5 @@ { - $Id: laz_xmlcfg.pas 28744 2010-12-17 19:12:20Z mattias $ + $Id$ This file was part of the Free Component Library and was adapted to use UTF8 strings instead of widestrings. diff -Nru lazarus-0.9.30/components/codetools/laz_xmlread.pas lazarus-0.9.30.2/components/codetools/laz_xmlread.pas --- lazarus-0.9.30/components/codetools/laz_xmlread.pas 2009-10-24 10:23:12.000000000 +0000 +++ lazarus-0.9.30.2/components/codetools/laz_xmlread.pas 2011-11-23 16:14:29.000000000 +0000 @@ -1,5 +1,5 @@ { - $Id: laz_xmlread.pas 22274 2009-10-24 10:23:12Z mattias $ + $Id$ This file is part of the Free Component Library XML reading routines. diff -Nru lazarus-0.9.30/components/codetools/laz_xmlwrite.pas lazarus-0.9.30.2/components/codetools/laz_xmlwrite.pas --- lazarus-0.9.30/components/codetools/laz_xmlwrite.pas 2008-08-25 22:32:23.000000000 +0000 +++ lazarus-0.9.30.2/components/codetools/laz_xmlwrite.pas 2011-11-23 16:14:29.000000000 +0000 @@ -1,5 +1,5 @@ { - $Id: laz_xmlwrite.pas 16236 2008-08-25 22:32:23Z mattias $ + $Id$ This file is part of the Free Component Library XML writing routines diff -Nru lazarus-0.9.30/components/codetools/Makefile lazarus-0.9.30.2/components/codetools/Makefile --- lazarus-0.9.30/components/codetools/Makefile 2010-12-04 16:25:19.000000000 +0000 +++ lazarus-0.9.30.2/components/codetools/Makefile 2011-11-23 16:14:29.000000000 +0000 @@ -654,190 +654,190 @@ override CLEAN_FILES+=$(wildcard $(COMPILER_UNITTARGETDIR)/*$(OEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(PPUEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(RSTEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*.lfm) $(wildcard $(COMPILER_UNITTARGETDIR)/*.res) $(wildcard $(COMPILER_UNITTARGETDIR)/*.compiled) $(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT)) endif ifeq ($(FULL_TARGET),i386-linux) -override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dVerboseIndenter -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter +override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter endif ifeq ($(FULL_TARGET),i386-go32v2) -override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dVerboseIndenter -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter +override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter endif ifeq ($(FULL_TARGET),i386-win32) -override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dVerboseIndenter -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter +override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter endif ifeq ($(FULL_TARGET),i386-os2) -override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dVerboseIndenter -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter +override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter endif ifeq ($(FULL_TARGET),i386-freebsd) -override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dVerboseIndenter -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter +override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter endif ifeq ($(FULL_TARGET),i386-beos) -override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dVerboseIndenter -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter +override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter endif ifeq ($(FULL_TARGET),i386-haiku) -override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dVerboseIndenter -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter +override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter endif ifeq ($(FULL_TARGET),i386-netbsd) -override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dVerboseIndenter -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter +override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter endif ifeq ($(FULL_TARGET),i386-solaris) -override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dVerboseIndenter -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter +override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter endif ifeq ($(FULL_TARGET),i386-qnx) -override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dVerboseIndenter -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter +override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter endif ifeq ($(FULL_TARGET),i386-netware) -override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dVerboseIndenter -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter +override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter endif ifeq ($(FULL_TARGET),i386-openbsd) -override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dVerboseIndenter -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter +override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter endif ifeq ($(FULL_TARGET),i386-wdosx) -override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dVerboseIndenter -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter +override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter endif ifeq ($(FULL_TARGET),i386-darwin) -override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dVerboseIndenter -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter +override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter endif ifeq ($(FULL_TARGET),i386-emx) -override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dVerboseIndenter -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter +override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter endif ifeq ($(FULL_TARGET),i386-watcom) -override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dVerboseIndenter -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter +override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter endif ifeq ($(FULL_TARGET),i386-netwlibc) -override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dVerboseIndenter -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter +override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter endif ifeq ($(FULL_TARGET),i386-wince) -override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dVerboseIndenter -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter +override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter endif ifeq ($(FULL_TARGET),i386-embedded) -override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dVerboseIndenter -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter +override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter endif ifeq ($(FULL_TARGET),i386-symbian) -override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dVerboseIndenter -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter +override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter endif ifeq ($(FULL_TARGET),i386-nativent) -override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dVerboseIndenter -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter +override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter endif ifeq ($(FULL_TARGET),i386-iphonesim) -override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dVerboseIndenter -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter +override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter endif ifeq ($(FULL_TARGET),m68k-linux) -override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dVerboseIndenter -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter +override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter endif ifeq ($(FULL_TARGET),m68k-freebsd) -override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dVerboseIndenter -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter +override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter endif ifeq ($(FULL_TARGET),m68k-netbsd) -override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dVerboseIndenter -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter +override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter endif ifeq ($(FULL_TARGET),m68k-amiga) -override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dVerboseIndenter -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter +override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter endif ifeq ($(FULL_TARGET),m68k-atari) -override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dVerboseIndenter -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter +override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter endif ifeq ($(FULL_TARGET),m68k-openbsd) -override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dVerboseIndenter -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter +override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter endif ifeq ($(FULL_TARGET),m68k-palmos) -override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dVerboseIndenter -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter +override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter endif ifeq ($(FULL_TARGET),m68k-embedded) -override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dVerboseIndenter -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter +override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter endif ifeq ($(FULL_TARGET),powerpc-linux) -override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dVerboseIndenter -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter +override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter endif ifeq ($(FULL_TARGET),powerpc-netbsd) -override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dVerboseIndenter -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter +override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter endif ifeq ($(FULL_TARGET),powerpc-amiga) -override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dVerboseIndenter -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter +override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter endif ifeq ($(FULL_TARGET),powerpc-macos) -override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dVerboseIndenter -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter +override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter endif ifeq ($(FULL_TARGET),powerpc-darwin) -override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dVerboseIndenter -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter +override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter endif ifeq ($(FULL_TARGET),powerpc-morphos) -override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dVerboseIndenter -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter +override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter endif ifeq ($(FULL_TARGET),powerpc-embedded) -override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dVerboseIndenter -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter +override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter endif ifeq ($(FULL_TARGET),sparc-linux) -override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dVerboseIndenter -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter +override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter endif ifeq ($(FULL_TARGET),sparc-netbsd) -override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dVerboseIndenter -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter +override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter endif ifeq ($(FULL_TARGET),sparc-solaris) -override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dVerboseIndenter -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter +override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter endif ifeq ($(FULL_TARGET),sparc-embedded) -override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dVerboseIndenter -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter +override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter endif ifeq ($(FULL_TARGET),x86_64-linux) -override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dVerboseIndenter -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter +override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter endif ifeq ($(FULL_TARGET),x86_64-freebsd) -override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dVerboseIndenter -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter +override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter endif ifeq ($(FULL_TARGET),x86_64-solaris) -override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dVerboseIndenter -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter +override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter endif ifeq ($(FULL_TARGET),x86_64-darwin) -override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dVerboseIndenter -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter +override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter endif ifeq ($(FULL_TARGET),x86_64-win64) -override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dVerboseIndenter -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter +override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter endif ifeq ($(FULL_TARGET),x86_64-embedded) -override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dVerboseIndenter -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter +override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter endif ifeq ($(FULL_TARGET),arm-linux) -override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dVerboseIndenter -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter +override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter endif ifeq ($(FULL_TARGET),arm-palmos) -override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dVerboseIndenter -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter +override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter endif ifeq ($(FULL_TARGET),arm-darwin) -override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dVerboseIndenter -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter +override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter endif ifeq ($(FULL_TARGET),arm-wince) -override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dVerboseIndenter -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter +override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter endif ifeq ($(FULL_TARGET),arm-gba) -override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dVerboseIndenter -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter +override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter endif ifeq ($(FULL_TARGET),arm-nds) -override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dVerboseIndenter -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter +override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter endif ifeq ($(FULL_TARGET),arm-embedded) -override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dVerboseIndenter -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter +override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter endif ifeq ($(FULL_TARGET),arm-symbian) -override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dVerboseIndenter -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter +override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter endif ifeq ($(FULL_TARGET),powerpc64-linux) -override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dVerboseIndenter -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter +override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter endif ifeq ($(FULL_TARGET),powerpc64-darwin) -override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dVerboseIndenter -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter +override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter endif ifeq ($(FULL_TARGET),powerpc64-embedded) -override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dVerboseIndenter -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter +override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter endif ifeq ($(FULL_TARGET),avr-embedded) -override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dVerboseIndenter -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter +override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter endif ifeq ($(FULL_TARGET),armeb-linux) -override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dVerboseIndenter -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter +override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter endif ifeq ($(FULL_TARGET),armeb-embedded) -override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dVerboseIndenter -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter +override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter endif ifeq ($(FULL_TARGET),mipsel-linux) -override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dVerboseIndenter -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter +override COMPILER_OPTIONS+=-MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter endif ifeq ($(FULL_TARGET),i386-linux) override COMPILER_INCLUDEDIR+=. diff -Nru lazarus-0.9.30/components/codetools/Makefile.compiled lazarus-0.9.30.2/components/codetools/Makefile.compiled --- lazarus-0.9.30/components/codetools/Makefile.compiled 2010-12-05 17:22:19.000000000 +0000 +++ lazarus-0.9.30.2/components/codetools/Makefile.compiled 2011-11-23 16:14:29.000000000 +0000 @@ -1,5 +1,5 @@ - + diff -Nru lazarus-0.9.30/components/codetools/Makefile.fpc lazarus-0.9.30.2/components/codetools/Makefile.fpc --- lazarus-0.9.30/components/codetools/Makefile.fpc 2010-12-04 16:25:19.000000000 +0000 +++ lazarus-0.9.30.2/components/codetools/Makefile.fpc 2011-11-23 16:14:29.000000000 +0000 @@ -12,7 +12,7 @@ unittargetdir=units/$(CPU_TARGET)-$(OS_TARGET) unitdir=../../packager/units/$(CPU_TARGET)-$(OS_TARGET) . includedir=. -options= -MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dVerboseIndenter -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter +options= -MObjFPC -Sci -O1 -gl -vewni -l -gh -gt -gl -dQT_NATIVE_DIALOGS -dWithSynOverviewGutter [target] units=codetools.pas diff -Nru lazarus-0.9.30/components/education/educationlaz.pas lazarus-0.9.30.2/components/education/educationlaz.pas --- lazarus-0.9.30/components/education/educationlaz.pas 2010-04-21 18:18:52.000000000 +0000 +++ lazarus-0.9.30.2/components/education/educationlaz.pas 2011-11-23 16:14:29.000000000 +0000 @@ -2,12 +2,12 @@ This source is only used to compile and install the package. } -unit educationlaz; +unit EducationLaz; interface uses - EduEnvOptsFrame, EduOptions, EduPkgSystem, EduCompPalette, EduMenu, + EduEnvOptsFrame, EduOptions, EduPkgSystem, EduCompPalette, EduMenu, EduNewProgram, EduPropsEvents, EduOIPages, EduOptionsDlg, EduSpeedButtons, LazarusPackageIntf; diff -Nru lazarus-0.9.30/components/education/eduoptions.pas lazarus-0.9.30.2/components/education/eduoptions.pas --- lazarus-0.9.30/components/education/eduoptions.pas 2011-02-10 22:22:30.000000000 +0000 +++ lazarus-0.9.30.2/components/education/eduoptions.pas 2011-11-23 16:14:29.000000000 +0000 @@ -141,7 +141,7 @@ property NextSibling: TEduOptionsNode read FNextSibling; property PrevSibling: TEduOptionsNode read FPrevSibling; property ChildCount: integer read GetChildCount; - property Childs[Index: integer]: TEduOptionsNode read GetChilds; default; + property Children[Index: integer]: TEduOptionsNode read GetChilds; default; end; { TEduOptsRootNode } @@ -233,7 +233,7 @@ var Child: TEduOptionsNode; begin - Child:=Childs[Index]; + Child:=Children[Index]; Remove(Index); Child.Free; end; @@ -242,7 +242,7 @@ var Child: TEduOptionsNode; begin - Child:=Childs[Index]; + Child:=Children[Index]; fChilds.Delete(Index); Child.FParent:=nil; Child.Unbind; @@ -259,11 +259,11 @@ FChilds.Insert(Index,Node); Node.FParent:=Self; if Index>0 then begin - Node.FPrevSibling:=Childs[Index-1]; + Node.FPrevSibling:=Children[Index-1]; Node.FPrevSibling.FNextSibling:=Node; end; if Index+1nil then begin for i:=RootItem.ChildCount-1 downto 0 do begin - Item:=RootItem.Childs[i]; + Item:=RootItem.Children[i]; if (Item.StoreIn='') then Item.Free; end; @@ -386,7 +386,7 @@ begin if Parent<>nil then begin for i:=Parent.ChildCount-1 downto 0 do begin - Item:=Parent.Childs[i]; + Item:=Parent.Children[i]; if (Item.StoreIn<>'') and (Name='*') or (SysUtils.CompareText(Item.StoreIn,Name)=0) then Item.Free; @@ -444,10 +444,10 @@ Changed:=false; Cnt:=0; for i:=0 to RootItem.ChildCount-1 do begin - Item:=RootItem.Childs[i]; + Item:=RootItem.Children[i]; if SysUtils.CompareText(Item.StoreIn,Pkg.Name)<>0 then continue; if (Cnt=TmpRoot.ChildCount) - or (not TmpRoot.Childs[Cnt].IsEqual(Item,true)) then begin + or (not TmpRoot.Children[Cnt].IsEqual(Item,true)) then begin Changed:=true; break; end; @@ -466,7 +466,7 @@ Path:=Path+'/'; Cnt:=0; for i:=0 to RootItem.ChildCount-1 do begin - Item:=RootItem.Childs[i]; + Item:=RootItem.Children[i]; //DebugLn(['TExternHelpOptions.SaveOptionsToPackage ',Item.Name,' StoreIN=',Item.StoreIn,' ',SysUtils.CompareText(Item.StoreIn,Pkg.Name)=0]); if SysUtils.CompareText(Item.StoreIn,Pkg.Name)<>0 then continue; inc(Cnt); @@ -525,7 +525,7 @@ Path:='ExternHelp/'; Cnt:=0; for i:=1 to RootItem.ChildCount do begin - Item:=RootItem.Childs[i-1]; + Item:=RootItem.Children[i-1]; if Item.StoreIn<>'' then continue; inc(Cnt); SaveNode(Config,Path+'Items/Item'+IntToStr(Cnt)+'/',Item); @@ -627,7 +627,7 @@ end; for i:=0 to Item.ChildCount-1 do - RegisterItem(Item.Childs[i]); + RegisterItem(Item.Children[i]); end; begin @@ -976,7 +976,7 @@ TVNode: TTreeNode; begin for i:=0 to ParentItem.ChildCount-1 do begin - Item:=ParentItem.Childs[i]; + Item:=ParentItem.Children[i]; TVNode:=ItemsTreeView.Items.AddChildObject(ParentTVNode,Item.Name,Item); Add(Item,TVNode); TVNode.Expanded:=true; @@ -1206,7 +1206,7 @@ Result:=fChilds.Count; end; -function TExternHelpItem.GetChilds(Index: integer): TExternHelpItem; +function TExternHelpItem.GetChildren(Index: integer): TExternHelpItem; begin Result:=TExternHelpItem(fChilds[Index]); end; @@ -1267,7 +1267,7 @@ begin if (ChildCount=0) and (URL='') and (Filename='') and (StoreIn='') then exit; for i:=fChilds.Count-1 downto 0 do begin - Child:=Childs[i]; + Child:=Children[i]; Child.Parent:=nil; Child.Free; end; @@ -1295,14 +1295,14 @@ procedure TExternHelpItem.RemoveChild(Index: integer); begin - Childs[Index].Parent:=nil; + Children[Index].Parent:=nil; fChilds.Delete(Index); IncreaseChangeStep; end; procedure TExternHelpItem.DeleteChild(Index: integer); begin - Childs[Index].Free; + Children[Index].Free; end; procedure TExternHelpItem.DeleteChild(Child: TExternHelpItem); @@ -1328,7 +1328,7 @@ and (ChildCount=Item.ChildCount); if Result then begin for i:=0 to ChildCount-1 do - if not (Childs[i].IsEqual(Item.Childs[i],true)) then exit(false); + if not (Children[i].IsEqual(Item.Children[i],true)) then exit(false); end; end; @@ -1353,9 +1353,9 @@ AddChild(Item); IncreaseChangeStep; end else begin - Item:=Childs[i]; + Item:=Children[i]; end; - Item.Assign(Src.Childs[i],true); + Item.Assign(Src.Children[i],true); end; while ChildCount>Src.ChildCount do begin DeleteChild(ChildCount-1); diff -Nru lazarus-0.9.30/components/externhelp/externhelp.lpk lazarus-0.9.30.2/components/externhelp/externhelp.lpk --- lazarus-0.9.30/components/externhelp/externhelp.lpk 2010-08-25 07:24:11.000000000 +0000 +++ lazarus-0.9.30.2/components/externhelp/externhelp.lpk 2011-11-23 16:14:29.000000000 +0000 @@ -2,13 +2,17 @@ + - + + + + @@ -44,7 +48,7 @@ - + diff -Nru lazarus-0.9.30/components/fpcunit/Makefile.compiled lazarus-0.9.30.2/components/fpcunit/Makefile.compiled --- lazarus-0.9.30/components/fpcunit/Makefile.compiled 2010-10-29 12:05:03.000000000 +0000 +++ lazarus-0.9.30.2/components/fpcunit/Makefile.compiled 2011-11-23 16:14:29.000000000 +0000 @@ -1,5 +1,5 @@ - + diff -Nru lazarus-0.9.30/components/fpweb/images/make_img_list.sh lazarus-0.9.30.2/components/fpweb/images/make_img_list.sh --- lazarus-0.9.30/components/fpweb/images/make_img_list.sh 2010-09-15 06:59:22.000000000 +0000 +++ lazarus-0.9.30.2/components/fpweb/images/make_img_list.sh 2011-11-23 16:14:29.000000000 +0000 @@ -1,8 +1,6 @@ +#!/bin/sh + if [ -f fpweb_images.inc ]; then rm fpweb_images.inc fi ../../../tools/lazres fpweb_images.inc HTMLList.png quick_table.png tag_dd.png tag_dl.png tag_dt.png tag_li.png tag_ol.png tag_ul.png tag_table_body.png tag_table_row.png tag_tbody.png tag_td.png tag_tr.png tag_table_data.png tag_h1.png tag_h2.png tag_h3.png tag_h4.png tag_h5.png HTMLForm.png lineedit.png reset.png submit.png tag_image.png tag_br.png tag_comm.png tag_hr.png color-picker.png div_center.png div_justify.png div_left.png div_right.png tag_bold.png tag_i.png tag_u.png tag_nbsp.png button.png check.png radio.png select.png tag_a.png tag_attribute.png tag_element.png tag_sub.png tag_sup.png tag_font.png tag_pre.png - - - - diff -Nru lazarus-0.9.30/components/lazcontrols/dividerbevel.pas lazarus-0.9.30.2/components/lazcontrols/dividerbevel.pas --- lazarus-0.9.30/components/lazcontrols/dividerbevel.pas 2010-06-22 18:36:39.000000000 +0000 +++ lazarus-0.9.30.2/components/lazcontrols/dividerbevel.pas 2011-11-23 16:14:29.000000000 +0000 @@ -175,10 +175,11 @@ begin inherited Create(AOwner); ControlStyle := [csSetCaption]; - Font.Style := Font.Style + [fsBold]; FCaptionSpacing := 10; LeftIndent := 60; FNeedCalcSize := True; + if (AOwner = nil) or not(csLoading in AOwner.ComponentState) then + Font.Style := Font.Style + [fsBold]; with GetControlClassDefaultSize do SetInitialBounds(0, 0, CX, CY); end; diff -Nru lazarus-0.9.30/components/lazreport/source/lr_e_htm.pas lazarus-0.9.30.2/components/lazreport/source/lr_e_htm.pas --- lazarus-0.9.30/components/lazreport/source/lr_e_htm.pas 2009-12-17 20:03:21.000000000 +0000 +++ lazarus-0.9.30.2/components/lazreport/source/lr_e_htm.pas 2011-11-23 16:14:29.000000000 +0000 @@ -49,8 +49,8 @@ function StyleIndex(p: PfrTextRec; AddIfNotFound: boolean = true): Integer; function TextStyleID(p: PfrTextRec): AnsiString; protected - procedure AppendLine(const s: UTF8String); - procedure InsertLine(const s: UTF8String; position: Integer); + procedure AppendLine(const s: AnsiString); + procedure InsertLine(const s: AnsiString; position: Integer); function GetviewText(View:TfrView): string; override; procedure CalcXCoords(var x,w: integer); override; public @@ -386,13 +386,13 @@ end; -procedure TfrHTMExportFilter.AppendLine(const s: UTF8String); +procedure TfrHTMExportFilter.AppendLine(const s: AnsiString); begin outputLines.Add(s); end; -procedure TfrHTMExportFilter.InsertLine(const s: UTF8String; position: Integer); +procedure TfrHTMExportFilter.InsertLine(const s: AnsiString; position: Integer); begin outputLines.Insert(position, s); end; diff -Nru lazarus-0.9.30/components/leakview/leakview.lpk lazarus-0.9.30.2/components/leakview/leakview.lpk --- lazarus-0.9.30/components/leakview/leakview.lpk 2010-09-20 16:39:15.000000000 +0000 +++ lazarus-0.9.30.2/components/leakview/leakview.lpk 2011-11-23 16:14:29.000000000 +0000 @@ -67,8 +67,8 @@ - - <_ExternHelp Childs="Count"/> + + <_ExternHelp Children="Count"/> diff -Nru lazarus-0.9.30/components/Makefile.fpc lazarus-0.9.30.2/components/Makefile.fpc --- lazarus-0.9.30/components/Makefile.fpc 2010-09-17 14:18:31.000000000 +0000 +++ lazarus-0.9.30.2/components/Makefile.fpc 2011-11-23 16:28:21.000000000 +0000 @@ -1,4 +1,4 @@ -# $Id: Makefile.fpc 27395 2010-09-17 14:18:31Z sekelsenmat $ +# $Id$ # # Makefile.fpc for Lazarus for Free Pascal # diff -Nru lazarus-0.9.30/components/memds/frmselectdataset.pp lazarus-0.9.30.2/components/memds/frmselectdataset.pp --- lazarus-0.9.30/components/memds/frmselectdataset.pp 2010-07-11 17:47:25.000000000 +0000 +++ lazarus-0.9.30.2/components/memds/frmselectdataset.pp 2011-11-23 16:14:29.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: frmselectdataset.pp 26601 2010-07-11 17:47:25Z maxim $ } +{ $Id$ } { ***************************************************************************** * * diff -Nru lazarus-0.9.30/components/projecttemplates/projtemplates.lpk lazarus-0.9.30.2/components/projecttemplates/projtemplates.lpk --- lazarus-0.9.30/components/projecttemplates/projtemplates.lpk 2010-11-28 18:45:05.000000000 +0000 +++ lazarus-0.9.30.2/components/projecttemplates/projtemplates.lpk 2011-11-23 16:14:29.000000000 +0000 @@ -76,8 +76,8 @@ - - <_ExternHelp Childs="Count"/> + + <_ExternHelp Children="Count"/> diff -Nru lazarus-0.9.30/components/sdf/registersdf.pas lazarus-0.9.30.2/components/sdf/registersdf.pas --- lazarus-0.9.30/components/sdf/registersdf.pas 2008-07-22 09:48:15.000000000 +0000 +++ lazarus-0.9.30.2/components/sdf/registersdf.pas 2011-11-23 16:14:29.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: registersdf.pas 15834 2008-07-22 09:48:15Z mattias $ } +{ $Id$ } { ***************************************************************************** * * diff -Nru lazarus-0.9.30/components/sqldb/registersqldb.pas lazarus-0.9.30.2/components/sqldb/registersqldb.pas --- lazarus-0.9.30/components/sqldb/registersqldb.pas 2010-09-18 09:48:04.000000000 +0000 +++ lazarus-0.9.30.2/components/sqldb/registersqldb.pas 2011-11-23 16:14:29.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: registersqldb.pas 27405 2010-09-18 09:48:04Z michael $ } +{ $Id$ } { ***************************************************************************** * * diff -Nru lazarus-0.9.30/components/synedit/allsyneditunits.pp lazarus-0.9.30.2/components/synedit/allsyneditunits.pp --- lazarus-0.9.30/components/synedit/allsyneditunits.pp 2010-12-17 19:49:06.000000000 +0000 +++ lazarus-0.9.30.2/components/synedit/allsyneditunits.pp 2011-11-23 16:14:29.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: allsyneditunits.pp 28745 2010-12-17 19:49:06Z martin $ } +{ $Id$ } { /*************************************************************************** allsyneditunits.pp diff -Nru lazarus-0.9.30/components/synedit/Makefile.fpc lazarus-0.9.30.2/components/synedit/Makefile.fpc --- lazarus-0.9.30/components/synedit/Makefile.fpc 2010-12-17 19:49:06.000000000 +0000 +++ lazarus-0.9.30.2/components/synedit/Makefile.fpc 2011-11-23 16:14:29.000000000 +0000 @@ -1,4 +1,4 @@ -# $Id: Makefile.fpc 28745 2010-12-17 19:49:06Z martin $ +# $Id$ # # Makefile.fpc for Lazarus for Free Pascal # diff -Nru lazarus-0.9.30/components/synedit/synbeautifier.pas lazarus-0.9.30.2/components/synedit/synbeautifier.pas --- lazarus-0.9.30/components/synedit/synbeautifier.pas 2010-11-20 12:08:14.000000000 +0000 +++ lazarus-0.9.30.2/components/synedit/synbeautifier.pas 2011-11-23 16:14:29.000000000 +0000 @@ -107,6 +107,7 @@ procedure AfterCommand(const Editor: TSynEditBase; const Lines: TSynEditStrings; const ACaret: TSynEditCaret; var Command: TSynEditorCommand; InitialCmd: TSynEditorCommand; StartLinePos, EndLinePos: Integer); + // GetDesiredIndentForLine: Returns the 1-based Physical x pos function GetDesiredIndentForLine (Editor: TSynEditBase; const Lines: TSynEditStrings; const ACaret: TSynEditCaret): Integer; virtual; abstract; @@ -144,6 +145,7 @@ function UnIndentLine(const ACaret: TSynEditCaret; out CaretNewX: Integer): Boolean; public procedure Assign(Src: TPersistent); override; + // Retruns a 0-based position (even 0-based physical) function GetIndentForLine(Editor: TSynEditBase; const Line: string; Physical: boolean): Integer; function GetDesiredIndentForLine @@ -475,14 +477,14 @@ Temp: string; FoundLine: LongInt; begin - Result := 0; + Result := 1; FCurrentLines := Lines; // for GetCurrentIndent BackCounter := ACaret.LinePos - 1; if BackCounter > 0 then repeat Dec(BackCounter); Temp := Lines[BackCounter]; - Result := GetIndentForLine(Editor, Temp, True) + 1; + Result := GetIndentForLine(Editor, Temp, True) + 1; // Physical until (BackCounter = 0) or (Temp <> ''); FoundLine := BackCounter + 1; @@ -491,12 +493,12 @@ // FOnGetDesiredIndent(Editor, ACaret.LineBytePos, ACaret.LinePos, Result, // FoundLine, ReplaceIndent); - if Result < 0 then exit; + //if Result < 0 then exit; - if FoundLine > 0 then - Temp := Lines[FoundLine-1] - else - FoundLine := BackCounter + 1; + //if FoundLine > 0 then + // Temp := Lines[FoundLine-1] + //else + // FoundLine := BackCounter + 1; Temp := copy(Temp, 1, GetIndentForLine(Editor, Temp, False)); case FIndentType of diff -Nru lazarus-0.9.30/components/synedit/syncompletion.pas lazarus-0.9.30.2/components/synedit/syncompletion.pas --- lazarus-0.9.30/components/synedit/syncompletion.pas 2010-12-03 02:10:35.000000000 +0000 +++ lazarus-0.9.30.2/components/synedit/syncompletion.pas 2011-11-23 16:14:29.000000000 +0000 @@ -27,7 +27,7 @@ If you do not delete the provisions above, a recipient may use your version of this file under either the MPL or the GPL. -$Id: syncompletion.pas 28602 2010-12-03 02:10:35Z martin $ +$Id$ You may retrieve the latest version of this file at the SynEdit home page, located at http://SynEdit.SourceForge.net @@ -1593,7 +1593,7 @@ with TCustomSynEdit(F.CurrentEditor) do begin BeginUndoBlock; BeginUpdate; - LogCaret:=PhysicalToLogicalPos(CaretXY); + LogCaret := LogicalCaretXY; NewBlockBegin:=LogCaret; CurLine:=Lines[NewBlockBegin.Y - 1]; while (NewBlockBegin.X>1) and (NewBlockBegin.X-1<=length(CurLine)) diff -Nru lazarus-0.9.30/components/synedit/syneditautocomplete.pp lazarus-0.9.30.2/components/synedit/syneditautocomplete.pp --- lazarus-0.9.30/components/synedit/syneditautocomplete.pp 2010-03-21 18:04:17.000000000 +0000 +++ lazarus-0.9.30.2/components/synedit/syneditautocomplete.pp 2011-11-23 16:14:29.000000000 +0000 @@ -29,7 +29,7 @@ If you do not delete the provisions above, a recipient may use your version of this file under either the MPL or the GPL. -$Id: syneditautocomplete.pp 24152 2010-03-21 18:04:17Z martin $ +$Id$ You may retrieve the latest version of this file at the SynEdit home page, located at http://SynEdit.SourceForge.net diff -Nru lazarus-0.9.30/components/synedit/syneditexport.pas lazarus-0.9.30.2/components/synedit/syneditexport.pas --- lazarus-0.9.30/components/synedit/syneditexport.pas 2008-08-25 22:32:23.000000000 +0000 +++ lazarus-0.9.30.2/components/synedit/syneditexport.pas 2011-11-23 16:14:29.000000000 +0000 @@ -29,7 +29,7 @@ If you do not delete the provisions above, a recipient may use your version of this file under either the MPL or the GPL. -$Id: syneditexport.pas 16236 2008-08-25 22:32:23Z mattias $ +$Id$ You may retrieve the latest version of this file at the SynEdit home page, located at http://SynEdit.SourceForge.net diff -Nru lazarus-0.9.30/components/synedit/syneditfoldedview.pp lazarus-0.9.30.2/components/synedit/syneditfoldedview.pp --- lazarus-0.9.30/components/synedit/syneditfoldedview.pp 2011-02-10 22:22:30.000000000 +0000 +++ lazarus-0.9.30.2/components/synedit/syneditfoldedview.pp 2011-11-23 16:14:29.000000000 +0000 @@ -3623,7 +3623,9 @@ begin {$IFDEF SynFoldDebug}debugln(['FOLD-- LineCountChanged AIndex=', AIndex, ' Acount=',ACount]);{$ENDIF} // no need for fix folding => synedit will be called, and scanlines will call fixfolding - {TODO: a "need fix folding" flag => to ensure it will be called if synedit doesnt} + {TODO: a "need fix folding" flag => to ensure it will be called if synedit doesnt + SynEdit.ScanRanges, calls Fixfolding as workaroound => review + } if (fLockCount > 0) and (AIndex < max(fNeedFixFrom, fNeedFixMinEnd)) then begin // adapt the fixfold range. Could be done smarter, but it doesn't matter if the range gets bigger than needed. if (ACount < 0) and (AIndex < fNeedFixFrom) then inc(fNeedFixFrom, ACount); diff -Nru lazarus-0.9.30/components/synedit/synedithighlighter.pp lazarus-0.9.30.2/components/synedit/synedithighlighter.pp --- lazarus-0.9.30/components/synedit/synedithighlighter.pp 2010-10-13 22:36:04.000000000 +0000 +++ lazarus-0.9.30.2/components/synedit/synedithighlighter.pp 2011-11-23 16:14:29.000000000 +0000 @@ -17,7 +17,7 @@ Contributors to the SynEdit and mwEdit projects are listed in the Contributors.txt file. -$Id: synedithighlighter.pp 27690 2010-10-13 22:36:04Z martin $ +$Id$ You may retrieve the latest version of this file at the SynEdit home page, located at http://SynEdit.SourceForge.net @@ -1252,9 +1252,7 @@ ResetRange else SetRange(FCurrentRanges[LineNumber - 1]); - // Keep a copy of the line text, since some highlighters just use a PChar pointer to it. - FLineText := CurrentLines[LineNumber]; - SetLine(FLineText, LineNumber); + SetLine(CurrentLines[LineNumber], LineNumber); end; procedure TSynCustomHighlighter.ResetRange; @@ -1263,6 +1261,8 @@ procedure TSynCustomHighlighter.SetLine(const NewValue: String; LineNumber: Integer); begin + // Keep a copy of the line text, since some highlighters just use a PChar pointer to it. + FLineText := NewValue; FIsInNextToEOL := False; FLineIndex := LineNumber; end; diff -Nru lazarus-0.9.30/components/synedit/synedit.inc lazarus-0.9.30.2/components/synedit/synedit.inc --- lazarus-0.9.30/components/synedit/synedit.inc 2006-05-01 21:47:48.000000000 +0000 +++ lazarus-0.9.30.2/components/synedit/synedit.inc 2011-11-23 16:14:29.000000000 +0000 @@ -202,4 +202,4 @@ {$ENDIF} -// $Id: synedit.inc 9222 2006-05-01 21:47:48Z micha $ +// $Id$ diff -Nru lazarus-0.9.30/components/synedit/syneditkeycmds.pp lazarus-0.9.30.2/components/synedit/syneditkeycmds.pp --- lazarus-0.9.30/components/synedit/syneditkeycmds.pp 2009-11-13 21:56:26.000000000 +0000 +++ lazarus-0.9.30.2/components/synedit/syneditkeycmds.pp 2011-11-23 16:14:29.000000000 +0000 @@ -27,7 +27,7 @@ If you do not delete the provisions above, a recipient may use your version of this file under either the MPL or the GPL. -$Id: syneditkeycmds.pp 22581 2009-11-13 21:56:26Z martin $ +$Id$ You may retrieve the latest version of this file at the SynEdit home page, located at http://SynEdit.SourceForge.net diff -Nru lazarus-0.9.30/components/synedit/syneditmiscclasses.pp lazarus-0.9.30.2/components/synedit/syneditmiscclasses.pp --- lazarus-0.9.30/components/synedit/syneditmiscclasses.pp 2010-10-27 00:49:34.000000000 +0000 +++ lazarus-0.9.30.2/components/synedit/syneditmiscclasses.pp 2011-11-23 16:14:29.000000000 +0000 @@ -27,7 +27,7 @@ If you do not delete the provisions above, a recipient may use your version of this file under either the MPL or the GPL. -$Id: syneditmiscclasses.pp 27893 2010-10-27 00:49:34Z martin $ +$Id$ You may retrieve the latest version of this file at the SynEdit home page, located at http://SynEdit.SourceForge.net diff -Nru lazarus-0.9.30/components/synedit/syneditmiscprocs.pp lazarus-0.9.30.2/components/synedit/syneditmiscprocs.pp --- lazarus-0.9.30/components/synedit/syneditmiscprocs.pp 2010-05-08 19:06:03.000000000 +0000 +++ lazarus-0.9.30.2/components/synedit/syneditmiscprocs.pp 2011-11-23 16:14:29.000000000 +0000 @@ -27,7 +27,7 @@ If you do not delete the provisions above, a recipient may use your version of this file under either the MPL or the GPL. -$Id: syneditmiscprocs.pp 25262 2010-05-08 19:06:03Z martin $ +$Id$ You may retrieve the latest version of this file at the SynEdit home page, located at http://SynEdit.SourceForge.net diff -Nru lazarus-0.9.30/components/synedit/syneditplugins.pas lazarus-0.9.30.2/components/synedit/syneditplugins.pas --- lazarus-0.9.30/components/synedit/syneditplugins.pas 2009-08-31 22:11:30.000000000 +0000 +++ lazarus-0.9.30.2/components/synedit/syneditplugins.pas 2011-11-23 16:14:29.000000000 +0000 @@ -26,7 +26,7 @@ If you do not delete the provisions above, a recipient may use your version of this file under either the MPL or the GPL. -$Id: syneditplugins.pas 21507 2009-08-31 22:11:30Z mattias $ +$Id$ You may retrieve the latest version of this file at the SynEdit home page, located at http://SynEdit.SourceForge.net diff -Nru lazarus-0.9.30/components/synedit/syneditpointclasses.pas lazarus-0.9.30.2/components/synedit/syneditpointclasses.pas --- lazarus-0.9.30/components/synedit/syneditpointclasses.pas 2010-08-26 19:33:23.000000000 +0000 +++ lazarus-0.9.30.2/components/synedit/syneditpointclasses.pas 2011-11-23 16:14:29.000000000 +0000 @@ -46,6 +46,7 @@ TInvalidateLines = procedure(FirstLine, LastLine: integer) of Object; TLinesCountChanged = procedure(FirstLine, Count: integer) of Object; + TMaxLeftCharFunc = function: Integer of object; { TSynEditPointBase } @@ -176,15 +177,17 @@ FLinePos: Integer; // 1 based FCharPos: Integer; // 1 based FLastCharPos: Integer; // used by KeepCaretX + FBytePos, FBytePosOffset: Integer; // 1 based FOldLinePos: Integer; // 1 based FOldCharPos: Integer; // 1 based FAdjustToNextChar: Boolean; - FMaxLeftChar: PInteger; + FMaxLeftChar: TMaxLeftCharFunc; FChangeOnTouch: Boolean; FSkipTabs: Boolean; FTouched: Boolean; procedure AdjustToChar; + procedure UpdateBytePos; function GetOldLineBytePos: TPoint; function GetOldLineCharPos: TPoint; procedure InternalSetLineCharPos(NewLine, NewCharPos: Integer; @@ -242,7 +245,7 @@ property SkipTabs: Boolean read FSkipTabs write SetSkipTabs; property AllowPastEOL: Boolean read FAllowPastEOL write SetAllowPastEOL; property KeepCaretX: Boolean read FKeepCaretX write SetKeepCaretX; - property MaxLeftChar: PInteger write FMaxLeftChar; + property MaxLeftChar: TMaxLeftCharFunc write FMaxLeftChar; end; TSynCaretType = (ctVerticalLine, ctHorizontalLine, ctHalfBlock, ctBlock); @@ -259,7 +262,7 @@ FClipTop: Integer; FDisplayPos: TPoint; FDisplayType: TSynCaretType; - FExtraLineChars: Integer; + FExtraLinePixel, FExtraLineChars: Integer; FOnExtraLineCharsChanged: TNotifyEvent; FVisible: Boolean; FHandleOwner: TWinControl; @@ -272,6 +275,7 @@ procedure SetDisplayType(const AType: TSynCaretType); procedure SetVisible(const AValue: Boolean); private + FClipExtraPixel: Integer; {$IFDeF SynCaretDebug} FDebugShowCount: Integer; {$ENDIF} @@ -283,9 +287,11 @@ FLockCount: Integer; FLockedUpdateNeeded: Boolean; procedure SetClipBottom(const AValue: Integer); + procedure SetClipExtraPixel(AValue: Integer); procedure SetClipLeft(const AValue: Integer); procedure SetClipRect(const AValue: TRect); procedure SetClipTop(const AValue: Integer); + procedure CalcExtraLineChars; procedure UpdateDisplayType; procedure UpdateDisplay; procedure ShowCaret; @@ -307,6 +313,7 @@ property ClipTop: Integer read FClipTop write SetClipTop; property ClipRect: TRect write SetClipRect; property ClipBottom: Integer read FClipBottom write SetClipBottom; + property ClipExtraPixel: Integer read FClipExtraPixel write SetClipExtraPixel; // Amount of pixels, after the last full char (half visible char width) property Visible: Boolean read FVisible write SetVisible; property DisplayType: TSynCaretType read FDisplayType write SetDisplayType; property DisplayPos: TPoint read FDisplayPos write SetDisplayPos; @@ -436,6 +443,8 @@ procedure TSynEditCaret.IncAutoMoveOnEdit; begin + if FAutoMoveOnEdit =0 then + UpdateBytePos;; inc(FAutoMoveOnEdit); end; @@ -511,6 +520,11 @@ end; end; +procedure TSynEditCaret.UpdateBytePos; +begin + FBytePos := FLines.LogPhysConvertor.PhysicalToLogical(FLinePos-1, FCharPos, FBytePosOffset); +end; + function TSynEditCaret.GetOldLineBytePos: TPoint; begin Result := FLines.PhysicalToLogicalPos(OldLineCharPos); @@ -563,7 +577,7 @@ try if (fCharPos <> NewCharPos) or (fLinePos <> NewLine) or ForceSet then begin if FMaxLeftChar <> nil then - nMaxX := FMaxLeftChar^ + nMaxX := FMaxLeftChar() else nMaxX := MaxInt; if NewLine > FLines.Count then @@ -589,6 +603,8 @@ AdjustToChar; if (not KeepLastCharPos) or (not FKeepCaretX) then FLastCharPos := FCharPos; + if FAutoMoveOnEdit <> 0 then + UpdateBytePos; end; finally Unlock; @@ -703,10 +719,17 @@ end; end; +var + p: TPoint; begin if FAutoMoveOnEdit > 0 then begin IncForcePastEOL; - LineBytePos := AdjustPoint(LineBytePos); + p := AdjustPoint(Point(FBytePos, FLinePos)); + p.x := FLines.LogPhysConvertor.LogicalToPhysical(p.y-1, p.x, FBytePosOffset); + FBytePos := -1; + LineCharPos := p; + if FBytePos < 0 then + UpdateBytePos; DecForcePastEOL; end; end; @@ -716,7 +739,7 @@ constructor TSynEditSelection.Create(ALines : TSynEditStrings; aActOnLineChanges: Boolean); begin Inherited Create(ALines); - FInternalCaret := TSynEditCaret.Create; + FInternalCaret := TSynEditCaret.Create; // TODO: does not need FLines.AddEditHandler FInternalCaret.Lines := FLines; FActiveSelectionMode := smNormal; @@ -1561,6 +1584,7 @@ FCurrentPosX := -1; FCurrentPosY := -1; FCurrentClippedWidth := -1; + FClipExtraPixel := 0; FLockCount := 0; end; @@ -1656,10 +1680,7 @@ end; procedure TSynEditScreenCaret.UpdateDisplayType; -var - OldExtraChars: Integer; begin - OldExtraChars := FExtraLineChars; case FDisplayType of ctVerticalLine: begin @@ -1667,7 +1688,7 @@ FPixelHeight := FCharHeight - 2; FOffsetX := -1; FOffsetY := 1; - FExtraLineChars := 0; + FExtraLinePixel := 1; end; ctBlock: begin @@ -1675,7 +1696,7 @@ FPixelHeight := FCharHeight - 2; FOffsetX := 0; FOffsetY := 1; - FExtraLineChars := 1; + FExtraLinePixel := FCharWidth; end; ctHalfBlock: begin @@ -1683,7 +1704,7 @@ FPixelHeight := (FCharHeight - 2) div 2; FOffsetX := 0; FOffsetY := FPixelHeight + 1; - FExtraLineChars := 1; + FExtraLinePixel := FCharWidth; end; ctHorizontalLine: begin @@ -1691,11 +1712,10 @@ FPixelHeight := 2; FOffsetX := 0; FOffsetY := FCharHeight - 1; - FExtraLineChars := 1; + FExtraLinePixel := FCharWidth; end; end; - if (FExtraLineChars <> OldExtraChars) and assigned(FOnExtraLineCharsChanged) then - FOnExtraLineCharsChanged(Self); + CalcExtraLineChars; UpdateDisplay; end; @@ -1706,6 +1726,17 @@ UpdateDisplay; end; +procedure TSynEditScreenCaret.SetClipExtraPixel(AValue: Integer); +begin + if FClipExtraPixel = AValue then Exit; + {$IFDeF SynCaretDebug} + debugln(['SynEditCaret ClipRect for HandleOwner=',FHandleOwner, ' ExtraPixel=', dbgs(AValue)]); + {$ENDIF} + FClipExtraPixel := AValue; + CalcExtraLineChars; + UpdateDisplay; +end; + procedure TSynEditScreenCaret.SetClipLeft(const AValue: Integer); begin if FClipLeft = AValue then exit; @@ -1715,6 +1746,10 @@ procedure TSynEditScreenCaret.SetClipRect(const AValue: TRect); begin + if (FClipLeft = AValue.Left) and (FClipRight = AValue.Right) and + (FClipTop = AValue.Top) and (FClipBottom = AValue.Bottom) + then + exit; {$IFDeF SynCaretDebug} debugln(['SynEditCaret ClipRect for HandleOwner=',FHandleOwner, ' Rect=', dbgs(AValue)]); {$ENDIF} @@ -1732,6 +1767,17 @@ UpdateDisplay; end; +procedure TSynEditScreenCaret.CalcExtraLineChars; +var + OldExtraChars: Integer; +begin + OldExtraChars := FExtraLineChars; + FExtraLineChars := Max(0, FExtraLinePixel - FClipExtraPixel + FCharWidth - 1) + div FCharWidth; + if (FExtraLineChars <> OldExtraChars) and assigned(FOnExtraLineCharsChanged) then + FOnExtraLineCharsChanged(Self); +end; + procedure TSynEditScreenCaret.UpdateDisplay; begin if FLockCount > 0 then begin diff -Nru lazarus-0.9.30/components/synedit/synedit.pp lazarus-0.9.30.2/components/synedit/synedit.pp --- lazarus-0.9.30/components/synedit/synedit.pp 2011-01-23 18:31:19.000000000 +0000 +++ lazarus-0.9.30.2/components/synedit/synedit.pp 2011-11-23 16:14:29.000000000 +0000 @@ -27,7 +27,7 @@ If you do not delete the provisions above, a recipient may use your version of this file under either the MPL or the GPL. -$Id: synedit.pp 29177 2011-01-23 18:31:19Z vincents $ +$Id$ You may retrieve the latest version of this file at the SynEdit home page, located at http://SynEdit.SourceForge.net @@ -179,7 +179,7 @@ // Mouse-states sfLeftGutterClick, sfRightGutterClick, sfDblClicked, sfTripleClicked, sfQuadClicked, - sfWaitForDragging, sfIsDragging, sfMouseSelecting, sfMouseDoneSelecting, + sfWaitForDragging, sfIsDragging, sfWaitForMouseSelecting, sfMouseSelecting, sfMouseDoneSelecting, sfIgnoreUpClick ); //mh 2000-10-30 TSynStateFlags = set of TSynStateFlag; @@ -344,9 +344,9 @@ FBlockIndent: integer; FCaret: TSynEditCaret; FInternalCaret: TSynEditCaret; + FScreenCaret: TSynEditScreenCaret; FInternalBlockSelection: TSynEditSelection; FOnChangeUpdating: TChangeUpdatingEvent; - FScreenCaret: TSynEditScreenCaret; FMouseSelectionMode: TSynSelectionMode; fCtrlMouseActive: boolean; // deprecated since 0.9.29 fMarkupManager : TSynEditMarkupManager; @@ -369,7 +369,7 @@ FLastMousePoint: TPoint; // Pixel FChangedLinesStart: integer; // 1 based, 0 means invalid FChangedLinesEnd: integer; // 1 based, 0 means invalid, -1 means rest of screen - FBeautifier: TSynCustomBeautifier; + FBeautifier, FDefaultBeautifier: TSynCustomBeautifier; FBeautifyStartLineIdx, FBeautifyEndLineIdx: Integer; FFoldedLinesView: TSynEditFoldedView; @@ -561,6 +561,7 @@ procedure SetExtraCharSpacing(const Value: integer); procedure SetLastMouseCaret(const AValue: TPoint); function CurrentMaxLeftChar: Integer; + function CurrentMaxLineLen: Integer; procedure SetLeftChar(Value: Integer); procedure SetLineText(Value: string); procedure SetMaxLeftChar(Value: integer); @@ -650,18 +651,14 @@ procedure KeyDown(var Key: Word; Shift: TShiftState); override; procedure UTF8KeyPress(var Key: TUTF8Char); override; procedure KeyPress(var Key: Char); override; - {$IFDEF SYN_LAZARUS} procedure KeyUp(var Key : Word; Shift : TShiftState); override; - {$ENDIF} Procedure LineCountChanged(Sender: TSynEditStrings; AIndex, ACount : Integer); Procedure LineTextChanged(Sender: TSynEditStrings; AIndex, ACount : Integer); procedure DoHighlightChanged(Sender: TSynEditStrings; AIndex, ACount : Integer); procedure ListCleared(Sender: TObject); - {$IFDEF SYN_LAZARUS} procedure FoldChanged(Index: integer); function GetTopView : Integer; procedure SetTopView(const AValue : Integer); - {$ENDIF} procedure Loaded; override; procedure MarkListChange(Sender: TSynEditMark; Changes: TSynEditMarkChangeReasons); {$IFDEF SYN_MBCSSUPPORT} @@ -675,10 +672,10 @@ procedure Paint; override; procedure PaintTextLines(AClip: TRect; FirstLine, LastLine, FirstCol, LastCol: integer); virtual; - {$IFDEF SYN_LAZARUS} procedure StartPaintBuffer(const ClipRect: TRect); procedure EndPaintBuffer(const ClipRect: TRect); - {$ENDIF} + function NextWordLogicalPos(WordEndForDelete : Boolean = false): TPoint; + function PrevWordLogicalPos: TPoint; procedure RecalcCharExtent; procedure RedoItem(Item: TSynEditUndoItem); procedure SetCaretXY(Value: TPoint); virtual; @@ -728,7 +725,6 @@ ATextDrawer: TheTextDrawer): TSynGutter; virtual; public procedure FindMatchingBracket; virtual; - {$IFDEF SYN_LAZARUS} function FindMatchingBracket(PhysStartBracket: TPoint; StartIncludeNeighborChars, MoveCaret, SelectBrackets, OnlyVisible: Boolean @@ -738,7 +734,6 @@ procedure UnfoldAll; procedure FoldAll(StartLevel : Integer = 0; IgnoreNested : Boolean = False); procedure EraseBackground(DC: HDC); override; - {$ENDIF} procedure AddKey(Command: TSynEditorCommand; Key1: word; SS1: TShiftState; Key2: word; SS2: TShiftState); @@ -778,7 +773,7 @@ procedure GetWordBoundsAtRowCol(const XY: TPoint; var StartX, EndX: integer); function GetWordAtRowCol(XY: TPoint): string; function NextTokenPos: TPoint; virtual; deprecated; // use next word pos instead - function NextWordPos(WordEndForDelete : Boolean = false): TPoint; virtual; + function NextWordPos: TPoint; virtual; function PrevWordPos: TPoint; virtual; function IdentChars: TSynIdentChars; function IsIdentChar(const c: TUTF8Char): boolean; @@ -866,6 +861,7 @@ property CaretX: Integer read GetCaretX write SetCaretX; property CaretY: Integer read GetCaretY write SetCaretY; property CaretXY: TPoint read GetCaretXY write SetCaretXY;// screen position + property LogicalCaretXY: TPoint read GetLogicalCaretXY write SetLogicalCaretXY; property CharsInWindow: Integer read fCharsInWindow; property CharWidth: integer read fCharWidth; property Color default clWhite; @@ -873,7 +869,6 @@ {$IFDEF SYN_LAZARUS} property CtrlMouseActive: boolean read fCtrlMouseActive; deprecated; // deprecated in 0.9.29 {$ENDIF} - property LogicalCaretXY: TPoint read GetLogicalCaretXY write SetLogicalCaretXY; {$IFDEF SYN_LAZARUS} property SelStart: Integer read GetSelStart write SetSelStart; property SelEnd: Integer read GetSelEnd write SetSelEnd; @@ -1213,9 +1208,6 @@ function PerformUndo(Caller: TObject): Boolean; override; end; -var - SynDefaultBeautifier: TSynCustomBeautifier; - { TSynEditUndoCaret } function TSynEditUndoCaret.IsEqualContent(AnItem: TSynEditUndoItem): Boolean; @@ -1609,16 +1601,17 @@ FStatusChangedList := TSynStatusChangedHandlerList.Create; - FBeautifier := SynDefaultBeautifier; + FDefaultBeautifier := TSynBeautifier.Create(self); + FBeautifier := FDefaultBeautifier; FLines := TSynEditStringList.Create; TSynEditStringList(FLines).AttachSynEdit(Self); FCaret := TSynEditCaret.Create; - FCaret.MaxLeftChar := @FMaxLeftChar; + FCaret.MaxLeftChar := @CurrentMaxLineLen; FCaret.AddChangeHandler({$IFDEF FPC}@{$ENDIF}CaretChanged); FInternalCaret := TSynEditCaret.Create; - FInternalCaret.MaxLeftChar := @FMaxLeftChar; + FInternalCaret.MaxLeftChar := @CurrentMaxLineLen; // Create the lines/views FTrimmedLinesView := TSynEditStringTrimmingList.Create(fLines, fCaret); @@ -1933,6 +1926,8 @@ EnsureCursorPosVisible; // TODO: This may call SetTopLine, change order // This does Paintlock, should be before final decrease // Must be after EnsureCursorPosVisible (as it does MoveCaretToVisibleArea) + if FCaret.LinePos > FLines.Count then + FCaret.LinePos := FLines.Count; if sfCaretChanged in fStateFlags then UpdateCaret; //if sfScrollbarChanged in fStateFlags then @@ -2021,6 +2016,8 @@ FreeAndNil(fInternalCaret); FreeAndNil(FScreenCaret); FreeAndNil(FStatusChangedList); + FBeautifier := nil; + FreeAndNil(FDefaultBeautifier); inherited Destroy; end; @@ -2169,19 +2166,20 @@ function TCustomSynEdit.GetLogicalCaretXY: TPoint; begin - Result:=PhysicalToLogicalPos(CaretXY); + Result := FCaret.LineBytePos; end; procedure TCustomSynEdit.SetLogicalCaretXY(const NewLogCaretXY: TPoint); begin - CaretXY:=LogicalToPhysicalPos(NewLogCaretXY); + FCaret.ChangeOnTouch; + FCaret.LineBytePos := NewLogCaretXY; end; procedure TCustomSynEdit.SetBeautifier(NewBeautifier: TSynCustomBeautifier); begin if fBeautifier = NewBeautifier then exit; if NewBeautifier = nil then - fBeautifier := SynDefaultBeautifier + fBeautifier := FDefaultBeautifier else fBeautifier := NewBeautifier; end; @@ -2434,7 +2432,6 @@ //DebugLn('[TCustomSynEdit.KeyDown] END ',dbgs(Key),' ',dbgs(Shift)); end; -{$IFDEF SYN_LAZARUS} procedure TCustomSynEdit.KeyUp(var Key: Word; Shift: TShiftState); begin {$IFDEF VerboseKeys} @@ -2451,7 +2448,6 @@ UpdateCursor; end; -{$ENDIF} procedure TCustomSynEdit.Loaded; begin @@ -2591,7 +2587,7 @@ Include(fStateFlags, sfMouseDoneSelecting); end; MouseCapture := True; - Include(fStateFlags, sfMouseSelecting); + Include(fStateFlags, sfWaitForMouseSelecting); end; emcSelectWord: begin @@ -2744,7 +2740,7 @@ fStateFlags := fStateFlags - [sfDblClicked, sfTripleClicked, sfQuadClicked, sfLeftGutterClick, sfRightGutterClick, - sfMouseSelecting, sfMouseDoneSelecting, + sfWaitForMouseSelecting, sfMouseSelecting, sfMouseDoneSelecting, sfWaitForDragging, sfIgnoreUpClick ]; @@ -2778,8 +2774,10 @@ finally DecPaintLock; end; - if FMouseClickDoPopUp and (PopupMenu <> nil) then + if FMouseClickDoPopUp and (PopupMenu <> nil) then begin + PopupMenu.PopupComponent:=self; PopupMenu.PopUp; + end; inherited MouseDown(Button, Shift, X, Y); LCLIntf.SetFocus(Handle); @@ -2802,14 +2800,20 @@ LastMouseCaret := PixelsToRowColumn(Point(X,Y)); UpdateCursor; + if (sfWaitForMouseSelecting in fStateFlags) and MouseCapture and + ( (abs(fMouseDownX-X) >= MinMax(fCharWidth div 2, 2, 4)) or + (abs(fMouseDownY-Y) >= MinMax(fTextHeight div 2, 2, 4)) ) + then + FStateFlags := FStateFlags - [sfWaitForMouseSelecting] + [sfMouseSelecting]; + //debugln('TCustomSynEdit.MouseMove sfWaitForDragging=',dbgs(sfWaitForDragging in fStateFlags),' MouseCapture=',dbgs(MouseCapture),' GetCaptureControl=',DbgSName(GetCaptureControl)); if MouseCapture and (sfWaitForDragging in fStateFlags) then begin if (Abs(fMouseDownX - X) >= GetSystemMetrics(SM_CXDRAG)) or (Abs(fMouseDownY - Y) >= GetSystemMetrics(SM_CYDRAG)) then begin - Exclude(fStateFlags, sfWaitForDragging); - Exclude(fStateFlags, sfMouseSelecting); - Include(fStateFlags, sfIsDragging); + FStateFlags := FStateFlags + -[sfWaitForDragging, sfWaitForMouseSelecting, sfMouseSelecting] + + [sfIsDragging]; //debugln('TCustomSynEdit.MouseMove BeginDrag'); BeginDrag(true); end; @@ -2872,7 +2876,7 @@ FBlockSelection.DecPersistentLock; end else - if MouseCapture and (not(sfIsDragging in fStateFlags)) + if MouseCapture and (fStateFlags * [sfIsDragging, sfWaitForMouseSelecting] = []) then begin MouseCapture:=false; fScrollTimer.Enabled := False; @@ -2929,7 +2933,7 @@ Inc(X, CharsInWindow); FCaret.LineCharPos := Point(X, C.Y); if (not(sfIsDragging in fStateFlags)) then - SetBlockEnd(PhysicalToLogicalPos(CaretXY)); + SetBlockEnd(LogicalCaretXY); end; if fScrollDeltaY <> 0 then begin if GetKeyState(VK_SHIFT) < 0 then @@ -2939,9 +2943,11 @@ if fScrollDeltaY > 0 then Y := FFoldedLinesView.TextIndex[LinesInWindow-1]+1 // scrolling down else Y := TopLine; // scrolling up + if Y < 1 // past end of file + then y := FCaret.LinePos; FCaret.LineCharPos := Point(C.X, Y); if (not(sfIsDragging in fStateFlags)) then - SetBlockEnd(PhysicalToLogicalPos(CaretXY)); + SetBlockEnd(LogicalCaretXY); end; finally DoDecPaintLock(Self); @@ -2970,6 +2976,7 @@ wasSelecting := (sfMouseDoneSelecting in fStateFlags); ignoreUp := (sfIgnoreUpClick in fStateFlags); Exclude(fStateFlags, sfIsDragging); + Exclude(fStateFlags, sfWaitForMouseSelecting); Exclude(fStateFlags, sfMouseSelecting); Exclude(fStateFlags, sfMouseDoneSelecting); Exclude(fStateFlags, sfIgnoreUpClick); @@ -2996,8 +3003,8 @@ if sfWaitForDragging in fStateFlags then begin ComputeCaret(X, Y); - SetBlockBegin(PhysicalToLogicalPos(CaretXY)); - SetBlockEnd(PhysicalToLogicalPos(CaretXY)); + SetBlockBegin(LogicalCaretXY); + SetBlockEnd(LogicalCaretXY); Exclude(fStateFlags, sfWaitForDragging); end; @@ -3024,8 +3031,10 @@ finally DecPaintLock; end; - if FMouseClickDoPopUp and (PopupMenu <> nil) then + if FMouseClickDoPopUp and (PopupMenu <> nil) then begin + PopupMenu.PopupComponent:=self; PopupMenu.PopUp; + end; //DebugLn('TCustomSynEdit.MouseUp END Mouse=',X,',',Y,' Caret=',CaretX,',',CaretY,', BlockBegin=',BlockBegin.X,',',BlockBegin.Y,' BlockEnd=',BlockEnd.X,',',BlockEnd.Y); end; @@ -3113,7 +3122,6 @@ end; end; -{$IFDEF SYN_LAZARUS} procedure TCustomSynEdit.CodeFoldAction(iLine: integer); // iLine is 1 based as parameter begin @@ -3161,7 +3169,6 @@ FFoldedLinesView.FoldAll(StartLevel, IgnoreNested); Invalidate; end; -{$ENDIF} procedure TCustomSynEdit.PaintTextLines(AClip: TRect; FirstLine, LastLine, FirstCol, LastCol: integer); @@ -3938,7 +3945,6 @@ ReAllocMem(TokenAccu.p,0); end; -{$IFDEF SYN_LAZARUS} procedure TCustomSynEdit.StartPaintBuffer(const ClipRect: TRect); {$IFDEF EnableDoubleBuf} var @@ -3962,9 +3968,7 @@ Canvas:=BufferBitmap.Canvas; {$ENDIF} end; -{$ENDIF} -{$IFDEF SYN_LAZARUS} procedure TCustomSynEdit.EndPaintBuffer(const ClipRect: TRect); begin {$IFDEF EnableDoubleBuf} @@ -3976,11 +3980,78 @@ {$ENDIF} end; +function TCustomSynEdit.NextWordLogicalPos(WordEndForDelete: Boolean): TPoint; +var + CX, CY, LineLen: integer; + Line: string; + LogCaret: TPoint; + DelSpaces : Boolean; +begin + LogCaret:=LogicalCaretXY; + CX := LogCaret.X; + CY := LogCaret.Y; + // valid line? + if (CY >= 1) and (CY <= FTheLinesView.Count) then begin + Line := FTheLinesView[CY - 1]; + LineLen := Length(Line); + + if CX >= LineLen then begin + // find first IdentChar in the next line + if CY < FTheLinesView.Count then begin + Line := FTheLinesView[CY]; + Inc(CY); + if WordEndForDelete then + CX := Max(1, StrScanForCharInSet(Line, 1, [#1..#255] - TSynWhiteChars)) + else + CX := Max(1, WordBreaker.NextWordStart(Line, 1, True)); + end; + end else begin + if WordEndForDelete then begin + DelSpaces := WordBreaker.IsAtWordStart(Line, CX) or not WordBreaker.IsInWord(Line, CX); + CX := WordBreaker.NextBoundary(Line, CX); + if DelSpaces and(cx > 0) then + CX := StrScanForCharInSet(Line, CX, [#1..#255] - TSynWhiteChars); + end + else + CX := WordBreaker.NextWordStart(Line, CX); + // if one of those failed just position at the end of the line + if CX <= 0 then + CX := LineLen + 1; + end; + end; + Result := Point(CX, CY); +end; + +function TCustomSynEdit.PrevWordLogicalPos: TPoint; +var + CX, CY: integer; + Line: string; + LogCaret: TPoint; +begin + LogCaret:=LogicalCaretXY; + CX := LogCaret.X; + CY := LogCaret.Y; + // valid line? + if (CY >= 1) and (CY <= FTheLinesView.Count) then begin + Line := FTheLinesView[CY - 1]; + CX := WordBreaker.PrevWordStart(Line, Min(CX, Length(Line) + 1)); + if CX <= 0 then + if CY > 1 then begin + // just position at the end of the previous line + Dec(CY); + Line := FTheLinesView[CY - 1]; + CX := Length(Line) + 1; + end + else + CX := 1; + end; + Result := Point(CX, CY); +end; + procedure TCustomSynEdit.EraseBackground(DC: HDC); begin // we are painting everything ourselves, so not need to erase background end; -{$ENDIF} procedure TCustomSynEdit.Update; begin @@ -4110,7 +4181,7 @@ procedure TCustomSynEdit.SelectWord; begin - SetWordBlock(PhysicalToLogicalPos(CaretXY)); + SetWordBlock(LogicalCaretXY); end; procedure TCustomSynEdit.SelectLine(WithLeadSpaces: Boolean = True); @@ -4146,12 +4217,12 @@ function TCustomSynEdit.GetCaretX : Integer; begin - Result:= fCaret.CharPos; + Result:= FCaret.CharPos; end; function TCustomSynEdit.GetCaretY : Integer; begin - Result:= fCaret.LinePos; + Result:= FCaret.LinePos; end; function TCustomSynEdit.GetCaretUndo: TSynEditUndoItem; @@ -4181,7 +4252,7 @@ function TCustomSynEdit.GetCaretXY: TPoint; begin - Result := Point(CaretX, CaretY); + Result := FCaret.LineCharPos; end; function TCustomSynEdit.GetFoldedCodeColor: TSynSelectedColor; @@ -4226,6 +4297,15 @@ Result := Result - fCharsInWindow + 1 + FScreenCaret.ExtraLineChars; end; +function TCustomSynEdit.CurrentMaxLineLen: Integer; +begin + if not HandleAllocated then // don't know chars in window yet + exit(MaxInt); + Result := FTheLinesView.LengthOfLongestLine + 1; + if (eoScrollPastEol in Options) and (Result < fMaxLeftChar) then + Result := fMaxLeftChar; +end; + procedure TCustomSynEdit.SetLeftChar(Value: Integer); begin Value := Min(Value, CurrentMaxLeftChar); @@ -4279,9 +4359,6 @@ inherited CreateHandle; //SizeOrFontChanged will be called FLeftGutter.RecalcBounds; FRightGutter.RecalcBounds; - FScreenCaret.ClipRect := Rect(TextLeftPixelOffset(False), 0, - ClientWidth - TextRightPixelOffset - ScrollBarWidth, - ClientHeight - ScrollBarWidth); UpdateScrollBars; finally DoDecPaintLock(nil); @@ -4616,7 +4693,7 @@ case Msg.ScrollCode of // Scrolls to start / end of the line SB_TOP: LeftChar := 1; - SB_BOTTOM: LeftChar := Max(FTheLinesView.LengthOfLongestLine, MaxLeftChar); + SB_BOTTOM: LeftChar := CurrentMaxLeftChar; // Scrolls one char left / right SB_LINEDOWN: LeftChar := LeftChar + 1; SB_LINEUP: LeftChar := LeftChar - 1; @@ -4681,9 +4758,6 @@ if sfEnsureCursorPosAtResize in fStateFlags then EnsureCursorPosVisible; Exclude(fStateFlags, sfEnsureCursorPosAtResize); - FScreenCaret.ClipRect := Rect(TextLeftPixelOffset(False), 0, - ClientWidth - TextRightPixelOffset - ScrollBarWidth, - ClientHeight - ScrollBarWidth); finally FScreenCaret.UnLock; dec(FScrollBarUpdateLock); @@ -4796,8 +4870,11 @@ exit; end; if not assigned(FHighlighter) then begin - if ATextChanged then + if ATextChanged then begin fMarkupManager.TextChanged(FChangedLinesStart, FChangedLinesEnd); + // TODO: see TSynEditFoldedView.LineCountChanged, this is only needed, because NeedFixFrom does not always work + FFoldedLinesView.FixFoldingAtTextIndex(FChangedLinesStart, FChangedLinesEnd); + end; Topline := TopLine; exit; end; @@ -4851,6 +4928,7 @@ ScanRanges; InvalidateLines(AIndex + 1, -1); InvalidateGutterLines(AIndex + 1, -1); + if FCaret.LinePos > FLines.Count then FCaret.LinePos := FLines.Count; end; if TopLine > AIndex + 1 then TopLine := TopLine + ACount // will call UpdateScrollBars @@ -4904,7 +4982,6 @@ StatusChanged(scTextCleared); end; -{$IFDEF SYN_LAZARUS} procedure TCustomSynEdit.FoldChanged(Index : integer); var i: Integer; @@ -4935,7 +5012,6 @@ begin Result := FFoldedLinesView.TextIndexToViewPos(TopLine-1); end; -{$ENDIF} procedure TCustomSynEdit.SetWordBlock(Value: TPoint); var @@ -4986,7 +5062,7 @@ FBlockSelection.EndLineBytePos := Point(x2, MinMax(Value.y, 1, FTheLinesView.Count)); end; FBlockSelection.ActiveSelectionMode := smNormal; - CaretXY := FTheLinesView.LogicalToPhysicalPos(FBlockSelection.EndLineBytePos); + LogicalCaretXY := FBlockSelection.EndLineBytePos; //DebugLn(' FFF2 ',Value.X,',',Value.Y,' BlockBegin=',BlockBegin.X,',',BlockBegin.Y,' BlockEnd=',BlockEnd.X,',',BlockEnd.Y); DoDecPaintLock(Self); end; @@ -5740,10 +5816,8 @@ FCaret.DecForcePastEOL; end; FCaret.LineCharPos := NewCaret; - BlockBegin := {$IFDEF SYN_LAZARUS}PhysicalToLogicalPos(NewCaret) - {$ELSE}NewCaret{$ENDIF}; - BlockEnd := {$IFDEF SYN_LAZARUS}PhysicalToLogicalPos(CaretXY) - {$ELSE}CaretXY{$ENDIF}; + BlockBegin := PhysicalToLogicalPos(NewCaret); + BlockEnd := LogicalCaretXY; finally InternalEndUndoBlock; end; @@ -6199,21 +6273,19 @@ // word selection ecWordLeft, ecSelWordLeft, ecColSelWordLeft: begin - Caret := CaretXY; - CaretNew := PrevWordPos; + CaretNew := PrevWordLogicalPos; if FFoldedLinesView.FoldedAtTextIndex[CaretNew.Y - 1] then begin CY := FindNextUnfoldedLine(CaretNew.Y, False); - CaretNew := LogicalToPhysicalPos(Point(1 + Length(FTheLinesView[CY-1]), CY)); + CaretNew := Point(1 + Length(FTheLinesView[CY-1]), CY); end; - FCaret.LineCharPos := CaretNew; + FCaret.LineBytePos := CaretNew; end; ecWordRight, ecSelWordRight, ecColSelWordRight: begin - Caret := CaretXY; - CaretNew := NextWordPos; + CaretNew := NextWordLogicalPos; if FFoldedLinesView.FoldedAtTextIndex[CaretNew.Y - 1] then CaretNew := Point(1, FindNextUnfoldedLine(CaretNew.Y, True)); - FCaret.LineCharPos := CaretNew; + FCaret.LineBytePos := CaretNew; end; ecSelectAll: begin @@ -6227,7 +6299,7 @@ else begin Temp := LineText; Len := Length(Temp); - LogCaretXY:=PhysicalToLogicalPos(CaretXY); + LogCaretXY:=LogicalCaretXY; Caret := CaretXY; //debugln('ecDeleteLastChar B Temp="',DbgStr(Temp),'" CaretX=',dbgs(CaretX),' LogCaretXY=',dbgs(LogCaretXY)); if LogCaretXY.X > Len +1 @@ -6267,7 +6339,7 @@ else begin Temp := LineText; Len := Length(Temp); - LogCaretXY:=PhysicalToLogicalPos(CaretXY); + LogCaretXY:=LogicalCaretXY; if LogCaretXY.X <= Len then begin // delete char @@ -6292,12 +6364,12 @@ Helper := StringOfChar(' ', CaretX - 1 - Len); CaretX := 1 + Len; end; - WP := NextWordPos(True); + WP := NextWordLogicalPos(True); end else WP := Point(Len + 1, CaretY); - if (WP.X <> CaretX) or (WP.Y <> CaretY) then begin - FInternalBlockSelection.StartLineBytePos := PhysicalToLogicalPos(WP); - FInternalBlockSelection.EndLineBytePos := PhysicalToLogicalPos(CaretXY); + if (WP.X <> FCaret.BytePos) or (WP.Y <> FCaret.LinePos) then begin + FInternalBlockSelection.StartLineBytePos := WP; + FInternalBlockSelection.EndLineBytePos := LogicalCaretXY; FInternalBlockSelection.ActiveSelectionMode := smNormal; FInternalBlockSelection.SetSelTextPrimitive(smNormal, nil); if Helper <> '' then @@ -6308,25 +6380,26 @@ ecDeleteLastWord, ecDeleteBOL: if not ReadOnly then begin if Command = ecDeleteLastWord then - WP := PrevWordPos + WP := PrevWordLogicalPos else WP := Point(1, CaretY); - if (WP.X <> CaretX) or (WP.Y <> CaretY) then begin - FInternalBlockSelection.StartLineBytePos := PhysicalToLogicalPos(WP); - FInternalBlockSelection.EndLineBytePos := PhysicalToLogicalPos(CaretXY); + if (WP.X <> FCaret.BytePos) or (WP.Y <> FCaret.LinePos) then begin + FInternalBlockSelection.StartLineBytePos := WP; + FInternalBlockSelection.EndLineBytePos := LogicalCaretXY; FInternalBlockSelection.ActiveSelectionMode := smNormal; FInternalBlockSelection.SetSelTextPrimitive(smNormal, nil); - CaretXY := WP; + FCaret.LineBytePos := WP; end; end; ecDeleteLine: - if not ReadOnly and not ((FTheLinesView.Count = 1) and (Length(FTheLinesView[0]) = 0)) + if not ReadOnly then begin - if FTheLinesView.Count = 1 then - FTheLinesView.EditDelete(1, 1, length(FTheLinesView[0])) - else begin - FTheLinesView.EditLinesDelete(CaretY, 1); - end; + CY := FCaret.LinePos; + if (Cy < FTheLinesView.Count) then + FTheLinesView.EditLinesDelete(CaretY, 1) + else + if (Cy = FTheLinesView.Count) and (FTheLinesView[CY-1] <> '') then + FTheLinesView.EditDelete(1, Cy, length(FTheLinesView[Cy-1])); CaretXY := Point(1, CaretY); // like seen in the Delphi editor end; ecClearAll: @@ -6339,7 +6412,7 @@ if SelAvail and (not FBlockSelection.Persistent) and (eoOverwriteBlock in fOptions2) then SetSelTextExternal(''); Temp := LineText; - LogCaretXY:=PhysicalToLogicalPos(CaretXY); + LogCaretXY:=LogicalCaretXY; Len := Length(Temp); if LogCaretXY.X > Len + 1 then LogCaretXY.X := Len + 1; @@ -6415,7 +6488,7 @@ // Insert a linebreak, but do not apply any other functionality (such as indent) if SelAvail and (not FBlockSelection.Persistent) and (eoOverwriteBlock in fOptions2) then SetSelTextExternal(''); - LogCaretXY:=PhysicalToLogicalPos(CaretXY); + LogCaretXY:=LogicalCaretXY; FTheLinesView.EditLineBreak(LogCaretXY.X, LogCaretXY.Y); CaretXY := Point(1, CaretY + 1); EnsureCursorPosVisible; @@ -6602,7 +6675,7 @@ if fInserting then Helper := ''; fUndoList.AddChange(crInsert, StartOfBlock, - PhysicalToLogicalPos(CaretXY), + LogicalCaretXY, Helper, smNormal); if CaretX >= LeftChar + fCharsInWindow then LeftChar := LeftChar + min(25, fCharsInWindow - 1); @@ -6964,16 +7037,12 @@ procedure TCustomSynEdit.GutterResized(Sender: TObject); begin if (csLoading in ComponentState) then exit; - FScreenCaret.ClipRect := Rect(TextLeftPixelOffset(False), 0, - ClientWidth - TextRightPixelOffset - ScrollBarWidth, - ClientHeight - ScrollBarWidth); + GutterChanged(Sender); fTextOffset := TextLeftPixelOffset - (LeftChar - 1) * fCharWidth; + if HandleAllocated then begin - FCharsInWindow := Max(1, (ClientWidth - - TextLeftPixelOffset - TextRightPixelOffset - - ScrollBarWidth) div fCharWidth); - //debugln('TCustomSynEdit.SetGutterWidth A ClientWidth=',dbgs(ClientWidth),' FLeftGutter.Width=',dbgs(FLeftGutter.Width),' ScrollBarWidth=',dbgs(ScrollBarWidth),' fCharWidth=',dbgs(fCharWidth)); + RecalcCharsAndLinesInWin(False); UpdateScrollBars; Invalidate; end; @@ -7455,14 +7524,28 @@ end; procedure TCustomSynEdit.RecalcCharsAndLinesInWin(CheckCaret: Boolean); +var + NewLinesInWindow: Integer; + w: Integer; begin - FCharsInWindow := Max(1, (ClientWidth - - TextLeftPixelOffset - TextRightPixelOffset - - ScrollBarWidth) div fCharWidth); - FLinesInWindow := Max(0,ClientHeight - ScrollBarWidth) div Max(1,fTextHeight); - FFoldedLinesView.LinesInWindow := fLinesInWindow; - FMarkupManager.LinesInWindow:= fLinesInWindow; - StatusChanged([scLinesInWindow]); + w := ClientWidth - TextLeftPixelOffset - TextRightPixelOffset - ScrollBarWidth; + FCharsInWindow := Max(1, w div fCharWidth); + + NewLinesInWindow := Max(0,ClientHeight - ScrollBarWidth) div Max(1,fTextHeight); + if NewLinesInWindow <> FLinesInWindow then begin + FLinesInWindow := NewLinesInWindow; + FFoldedLinesView.LinesInWindow := fLinesInWindow; + FMarkupManager.LinesInWindow:= fLinesInWindow; + StatusChanged([scLinesInWindow]); + end; + + FScreenCaret.Lock; + FScreenCaret.ClipRect := Rect(TextLeftPixelOffset(False), 0, + ClientWidth - TextRightPixelOffset - ScrollBarWidth + 1, + ClientHeight - ScrollBarWidth); + FScreenCaret.ClipExtraPixel := w - fCharsInWindow * fCharWidth; + FScreenCaret.UnLock; + if CheckCaret then begin if not (eoScrollPastEol in Options) then LeftChar := LeftChar; @@ -7753,13 +7836,17 @@ end; begin - if not SelAvail then exit; IncPaintLock; FBlockSelection.IncPersistentLock; try // build text to insert - BB := BlockBegin; - BE := BlockEnd; + if not SelAvail then begin + BB := CaretXY; + BE := CaretXY; + end else begin + BB := BlockBegin; + BE := BlockEnd; + end; if (BE.X = 1) then e := BE.y - 1 else @@ -7814,10 +7901,13 @@ end; begin - if not SelAvail then exit; - - BB := BlockBegin; - BE := BlockEnd; + if not SelAvail then begin + BB := CaretXY; + BE := CaretXY; + end else begin + BB := BlockBegin; + BE := BlockEnd; + end; // convert selection to complete lines if BE.X = 1 then e := BE.y - 1 @@ -7907,7 +7997,7 @@ OldPos: TPoint; NewPos: TPoint; begin - OldPos := LogicalCaretXY; + OldPos := CaretXY; NewPos := OldPos; if not(eoEnhanceHomeKey in fOptions) and (CaretX > 1) and (aMode in [synhmDefault]) then @@ -7934,7 +8024,8 @@ if (FirstNonBlank >= 1) or (aMode in [synhmFirstWord]) then begin // this line is not blank - LineStart := FirstNonBlank; + if FirstNonBlank < 1 then FirstNonBlank := 1; + LineStart := LogicalToPhysicalPos(Point(FirstNonBlank, CaretY)).x; end else begin // this line is blank @@ -7949,8 +8040,7 @@ NewPos.X:=1; end; end; - - FCaret.LineBytePos := NewPos; + FCaret.LineCharPos := NewPos; end; procedure TCustomSynEdit.DoEndKey; @@ -7965,13 +8055,13 @@ OldPos: TPoint; NewPos: TPoint; begin - OldPos := LogicalCaretXY; + OldPos := CaretXY; NewPos := OldPos; s := LineText; - if not (eoEnhanceEndKey in fOptions2) and (CaretX <> Length(s)+1) then begin + if not (eoEnhanceEndKey in fOptions2) and (FCaret.BytePos <> Length(s)+1) then begin // not at end of real line -> jump to end of line - NewPos.X := Length(s)+1; + FCaret.BytePos := Length(s)+1; end else begin // calculate line end position LastNonBlank := -1; @@ -7983,7 +8073,7 @@ end; if LastNonBlank >=1 then begin // this line is not blank - LineEnd := LastNonBlank + 1; + LineEnd := LogicalToPhysicalPos(Point(LastNonBlank + 1, CaretY)).x; end else begin // this line is blank // -> use automatic line indent @@ -7991,13 +8081,13 @@ end; NewPos.X:=LineEnd; - if (eoEnhanceEndKey in fOptions2) and (OldPos.X <> Length(s)+1) and (OldPos.X >= NewPos.X) + if (eoEnhanceEndKey in fOptions2) and (FCaret.BytePos <> Length(s)+1) and (OldPos.X >= NewPos.X) then begin - NewPos.X := Length(s)+1; - end; + FCaret.BytePos := Length(s)+1; + end + else + FCaret.LineCharPos := NewPos; end; - - FCaret.LineBytePos := NewPos; end; {$IFDEF SYN_COMPILER_4_UP} @@ -8169,7 +8259,6 @@ {$ENDIF} end; -{$IFDEF SYN_LAZARUS} function TCustomSynEdit.FindMatchingBracket(PhysStartBracket: TPoint; StartIncludeNeighborChars, MoveCaret, SelectBrackets, OnlyVisible: boolean ): TPoint; @@ -8259,8 +8348,9 @@ end; inc(EndPt.X); SetCaretAndSelection(CaretXY, StartPt, EndPt); - end else if MoveCaret then - CaretXY := LogicalToPhysicalPos(Result) + end + else if MoveCaret then + LogicalCaretXY := Result; end; procedure DoFindMatchingQuote(q: char); @@ -8435,7 +8525,6 @@ end; end; end; -{$ENDIF} //L505 begin function TCustomSynEdit.GetHighlighterAttriAtRowCol(XY: TPoint; @@ -8536,7 +8625,7 @@ end; begin - LogCaret:=PhysicalToLogicalPos(CaretXY); + LogCaret:=LogicalCaretXY; CX := LogCaret.X; CY := LogCaret.Y; // valid line? @@ -8582,72 +8671,14 @@ Result := LogicalToPhysicalPos(Point(CX, CY)); end; -function TCustomSynEdit.NextWordPos(WordEndForDelete : Boolean = false): TPoint; -var - CX, CY, LineLen: integer; - Line: string; - LogCaret: TPoint; - DelSpaces : Boolean; +function TCustomSynEdit.NextWordPos: TPoint; begin - LogCaret:=PhysicalToLogicalPos(CaretXY); - CX := LogCaret.X; - CY := LogCaret.Y; - // valid line? - if (CY >= 1) and (CY <= FTheLinesView.Count) then begin - Line := FTheLinesView[CY - 1]; - LineLen := Length(Line); - - if CX >= LineLen then begin - // find first IdentChar in the next line - if CY < FTheLinesView.Count then begin - Line := FTheLinesView[CY]; - Inc(CY); - if WordEndForDelete then - CX := Max(1, StrScanForCharInSet(Line, 1, [#1..#255] - TSynWhiteChars)) - else - CX := Max(1, WordBreaker.NextWordStart(Line, 1, True)); - end; - end else begin - if WordEndForDelete then begin - DelSpaces := WordBreaker.IsAtWordStart(Line, CX) or not WordBreaker.IsInWord(Line, CX); - CX := WordBreaker.NextBoundary(Line, CX); - if DelSpaces and(cx > 0) then - CX := StrScanForCharInSet(Line, CX, [#1..#255] - TSynWhiteChars); - end - else - CX := WordBreaker.NextWordStart(Line, CX); - // if one of those failed just position at the end of the line - if CX <= 0 then - CX := LineLen + 1; - end; - end; - Result := LogicalToPhysicalPos(Point(CX, CY)); + Result := LogicalToPhysicalPos(NextWordLogicalPos); end; function TCustomSynEdit.PrevWordPos: TPoint; -var - CX, CY: integer; - Line: string; - LogCaret: TPoint; begin - LogCaret:=LogicalCaretXY; - CX := LogCaret.X; - CY := LogCaret.Y; - // valid line? - if (CY >= 1) and (CY <= FTheLinesView.Count) then begin - Line := FTheLinesView[CY - 1]; - CX := WordBreaker.PrevWordStart(Line, Min(CX, Length(Line) + 1)); - if CX <= 0 then - if CY > 1 then begin - // just position at the end of the previous line - Dec(CY); - Line := FTheLinesView[CY - 1]; - CX := Length(Line) + 1; - end - else - CX := 1; - end; - Result := LogicalToPhysicalPos(Point(CX, CY)); + Result := LogicalToPhysicalPos(PrevWordLogicalPos); end; function TCustomSynEdit.FindHookedCmdEvent(AHandlerProc: THookedCommandEvent): @@ -9018,7 +9049,6 @@ initialization InitSynDefaultFont; - SynDefaultBeautifier := TSynBeautifier.Create(Application); Register; end. diff -Nru lazarus-0.9.30/components/synedit/syneditregexsearch.pas lazarus-0.9.30.2/components/synedit/syneditregexsearch.pas --- lazarus-0.9.30/components/synedit/syneditregexsearch.pas 2009-08-31 22:11:30.000000000 +0000 +++ lazarus-0.9.30.2/components/synedit/syneditregexsearch.pas 2011-11-23 16:14:29.000000000 +0000 @@ -25,7 +25,7 @@ If you do not delete the provisions above, a recipient may use your version of this file under either the MPL or the GPL. -$Id: syneditregexsearch.pas 21507 2009-08-31 22:11:30Z mattias $ +$Id$ You may retrieve the latest version of this file at the SynEdit home page, located at http://SynEdit.SourceForge.net diff -Nru lazarus-0.9.30/components/synedit/syneditsearch.pp lazarus-0.9.30.2/components/synedit/syneditsearch.pp --- lazarus-0.9.30/components/synedit/syneditsearch.pp 2009-01-02 20:42:02.000000000 +0000 +++ lazarus-0.9.30.2/components/synedit/syneditsearch.pp 2011-11-23 16:14:29.000000000 +0000 @@ -27,7 +27,7 @@ If you do not delete the provisions above, a recipient may use your version of this file under either the MPL or the GPL. -$Id: syneditsearch.pp 18066 2009-01-02 20:42:02Z martin $ +$Id$ You may retrieve the latest version of this file at the SynEdit home page, located at http://SynEdit.SourceForge.net diff -Nru lazarus-0.9.30/components/synedit/syneditstrconst.pp lazarus-0.9.30.2/components/synedit/syneditstrconst.pp --- lazarus-0.9.30/components/synedit/syneditstrconst.pp 2010-11-18 12:19:24.000000000 +0000 +++ lazarus-0.9.30.2/components/synedit/syneditstrconst.pp 2011-11-23 16:14:29.000000000 +0000 @@ -26,7 +26,7 @@ If you do not delete the provisions above, a recipient may use your version of this file under either the MPL or the GPL. -$Id: syneditstrconst.pp 28315 2010-11-18 12:19:24Z martin $ +$Id$ You may retrieve the latest version of this file at the SynEdit home page, located at http://SynEdit.SourceForge.net diff -Nru lazarus-0.9.30/components/synedit/synedittextbase.pas lazarus-0.9.30.2/components/synedit/synedittextbase.pas --- lazarus-0.9.30/components/synedit/synedittextbase.pas 2010-10-27 22:57:04.000000000 +0000 +++ lazarus-0.9.30.2/components/synedit/synedittextbase.pas 2011-11-23 16:14:29.000000000 +0000 @@ -129,6 +129,30 @@ read GetStorageMems write SetStorageMems; default; end; + { TSynLogicalPhysicalConvertor } +const + SYN_LP_MIN_ALLOC = 1024; // Keep at least n*SizeOf(TPhysicalCharWidths) allocated +type + TSynLogicalPhysicalConvertor = class + private + FLines: TSynEditStrings; + FCurrentWidths: TPhysicalCharWidths; + FCurrentWidthsLen, FCurrentWidthsAlloc: Integer; + FCurrentLine: Integer; + FTextChangeStamp, FViewChangeStamp: Int64; + // TODOtab-width + procedure PrepareWidthsForLine(AIndex: Integer; AForce: Boolean = False); + public + constructor Create(ALines: TSynEditStrings); + destructor Destroy; override; + // Line is 0-based // Column is 1-based + function PhysicalToLogical(AIndex, AColumn: Integer): Integer; + function PhysicalToLogical(AIndex, AColumn: Integer; out AColOffset: Integer): Integer; + // ACharPos 1=before 1st char + function LogicalToPhysical(AIndex, ABytePos: Integer): Integer; + function LogicalToPhysical(AIndex, ABytePos: Integer; var AColOffset: Integer): Integer; + end; + { TSynEditStringsBase } TSynEditStringsBase = class(TStrings) @@ -147,6 +171,7 @@ TSynEditStrings = class(TSynEditStringsBase) private FSenderUpdateCount: Integer; + FLogPhysConvertor :TSynLogicalPhysicalConvertor; protected FIsUtf8: Boolean; function GetIsUtf8 : Boolean; virtual; @@ -155,6 +180,8 @@ function GetExpandedString(Index: integer): string; virtual; abstract; function GetLengthOfLongestLine: integer; virtual; abstract; procedure SetTextStr(const Value: string); override; + function GetTextChangeStamp: int64; virtual; abstract; + function GetViewChangeStamp: int64; virtual; function GetUndoList: TSynEditUndoList; virtual; abstract; function GetRedoList: TSynEditUndoList; virtual; abstract; @@ -172,6 +199,7 @@ procedure DoGetPhysicalCharWidths(Line: PChar; LineLen, Index: Integer; PWidths: PPhysicalCharWidth); virtual; abstract; public constructor Create; + destructor Destroy; override; procedure BeginUpdate(Sender: TObject); overload; procedure EndUpdate(Sender: TObject); overload; function IsUpdating: Boolean; @@ -214,6 +242,7 @@ function PhysicalToLogicalPos(const p: TPoint): TPoint; function PhysicalToLogicalCol(const Line: string; Index, PhysicalPos: integer): integer; virtual; + property LogPhysConvertor :TSynLogicalPhysicalConvertor read FLogPhysConvertor; public procedure EditInsert(LogX, LogY: Integer; AText: String); virtual; abstract; function EditDelete(LogX, LogY, ByteLen: Integer): String; virtual; abstract; @@ -229,6 +258,8 @@ property IsUndoing: Boolean read GetIsUndoing write SetIsUndoing; property IsRedoing: Boolean read GetIsRedoing write SetIsRedoing; public + property TextChangeStamp: int64 read GetTextChangeStamp; + property ViewChangeStamp: int64 read GetViewChangeStamp; // tabs-size, trailing-spaces, ... property ExpandedStrings[Index: integer]: string read GetExpandedString; property LengthOfLongestLine: integer read GetLengthOfLongestLine; property IsUtf8: Boolean read GetIsUtf8 write SetIsUtf8; @@ -242,6 +273,8 @@ function GetIsUtf8 : Boolean; override; procedure SetIsUtf8(const AValue : Boolean); override; + function GetTextChangeStamp: int64; override; + function GetViewChangeStamp: int64; override; function GetRange(Index: Pointer): TSynManagedStorageMem; override; procedure PutRange(Index: Pointer; const ARange: TSynManagedStorageMem); override; @@ -430,6 +463,139 @@ raise ESynEditStorageMem.CreateFmt(SListIndexOutOfBounds, [Index]); end; +{ TSynLogicalPhysicalConvertor } + +procedure TSynLogicalPhysicalConvertor.PrepareWidthsForLine(AIndex: Integer; + AForce: Boolean); +var + LineLen: Integer; + Line: PChar; +//const dbg_cnt: integer = 0; +begin + if (not AForce) and (FCurrentLine = AIndex) and + (FLines.TextChangeStamp = FTextChangeStamp) and (FLines.ViewChangeStamp = FViewChangeStamp) + then begin + //debugln(['**************** RE-USING widths: ', AIndex,' (',dbgs(Pointer(self)),')']); + //dbg_cnt := dbg_cnt + 1; + exit; + end; + + if (AIndex < 0) or (AIndex >= FLines.Count) then begin + FCurrentWidthsLen := 0; + FViewChangeStamp := FLines.ViewChangeStamp; + FTextChangeStamp := FLines.TextChangeStamp; + exit; + end; + + Line := FLines.GetPChar(AIndex, LineLen); + if LineLen > FCurrentWidthsAlloc then begin + //debugln(['**************** COMPUTING widths (grow): ', AIndex,' (',dbgs(Pointer(self)),') old-alloc=', FCurrentWidthsAlloc, ' new-len=',LineLen]); + SetLength(FCurrentWidths, LineLen); + FCurrentWidthsAlloc := LineLen; + end + else if FCurrentWidthsAlloc > Max(Max(LineLen, FCurrentWidthsLen)*4, SYN_LP_MIN_ALLOC) then begin + //debugln(['**************** COMPUTING widths (shrink): ', AIndex,' (',dbgs(Pointer(self)),') old-alloc=', FCurrentWidthsAlloc, ' new-len=',LineLen]); + FCurrentWidthsAlloc := Max(Max(LineLen, FCurrentWidthsLen), SYN_LP_MIN_ALLOC) ; + SetLength(FCurrentWidths, FCurrentWidthsAlloc); + //end + //else begin + // debugln(['**************** COMPUTING widths: ', AIndex,' (',dbgs(Pointer(self)),') alloc=',FCurrentWidthsAlloc]); + end; + //debugln(['**************** NEW for index:: ', AIndex,' (',dbgs(Pointer(self)),') after index: ', FCurrentLine, ' used ', dbg_cnt,' times // old-alloc=', FCurrentWidthsAlloc, ' new-len=',LineLen, ' viewchg:',dbgs(not(FViewChangeStamp=FLines.ViewChangeStamp)),' txtchg:',dbgs(not(FTextChangeStamp=FLines.TextChangeStamp))]); dbg_cnt := 0; + + FCurrentWidthsLen := LineLen; + if LineLen > 0 then + FLines.DoGetPhysicalCharWidths(Line, LineLen, AIndex, @FCurrentWidths[0]); + FViewChangeStamp := FLines.ViewChangeStamp; + FTextChangeStamp := FLines.TextChangeStamp; + FCurrentLine := AIndex; +end; + +constructor TSynLogicalPhysicalConvertor.Create(ALines: TSynEditStrings); +begin + FLines := ALines; + FCurrentLine := -1; + FCurrentWidths := nil; + FCurrentWidthsLen := 0; + FCurrentWidthsAlloc := 0; +end; + +destructor TSynLogicalPhysicalConvertor.Destroy; +begin + SetLength(FCurrentWidths, 0); + inherited Destroy; +end; + +function TSynLogicalPhysicalConvertor.PhysicalToLogical(AIndex, + AColumn: Integer): Integer; +var + ColOffs: Integer; +begin + Result := PhysicalToLogical(AIndex, AColumn, ColOffs); +end; + +function TSynLogicalPhysicalConvertor.PhysicalToLogical(AIndex, AColumn: Integer; + out AColOffset: Integer): Integer; +var + BytePos, ScreenPos, ScreenPosOld: integer; +begin + PrepareWidthsForLine(AIndex); + + ScreenPos := 1; + BytePos := 0; + while BytePos < FCurrentWidthsLen do begin + ScreenPosOld := ScreenPos; + ScreenPos := ScreenPos + FCurrentWidths[BytePos]; + inc(BytePos); + if ScreenPos > AColumn then begin + AColOffset := AColumn - ScreenPosOld; + exit(BytePos); + end; + end; + + // Column at/past end of line + AColOffset := 0; + Result := BytePos + 1 + AColumn - ScreenPos; +end; + +function TSynLogicalPhysicalConvertor.LogicalToPhysical(AIndex, + ABytePos: Integer): Integer; +var + ColOffs: Integer; +begin + ColOffs := 0; + Result := LogicalToPhysical(AIndex, ABytePos, ColOffs); +end; + +function TSynLogicalPhysicalConvertor.LogicalToPhysical(AIndex, ABytePos: Integer; + var AColOffset: Integer): Integer; +var + i: integer; + CharWidths: TPhysicalCharWidths; +begin + {$IFDEF AssertSynMemIndex} + if (ABytePos <= 0) then + raise Exception.Create(Format('Bad Bytpos for PhystoLogical BytePos=%d ColOffs= %d idx= %d',[ABytePos, AColOffset, AIndex])); + {$ENDIF} + if (ABytePos = 0) or ((ABytePos = 1) and (AColOffset=0)) then + exit(ABytePos); + PrepareWidthsForLine(AIndex); + + dec(ABytePos); + if ABytePos >= FCurrentWidthsLen then begin + Result := 1 + ABytePos - FCurrentWidthsLen; + ABytePos := FCurrentWidthsLen; + AColOffset := 0; + end + else begin + AColOffset := Min(AColOffset, FCurrentWidths[ABytePos]-1); + Result := 1 + AColOffset; + end; + + for i := 0 to ABytePos - 1 do + Result := Result + FCurrentWidths[i]; +end; + { TSynEditStringsBase } function TSynEditStringsBase.GetPChar(ALineIndex: Integer): PChar; @@ -443,10 +609,17 @@ constructor TSynEditStrings.Create; begin + FLogPhysConvertor := TSynLogicalPhysicalConvertor.Create(self); inherited Create; IsUtf8 := True; end; +destructor TSynEditStrings.Destroy; +begin + FreeAndNil(FLogPhysConvertor); + inherited Destroy; +end; + procedure TSynEditStrings.BeginUpdate(Sender: TObject); begin if FSenderUpdateCount = 0 then @@ -579,6 +752,11 @@ end; end; +function TSynEditStrings.GetViewChangeStamp: int64; +begin + Result := 0; +end; + procedure TSynEditStrings.SetUpdateState(Updating: Boolean); begin // Update/check "FSenderUpdateCount", to avoid extra locking/unlocking @@ -591,8 +769,9 @@ function TSynEditStrings.LogicalToPhysicalPos(const p : TPoint) : TPoint; begin Result := p; - if Result.Y - 1 < Count then - Result.X:=LogicalToPhysicalCol(self[Result.Y - 1], Result.Y, Result.X); + Result.X := FLogPhysConvertor.LogicalToPhysical(p.y - 1, p.x); +// if Result.Y - 1 < Count then +// Result.X:=LogicalToPhysicalCol(self[Result.Y - 1], Result.Y, Result.X); end; function TSynEditStrings.LogicalToPhysicalCol(const Line : String; @@ -619,8 +798,9 @@ function TSynEditStrings.PhysicalToLogicalPos(const p : TPoint) : TPoint; begin Result := p; - if (Result.Y>=1) and (Result.Y <= Count) then - Result.X:=PhysicalToLogicalCol(self[Result.Y - 1], Result.Y - 1, Result.X); + Result.X := FLogPhysConvertor.PhysicalToLogical(p.y - 1, p.x); +// if (Result.Y>=1) and (Result.Y <= Count) then +// Result.X:=PhysicalToLogicalCol(self[Result.Y - 1], Result.Y - 1, Result.X); end; function TSynEditStrings.PhysicalToLogicalCol(const Line : string; @@ -728,6 +908,16 @@ FSynStrings.IsUtf8 := AValue; end; +function TSynEditStringsLinked.GetTextChangeStamp: int64; +begin + Result := fSynStrings.GetTextChangeStamp; +end; + +function TSynEditStringsLinked.GetViewChangeStamp: int64; +begin + Result := fSynStrings.GetViewChangeStamp; +end; + //Ranges function TSynEditStringsLinked.GetRange(Index: Pointer): TSynManagedStorageMem; begin diff -Nru lazarus-0.9.30/components/synedit/synedittextbuffer.pp lazarus-0.9.30.2/components/synedit/synedittextbuffer.pp --- lazarus-0.9.30/components/synedit/synedittextbuffer.pp 2010-08-08 00:35:06.000000000 +0000 +++ lazarus-0.9.30.2/components/synedit/synedittextbuffer.pp 2011-11-23 16:14:29.000000000 +0000 @@ -27,7 +27,7 @@ If you do not delete the provisions above, a recipient may use your version of this file under either the MPL or the GPL. -$Id: synedittextbuffer.pp 27027 2010-08-08 00:35:06Z martin $ +$Id$ You may retrieve the latest version of this file at the SynEdit home page, located at http://SynEdit.SourceForge.net @@ -136,6 +136,7 @@ protected function GetExpandedString(Index: integer): string; override; function GetLengthOfLongestLine: integer; override; + function GetTextChangeStamp: int64; override; function GetRedoList: TSynEditUndoList; override; function GetUndoList: TSynEditUndoList; override; @@ -201,7 +202,6 @@ property Flags[Index: Integer]: TSynEditStringFlags read GetFlags write SetFlags; property Modified: Boolean read FModified write SetModified; - property TextChangeStamp: int64 read FTextChangeStamp; public property UndoList: TSynEditUndoList read GetUndoList write fUndoList; property RedoList: TSynEditUndoList read GetRedoList write fRedoList; @@ -642,6 +642,11 @@ Result := 0; end; +function TSynEditStringList.GetTextChangeStamp: int64; +begin + Result := FTextChangeStamp; +end; + function TSynEditStringList.GetRedoList: TSynEditUndoList; begin Result := fRedoList; diff -Nru lazarus-0.9.30/components/synedit/synedittexttabexpander.pas lazarus-0.9.30.2/components/synedit/synedittexttabexpander.pas --- lazarus-0.9.30/components/synedit/synedittexttabexpander.pas 2011-01-23 19:37:54.000000000 +0000 +++ lazarus-0.9.30.2/components/synedit/synedittexttabexpander.pas 2011-11-23 16:14:29.000000000 +0000 @@ -58,11 +58,13 @@ FTabData: TSynEditStringTabData; FLastLineHasTab: Boolean; // Last line, parsed by GetPhysicalCharWidths FLastLinePhysLen: Integer; + FViewChangeStamp: int64; procedure TextBufferChanged(Sender: TObject); procedure LineCountChanged(Sender: TSynEditStrings; AIndex, ACount : Integer); function ExpandedString(Index: integer): string; function ExpandedStringLength(Index: integer): Integer; protected + function GetViewChangeStamp: int64; override; function GetTabWidth : integer; procedure SetTabWidth(const AValue : integer); function GetExpandedString(Index: integer): string; override; @@ -170,6 +172,10 @@ begin if FTabWidth = AValue then exit; + {$PUSH}{$Q-}{$R-} + FViewChangeStamp := FViewChangeStamp + 1; + {$POP} + FTabWidth := AValue; FIndexOfLongestLine := -1; for i := 0 to Count - 1 do @@ -177,6 +183,14 @@ FTabData[i] := LINE_LEN_UNKNOWN; end; +function TSynEditStringTabExpander.GetViewChangeStamp: int64; +begin + Result := inherited GetViewChangeStamp; + {$PUSH}{$Q-}{$R-} + Result := Result + FViewChangeStamp; + {$POP} +end; + procedure TSynEditStringTabExpander.TextBufferChanged(Sender: TObject); var Data: TSynEditStringTabData; diff -Nru lazarus-0.9.30/components/synedit/synedittexttrimmer.pas lazarus-0.9.30.2/components/synedit/synedittexttrimmer.pas --- lazarus-0.9.30/components/synedit/synedittexttrimmer.pas 2011-02-10 22:22:30.000000000 +0000 +++ lazarus-0.9.30.2/components/synedit/synedittexttrimmer.pas 2011-11-23 16:14:29.000000000 +0000 @@ -52,6 +52,7 @@ fLockList : TStringList; FLineEdited: Boolean; FTempLineStringForPChar: String; // experimental; used by GetPChar; + FViewChangeStamp: int64; procedure DoCaretChanged(Sender : TObject); procedure ListCleared(Sender: TObject); Procedure LinesChanged(Sender: TSynEditStrings; AIndex, ACount : Integer); @@ -68,7 +69,9 @@ procedure EditMoveToTrim(LogY, Len: Integer); procedure EditMoveFromTrim(LogY, Len: Integer); procedure UpdateLineText(LogY: Integer); + procedure IncViewChangeStamp; protected + function GetViewChangeStamp: int64; override; function GetExpandedString(Index: integer): string; override; function GetLengthOfLongestLine: integer; override; function Get(Index: integer): string; override; @@ -378,6 +381,7 @@ then begin if (fLineIndex <> TSynEditCaret(Sender).LinePos - 1) then begin {$IFDEF SynTrimDebug}debugln(['--- Trimmer -- CarteChnaged - Clearing 1 ', ' fLineIndex=', fLineIndex, ' fSpaces=',length(fSpaces), 'newCaretYPos=',TSynEditCaret(Sender).LinePos]);{$ENDIF} + if fSpaces <> '' then IncViewChangeStamp; fLineIndex := TSynEditCaret(Sender).LinePos - 1; fSpaces := ''; end; @@ -385,7 +389,7 @@ end; FIsTrimming := True; - SendNotification(senrLineChange, self, fLineIndex, 1); + IncViewChangeStamp; if (fLineIndex <> TSynEditCaret(Sender).LinePos - 1) or (FTrimType = settIgnoreAll) then begin @@ -393,6 +397,7 @@ CurUndoList.AppendToLastChange(TSynEditUndoTrimForget.Create(FLineIndex+1, FSpaces)); i := length(FSpaces); fSpaces := ''; + SendNotification(senrLineChange, self, fLineIndex, 1); SendNotification(senrEditAction, self, FLineIndex+1, 0, 1+length(fSynStrings[FLineIndex]), -i, ''); end else begin @@ -408,6 +413,7 @@ FSpaces := copy(FSpaces, 1, j); i := length(s); CurUndoList.AppendToLastChange(TSynEditUndoTrimForget.Create(FLineIndex+1, s)); + SendNotification(senrLineChange, self, fLineIndex, 1); SendNotification(senrEditAction, self, FLineIndex+1, 0, 1+length(fSynStrings[FLineIndex]) + length(FSpaces), -i, ''); end; @@ -419,6 +425,7 @@ procedure TSynEditStringTrimmingList.ListCleared(Sender: TObject); begin {$IFDEF SynTrimDebug}debugln(['--- Trimmer -- LIST CLEARED ', ' fLineIndex=', fLineIndex, ' fSpaces=',length(fSpaces) ]);{$ENDIF} + if fSpaces <> '' then IncViewChangeStamp; fLockList.Clear; fLineIndex:= -1; fSpaces := ''; @@ -445,6 +452,7 @@ i, j: Integer; begin if (not fEnabled) then exit; + IncViewChangeStamp; if fLockCount > 0 then begin {$IFDEF SynTrimDebug}debugln(['--- Trimmer -- Lines Changed (ins/del) locked ', ' fLineIndex=', fLineIndex, ' fSpaces=',length(fSpaces) ]);{$ENDIF} for i := fLockList.Count-1 downto 0 do begin @@ -549,6 +557,7 @@ if Index <> fLineIndex then exit(''); if (fLineIndex < 0) or (fLineIndex >= fSynStrings.Count) or (fLineText <> fSynStrings[fLineIndex]) then begin + if fSpaces <> '' then IncViewChangeStamp; fSpaces:=''; fLineText:=''; end; @@ -581,14 +590,20 @@ {$IFDEF SynTrimDebug}debugln(['--- Trimmer -- TrimAfterLock', ' fLineIndex=', fLineIndex, ' fSpaces=',length(fSpaces), ' Index=', Index, ' LockList=',fLockList.CommaText]);{$ENDIF} i := fLockList.IndexOfObject(TObject(Pointer(PtrUInt(fLineIndex)))); if i >= 0 then begin + if fSpaces <> fLockList[i] then + IncViewChangeStamp; fSpaces:= fLockList[i]; if (fLineIndex >= 0) and (fLineIndex < fSynStrings.Count) then fLineText := fSynStrings[fLineIndex]; fLockList.Delete(i); DoCaretChanged(fCaret); - end; + end + else if fSpaces <> '' then + IncViewChangeStamp; FIsTrimming := True; BeginUpdate; + if fLockList.Count > 0 then + IncViewChangeStamp; try for i := 0 to fLockList.Count-1 do begin index := Integer(PtrUInt(Pointer(fLockList.Objects[i]))); @@ -760,6 +775,7 @@ copy(s,1, LogX - 1) + AText + copy(s, LogX, length(s)), fSynStrings.Strings[LogY - 1]); CurUndoList.AddChange(TSynEditUndoTrimInsert.Create(LogX, LogY, Length(AText))); + IncViewChangeStamp; end; function TSynEditStringTrimmingList.EditDeleteTrim(LogX, LogY, ByteLen: @@ -777,6 +793,7 @@ fSynStrings.Strings[LogY - 1]); if Result <> '' then CurUndoList.AddChange(TSynEditUndoTrimDelete.Create(LogX, LogY, Result)); + IncViewChangeStamp; end; procedure TSynEditStringTrimmingList.EditMoveToTrim(LogY, Len: Integer); @@ -792,6 +809,7 @@ StoreSpacesForLine(LogY - 1, s, t); fSynStrings[LogY - 1] := t; CurUndoList.AddChange(TSynEditUndoTrimMoveTo.Create(LogY, Len)); + IncViewChangeStamp; end; procedure TSynEditStringTrimmingList.EditMoveFromTrim(LogY, Len: Integer); @@ -807,6 +825,7 @@ StoreSpacesForLine(LogY - 1, s, t); fSynStrings[LogY - 1] := t; CurUndoList.AddChange(TSynEditUndoTrimMoveFrom.Create(LogY, Len)); + IncViewChangeStamp; end; procedure TSynEditStringTrimmingList.UpdateLineText(LogY: Integer); @@ -815,6 +834,21 @@ fLineText := fSynStrings[LogY - 1]; end; +procedure TSynEditStringTrimmingList.IncViewChangeStamp; +begin + {$PUSH}{$Q-}{$R-} + FViewChangeStamp := FViewChangeStamp + 1; + {$POP} +end; + +function TSynEditStringTrimmingList.GetViewChangeStamp: int64; +begin + Result := inherited GetViewChangeStamp; + {$PUSH}{$Q-}{$R-} + Result := Result + FViewChangeStamp; + {$POP} +end; + procedure TSynEditStringTrimmingList.EditInsert(LogX, LogY: Integer; AText: String); var t: String; diff -Nru lazarus-0.9.30/components/synedit/synedittypes.pp lazarus-0.9.30.2/components/synedit/synedittypes.pp --- lazarus-0.9.30/components/synedit/synedittypes.pp 2010-10-29 18:44:13.000000000 +0000 +++ lazarus-0.9.30.2/components/synedit/synedittypes.pp 2011-11-23 16:14:29.000000000 +0000 @@ -27,7 +27,7 @@ If you do not delete the provisions above, a recipient may use your version of this file under either the MPL or the GPL. -$Id: synedittypes.pp 27952 2010-10-29 18:44:13Z martin $ +$Id$ You may retrieve the latest version of this file at the SynEdit home page, located at http://SynEdit.SourceForge.net diff -Nru lazarus-0.9.30/components/synedit/synexporthtml.pas lazarus-0.9.30.2/components/synedit/synexporthtml.pas --- lazarus-0.9.30/components/synedit/synexporthtml.pas 2009-09-01 01:17:52.000000000 +0000 +++ lazarus-0.9.30.2/components/synedit/synexporthtml.pas 2011-11-23 16:14:29.000000000 +0000 @@ -29,7 +29,7 @@ If you do not delete the provisions above, a recipient may use your version of this file under either the MPL or the GPL. -$Id: synexporthtml.pas 21508 2009-09-01 01:17:52Z paul $ +$Id$ You may retrieve the latest version of this file at the SynEdit home page, located at http://SynEdit.SourceForge.net diff -Nru lazarus-0.9.30/components/synedit/synhighlighterany.pas lazarus-0.9.30.2/components/synedit/synhighlighterany.pas --- lazarus-0.9.30/components/synedit/synhighlighterany.pas 2010-03-29 20:15:32.000000000 +0000 +++ lazarus-0.9.30.2/components/synedit/synhighlighterany.pas 2011-11-23 16:14:29.000000000 +0000 @@ -468,6 +468,7 @@ procedure TSynAnySyn.SetLine(const NewValue: String; LineNumber:Integer); begin + inherited; fLine := PChar(NewValue); Run := 0; fLineNumber := LineNumber; diff -Nru lazarus-0.9.30/components/synedit/synhighlighterbat.pas lazarus-0.9.30.2/components/synedit/synhighlighterbat.pas --- lazarus-0.9.30/components/synedit/synhighlighterbat.pas 2010-12-19 19:02:56.000000000 +0000 +++ lazarus-0.9.30.2/components/synedit/synhighlighterbat.pas 2011-11-23 16:14:29.000000000 +0000 @@ -417,6 +417,7 @@ procedure TSynBatSyn.SetLine({$IFDEF FPC}const {$ENDIF}NewValue: String; LineNumber: Integer); begin + inherited; fLine := PChar(NewValue); Run := 0; fEcho := False; diff -Nru lazarus-0.9.30/components/synedit/synhighlightercpp.pp lazarus-0.9.30.2/components/synedit/synhighlightercpp.pp --- lazarus-0.9.30/components/synedit/synhighlightercpp.pp 2009-08-01 10:48:48.000000000 +0000 +++ lazarus-0.9.30.2/components/synedit/synhighlightercpp.pp 2011-11-23 16:14:29.000000000 +0000 @@ -27,7 +27,7 @@ If you do not delete the provisions above, a recipient may use your version of this file under either the MPL or the GPL. -$Id: synhighlightercpp.pp 21053 2009-08-01 10:48:48Z martin $ +$Id$ You may retrieve the latest version of this file at the SynEdit home page, located at http://SynEdit.SourceForge.net @@ -812,6 +812,7 @@ procedure TSynCppSyn.SetLine(const NewValue: String; LineNumber:Integer); begin + inherited; fLine := PChar(NewValue); Run := 0; fLineNumber := LineNumber; diff -Nru lazarus-0.9.30/components/synedit/synhighlightercss.pas lazarus-0.9.30.2/components/synedit/synhighlightercss.pas --- lazarus-0.9.30/components/synedit/synhighlightercss.pas 2009-08-01 10:48:48.000000000 +0000 +++ lazarus-0.9.30.2/components/synedit/synhighlightercss.pas 2011-11-23 16:14:29.000000000 +0000 @@ -27,7 +27,7 @@ If you do not delete the provisions above, a recipient may use your version of this file under either the MPL or the GPL. -$Id: synhighlightercss.pas 21053 2009-08-01 10:48:48Z martin $ +$Id$ You may retrieve the latest version of this file at the SynEdit home page, located at http://SynEdit.SourceForge.net @@ -1473,6 +1473,7 @@ procedure TSynCssSyn.SetLine({$IFDEF FPC}const {$ENDIF}NewValue: String; LineNumber: Integer); begin + inherited; fLine := PChar(NewValue); Run := 0; fLineNumber := LineNumber; diff -Nru lazarus-0.9.30/components/synedit/synhighlighterhashentries.pas lazarus-0.9.30.2/components/synedit/synhighlighterhashentries.pas --- lazarus-0.9.30/components/synedit/synhighlighterhashentries.pas 2004-03-02 23:04:11.000000000 +0000 +++ lazarus-0.9.30.2/components/synedit/synhighlighterhashentries.pas 2011-11-23 16:14:29.000000000 +0000 @@ -26,7 +26,7 @@ If you do not delete the provisions above, a recipient may use your version of this file under either the MPL or the GPL. -$Id: synhighlighterhashentries.pas 5253 2004-03-02 23:04:11Z mattias $ +$Id$ You may retrieve the latest version of this file at the SynEdit home page, located at http://SynEdit.SourceForge.net diff -Nru lazarus-0.9.30/components/synedit/synhighlighterhtml.pp lazarus-0.9.30.2/components/synedit/synhighlighterhtml.pp --- lazarus-0.9.30/components/synedit/synhighlighterhtml.pp 2010-04-14 20:03:17.000000000 +0000 +++ lazarus-0.9.30.2/components/synedit/synhighlighterhtml.pp 2011-11-23 16:14:29.000000000 +0000 @@ -27,7 +27,7 @@ If you do not delete the provisions above, a recipient may use your version of this file under either the MPL or the GPL. -$Id: synhighlighterhtml.pp 24622 2010-04-14 20:03:17Z martin $ +$Id$ You may retrieve the latest version of this file at the SynEdit home page, located at http://SynEdit.SourceForge.net diff -Nru lazarus-0.9.30/components/synedit/synhighlighterini.pas lazarus-0.9.30.2/components/synedit/synhighlighterini.pas --- lazarus-0.9.30/components/synedit/synhighlighterini.pas 2010-12-19 19:02:56.000000000 +0000 +++ lazarus-0.9.30.2/components/synedit/synhighlighterini.pas 2011-11-23 16:14:29.000000000 +0000 @@ -193,6 +193,7 @@ procedure TSynIniSyn.SetLine({$IFDEF FPC}const {$ENDIF}NewValue: String; LineNumber:Integer); begin + inherited; fLine := PChar(NewValue); Run := 0; fLineNumber := LineNumber; diff -Nru lazarus-0.9.30/components/synedit/synhighlighterjava.pas lazarus-0.9.30.2/components/synedit/synhighlighterjava.pas --- lazarus-0.9.30/components/synedit/synhighlighterjava.pas 2009-08-01 10:48:48.000000000 +0000 +++ lazarus-0.9.30.2/components/synedit/synhighlighterjava.pas 2011-11-23 16:14:29.000000000 +0000 @@ -27,7 +27,7 @@ If you do not delete the provisions above, a recipient may use your version of this file under either the MPL or the GPL. -$Id: synhighlighterjava.pas 21053 2009-08-01 10:48:48Z martin $ +$Id$ You may retrieve the latest version of this file at the SynEdit home page, located at http://SynEdit.SourceForge.net @@ -693,6 +693,7 @@ procedure TSynJavaSyn.SetLine({$IFDEF FPC}const {$ENDIF}NewValue: String; LineNumber:Integer); begin + inherited; fLine := PChar(NewValue); Run := 0; fEol := False; diff -Nru lazarus-0.9.30/components/synedit/synhighlighterjscript.pas lazarus-0.9.30.2/components/synedit/synhighlighterjscript.pas --- lazarus-0.9.30/components/synedit/synhighlighterjscript.pas 2009-08-01 10:48:48.000000000 +0000 +++ lazarus-0.9.30.2/components/synedit/synhighlighterjscript.pas 2011-11-23 16:14:29.000000000 +0000 @@ -27,7 +27,7 @@ If you do not delete the provisions above, a recipient may use your version of this file under either the MPL or the GPL. -$Id: synhighlighterjscript.pas 21053 2009-08-01 10:48:48Z martin $ +$Id$ You may retrieve the latest version of this file at the SynEdit home page, located at http://SynEdit.SourceForge.net @@ -1537,6 +1537,7 @@ procedure TSynJScriptSyn.SetLine({$IFDEF FPC}const {$ENDIF}NewValue: String; LineNumber: Integer); begin + inherited; fLine := PChar(NewValue); Run := 0; fLineNumber := LineNumber; diff -Nru lazarus-0.9.30/components/synedit/synhighlighterlfm.pas lazarus-0.9.30.2/components/synedit/synhighlighterlfm.pas --- lazarus-0.9.30/components/synedit/synhighlighterlfm.pas 2010-04-17 19:44:03.000000000 +0000 +++ lazarus-0.9.30.2/components/synedit/synhighlighterlfm.pas 2011-11-23 16:14:29.000000000 +0000 @@ -27,7 +27,7 @@ If you do not delete the provisions above, a recipient may use your version of this file under either the MPL or the GPL. -$Id: synhighlighterlfm.pas 24685 2010-04-17 19:44:03Z martin $ +$Id$ You may retrieve the latest version of this file at the SynEdit home page, located at http://SynEdit.SourceForge.net diff -Nru lazarus-0.9.30/components/synedit/synhighlightermulti.pas lazarus-0.9.30.2/components/synedit/synhighlightermulti.pas --- lazarus-0.9.30/components/synedit/synhighlightermulti.pas 2010-10-02 16:30:18.000000000 +0000 +++ lazarus-0.9.30.2/components/synedit/synhighlightermulti.pas 2011-11-23 16:14:29.000000000 +0000 @@ -1488,6 +1488,7 @@ i: Integer; begin if IsScanning then exit; + inherited; FCurLineIndex := LineNumber; FLine := NewValue; diff -Nru lazarus-0.9.30/components/synedit/synhighlighterpas.pp lazarus-0.9.30.2/components/synedit/synhighlighterpas.pp --- lazarus-0.9.30/components/synedit/synhighlighterpas.pp 2011-02-01 20:35:26.000000000 +0000 +++ lazarus-0.9.30.2/components/synedit/synhighlighterpas.pp 2011-11-23 16:14:29.000000000 +0000 @@ -28,7 +28,7 @@ If you do not delete the provisions above, a recipient may use your version of this file under either the MPL or the GPL. -$Id: synhighlighterpas.pp 29299 2011-02-01 20:35:26Z vincents $ +$Id$ You may retrieve the latest version of this file at the SynEdit home page, located at http://SynEdit.SourceForge.net @@ -454,7 +454,7 @@ procedure EndCustomCodeFoldBlock(ABlockType: TPascalCodeFoldBlockType); function GetFoldNodeInfo(Line, Index: Integer; Filter: TSynFoldActions): TSynFoldNodeInfo; override; - function GetFoldNodeInfoCount(Line: Integer; Filter: TSynFoldActions): Integer; override; + function GetFoldNodeInfoCount(Line: Integer; Filter: TSynFoldActions): Integer; override; // Line: 0-based property PasCodeFoldRange: TSynPasSynRange read GetPasCodeFoldRange; function TopPascalCodeFoldBlockType @@ -1069,17 +1069,19 @@ function TSynPasSyn.Func33: TtkTokenKind; begin - if KeyComp('Or') then Result := tkKey else - if KeyComp('Asm') then - begin - Result := tkKey; - fRange := fRange + [rsAsm]; - fAsmStart := True; - {$IFDEF SYN_LAZARUS} - StartPascalCodeFoldBlock(cfbtAsm); - //debugln('TSynPasSyn.Func37 BEGIN ',dbgs(ord(TopPascalCodeFoldBlockType)),' LineNumber=',dbgs(fLineNumber),' ',dbgs(MinimumCodeFoldBlockLevel),' ',dbgs(CurrentCodeFoldBlockLevel)); - {$ENDIF} - end else Result := tkIdentifier; + if KeyComp('Or') then Result := tkKey + else + if KeyComp('Asm') then + begin + Result := tkKey; + fRange := fRange + [rsAsm]; + fAsmStart := True; + if TopPascalCodeFoldBlockType in [cfbtVarType, cfbtLocalVarType] then + EndPascalCodeFoldBlockLastLine; + StartPascalCodeFoldBlock(cfbtAsm); + //debugln('TSynPasSyn.Func37 BEGIN ',dbgs(ord(TopPascalCodeFoldBlockType)),' LineNumber=',dbgs(fLineNumber),' ',dbgs(MinimumCodeFoldBlockLevel),' ',dbgs(CurrentCodeFoldBlockLevel)); + end + else Result := tkIdentifier; end; function TSynPasSyn.Func35: TtkTokenKind; @@ -1404,7 +1406,9 @@ function TSynPasSyn.Func72: TtkTokenKind; begin - if KeyComp('Static') and (TopPascalCodeFoldBlockType in [cfbtClassSection]) then + if KeyComp('Static') and (TopPascalCodeFoldBlockType in [cfbtClass, cfbtClassSection]) and + (fRange * [rsAfterClassMembers, rsInProcHeader, rsProperty] = [rsAfterClassMembers]) + then Result := tkKey else Result := tkIdentifier; @@ -2113,7 +2117,10 @@ function TSynPasSyn.Func167: TtkTokenKind; begin - if KeyComp('Shortstring') then Result := tkKey else Result := tkIdentifier; + if (FStringKeywordMode in [spsmDefault]) and KeyComp('Shortstring') then + Result := tkKey + else + Result := tkIdentifier; end; function TSynPasSyn.Func168: TtkTokenKind; @@ -3906,6 +3913,7 @@ var i: Integer; begin + // TODO: assert line > 0 if FNodeInfoLine <> Line then GetFoldNodeInfo(Line, 0, []); Result := FNodeInfoCount; diff -Nru lazarus-0.9.30/components/synedit/synhighlighterperl.pas lazarus-0.9.30.2/components/synedit/synhighlighterperl.pas --- lazarus-0.9.30/components/synedit/synhighlighterperl.pas 2009-08-01 10:48:48.000000000 +0000 +++ lazarus-0.9.30.2/components/synedit/synhighlighterperl.pas 2011-11-23 16:14:29.000000000 +0000 @@ -27,7 +27,7 @@ If you do not delete the provisions above, a recipient may use your version of this file under either the MPL or the GPL. -$Id: synhighlighterperl.pas 21053 2009-08-01 10:48:48Z martin $ +$Id$ You may retrieve the latest version of this file at the SynEdit home page, located at http://SynEdit.SourceForge.net @@ -2039,6 +2039,7 @@ procedure TSynPerlSyn.SetLine({$IFDEF FPC}const {$ENDIF}NewValue: String; LineNumber:Integer); begin + inherited; fLine := PChar(NewValue); Run := 0; fLineNumber := LineNumber; diff -Nru lazarus-0.9.30/components/synedit/synhighlighterphp.pas lazarus-0.9.30.2/components/synedit/synhighlighterphp.pas --- lazarus-0.9.30/components/synedit/synhighlighterphp.pas 2009-08-01 10:48:48.000000000 +0000 +++ lazarus-0.9.30.2/components/synedit/synhighlighterphp.pas 2011-11-23 16:14:29.000000000 +0000 @@ -27,7 +27,7 @@ If you do not delete the provisions above, a recipient may use your version of this file under either the MPL or the GPL. -$Id: synhighlighterphp.pas 21053 2009-08-01 10:48:48Z martin $ +$Id$ You may retrieve the latest version of this file at the SynEdit home page, located at http://SynEdit.SourceForge.net @@ -696,6 +696,7 @@ procedure TSynPHPSyn.SetLine({$IFDEF FPC}const {$ENDIF}NewValue: String; LineNumber: Integer); begin + inherited; fLine := PChar(NewValue); {$IFDEF SYN_LAZARUS} fLineLen := length(NewValue); diff -Nru lazarus-0.9.30/components/synedit/synhighlighterposition.pas lazarus-0.9.30.2/components/synedit/synhighlighterposition.pas --- lazarus-0.9.30/components/synedit/synhighlighterposition.pas 2009-08-01 10:48:48.000000000 +0000 +++ lazarus-0.9.30.2/components/synedit/synhighlighterposition.pas 2011-11-23 16:14:29.000000000 +0000 @@ -8,7 +8,7 @@ the specific language governing rights and limitations under the License. -$Id: synhighlighterposition.pas 21053 2009-08-01 10:48:48Z martin $ +$Id$ This is a basic synedit highlighter that does not parse text to create the attributes, but stores a list of ranges. @@ -264,6 +264,7 @@ var p: PPositionTokens; begin + inherited; fLine := NewValue; fLineLen := length(fLine); fLineNumber := LineNumber; diff -Nru lazarus-0.9.30/components/synedit/synhighlighterpython.pas lazarus-0.9.30.2/components/synedit/synhighlighterpython.pas --- lazarus-0.9.30/components/synedit/synhighlighterpython.pas 2009-08-01 10:48:48.000000000 +0000 +++ lazarus-0.9.30.2/components/synedit/synhighlighterpython.pas 2011-11-23 16:14:29.000000000 +0000 @@ -28,7 +28,7 @@ If you do not delete the provisions above, a recipient may use your version of this file under either the MPL or the GPL. -$Id: synhighlighterpython.pas 21053 2009-08-01 10:48:48Z martin $ +$Id$ You may retrieve the latest version of this file at the SynEdit home page, located at http://SynEdit.SourceForge.net @@ -479,6 +479,7 @@ procedure TSynPythonSyn.SetLine({$IFDEF FPC}const {$ENDIF}NewValue: string; LineNumber: Integer); begin + inherited; fLine := PChar(NewValue); Run := 0; fLineNumber := LineNumber; diff -Nru lazarus-0.9.30/components/synedit/synhighlightersql.pas lazarus-0.9.30.2/components/synedit/synhighlightersql.pas --- lazarus-0.9.30/components/synedit/synhighlightersql.pas 2010-05-31 10:35:13.000000000 +0000 +++ lazarus-0.9.30.2/components/synedit/synhighlightersql.pas 2011-11-23 16:14:29.000000000 +0000 @@ -30,7 +30,7 @@ If you do not delete the provisions above, a recipient may use your version of this file under either the MPL or the GPL. -$Id: synhighlightersql.pas 25801 2010-05-31 10:35:13Z mattias $ +$Id$ You may retrieve the latest version of this file at the SynEdit home page, located at http://SynEdit.SourceForge.net @@ -1110,6 +1110,7 @@ procedure TSynSQLSyn.SetLine({$IFDEF FPC}const {$ENDIF}NewValue: string; LineNumber: Integer); begin + inherited; fLine := PChar(NewValue); Run := 0; fLineNumber := LineNumber; diff -Nru lazarus-0.9.30/components/synedit/synhighlightertex.pas lazarus-0.9.30.2/components/synedit/synhighlightertex.pas --- lazarus-0.9.30/components/synedit/synhighlightertex.pas 2009-04-04 21:23:53.000000000 +0000 +++ lazarus-0.9.30.2/components/synedit/synhighlightertex.pas 2011-11-23 16:14:29.000000000 +0000 @@ -25,7 +25,7 @@ If you do not delete the provisions above, a recipient may use your version of this file under either the MPL or the GPL. -$Id: synhighlightertex.pas 19222 2009-04-04 21:23:53Z martin $ +$Id$ You may retrieve the latest version of this file from sproessig@bs-webdesign.de @@ -207,6 +207,7 @@ procedure TSynTeXSyn.SetLine({$IFDEF FPC}const {$ENDIF}NewValue: String; LineNumber:Integer); begin + inherited; fLine := PChar(NewValue); Run := 0; fLineNumber := LineNumber; diff -Nru lazarus-0.9.30/components/synedit/synhighlighterunixshellscript.pas lazarus-0.9.30.2/components/synedit/synhighlighterunixshellscript.pas --- lazarus-0.9.30/components/synedit/synhighlighterunixshellscript.pas 2009-08-01 10:48:48.000000000 +0000 +++ lazarus-0.9.30.2/components/synedit/synhighlighterunixshellscript.pas 2011-11-23 16:14:29.000000000 +0000 @@ -26,7 +26,7 @@ If you do not delete the provisions above, a recipient may use your version of this file under either the MPL or the GPL. -$Id: synhighlighterunixshellscript.pas 21053 2009-08-01 10:48:48Z martin $ +$Id$ You may retrieve the latest version of this file at the SynEdit home page, located at http://SynEdit.SourceForge.net @@ -356,6 +356,7 @@ {$IFDEF FPC}const {$ENDIF}NewValue: String; LineNumber:Integer); begin + inherited; fLine := PChar(NewValue); Run := 0; fLineNumber := LineNumber; diff -Nru lazarus-0.9.30/components/synedit/synhighlightervb.pas lazarus-0.9.30.2/components/synedit/synhighlightervb.pas --- lazarus-0.9.30/components/synedit/synhighlightervb.pas 2009-08-31 22:11:30.000000000 +0000 +++ lazarus-0.9.30.2/components/synedit/synhighlightervb.pas 2011-11-23 16:14:29.000000000 +0000 @@ -1053,6 +1053,7 @@ procedure TSynVBSyn.SetLine({$IFDEF FPC}const {$ENDIF}NewValue: String; LineNumber: Integer); begin + inherited; fLine := PChar(NewValue); Run := 0; fLineNumber := LineNumber; diff -Nru lazarus-0.9.30/components/synedit/synhighlighterxml.pas lazarus-0.9.30.2/components/synedit/synhighlighterxml.pas --- lazarus-0.9.30/components/synedit/synhighlighterxml.pas 2010-05-30 22:16:26.000000000 +0000 +++ lazarus-0.9.30.2/components/synedit/synhighlighterxml.pas 2011-11-23 16:14:29.000000000 +0000 @@ -25,7 +25,7 @@ If you do not delete the provisions above, a recipient may use your version of this file under either the MPL or the GPL. -$Id: synhighlighterxml.pas 25786 2010-05-30 22:16:26Z martin $ +$Id$ You may retrieve the latest version of this file at the SynEdit home page, located at http://SynEdit.SourceForge.net diff -Nru lazarus-0.9.30/components/synedit/synmacrorecorder.pas lazarus-0.9.30.2/components/synedit/synmacrorecorder.pas --- lazarus-0.9.30/components/synedit/synmacrorecorder.pas 2009-08-31 22:11:30.000000000 +0000 +++ lazarus-0.9.30.2/components/synedit/synmacrorecorder.pas 2011-11-23 16:14:29.000000000 +0000 @@ -26,7 +26,7 @@ If you do not delete the provisions above, a recipient may use your version of this file under either the MPL or the GPL. -$Id: synmacrorecorder.pas 21507 2009-08-31 22:11:30Z mattias $ +$Id$ You may retrieve the latest version of this file at the SynEdit home page, located at http://SynEdit.SourceForge.net diff -Nru lazarus-0.9.30/components/synedit/synmemo.pas lazarus-0.9.30.2/components/synedit/synmemo.pas --- lazarus-0.9.30/components/synedit/synmemo.pas 2009-11-18 03:33:29.000000000 +0000 +++ lazarus-0.9.30.2/components/synedit/synmemo.pas 2011-11-23 16:14:29.000000000 +0000 @@ -27,7 +27,7 @@ If you do not delete the provisions above, a recipient may use your version of this file under either the MPL or the GPL. -$Id: synmemo.pas 22665 2009-11-18 03:33:29Z martin $ +$Id$ You may retrieve the latest version of this file at the SynEdit home page, located at http://SynEdit.SourceForge.net @@ -142,7 +142,7 @@ property OnStartDrag; // TCustomSynEdit properties property BookMarkOptions; - property BorderStyle; + property BorderStyle default bsSingle; property ExtraLineSpacing; property Gutter; property HideSelection; diff -Nru lazarus-0.9.30/components/synedit/synpluginsyncronizededitbase.pp lazarus-0.9.30.2/components/synedit/synpluginsyncronizededitbase.pp --- lazarus-0.9.30/components/synedit/synpluginsyncronizededitbase.pp 2010-09-11 14:05:21.000000000 +0000 +++ lazarus-0.9.30.2/components/synedit/synpluginsyncronizededitbase.pp 2011-11-23 16:14:29.000000000 +0000 @@ -1175,8 +1175,10 @@ procedure TSynPluginCustomSyncroEdit.DoPaintLockEnded; begin inherited DoPaintLockEnded; - ApplyChangeList; - UpdateCurrentCell; + if Active then begin + ApplyChangeList; + UpdateCurrentCell; + end; end; procedure TSynPluginCustomSyncroEdit.UpdateCurrentCell; diff -Nru lazarus-0.9.30/components/synedit/syntextdrawer.pp lazarus-0.9.30.2/components/synedit/syntextdrawer.pp --- lazarus-0.9.30/components/synedit/syntextdrawer.pp 2010-11-20 20:31:51.000000000 +0000 +++ lazarus-0.9.30.2/components/synedit/syntextdrawer.pp 2011-11-23 16:14:29.000000000 +0000 @@ -55,7 +55,7 @@ Added BaseStyle property to TheFontFont class. ==============================================================================} -// $Id: syntextdrawer.pp 28373 2010-11-20 20:31:51Z martin $ +// $Id$ // SynEdit note: The name had to be changed to get SynEdit to install // together with mwEdit into the same Delphi installation @@ -1363,7 +1363,7 @@ DeleteObject(SelectObject(FDC, OldPen)); end; - NeedDistArray:= ForceEto or (FCharExtra > 0) or + NeedDistArray:= ForceEto or (FCharExtra <> 0) or (FBaseCharWidth <> FFontStock.CharAdvance) or FFontStock.NeedETO; ForceEto := False; //DebugLn(['TheTextDrawer.ExtTextOut NeedDistArray=',NeedDistArray]); diff -Nru lazarus-0.9.30/components/synedit/test/testbase.pas lazarus-0.9.30.2/components/synedit/test/testbase.pas --- lazarus-0.9.30/components/synedit/test/testbase.pas 2010-10-27 21:44:03.000000000 +0000 +++ lazarus-0.9.30.2/components/synedit/test/testbase.pas 2011-11-23 16:14:29.000000000 +0000 @@ -7,7 +7,7 @@ uses Classes, SysUtils, Forms, fpcunit, SynEdit, LCLType, LCLProc, math, - SynEditTypes, Clipbrd; + SynEditTypes, SynEditPointClasses, Clipbrd; type @@ -24,6 +24,7 @@ property ViewedTextBuffer; property TextBuffer; property TextView; // foldedview + property CaretObj: TSynEditCaret read GetCaretObj; end; { TTestBase } @@ -318,6 +319,7 @@ procedure TTestBase.TestFail(Name, Func, Expect, Got: String; Result: Boolean = False); begin if Result then exit; + DebugLn(DbgStr(SynEdit.Text)); if BaseTestName <> '' then Fail(Format('%s: %s (%s)%sExpected: %s%s Got: %s', [BaseTestName, Name, Func, LineEnding, Expect, LineEnding, Got])) else @@ -473,7 +475,7 @@ procedure TTestBase.SetCaretPhys(X, Y: Integer); begin - SynEdit.LogicalCaretXY := Point(X, Y); + SynEdit.CaretXY := Point(X, Y); SynEdit.BlockBegin := SynEdit.LogicalCaretXY; {$IFDEF WITH_APPMSG}Application.ProcessMessages;{$ENDIF} end; diff -Nru lazarus-0.9.30/components/synedit/test/testbasicsynedit.pas lazarus-0.9.30.2/components/synedit/test/testbasicsynedit.pas --- lazarus-0.9.30/components/synedit/test/testbasicsynedit.pas 2010-11-20 12:08:18.000000000 +0000 +++ lazarus-0.9.30.2/components/synedit/test/testbasicsynedit.pas 2011-11-23 16:14:29.000000000 +0000 @@ -3,6 +3,8 @@ (* TODO: - TestEditEmpty: Test with different sets of VirtualViews (with/without trimming (enabled/module present at all) + + Word Left/Right: Need tests with fold, trim, selection *) {$mode objfpc}{$H+} @@ -27,6 +29,11 @@ published procedure TestEditEmpty; procedure TestEditTabs; + procedure TestEditPhysicalLogical; + procedure TestCaretAutoMove; + procedure TestEditHomeEnd; + procedure TestCaretMoveLeftRightWord; + procedure TestCaretDeleteWord_LastWord; end; implementation @@ -173,6 +180,771 @@ end; +procedure TTestBasicSynEdit.TestEditPhysicalLogical; + + procedure TestPhysLog(name: string; y, x, expX: integer); + var gotX: Integer; + begin + name := name + ' y='+inttostr(y)+' x='+inttostr(x); + gotX := SynEdit.PhysicalToLogicalPos(Point(x, y)).x; + AssertEquals(name+' PhysicalToLogicalPos', expX, gotX); + gotX := SynEdit.PhysicalToLogicalCol(SynEdit.Lines[y-1], y-1, x); + AssertEquals(name+' PhysicalToLogicalCol', expX, gotX); + end; + + procedure TestLogPhys(name: string; y, x, expX: integer); + var gotX: Integer; + begin + name := name + ' y='+inttostr(y)+' x='+inttostr(x); + gotX := SynEdit.LogicalToPhysicalPos(Point(x, y)).x; + AssertEquals(name+' LogicalToPhysicalPos', expX, gotX); + gotX := SynEdit.LogicalToPhysicalCol(SynEdit.Lines[y-1], y-1, x); + AssertEquals(name+' LogicalToPhysicalCol', expX, gotX); + end; + +begin + ReCreateEdit; + SynEdit.TabWidth := 6; + + SetLines(['abc', ' ääX', #9'mn', 'abc'#9'de', #9'Xää.']); + + TestLogPhys('simple line (abc)', 1, 1, 1); + TestLogPhys('simple line (abc)', 1, 2, 2); + TestLogPhys('simple line (abc)', 1, 4, 4); + TestLogPhys('simple line (abc)', 1, 5, 5); + TestLogPhys('simple line (abc)', 1, 6, 6); + TestLogPhys('line with 2byte-char', 2, 1, 1); + TestLogPhys('line with 2byte-char', 2, 2, 2); + TestLogPhys('line with 2byte-char', 2, 4, 3); // after ae + TestLogPhys('line with 2byte-char', 2, 6, 4); + TestLogPhys('line with 2byte-char', 2, 7, 5); + TestLogPhys('line with 2byte-char', 2, 8, 6); + TestLogPhys('line with 2byte-char', 2, 11, 9); + TestLogPhys('line with tab (start)', 3, 1, 1); + TestLogPhys('line with tab (start)', 3, 2, 7); + TestLogPhys('line with tab (middle)', 4, 3, 3); + TestLogPhys('line with tab (middle)', 4, 4, 4); // before tab + TestLogPhys('line with tab (middle)', 4, 5, 7); // after tab + TestLogPhys('line with tab (middle)', 4, 6, 8); + TestLogPhys('line with tab (middle)', 4, 9, 11); + TestLogPhys('line with tab (start) + 2bc', 5, 1, 1); + TestLogPhys('line with tab (start) + 2bc', 5, 2, 7); + TestLogPhys('line with tab (start) + 2bc', 5, 3, 8); + TestLogPhys('line with tab (start) + 2bc', 5, 5, 9); + + TestPhysLog('simple line (abc)', 1, 1, 1); + TestPhysLog('simple line (abc)', 1, 2, 2); + TestPhysLog('simple line (abc)', 1, 4, 4); + TestPhysLog('simple line (abc)', 1, 5, 5); + TestPhysLog('simple line (abc)', 1, 6, 6); + TestPhysLog('line with 2byte-char', 2, 1, 1); + TestPhysLog('line with 2byte-char', 2, 2, 2); + TestPhysLog('line with 2byte-char', 2, 3, 4); + TestPhysLog('line with 2byte-char', 2, 4, 6); + TestPhysLog('line with 2byte-char', 2, 5, 7); + TestPhysLog('line with 2byte-char', 2, 6, 8); + TestPhysLog('line with 2byte-char', 2, 7, 9); + TestPhysLog('line with tab (start)', 3, 1, 1); + TestPhysLog('line with tab (start)', 3, 2, 1); + TestPhysLog('line with tab (start)', 3, 5, 1); + TestPhysLog('line with tab (start)', 3, 6, 1); + TestPhysLog('line with tab (start)', 3, 7, 2); + TestPhysLog('line with tab (start)', 3, 8, 3); + TestPhysLog('line with tab (start)', 3, 9, 4); + TestPhysLog('line with tab (start)', 3, 11, 6); + +end; + +procedure TTestBasicSynEdit.TestCaretAutoMove; + + procedure DoTest(name: string; y, x, insertY, insertX, InsertY2, InsertX2: integer; + txt: string; expY, expX: Integer); + begin + name := name + ' y='+inttostr(y)+' x='+inttostr(x); + if y > 0 then begin + ReCreateEdit; + SynEdit.TabWidth := 6; + SetLines(['x', 'abc', ' ääX', #9'mn', 'abc'#9'de', #9'Xää.']); + SynEdit.CaretXY := Point(x, y); + end; + + SynEdit.TextBetweenPointsEx[Point(insertX, insertY), point(insertX2, InsertY2), scamAdjust] + := txt; +debugln(dbgstr(SynEdit.Text)); + TestIsCaretPhys(name, expX, expY); + end; + +const + cr = LineEnding; +begin + + + DoTest('simple insert', 2,2, 2,1, 2,1, 'X', 2,3); + DoTest('simple insert CR', 2,2, 2,1, 2,1, 'X'+cr, 3,2); + DoTest('simple insert CR+', 2,2, 2,1, 2,1, cr+'X', 3,3); + DoTest('simple delete', 2,2, 2,1, 2,2, '', 2,1); + DoTest('simple delete CR', 2,2, 1,2, 2,1, '', 1,3); + DoTest('+simple delete CR', 2,2, 1,1, 2,1, '', 1,2); + + DoTest('simple insert (eol)', 2,4, 2,1, 2,1, 'X', 2,5); + DoTest('simple insert (past eol)', 2,7, 2,1, 2,1, 'X', 2,8); + + DoTest('insert with tab', 4,8, 4,1, 4,1, 'X', 4,8); + DoTest('insert with tab (cont)', -4,8, 4,2, 4,2, 'Y', 4,8); + DoTest('insert with tab (cont)', -4,8, 4,3, 4,3, 'abc', 4,8); + DoTest('insert with tab (cont)', -4,8, 4,6, 4,6, 'Z', 4,14); + DoTest('insert with tab (cont)', -4,8, 4,7, 4,7, '.', 4,14); + DoTest('delete with tab (cont)', -4,8, 4,1, 4,2, '', 4,14); + DoTest('delete with tab (cont)', -4,8, 4,1, 4,2, '', 4,8); + DoTest('delete with tab (cont)', -4,8, 4,1, 4,2, '', 4,8); + DoTest('delete with tab (cont)', -4,8, 4,1, 4,2, '', 4,8); + + + SynEdit.CaretObj.IncAutoMoveOnEdit; + DoTest('insert with tab (am-block)', 4,8, 4,1, 4,1, 'X', 4,8); + DoTest('insert with tab (am-block) (cont)', -4,8, 4,2, 4,2, 'Y', 4,8); + DoTest('insert with tab (am-block) (cont)', -4,8, 4,3, 4,3, 'abc', 4,8); + DoTest('insert with tab (am-block) (cont)', -4,8, 4,6, 4,6, 'Z', 4,14); + DoTest('insert with tab (am-block) (cont)', -4,8, 4,7, 4,7, '.', 4,14); + DoTest('delete with tab (cont)', -4,8, 4,1, 4,2, '', 4,14); + DoTest('delete with tab (cont)', -4,8, 4,1, 4,2, '', 4,8); + DoTest('delete with tab (cont)', -4,8, 4,1, 4,2, '', 4,8); + DoTest('delete with tab (cont)', -4,8, 4,1, 4,2, '', 4,8); + SynEdit.CaretObj.DecAutoMoveOnEdit; + +end; + +procedure TTestBasicSynEdit.TestEditHomeEnd; + procedure DoInit1; + begin + InsertFlag := False; + TrimType := settIgnoreAll; + ReCreateEdit; + SynEdit.TabWidth := 6; + SyneDit.Options := []; + SyneDit.Options2 := []; + SetLines(['', //1 + '', + + 'test', // 3 + '', + '', + ' ', + 'test', // 3 + #9#9#9#9#9, + + ' spaced', // 9 + '', + '', + ' ', + ' spaced', + #9#9#9#9#9, + + #9'tabbed', // 15 + '', + '', + ' ', + #9'tabbed', + #9#9#9#9#9, + + #9' tabbed spaced', // 21 + '', + '', + ' ', + #9' tabbed spaced', + #9#9#9#9#9, + + ' ', // 27 (space only) + '', + '', + ' ', + #9' ', + #9#9#9#9#9, + + ' spaced 9 for tab', // 33 + #9#9#9#9#9, + + ' X ', // 35 + ' X'#9, // 36 + + '' + ]); + + end; + + procedure TestHome(Name:String; X, Y, ExpX1, ExpX2, ExpX3: Integer; ExpLTxTStartX: Integer = -1); + begin + SetCaretPhys(X, Y); + synedit.CommandProcessor(ecLineStart, '', nil); + TestIsCaretPhys(Name + '(1st home)', ExpX1,Y); + synedit.CommandProcessor(ecLineStart, '', nil); + TestIsCaretPhys(Name + '(2nd home)', ExpX2,Y); + synedit.CommandProcessor(ecLineStart, '', nil); + TestIsCaretPhys(Name + '(3rd home)', ExpX3,Y); + if ExpLTxTStartX > 0 then begin + SetCaretPhys(X, Y); + synedit.CommandProcessor(ecLineTextStart, '', nil); + TestIsCaretPhys(Name + '(1st line-text-start)', ExpLTxTStartX,Y); + synedit.CommandProcessor(ecLineTextStart, '', nil); + TestIsCaretPhys(Name + '(2nd line-text-start)', ExpLTxTStartX,Y); + synedit.CommandProcessor(ecLineTextStart, '', nil); + TestIsCaretPhys(Name + '(3rd line-text-start)', ExpLTxTStartX,Y); + end; + end; + + procedure TestEnd(Name:String; X, Y, ExpX1, ExpX2, ExpX3: Integer); + begin + SetCaretPhys(X, Y); + synedit.CommandProcessor(ecLineEnd, '', nil); + TestIsCaretPhys(Name + '(1st end)', ExpX1,Y); + synedit.CommandProcessor(ecLineEnd, '', nil); + TestIsCaretPhys(Name + '(2nd end)', ExpX2,Y); + synedit.CommandProcessor(ecLineEnd, '', nil); + TestIsCaretPhys(Name + '(3rd end)', ExpX3,Y); + end; + +begin + // None Smart-Home: + // Caret goes x=1, then x=indend + // Smart-Home: + // Caret goes x=indent, then 1, IF AFTER indent, or at x=1 + // Caret goes x=1, then x=indend, IF at x=indent, or inside indent + // Both + // Caret does not go past eol, unless explicitly enabled + // if spaces/tab exist at start of otherwise empty line, caret will go to prev-line indent + + {%region} + DoInit1; + PushBaseName('no smart / no past-eol'); + + TestHome('empty 1st line', 1, 1, 1,1,1, 1); + TestHome('empty 2nd line', 1, 2, 1,1,1, 1); + + TestHome('unindented line', 1, 3, 1,1,1, 1); + TestHome('unindented line x-in-line', 4, 3, 1,1,1, 1); + TestHome('1st line after unindendet', 1, 4, 1,1,1, 1); + TestHome('2nd line after unindendet', 1, 5, 1,1,1, 1); + TestHome('3rd #32 line after unindendet', 2, 6, 1,1,1, 1); + TestHome('4th #9 line after unindendet', 2, 8, 1,1,1, 1); + + TestHome('space indented line', 1, 9, 4,1,4, 4); + TestHome('space indented line x-after-indent', 4, 9, 1,4,1, 4); // go to indent, after absolute home + TestHome('space indented line x-in-indent', 3, 9, 1,4,1, 4); + TestHome('space indented line x-in-line', 6, 9, 1,4,1, 4); + TestHome('1st after space indented line', 1,10, 1,1,1, 1); + TestHome('2nd after space indented line', 1,11, 1,1,1, 1); + TestHome('3rd #32 after space indented line', 2,12, 1,4,1, 1); + TestHome('4th #9 after space indented line', 2,14, 1,4,1, 1); + TestHome('#9 after long space indented line', 2,34, 1,9,1, 1); + SyneDit.Options2 := SyneDit.Options2 + [eoCaretSkipTab]; + TestHome('4th #9 after space indented line [skipT]', 7,14, 1,1,1, 1); + TestHome('#9 after long space indented line [skipT]', 1,34, 7,1,7, 1); + TestHome('#9 after long space indented line [skipT]', 7,34, 1,7,1, 1); + TestHome('#9 after long space indented line [skipT]', 13,34, 1,7,1, 1); + SyneDit.Options2 := SyneDit.Options2 - [eoCaretSkipTab]; + + TestHome('tab indented line', 1,15, 7,1,7, 7); + TestHome('tab indented line x-after-indent', 7,15, 1,7,1, 7); + TestHome('tab indented line x-in-indent', 5,15, 1,7,1, 7); + TestHome('tab indented line x-in-line', 9,15, 1,7,1, 7); + TestHome('1st after tab indented line', 1,16, 1,1,1, 1); + TestHome('2nd after tab indented line', 1,17, 1,1,1, 1); + TestHome('3rd #32 after tab indented line', 2,18, 1,7,1, 1); + TestHome('4th #9 after tab indented line', 2,20, 1,7,1, 1); + {%endregion} + + {%region} + DoInit1; + SyneDit.Options := [eoScrollPastEol]; + PopPushBaseName('no smart / past-eol'); + + TestHome('empty 1st line', 1, 1, 1,1,1, 1); + TestHome('empty 2nd line', 1, 2, 1,1,1, 1); + + TestHome('unindented line', 1, 3, 1,1,1, 1); + TestHome('unindented line x-in-line', 4, 3, 1,1,1, 1); + TestHome('1st line after unindendet', 1, 4, 1,1,1, 1); + TestHome('2nd line after unindendet', 1, 5, 1,1,1, 1); + TestHome('3rd #32 line after unindendet', 2, 6, 1,1,1, 1); + TestHome('4th #9 line after unindendet', 2, 8, 1,1,1, 1); + + TestHome('space indented line', 1, 9, 4,1,4, 4); + TestHome('space indented line x-after-indent', 4, 9, 1,4,1, 4); // go to indent, after absolute home + TestHome('space indented line x-in-indent', 3, 9, 1,4,1, 4); + TestHome('space indented line x-in-line', 6, 9, 1,4,1, 4); + TestHome('1st after space indented line', 1,10, 4,1,4, 1); + TestHome('1st after space indented line (x)', 2,10, 1,4,1, 1); + TestHome('2nd after space indented line', 1,11, 4,1,4, 1); + TestHome('3rd #32 after space indented line', 2,12, 1,4,1, 1); + TestHome('4th #9 after space indented line', 2,14, 1,4,1, 1); + TestHome('#9 after long space indented line', 2,34, 1,9,1, 1); + SyneDit.Options2 := SyneDit.Options2 + [eoCaretSkipTab]; + TestHome('4th #9 after space indented line [skipT]', 7,14, 1,1,1, 1); + TestHome('#9 after long space indented line [skipT]', 1,34, 7,1,7, 1); + TestHome('#9 after long space indented line [skipT]', 7,34, 1,7,1, 1); + TestHome('#9 after long space indented line [skipT]', 13,34, 1,7,1, 1); + SyneDit.Options2 := SyneDit.Options2 - [eoCaretSkipTab]; + + TestHome('tab indented line', 1,15, 7,1,7, 7); + TestHome('tab indented line x-after-indent', 7,15, 1,7,1, 7); + TestHome('tab indented line x-in-indent', 5,15, 1,7,1, 7); + TestHome('tab indented line x-in-line', 9,15, 1,7,1, 7); + TestHome('1st after tab indented line', 1,16, 7,1,7, 1); + TestHome('1st after tab indented line(x)', 2,16, 1,7,1, 1); + TestHome('2nd after tab indented line', 1,17, 7,1,7, 1); + TestHome('3rd #32 after tab indented line', 2,18, 1,7,1, 1); + TestHome('4th #9 after tab indented line', 2,20, 1,7,1, 1); + {%endregion} + + + {%region} + DoInit1; + SyneDit.Options := [eoEnhanceHomeKey]; + + PopPushBaseName('smart home / no past-eol'); + + TestHome('empty 1st line', 1, 1, 1,1,1, 1); + TestHome('empty 2nd line', 1, 2, 1,1,1, 1); + + TestHome('unindented line', 1, 3, 1,1,1, 1); + TestHome('unindented line x-in-line', 4, 3, 1,1,1, 1); + TestHome('1st line after unindendet', 1, 4, 1,1,1, 1); + TestHome('2nd line after unindendet', 1, 5, 1,1,1, 1); + TestHome('3rd #32 line after unindendet', 2, 6, 1,1,1, 1); + TestHome('4th #9 line after unindendet', 2, 8, 1,1,1, 1); + + TestHome('space indented line', 1, 9, 4,1,4, 4); // go to absolut home (x-=1), after indent + TestHome('space indented line x-after-indent', 4, 9, 1,4,1, 4); + TestHome('space indented line x-in-indent', 3, 9, 1,4,1, 4); + TestHome('space indented line x-in-line', 6, 9, 4,1,4, 4); + TestHome('1st after space indented line', 1,10, 1,1,1, 1); + TestHome('2nd after space indented line', 1,11, 1,1,1, 1); + TestHome('3rd #32 after space indented line', 2,12, 1,4,1, 1); + TestHome('4th #9 after space indented line', 2,14, 1,4,1, 1); + TestHome('#9 after long space indented line', 2,34, 1,9,1, 1); + SyneDit.Options2 := SyneDit.Options2 + [eoCaretSkipTab]; + TestHome('4th #9 after space indented line [skipT]', 7,14, 1,1,1, 1); + TestHome('#9 after long space indented line [skipT]', 1,34, 7,1,7, 1); + TestHome('#9 after long space indented line [skipT]', 7,34, 1,7,1, 1); + TestHome('#9 after long space indented line [skipT]', 13,34, 7,1,7, 1); + SyneDit.Options2 := SyneDit.Options2 - [eoCaretSkipTab]; + + TestHome('tab indented line', 1,15, 7,1,7, 7); + TestHome('tab indented line x-after-indent', 7,15, 1,7,1, 7); + TestHome('tab indented line x-in-indent', 5,15, 1,7,1, 7); + TestHome('tab indented line x-in-line', 9,15, 7,1,7, 7); + TestHome('1st after tab indented line', 1,16, 1,1,1, 1); + TestHome('2nd after tab indented line', 1,17, 1,1,1, 1); + TestHome('3rd #32 after tab indented line', 2,18, 1,7,1, 1); + TestHome('3rd #32 after tab indented line', 11,18, 7,1,7, 1); + TestHome('4th #9 after tab indented line', 2,20, 1,7,1, 1); + {%endregion} + + + {%region} + DoInit1; + SyneDit.Options := [eoEnhanceHomeKey, eoScrollPastEol]; + + PopPushBaseName('smart home / past-eol'); + + TestHome('empty 1st line', 1, 1, 1,1,1, 1); + TestHome('empty 2nd line', 1, 2, 1,1,1, 1); + + TestHome('unindented line', 1, 3, 1,1,1, 1); + TestHome('unindented line x-in-line', 4, 3, 1,1,1, 1); + TestHome('1st line after unindendet', 1, 4, 1,1,1, 1); + TestHome('2nd line after unindendet', 1, 5, 1,1,1, 1); + TestHome('3rd #32 line after unindendet', 2, 6, 1,1,1, 1); + TestHome('4th #9 line after unindendet', 2, 8, 1,1,1, 1); + + TestHome('space indented line', 1, 9, 4,1,4, 4); // go to absolut home (x-=1), after indent + TestHome('space indented line x-after-indent', 4, 9, 1,4,1, 4); + TestHome('space indented line x-in-indent', 3, 9, 1,4,1, 4); + TestHome('space indented line x-in-line', 6, 9, 4,1,4, 4); + TestHome('1st after space indented line', 1,10, 4,1,4, 1); + TestHome('2nd after space indented line', 1,11, 4,1,4, 1); + TestHome('3rd #32 after space indented line', 2,12, 1,4,1, 1); + TestHome('4th #9 after space indented line', 2,14, 1,4,1, 1); + TestHome('#9 after long space indented line', 2,34, 1,9,1, 1); + SyneDit.Options2 := SyneDit.Options2 + [eoCaretSkipTab]; + TestHome('4th #9 after space indented line [skipT]', 7,14, 1,1,1, 1); + TestHome('#9 after long space indented line [skipT]', 7,34, 1,7,1, 1); + SyneDit.Options2 := SyneDit.Options2 - [eoCaretSkipTab]; + + TestHome('tab indented line', 1,15, 7,1,7, 7); + TestHome('tab indented line x-after-indent', 7,15, 1,7,1, 7); + TestHome('tab indented line x-in-indent', 5,15, 1,7,1, 7); + TestHome('tab indented line x-in-line', 9,15, 7,1,7, 7); + TestHome('1st after tab indented line', 1,16, 7,1,7, 1); + TestHome('1st after tab indented line (x)', 2,16, 1,7,1, 1); + TestHome('2nd after tab indented line', 1,17, 7,1,7, 1); + TestHome('3rd #32 after tab indented line', 2,18, 1,7,1, 1); + TestHome('3rd #32 after tab indented line', 11,18, 7,1,7, 1); + TestHome('4th #9 after tab indented line', 2,20, 1,7,1, 1); + {%endregion} + + PopPushBaseName('NO smart end/ NO past-eol'); + DoInit1; + TestEnd ('empty 1st line', 1,1, 1,1,1); + TestEnd ('end', 1,35, 6,3,6); + TestEnd ('end tab', 1,36, 7,3,7); + + PopPushBaseName('smart end/ NO past-eol'); + DoInit1; + SyneDit.Options2 := [eoEnhanceEndKey]; + TestEnd ('end', 1,35, 3,6,3); + TestEnd ('end tab', 1,36, 3,7,3); + + //SyneDit.Options := [eoScrollPastEol, eoEnhanceHomeKey]; + //SyneDit.Options2 := [eoEnhanceEndKey]; + +end; + +procedure TTestBasicSynEdit.TestCaretMoveLeftRightWord; + + procedure DoInit; + begin + InsertFlag := False; + TrimEnabled := False;; + ReCreateEdit; + + SynEdit.TabWidth := 7; + // 1 6 11 14 + SetLines(['Some text to test', //1 + // 1 5 9 + 'Foo bar abc', // 2 + // 8 14 19 24 + #9'Other line with tab', // 3 + // 1 8 11 15 + 'tab'#9'in the middle', // 4 + // 1 9 12 16 23 28 + 'tab'#9' in the middle with space', // 5 + // 1 9 13 16 + 'umlaute äää in text', // 6 + 'normal line', + // 4 14 21 28 32 + ' untrimmed spaces around line ', // 8 + 'normal line', + // 8 15 22 26 + #9'tab'#9'only'#9'line'#9, // 10 + // 1 8 + 'normal line', + '', // 12 (empty) + 'normal line', + ' ', // space only empty line // 14 + 'normal line', + '' + ]); + end; + + procedure TestWordLeft(Name:String; X, Y, ExpX1, ExpY1: Integer; + ExpX2: Integer = -1; ExpY2: Integer = -1); + begin + SetCaretPhys(X,Y); + SynEdit.CommandProcessor(ecWordLeft, '', nil); + TestIsCaretPhys(Name + '(1st WordLeft)', ExpX1, ExpY1); + if ExpY2 > 0 then begin + SynEdit.CommandProcessor(ecWordLeft, '', nil); + TestIsCaretPhys(Name + '(2nd WordLeft)', ExpX2, ExpY2); + end; + end; + + procedure TestWordRight(Name:String; X, Y, ExpX1, ExpY1: Integer; + ExpX2: Integer = -1; ExpY2: Integer = -1); + begin + SetCaretPhys(X,Y); + SynEdit.CommandProcessor(ecWordRight, '', nil); + TestIsCaretPhys(Name + '(1st WordRight)', ExpX1, ExpY1); + if ExpY2 > 0 then begin + SynEdit.CommandProcessor(ecWordRight, '', nil); + TestIsCaretPhys(Name + '(2nd WordRight)', ExpX2, ExpY2); + end; + end; + +begin + DoInit; + {%region word left} + TestWordLeft('simple "te|st"', 16, 1, 14, 1, 11, 1); + TestWordLeft('simple EOW "test|"', 18, 1, 14, 1, 11, 1); + TestWordLeft('simple BOW "|test"', 14, 1, 11, 1, 6, 1); + TestWordLeft('simple > BOT "So|me"', 3, 1, 1, 1, 1, 1); + TestWordLeft('simple > prev-line "F|oo"', 2, 2, 1, 2, 18, 1); + TestWordLeft('simple > prev-line "|Foo"', 1, 2, 18, 1, 14, 1); + + TestWordLeft('tab "wi|th"', 21, 3, 19, 3, 14, 3); + TestWordLeft('tab EOW "with|"', 23, 3, 19, 3, 14, 3); + TestWordLeft('tab BOW "|with"', 19, 3, 14, 3, 8, 3); + TestWordLeft('tab > prev-line "O|ther"', 9, 3, 8, 3, 12, 2); + + TestWordLeft('M-tab "i|n"', 9, 4, 8, 4, 1, 4); + TestWordLeft('M-tab > prev-line-tab "ta|b"', 3, 4, 1, 4, 27, 3); + + TestWordLeft('M-S-tab "i|n"', 10, 5, 9, 5, 1, 5); + TestWordLeft('M-S-EOW tab "in|"', 11, 5, 9, 5, 1, 5); + TestWordLeft('M-S-BOW tab "|in"', 9, 5, 1, 5, 21, 4); + TestWordLeft('M-S-tab "#9| in"', 8, 5, 1, 5); + + TestWordLeft('Umlaut "ää|ä"', 11, 6, 9, 6, 1, 6); + TestWordLeft('Umlaut EOW "äää|"', 12, 6, 9, 6, 1, 6); + TestWordLeft('Umlaut BOW "|äää"', 9, 6, 1, 6, 33, 5); + TestWordLeft('Umlaut "i|n"', 14, 6, 13, 6, 9, 6); + TestWordLeft('After Umlaut > prev line', 1, 7, 20, 6, 16, 6); + + TestWordLeft('untrimmed "un|trimmed"', 6, 8, 4, 8, 12, 7); + TestWordLeft('After untrimmed > prev', 1, 9, 35, 8, 28, 8); + TestWordLeft('untrimmed tab "t|ab"', 9,10, 8,10, 12, 9); + TestWordLeft('After untrimmed tab > prev', 1,11, 29,10, 22,10); + + TestWordLeft('After empty > prev', 1,13, 1,12); + TestWordLeft('After space empty > prev', 1,15, 6,14); + {%endregion} + + {%region word right} + TestWordRight('simple "te|xt"', 8, 1, 11, 1, 14, 1); + TestWordRight('simple EOW "text|"', 10, 1, 11, 1, 14, 1); + TestWordRight('simple BOW "|text"', 6, 1, 11, 1, 14, 1); + TestWordRight('simple EOT "li|ne"', 10,15, 12,15, 12,15); + TestWordRight('simple > EOL, next line "te|st"', 16, 1, 18, 1, 1, 2); + + TestWordRight('tab "li|ne"', 16, 3, 19, 3, 24, 3); + TestWordRight('tab EOW "line|"', 18, 3, 19, 3, 24, 3); + TestWordRight('tab BOW "|line"', 14, 3, 19, 3, 24, 3); + TestWordRight('tab > EOL, next-line', 25, 3, 27, 3, 1, 4); + + TestWordRight('M-tab "t|ab"', 2, 4, 8, 4, 11, 4); + TestWordRight('M-tab "tab|"', 4, 4, 8, 4, 11, 4); + TestWordRight('M-tab > EOL, next-line-tab', 17, 4, 21, 4, 1, 5); + + TestWordRight('M-S-tab BOW "t|ab"', 2, 5, 9, 5, 12, 5); + TestWordRight('M-S-tab EOW "tab|"', 4, 5, 9, 5, 12, 5); + TestWordRight('M-S-tab BOW "|tab"', 1, 5, 9, 5, 12, 5); + TestWordRight('M-S-tab "tab#9| "', 5, 5, 9, 5, 12, 5); + + TestWordRight('Umlaut "ää|ä"', 11, 6, 13, 6, 16, 6); + TestWordRight('Umlaut EOW "äää|"', 12, 6, 13, 6, 16, 6); + TestWordRight('Umlaut BOW "|äää"', 9, 6, 13, 6, 16, 6); + TestWordRight('Umlaut "um|laute"', 2, 6, 9, 6, 13, 6); + TestWordRight('After Umlaut > EOL, next line', 18, 6, 20, 6, 1, 7); + + TestWordRight('Before untrimmed > next', 12, 7, 4, 8, 14, 8); + TestWordRight('untrimmed > EOL, next', 30, 8, 35, 8, 1, 9); + TestWordRight('Before untrimmed tab > next', 12, 9, 8,10, 15,10); + TestWordRight('untrimmed tab > EOL, next', 24,10, 29,10, 1,11); + + TestWordRight('Before empty > next', 12,11, 1,12); + TestWordRight('Before space empty > next', 12,13, 1,14, 6, 14); + {%endregion} +end; + +procedure TTestBasicSynEdit.TestCaretDeleteWord_LastWord; + + function TestLines: TStringArray; + begin + SetLength(Result, 16); + // 1 6 11 14 + Result[0] := 'Some text to test'; //1 + // 1 5 9 + Result[1] := 'Foo bar abc'; // 2 + // 8 14 19 24 + Result[2] := #9'Other line with tab'; // 3 + // 1 8 11 15 + Result[3] := 'tab'#9'in the middle'; // 4 + // 1 9 12 16 23 28 + Result[4] := 'tab'#9' in the middle with space'; // 5 + // 1 9 13 16 + Result[5] := 'umlaute äää in text'; // 6 + Result[6] := 'normal line'; + // 4 14 21 28 32 + Result[7] := ' untrimmed spaces around line '; // 8 + Result[8] := 'normal line'; + // 8 15 22 26 + Result[9] := #9'tab'#9'only'#9'line'#9; // 10 + // 1 8 + Result[10] := 'normal line'; + Result[11] := ''; // 12 (empty) + Result[12] := 'normal line'; + Result[13] := ' '; // space only empty line // 14 + Result[14] := 'normal line'; + Result[15] := '' + end; + + procedure DoInit; + begin + InsertFlag := False; + TrimEnabled := False;; + ReCreateEdit; + + SynEdit.TabWidth := 7; + // 1 6 11 14 + SetLines(TestLines); + end; + + procedure TestWordLeft(Name:String; X, Y: Integer; + ExpX1, ExpY1: Integer; Repl: Array of const); + begin + DoInit; + SetCaretPhys(X,Y); + SynEdit.CommandProcessor(ecDeleteLastWord, '', nil); + TestIsCaretPhys(Name + '(1st DeleteLastWord)', ExpX1, ExpY1); + TestIsFullText(Name + '(1st DeleteLastWord)', TestLines, Repl); + end; + procedure TestWordLeft(Name:String; X, Y: Integer; + ExpX1, ExpY1: Integer; Repl: Array of const; + ExpX2, ExpY2: Integer; Repl2: Array of const); + begin + TestWordLeft(Name, X, Y, ExpX1, ExpY1, Repl); + SynEdit.CommandProcessor(ecDeleteLastWord, '', nil); + TestIsCaretPhys(Name + '(2nd DeleteLastWord)', ExpX2, ExpY2); + TestIsFullText(Name + '(2nd DeleteLastWord)', TestLines, Repl2); + end; + + procedure TestWordRight(Name:String; X, Y: Integer; + ExpX1, ExpY1: Integer; Repl: Array of const); + begin + DoInit; + SetCaretPhys(X,Y); + SynEdit.CommandProcessor(ecDeleteWord, '', nil); + TestIsCaretPhys(Name + '(1st DeleteWord)', ExpX1, ExpY1); + TestIsFullText(Name + '(1st DeleteWord)', TestLines, Repl); + end; + procedure TestWordRight(Name:String; X, Y: Integer; + ExpX1, ExpY1: Integer; Repl: Array of const; + ExpX2, ExpY2: Integer; Repl2: Array of const); + begin + TestWordRight(Name, X, Y, ExpX1, ExpY1, Repl); + SynEdit.CommandProcessor(ecDeleteWord, '', nil); + TestIsCaretPhys(Name + '(2nd DeleteWord)', ExpX2, ExpY2); + TestIsFullText(Name + '(2nd DeleteWord)', TestLines, Repl2); + end; + +begin + {%region word left} + TestWordLeft('simple "te|st"', 16, 1, 14, 1, [1,'Some text to st'], + 11, 1, [1,'Some text st']); + TestWordLeft('simple EOW "test|"', 18, 1, 14, 1, [1,'Some text to '], + 11, 1, [1,'Some text ']); + TestWordLeft('simple BOW "|test"', 14, 1, 11, 1, [1,'Some text test'], + 6, 1, [1,'Some test']); + TestWordLeft('simple > BOT "So|me"', 3, 1, 1, 1, [1,'me text to test'], + 1, 1, [1,'me text to test']); + TestWordLeft('simple > prev-line "F|oo"', 2, 2, 1, 2, [2,'oo bar abc'], + 18, 1, [1, 1, 'Some text to testoo bar abc']); + TestWordLeft('simple > prev-line "|Foo"', 1, 2, 18, 1, [1, 1, 'Some text to testFoo bar abc'], + 14, 1, [1, 1, 'Some text to Foo bar abc']); + + TestWordLeft('tab "wi|th"', 21, 3, 19, 3, [3, #9'Other line th tab'], + 14, 3, [3, #9'Other th tab']); + TestWordLeft('tab EOW "with|"', 23, 3, 19, 3, [3, #9'Other line tab'], + 14, 3, [3, #9'Other tab']); + TestWordLeft('tab BOW "|with"', 19, 3, 14, 3, [3, #9'Other with tab'], + 8, 3, [3, #9'with tab']); + TestWordLeft('tab > prev-line "O|ther"', 9, 3, 8, 3, [3, #9'ther line with tab'], + 12, 2, [2, 2, 'Foo bar abcther line with tab']); + + TestWordLeft('M-tab "i|n"', 9, 4, 8, 4, [4, 'tab'#9'n the middle'], + 1, 4, [4, 'n the middle']); + TestWordLeft('M-tab > prev-line-tab "ta|b"', 3, 4, 1, 4, [4, 'b'#9'in the middle'], + 27, 3, [3, 3, #9'Other line with tabb'#9'in the middle']); + + //TestWordLeft('M-S-tab "i|n"', 10, 5, 9, 5, + // 1, 5); + //TestWordLeft('M-S-EOW tab "in|"', 11, 5, 9, 5, + // 1, 5); + //TestWordLeft('M-S-BOW tab "|in"', 9, 5, 1, 5, + // 21, 4); + //TestWordLeft('M-S-tab "#9| in"', 8, 5, 1, 5); + // + TestWordLeft('Umlaut "ää|ä"', 11, 6, 9, 6, [6, 'umlaute ä in text'], + 1, 6, [6, 'ä in text']); + TestWordLeft('Umlaut EOW "äää|"', 12, 6, 9, 6, [6, 'umlaute in text'], + 1, 6, [6, ' in text']); + TestWordLeft('Umlaut BOW "|äää"', 9, 6, 1, 6, [6, 'äää in text'], + 33, 5, [5, 5, TestLines[4]+'äää in text']); + TestWordLeft('Umlaut "i|n"', 14, 6, 13, 6, [6, 'umlaute äää n text'], + 9, 6, [6, 'umlaute n text']); + TestWordLeft('After Umlaut > prev line', 1, 7, 20, 6, [6, 6, 'umlaute äää in text'+TestLines[6]], + 16, 6, [6, 6, 'umlaute äää in '+TestLines[6]]); + + //TestWordLeft('untrimmed "un|trimmed"', 6, 8, 4, 8, + // 12, 7); + //TestWordLeft('After untrimmed > prev', 1, 9, 35, 8, + // 28, 8); + //TestWordLeft('untrimmed tab "t|ab"', 9,10, 8,10, + // 12, 9); + //TestWordLeft('After untrimmed tab > prev', 1,11, 29,10, + // 22,10); + // + //TestWordLeft('After empty > prev', 1,13, 1,12); + //TestWordLeft('After space empty > prev', 1,15, 6,14); + {%endregion} + + {%region word right} + // if in middle of word, keep spaces after + TestWordRight('simple "te|xt"', 8, 1, 8, 1, [1,'Some te to test'], + 8, 1, [1,'Some teto test']); + // if at end of word, just del spaces after + TestWordRight('simple EOW "text|"', 10, 1, 10, 1, [1,'Some textto test'], + 10, 1, [1,'Some text test']); + // if at start of word, do NOT keep spaces after + TestWordRight('simple BOW "|text"', 6, 1, 6, 1, [1,'Some to test'], + 6, 1, [1,'Some test']); + TestWordRight('simple EOT "li|ne"', 10,15, 10,15, [15,'normal li'], + 10,15, [15,'normal li']); + TestWordRight('simple > EOL, next line "te|st"', 16, 1, 16, 1, [1,'Some text to te'], + 16, 1, [1, 1,'Some text to teFoo bar abc']); + + TestWordRight('tab "li|ne"', 16, 3, 16, 3, [3, #9'Other li with tab'], + 16, 3, [3, #9'Other liwith tab']); + TestWordRight('tab EOW "line|"', 18, 3, 18, 3, [3, #9'Other linewith tab'], + 18, 3, [3, #9'Other line tab']); + TestWordRight('tab BOW "|line"', 14, 3, 14, 3, [3, #9'Other with tab'], + 14, 3, [3, #9'Other tab']); + TestWordRight('tab > EOL, next-line', 25, 3, 25, 3, [3, #9'Other line with t'], + 25, 3, [3, 3, #9'Other line with ttab'#9'in the middle']); + + TestWordRight('M-tab "t|ab"', 2, 4, 2, 4, [4, 't'#9'in the middle'], + 2, 4, [4, 'tin the middle']); + TestWordRight('M-tab "tab|"', 4, 4, 4, 4, [4, 'tabin the middle'], + 4, 4, [4, 'tab the middle']); + TestWordRight('M-tab > EOL, next-line-tab', 17, 4, 17, 4, [4, 'tab'#9'in the mi'], + 17, 4, [4, 4, 'tab'#9'in the mitab'#9' in the middle with space']); + + //TestWordRight('M-S-tab BOW "t|ab"', 2, 5, 9, 5, + // 12, 5); + //TestWordRight('M-S-tab EOW "tab|"', 4, 5, 9, 5, + // 12, 5); + //TestWordRight('M-S-tab BOW "|tab"', 1, 5, 9, 5, + // 12, 5); + //TestWordRight('M-S-tab "tab#9| "', 5, 5, 9, 5, + // 12, 5); + // + TestWordRight('Umlaut "ää|ä"', 11, 6, 11, 6, [6, 'umlaute ää in text'], + 11, 6, [6, 'umlaute ääin text']); + TestWordRight('Umlaut EOW "äää|"', 12, 6, 12, 6, [6, 'umlaute äääin text'], + 12, 6, [6, 'umlaute äää text']); + TestWordRight('Umlaut BOW "|äää"', 9, 6, 9, 6, [6, 'umlaute in text'], + 9, 6, [6, 'umlaute text']); + TestWordRight('Umlaut "umlaute|"', 8, 6, 8, 6, [6, 'umlauteäää in text'], + 8, 6, [6, 'umlaute in text']); + TestWordRight('After Umlaut > EOL, next line', 18, 6, 18, 6, [6, 'umlaute äää in te'], + 18, 6, [6, 6, 'umlaute äää in te'+TestLines[6]]); + + //TestWordRight('Before untrimmed > next', 12, 7, 4, 8, + // 14, 8); + //TestWordRight('untrimmed > EOL, next', 30, 8, 35, 8, + // 1, 9); + //TestWordRight('Before untrimmed tab > next', 12, 9, 8,10, + // 15,10); + //TestWordRight('untrimmed tab > EOL, next', 24,10, 29,10, + // 1,11); + // + //TestWordRight('Before empty > next', 12,11, 1,12); + //TestWordRight('Before space empty > next', 12,13, 1,14, + // 6, 14); + {%endregion} + +end; + initialization diff -Nru lazarus-0.9.30/components/synedit/test/testhighlightpas.pas lazarus-0.9.30.2/components/synedit/test/testhighlightpas.pas --- lazarus-0.9.30/components/synedit/test/testhighlightpas.pas 2011-02-01 20:35:26.000000000 +0000 +++ lazarus-0.9.30.2/components/synedit/test/testhighlightpas.pas 2011-11-23 16:14:29.000000000 +0000 @@ -396,10 +396,11 @@ SetLines ([ 'Program A;', 'var', - ' Foo1: String', - ' Foo2: AnsiString', - ' Foo3: WideString', - ' Foo4: Integer', + ' Foo1: String;', + ' Foo2: AnsiString;', + ' Foo3: WideString;', + ' Foo4: Shortstring;', + ' Foo5: Integer;', '', 'Procedure b;', 'begin', @@ -415,35 +416,38 @@ PushBaseName('spsmDefault'); PasHighLighter.StringKeywordMode := spsmDefault; - CheckTokensForLine('String', 2, [tkSpace, tkIdentifier, tkSymbol, tkSpace, tkKey ]); - CheckTokensForLine('ansi', 3, [tkSpace, tkIdentifier, tkSymbol, tkSpace, tkKey ]); - CheckTokensForLine('wide', 4, [tkSpace, tkIdentifier, tkSymbol, tkSpace, tkKey ]); - CheckTokensForLine('int', 5, [tkSpace, tkIdentifier, tkSymbol, tkSpace, tkIdentifier ]); // selftest + CheckTokensForLine('String', 2, [tkSpace, tkIdentifier, tkSymbol, tkSpace, tkKey, tkSymbol ]); + CheckTokensForLine('ansi', 3, [tkSpace, tkIdentifier, tkSymbol, tkSpace, tkKey, tkSymbol ]); + CheckTokensForLine('wide', 4, [tkSpace, tkIdentifier, tkSymbol, tkSpace, tkKey, tkSymbol ]); + CheckTokensForLine('short', 5, [tkSpace, tkIdentifier, tkSymbol, tkSpace, tkKey, tkSymbol ]); + CheckTokensForLine('int', 6, [tkSpace, tkIdentifier, tkSymbol, tkSpace, tkIdentifier, tkSymbol ]); // selftest PopPushBaseName('spsmStringOnly'); PasHighLighter.StringKeywordMode := spsmStringOnly; - CheckTokensForLine('String', 2, [tkSpace, tkIdentifier, tkSymbol, tkSpace, tkKey ]); - CheckTokensForLine('ansi', 3, [tkSpace, tkIdentifier, tkSymbol, tkSpace, tkIdentifier ]); - CheckTokensForLine('wide', 4, [tkSpace, tkIdentifier, tkSymbol, tkSpace, tkIdentifier ]); - CheckTokensForLine('int', 5, [tkSpace, tkIdentifier, tkSymbol, tkSpace, tkIdentifier ]); // selftest + CheckTokensForLine('String', 2, [tkSpace, tkIdentifier, tkSymbol, tkSpace, tkKey, tkSymbol ]); + CheckTokensForLine('ansi', 3, [tkSpace, tkIdentifier, tkSymbol, tkSpace, tkIdentifier, tkSymbol ]); + CheckTokensForLine('wide', 4, [tkSpace, tkIdentifier, tkSymbol, tkSpace, tkIdentifier, tkSymbol ]); + CheckTokensForLine('short', 5, [tkSpace, tkIdentifier, tkSymbol, tkSpace, tkIdentifier, tkSymbol ]); + CheckTokensForLine('int', 6, [tkSpace, tkIdentifier, tkSymbol, tkSpace, tkIdentifier, tkSymbol ]); // selftest PopPushBaseName('spsmNone'); PasHighLighter.StringKeywordMode := spsmNone; - CheckTokensForLine('String', 2, [tkSpace, tkIdentifier, tkSymbol, tkSpace, tkIdentifier ]); - CheckTokensForLine('ansi', 3, [tkSpace, tkIdentifier, tkSymbol, tkSpace, tkIdentifier ]); - CheckTokensForLine('wide', 4, [tkSpace, tkIdentifier, tkSymbol, tkSpace, tkIdentifier ]); - CheckTokensForLine('int', 5, [tkSpace, tkIdentifier, tkSymbol, tkSpace, tkIdentifier ]); // selftest + CheckTokensForLine('String', 2, [tkSpace, tkIdentifier, tkSymbol, tkSpace, tkIdentifier, tkSymbol ]); + CheckTokensForLine('ansi', 3, [tkSpace, tkIdentifier, tkSymbol, tkSpace, tkIdentifier, tkSymbol ]); + CheckTokensForLine('wide', 4, [tkSpace, tkIdentifier, tkSymbol, tkSpace, tkIdentifier, tkSymbol ]); + CheckTokensForLine('short', 5, [tkSpace, tkIdentifier, tkSymbol, tkSpace, tkIdentifier, tkSymbol ]); + CheckTokensForLine('int', 6, [tkSpace, tkIdentifier, tkSymbol, tkSpace, tkIdentifier, tkSymbol ]); // selftest PopPushBaseName('False'); PasHighLighter.ExtendedKeywordsMode := False; - CheckTokensForLine('wide', 10, [tkSpace, tkIdentifier, tkSymbol ]); - CheckTokensForLine('wide', 11, [tkSpace, tkIdentifier, tkSymbol ]); + CheckTokensForLine('continue', 11, [tkSpace, tkIdentifier, tkSymbol ]); + CheckTokensForLine('exit', 12, [tkSpace, tkIdentifier, tkSymbol ]); PopPushBaseName('True'); PasHighLighter.ExtendedKeywordsMode := True; - CheckTokensForLine('wide', 10, [tkSpace, tkKey, tkSymbol ]); - CheckTokensForLine('wide', 11, [tkSpace, tkKey, tkSymbol ]); + CheckTokensForLine('continue', 11, [tkSpace, tkKey, tkSymbol ]); + CheckTokensForLine('exit', 12, [tkSpace, tkKey, tkSymbol ]); end; diff -Nru lazarus-0.9.30/components/tachart/demo/axis/main.lfm lazarus-0.9.30.2/components/tachart/demo/axis/main.lfm --- lazarus-0.9.30/components/tachart/demo/axis/main.lfm 2011-01-18 08:11:17.000000000 +0000 +++ lazarus-0.9.30.2/components/tachart/demo/axis/main.lfm 2011-11-23 16:14:29.000000000 +0000 @@ -215,6 +215,7 @@ Marks.Source = lcsMarks Marks.Style = smsLabel TickLength = 0 + OnMarkToText = TChartAxisList1MarkToText end> Foot.Brush.Color = clBtnFace Foot.Font.Color = clBlue @@ -290,7 +291,6 @@ item Grid.Visible = False Group = 1 - Marks.Visible = False Marks.Source = udcsSub Marks.Style = smsNone TickLength = 2 @@ -299,7 +299,6 @@ Alignment = calBottom Grid.Visible = False Group = 2 - Marks.Visible = False Marks.Source = udcsSub Marks.Style = smsNone TickLength = 2 diff -Nru lazarus-0.9.30/components/tachart/demo/axis/main.pas lazarus-0.9.30.2/components/tachart/demo/axis/main.pas --- lazarus-0.9.30/components/tachart/demo/axis/main.pas 2011-01-18 08:11:17.000000000 +0000 +++ lazarus-0.9.30.2/components/tachart/demo/axis/main.pas 2011-11-23 16:14:29.000000000 +0000 @@ -150,7 +150,7 @@ procedure TForm1.TChartAxisList1MarkToText(var AText: String; AMark: Double); begin - if AMark < 15 then + if AMark = 3 then AText := '*' + AText + '*'; end; diff -Nru lazarus-0.9.30/components/tachart/demo/legend/main.lfm lazarus-0.9.30.2/components/tachart/demo/legend/main.lfm --- lazarus-0.9.30/components/tachart/demo/legend/main.lfm 2010-11-30 13:21:11.000000000 +0000 +++ lazarus-0.9.30.2/components/tachart/demo/legend/main.lfm 2011-11-23 16:14:30.000000000 +0000 @@ -6,7 +6,6 @@ Caption = 'Form1' ClientHeight = 361 ClientWidth = 510 - OnCreate = FormCreate Position = poScreenCenter LCLVersion = '0.9.29' object Chart1: TChart @@ -56,6 +55,7 @@ Source = ListChartSource2 end object Chart1FuncSeries1: TFuncSeries + Legend.OnDraw = Chart1FuncSeries1DrawLegend Legend.UserItemsCount = 2 Extent.XMax = 5 Extent.UseXMin = True diff -Nru lazarus-0.9.30/components/tachart/demo/legend/main.pas lazarus-0.9.30.2/components/tachart/demo/legend/main.pas --- lazarus-0.9.30/components/tachart/demo/legend/main.pas 2010-11-30 13:21:11.000000000 +0000 +++ lazarus-0.9.30.2/components/tachart/demo/legend/main.pas 2011-11-23 16:14:30.000000000 +0000 @@ -36,7 +36,6 @@ procedure Chart1FuncSeries1Calculate(const AX: Double; out AY: Double); procedure Chart1FuncSeries1DrawLegend( ACanvas: TCanvas; const ARect: TRect; AIndex: Integer; var AText: String); - procedure FormCreate(Sender: TObject); procedure rgAlignmentClick(Sender: TObject); procedure seMarginXChange(Sender: TObject); procedure seMarginYChange(Sender: TObject); @@ -82,11 +81,6 @@ Round(Sin(x / w * 2 * Pi) * (ARect.Bottom - ARect.Top) / 2) + y0); end; -procedure TForm1.FormCreate(Sender: TObject); -begin - Chart1FuncSeries1.Legend.OnDraw := @Chart1FuncSeries1DrawLegend; -end; - procedure TForm1.rgAlignmentClick(Sender: TObject); begin with Chart1.Legend do diff -Nru lazarus-0.9.30/components/tachart/demo/save/main.lfm lazarus-0.9.30.2/components/tachart/demo/save/main.lfm --- lazarus-0.9.30/components/tachart/demo/save/main.lfm 2011-01-18 08:11:17.000000000 +0000 +++ lazarus-0.9.30.2/components/tachart/demo/save/main.lfm 2011-11-23 16:14:30.000000000 +0000 @@ -36,6 +36,7 @@ end object Chart1FuncSeries1: TFuncSeries ZPosition = 1 + OnCalculate = Chart1FuncSeries1Calculate Pen.Color = clRed Pen.Width = 2 end diff -Nru lazarus-0.9.30/components/tachart/demo/save/main.pas lazarus-0.9.30.2/components/tachart/demo/save/main.pas --- lazarus-0.9.30/components/tachart/demo/save/main.pas 2011-01-18 08:11:17.000000000 +0000 +++ lazarus-0.9.30.2/components/tachart/demo/save/main.pas 2011-11-23 16:14:30.000000000 +0000 @@ -52,7 +52,6 @@ RandSeed := 103489; for i := 1 to 10 do Chart1BarSeries1.AddXY(i, i * i / 2 + Random(6) + 1 + Random); - Chart1FuncSeries1.OnCalculate := @Chart1FuncSeries1Calculate; SaveDialog1.InitialDir := ExtractFilePath(Application.ExeName); end; diff -Nru lazarus-0.9.30/components/tachart/Makefile.compiled lazarus-0.9.30.2/components/tachart/Makefile.compiled --- lazarus-0.9.30/components/tachart/Makefile.compiled 2010-10-29 12:05:03.000000000 +0000 +++ lazarus-0.9.30.2/components/tachart/Makefile.compiled 2011-11-23 16:14:29.000000000 +0000 @@ -1,5 +1,5 @@ - + diff -Nru lazarus-0.9.30/components/tachart/tachartaxis.pas lazarus-0.9.30.2/components/tachart/tachartaxis.pas --- lazarus-0.9.30/components/tachart/tachartaxis.pas 2010-12-20 09:44:42.000000000 +0000 +++ lazarus-0.9.30.2/components/tachart/tachartaxis.pas 2011-11-23 16:14:30.000000000 +0000 @@ -42,8 +42,10 @@ property Style default psClear; end; + {$IFNDEF fpdoc} // Workaround for issue #18549. TCustomChartAxisTitle = specialize TGenericChartMarks; + {$ENDIF} { TChartAxisTitle } @@ -62,7 +64,7 @@ published property Caption: String read FCaption write SetCaption; property Distance default DEF_TITLE_DISTANCE; - // Use LabelFont instead. + // Use LabelFont instead. property Font: TFont read GetFont write SetFont stored false; deprecated; property Frame; property LabelBrush; @@ -85,7 +87,10 @@ property Style default psDot; end; - TCustomChartAxisMarks = specialize TGenericChartMarks; + {$IFNDEF fpdoc} // Workaround for issue #18549. + TCustomChartAxisMarks = + specialize TGenericChartMarks; + {$ENDIF} { TChartAxisMarks } @@ -172,7 +177,7 @@ constructor Create(ACollection: TCollection); override; destructor Destroy; override; public - procedure Assign(Source: TPersistent); override; + procedure Assign(ASource: TPersistent); override; procedure Draw( ACanvas: TCanvas; const AExtent: TDoubleRect; const ATransf: ICoordTransformer; const AZOffset: TPoint); @@ -223,6 +228,7 @@ procedure InitAndSort(AList: TFPList; ACompare: TListSortCompare); protected function GetOwner: TPersistent; override; + procedure Update(AItem: TCollectionItem); override; public constructor Create(AOwner: TCustomChart); destructor Destroy; override; @@ -282,14 +288,23 @@ var VIdentityTransform: TChartAxisTransformations; -function AxisGroupCompare(Item1, Item2: Pointer): Integer; +function AxisZCompare(AItem1, AItem2: Pointer): Integer; forward; + +function AxisGroupCompare(AItem1, AItem2: Pointer): Integer; begin - Result := TChartAxis(Item1).Group - TChartAxis(Item2).Group; + Result := TChartAxis(AItem1).Group - TChartAxis(AItem2).Group; + if Result = 0 then + Result := AxisZCompare(AItem1, AItem2); end; -function AxisZCompare(Item1, Item2: Pointer): Integer; +function AxisZCompare(AItem1, AItem2: Pointer): Integer; +var + a1: TChartAxis absolute AItem1; + a2: TChartAxis absolute AItem2; begin - Result := TChartAxis(Item1).ZPosition - TChartAxis(Item2).ZPosition; + Result := a1.ZPosition - a2.ZPosition; + if Result = 0 then + Result := a2.Index - a1.Index; end; procedure SideByAlignment( @@ -401,16 +416,25 @@ { TChartAxis } -procedure TChartAxis.Assign(Source: TPersistent); +procedure TChartAxis.Assign(ASource: TPersistent); begin - if Source is TChartAxis then - with TChartAxis(Source) do begin - FGrid.Assign(Grid); - FInverted := Inverted; - FTitle.Assign(Title); + if ASource is TChartAxis then + with TChartAxis(ASource) do begin + Self.FGrid.Assign(Grid); + Self.FGroup := Group; + Self.FInverted := Inverted; + Self.FMarks.Assign(Marks); + Self.FTickColor := TickColor; + Self.FTickLength := TickLength; + Self.FTitle.Assign(Title); + Self.FTransformations := Transformations; + Self.FZPosition := ZPosition; + Self.FVisible := Visible; + + Self.FOnMarkToText := OnMarkToText; end else - inherited Assign(Source); + inherited Assign(ASource); end; constructor TChartAxis.Create(ACollection: TCollection); @@ -472,11 +496,13 @@ Point(x, ATransf.YGraphToImage(AExtent.b.Y))); end; - d := TickLength + Marks.CenterOffset(ACanvas, AText).cy; - if Alignment = calTop then - d := -d; - DrawLabelAndTick( - Point(x, AY + d), Rect(x, AY - TickLength, x, AY + TickLength), AText); + if Marks.Visible then begin + d := TickLength + Marks.CenterOffset(ACanvas, AText).cy; + if Alignment = calTop then + d := -d; + DrawLabelAndTick( + Point(x, AY + d), Rect(x, AY - TickLength, x, AY + TickLength), AText); + end; end; procedure DrawYMark(AX: Integer; AMark: Double; const AText: String); @@ -493,11 +519,13 @@ Point(ATransf.XGraphToImage(AExtent.b.X), y)); end; - d := TickLength + Marks.CenterOffset(ACanvas, AText).cx; - if Alignment = calLeft then - d := -d; - DrawLabelAndTick( - Point(AX + d, y), Rect(AX - TickLength, y, AX + TickLength, y), AText); + if Marks.Visible then begin + d := TickLength + Marks.CenterOffset(ACanvas, AText).cx; + if Alignment = calLeft then + d := -d; + DrawLabelAndTick( + Point(AX + d, y), Rect(AX - TickLength, y, AX + TickLength, y), AText); + end; end; var @@ -607,6 +635,7 @@ Result := Size(0, 0); if AMin = AMax then exit; GetMarkValues(AMin, AMax); + if not Marks.Visible then exit; for i := 0 to High(FMarkTexts) do begin // CalculateTransformationCoeffs changes axis interval, so it is possibile // that a new mark longer then existing ones is introduced. @@ -687,7 +716,7 @@ procedure TChartAxis.SetOnMarkToText(const AValue: TChartAxisMarkToTextEvent); begin - if FOnMarkToText = AValue then exit; + if TMethod(FOnMarkToText) = TMethod(AValue) then exit; FOnMarkToText := AValue; StyleChanged(Self); end; @@ -720,7 +749,7 @@ FTransformations := AValue; if FTransformations <> nil then Transformations.Broadcaster.Subscribe(FListener); - StyleChanged(Self); + StyleChanged(AValue); end; procedure TChartAxis.SetVisible(const AValue: Boolean); @@ -742,7 +771,7 @@ with Collection.Owner as TCustomChart do begin // Transformation change could have invalidated the current extent, // so revert to full extent for now. - if ASender is TAxisTransform then + if (ASender is TAxisTransform) or (ASender is TChartAxisTransformations) then ZoomFull; Invalidate; end; @@ -923,6 +952,12 @@ a.FAlignment := AXIS_INDEX[AIndex]; end; +procedure TChartAxisList.Update(AItem: TCollectionItem); +begin + Unused(AItem); + FChart.Invalidate; +end; + { TAxisCoeffHelper } constructor TAxisCoeffHelper.Init( diff -Nru lazarus-0.9.30/components/tachart/tachartlazaruspkg.lpk lazarus-0.9.30.2/components/tachart/tachartlazaruspkg.lpk --- lazarus-0.9.30/components/tachart/tachartlazaruspkg.lpk 2010-12-20 09:44:42.000000000 +0000 +++ lazarus-0.9.30.2/components/tachart/tachartlazaruspkg.lpk 2011-11-23 16:14:30.000000000 +0000 @@ -5,7 +5,7 @@ - + @@ -16,6 +16,9 @@ + + + @@ -27,40 +30,40 @@ - - + + + - - + + - - + + - - - + + - + - + - - + + + - - - + + - + - + @@ -115,7 +118,7 @@ - + @@ -130,7 +133,7 @@ - + diff -Nru lazarus-0.9.30/components/tachart/tachartlazaruspkg.pas lazarus-0.9.30.2/components/tachart/tachartlazaruspkg.pas --- lazarus-0.9.30/components/tachart/tachartlazaruspkg.pas 2010-12-20 09:44:42.000000000 +0000 +++ lazarus-0.9.30.2/components/tachart/tachartlazaruspkg.pas 2011-11-23 16:14:30.000000000 +0000 @@ -7,20 +7,19 @@ interface uses - TAChartAxis, TAChartUtils, TACustomSeries, TADbSource, TAGraph, TASeries, - TASeriesEditor, TASources, TASubcomponentsEditor, TATools, - TATransformations, TATypes, TADrawUtils, TAMultiSeries, TALegend, TAStyles, - TAFuncSeries, TALegendPanel, TARadialSeries, TACustomSource, - LazarusPackageIntf; + TAGraph, TAChartAxis, TAChartUtils, TACustomSeries, TASources, TADbSource, + TASeries, TASeriesEditor, TASubcomponentsEditor, TATools, TATransformations, + TATypes, TADrawUtils, TAMultiSeries, TALegend, TAStyles, TAFuncSeries, + TALegendPanel, TARadialSeries, TACustomSource, LazarusPackageIntf; implementation procedure Register; begin - RegisterUnit('TADbSource', @TADbSource.Register); RegisterUnit('TAGraph', @TAGraph.Register); - RegisterUnit('TASeriesEditor', @TASeriesEditor.Register); RegisterUnit('TASources', @TASources.Register); + RegisterUnit('TADbSource', @TADbSource.Register); + RegisterUnit('TASeriesEditor', @TASeriesEditor.Register); RegisterUnit('TATools', @TATools.Register); RegisterUnit('TATransformations', @TATransformations.Register); RegisterUnit('TAStyles', @TAStyles.Register); diff -Nru lazarus-0.9.30/components/tachart/tachartutils.pas lazarus-0.9.30.2/components/tachart/tachartutils.pas --- lazarus-0.9.30/components/tachart/tachartutils.pas 2011-01-03 12:21:48.000000000 +0000 +++ lazarus-0.9.30.2/components/tachart/tachartutils.pas 2011-11-23 16:14:30.000000000 +0000 @@ -925,12 +925,12 @@ begin i := 0; while (i <= High(FIntervals)) and (FIntervals[i].FEnd < AStart) do - Inc(i); + i += 1; if i <= High(FIntervals) then AStart := Min(AStart, FIntervals[i].FStart); j := High(FIntervals); while (j >= 0) and (FIntervals[j].FStart > AEnd) do - Dec(j); + j -= 1; if j >= 0 then AEnd := Max(AEnd, FIntervals[j].FEnd); if i < j then begin @@ -940,7 +940,7 @@ end else if i > j then begin SetLength(FIntervals, Length(FIntervals) + 1); - for k := High(FIntervals) downto i do + for k := High(FIntervals) downto i + 1 do FIntervals[k] := FIntervals[k - 1]; end; FIntervals[i] := DoubleInterval(AStart, AEnd); diff -Nru lazarus-0.9.30/components/tachart/tacustomseries.pas lazarus-0.9.30.2/components/tachart/tacustomseries.pas --- lazarus-0.9.30/components/tachart/tacustomseries.pas 2011-02-04 20:22:08.000000000 +0000 +++ lazarus-0.9.30.2/components/tachart/tacustomseries.pas 2011-11-23 16:14:30.000000000 +0000 @@ -666,7 +666,7 @@ procedure TChartSeries.SetOnGetMark(const AValue: TChartGetMarkEvent); begin - if FOnGetMark = AValue then exit; + if TMethod(FOnGetMark) = TMethod(AValue) then exit; FOnGetMark := AValue; UpdateParentChart; end; diff -Nru lazarus-0.9.30/components/tachart/tacustomsource.pas lazarus-0.9.30.2/components/tachart/tacustomsource.pas --- lazarus-0.9.30/components/tachart/tacustomsource.pas 2010-12-22 12:24:31.000000000 +0000 +++ lazarus-0.9.30.2/components/tachart/tacustomsource.pas 2011-11-23 16:14:30.000000000 +0000 @@ -65,7 +65,7 @@ procedure AfterDraw; virtual; procedure BeforeDraw; virtual; procedure BeginUpdate; - procedure EndUpdate; + procedure EndUpdate; virtual; function IsUpdating: Boolean; inline; public class procedure CheckFormat(const AFormat: String); diff -Nru lazarus-0.9.30/components/tachart/tadbsource.pas lazarus-0.9.30.2/components/tachart/tadbsource.pas --- lazarus-0.9.30/components/tachart/tadbsource.pas 2010-12-20 09:44:42.000000000 +0000 +++ lazarus-0.9.30.2/components/tachart/tadbsource.pas 2011-11-23 16:14:30.000000000 +0000 @@ -28,7 +28,7 @@ { TDbChartSource } TDbChartSource = class(TCustomChartSource) - private + strict private FBookmark: TBookmark; FCurItem: TChartDataItem; FDataLink: TDataLink; @@ -74,17 +74,22 @@ { TDbChartSourceDataLink } - TDbChartSourceDataLink = class(TDatalink) - private + TDbChartSourceDataLink = class(TDataLink) + strict private FChartSrc: TDbChartSource; protected procedure DataSetChanged; override; - procedure DataSetScrolled(Distance: Integer); override; + procedure DataSetScrolled(ADistance: Integer); override; procedure UpdateData; override; public constructor Create(ASrc: TDbChartSource); end; +// FIXME: This is a workaround for issue #19887. +// Remove when dataset gains the capability to turn data events off. +var + VLockedDatasets: TFPList; + { TDbChartSourceDataLink } constructor TDbChartSourceDataLink.Create(ASrc: TDbChartSource); @@ -96,21 +101,19 @@ procedure TDbChartSourceDataLink.DataSetChanged; begin inherited DataSetChanged; - if (FChartSrc.FBookmark = nil) and (DataSet.State = dsBrowse) then + if DataSet.State = dsBrowse then FChartSrc.Reset; end; -procedure TDbChartSourceDataLink.DataSetScrolled(Distance: Integer); +procedure TDbChartSourceDataLink.DataSetScrolled(ADistance: Integer); begin - Unused(Distance); - // No need to react on scrolling + Unused(ADistance); // No need to react on scrolling. end; procedure TDbChartSourceDataLink.UpdateData; begin inherited UpdateData; - if FChartSrc.FBookmark = nil then - FChartSrc.Reset; + FChartSrc.Reset; end; procedure Register; @@ -123,18 +126,20 @@ procedure TDbChartSource.AfterDraw; begin inherited AfterDraw; - if not FDataLink.Active or (FBookmark = nil) then exit; try + if not FDataLink.Active or (FBookmark = nil) then exit; FDataLink.DataSet.GotoBookmark(FBookmark); FDataLink.DataSet.FreeBookmark(FBookmark); finally FBookmark := nil; + VLockedDatasets.Remove(FDataLink.DataSet); end; end; procedure TDbChartSource.BeforeDraw; begin inherited BeforeDraw; + VLockedDatasets.Add(FDataLink.DataSet); if FDataLink.Active then FBookmark := FDataLink.DataSet.GetBookmark; end; @@ -144,6 +149,7 @@ inherited Create(AOwner); FDataLink := TDbChartSourceDataLink.Create(Self); FFieldYList := TStringList.Create; + FYCount := 0; // Set to 1 by inherited. end; destructor TDbChartSource.Destroy; @@ -208,6 +214,7 @@ procedure TDbChartSource.Reset; begin + if VLockedDatasets.IndexOf(FDataLink.DataSet) >= 0 then exit; InvalidateCaches; Notify; end; @@ -258,5 +265,11 @@ raise EYCountError.Create('Set FieldY instead'); end; +initialization + VLockedDatasets := TFPList.Create; + +finalization + FreeAndNil(VLockedDatasets); + end. diff -Nru lazarus-0.9.30/components/tachart/tafuncseries.pas lazarus-0.9.30.2/components/tachart/tafuncseries.pas --- lazarus-0.9.30/components/tachart/tafuncseries.pas 2011-02-04 20:22:08.000000000 +0000 +++ lazarus-0.9.30.2/components/tachart/tafuncseries.pas 2011-11-23 16:14:30.000000000 +0000 @@ -443,7 +443,7 @@ procedure TColorMapSeries.SetOnCalculate(AValue: TFuncCalculate3DEvent); begin - if FOnCalculate = AValue then exit; + if TMethod(FOnCalculate) = TMethod(AValue) then exit; FOnCalculate := AValue; UpdateParentChart; end; diff -Nru lazarus-0.9.30/components/tachart/tagraph.pas lazarus-0.9.30.2/components/tachart/tagraph.pas --- lazarus-0.9.30/components/tachart/tagraph.pas 2010-12-20 05:30:51.000000000 +0000 +++ lazarus-0.9.30.2/components/tachart/tagraph.pas 2011-11-23 16:14:30.000000000 +0000 @@ -193,7 +193,7 @@ procedure SetReticuleMode(const AValue: TReticuleMode); procedure SetReticulePos(const AValue: TPoint); procedure SetTitle(Value: TChartTitle); - procedure SetToolset(const AValue: TBasicChartToolset); + procedure SetToolset(AValue: TBasicChartToolset); procedure VisitSources( AVisitor: TChartOnSourceVisitor; AAxis: TChartAxis; var AData); protected @@ -205,10 +205,12 @@ Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; procedure MouseMove(Shift: TShiftState; X, Y: Integer); override; procedure MouseUp( - Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; + AButton: TMouseButton; AShift: TShiftState; AX, AY: Integer); override; {$IFDEF LCLGtk2} procedure DoOnResize; override; {$ENDIF} + procedure Notification( + AComponent: TComponent; AOperation: TOperation); override; procedure PrepareAxis(ACanvas: TCanvas); procedure PrepareLegend( ACanvas: TCanvas; out ALegendItems: TChartLegendItems; @@ -452,6 +454,8 @@ procedure TChart.StyleChanged(Sender: TObject); begin + if Sender is TChartExtent then + ZoomFull; Invalidate; Broadcaster.Broadcast(Sender); end; @@ -635,9 +639,10 @@ axisMargin: TChartAxisMargins = (0, 0, 0, 0); a: TChartAxisAlignment; begin - if not FAxisVisible or (AxisList.Count = 0) then begin + if not AxisVisible then begin FClipRect.Left += Depth; FClipRect.Bottom -= Depth; + CalculateTransformationCoeffs(GetMargins(ACanvas)); exit; end; @@ -699,10 +704,14 @@ Invalidate; end; -procedure TChart.SetToolset(const AValue: TBasicChartToolset); +procedure TChart.SetToolset(AValue: TBasicChartToolset); begin if FToolset = AValue then exit; + if FToolset <> nil then + RemoveFreeNotification(FToolset); FToolset := AValue; + if FToolset <> nil then + FreeNotification(FToolset); FActiveToolIndex := -1; end; @@ -870,7 +879,8 @@ with TBasicChartSeries(seriesInZOrder[i]) do begin if not Active then continue; // Interleave axises with series according to ZPosition. - AxisList.Draw(ACanvas, CurrentExtent, Self, ZPosition, d, axisIndex); + if AxisVisible then + AxisList.Draw(ACanvas, CurrentExtent, Self, ZPosition, d, axisIndex); OffsetDrawArea(Min(ZPosition, d), Min(Depth, d)); ACanvas.ClipRect := FClipRect; ACanvas.Clipping := true; @@ -890,7 +900,8 @@ seriesInZOrder.Free; end; end; - AxisList.Draw(ACanvas, CurrentExtent, Self, MaxInt, d, axisIndex); + if AxisVisible then + AxisList.Draw(ACanvas, CurrentExtent, Self, MaxInt, d, axisIndex); end; procedure TChart.DrawReticule(ACanvas: TCanvas); @@ -918,12 +929,25 @@ inherited; end; -procedure TChart.MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); +procedure TChart.MouseUp( + AButton: TMouseButton; AShift: TShiftState; AX, AY: Integer); +const + MOUSE_BUTTON_TO_SHIFT: array [TMouseButton] of TShiftStateEnum = ( + ssLeft, ssRight, ssMiddle, ssExtra1, ssExtra2); begin - if GetToolset.Dispatch(Self, evidMouseUp, Shift, Point(X, Y)) then exit; + // To find a tool, toolset must see the shift state with the button still down. + Include(AShift, MOUSE_BUTTON_TO_SHIFT[AButton]); + if GetToolset.Dispatch(Self, evidMouseUp, AShift, Point(AX, AY)) then exit; inherited; end; +procedure TChart.Notification(AComponent: TComponent; AOperation: TOperation); +begin + if (AOperation = opRemove) and (AComponent = Toolset) then + FToolset := nil; + inherited Notification(AComponent, AOperation); +end; + procedure TChart.SetLegend(Value: TChartLegend); begin FLegend.Assign(Value); diff -Nru lazarus-0.9.30/components/tachart/talegend.pas lazarus-0.9.30.2/components/tachart/talegend.pas --- lazarus-0.9.30/components/tachart/talegend.pas 2011-02-02 08:10:43.000000000 +0000 +++ lazarus-0.9.30.2/components/tachart/talegend.pas 2011-11-23 16:14:30.000000000 +0000 @@ -348,7 +348,10 @@ // Draw the background and the border. ACanvas.Font.Assign(Font); ACanvas.Brush.Assign(BackgroundBrush); - ACanvas.Pen.Assign(Frame); + if Frame.Visible then + ACanvas.Pen.Assign(Frame) + else + ACanvas.Pen.Style := psClear; ACanvas.Rectangle(ABounds); r := ABounds; @@ -512,7 +515,7 @@ procedure TChartSeriesLegend.SetOnDraw(AValue: TLegendItemDrawEvent); begin - if FOnDraw = AValue then exit; + if TMethod(FOnDraw) = TMethod(AValue) then exit; FOnDraw := AValue; StyleChanged(Self); end; diff -Nru lazarus-0.9.30/components/tachart/taseries.pas lazarus-0.9.30.2/components/tachart/taseries.pas --- lazarus-0.9.30/components/tachart/taseries.pas 2011-02-02 08:10:43.000000000 +0000 +++ lazarus-0.9.30.2/components/tachart/taseries.pas 2011-11-23 16:14:30.000000000 +0000 @@ -357,6 +357,27 @@ breaks: TIntegerDynArray; breakCount: Integer = 0; + // Drawing long polylines with wide pen is very inefficient on Windows and GTK. + // On Windows it is so bad that trying to draw polyline with 50000 points + // will cause hard freeze of entire OS. (!) + // So, split long polylines into segments. + function PolylineIsTooLong: Boolean; inline; + const + // There is a trade-off between the call overhead for short serment and + // the above-mentioned inefficiency for long ones. + // This value was selected by some experiments as "optimal enough" for + // both affected platforms. + MAX_LENGTH = 50; + begin + {$IF defined(WIN32) or defined(GTK2)} + Result := + (LinePen.Width > 1) and (breakCount > 0) and + (pointCount - breaks[breakCount - 1] > MAX_LENGTH); + {$ELSE} + Result := false; + {$ENDIF} + end; + procedure CacheLine(AA, AB: TDoublePoint); var ai, bi: TPoint; @@ -367,7 +388,9 @@ ai := ParentChart.GraphToImage(AA); bi := ParentChart.GraphToImage(AB); if ai = bi then exit; - if (pointCount = 0) or (points[pointCount - 1] <> ai) then begin + if + (pointCount = 0) or (points[pointCount - 1] <> ai) or PolylineIsTooLong + then begin breaks[breakCount] := pointCount; breakCount += 1; points[pointCount] := ai; @@ -441,7 +464,7 @@ DrawLines; DrawLabels(ACanvas); - if FShowPoints then + if FShowPoints and Pointer.Visible then for i := FLoBound to FUpBound do begin p := FGraphPoints[i - FLoBound]; if not ParentChart.IsPointInViewPort(p) then continue; @@ -905,6 +928,7 @@ else Result.Y := ACoord; end; + var i, j, n2, numPrevPts: Integer; a, b: TDoublePoint; diff -Nru lazarus-0.9.30/components/tachart/tasources.pas lazarus-0.9.30.2/components/tachart/tasources.pas --- lazarus-0.9.30/components/tachart/tasources.pas 2010-12-22 12:24:31.000000000 +0000 +++ lazarus-0.9.30.2/components/tachart/tasources.pas 2011-11-23 16:14:30.000000000 +0000 @@ -187,6 +187,7 @@ function GetItem(AIndex: Integer): PChartDataItem; override; procedure SetYCount(AValue: Cardinal); override; public + procedure EndUpdate; override; function IsSorted: Boolean; override; procedure Reset; inline; published @@ -948,6 +949,14 @@ { TUserDefinedChartSource } +procedure TUserDefinedChartSource.EndUpdate; +begin + // There is no way to detect if the extent changed -- + // so call Reset to be a bit safer, but a bit slower. + Reset; + inherited EndUpdate; +end; + function TUserDefinedChartSource.GetCount: Integer; begin Result := FPointsNumber; diff -Nru lazarus-0.9.30/components/tachart/tasubcomponentseditor.pas lazarus-0.9.30.2/components/tachart/tasubcomponentseditor.pas --- lazarus-0.9.30/components/tachart/tasubcomponentseditor.pas 2010-10-08 11:11:42.000000000 +0000 +++ lazarus-0.9.30.2/components/tachart/tasubcomponentseditor.pas 2011-11-23 16:14:30.000000000 +0000 @@ -275,7 +275,7 @@ if not ChildrenListBox.SelCount = 0 then exit; i := AStart - ADir; with ChildrenListBox do - while InRange(i + ADir, 0, Count - 1) do begin + while InRange(i, 0, Count - 1) and InRange(i + ADir, 0, Count - 1) do begin if Selected[i] and not Selected[i + ADir] then begin with TIndexedComponent(Items.Objects[i]) do Index := Index + ADir; diff -Nru lazarus-0.9.30/components/tachart/tatools.pas lazarus-0.9.30.2/components/tachart/tatools.pas --- lazarus-0.9.30/components/tachart/tatools.pas 2010-12-20 04:09:42.000000000 +0000 +++ lazarus-0.9.30.2/components/tachart/tatools.pas 2011-11-23 16:14:30.000000000 +0000 @@ -841,7 +841,7 @@ sz, center, ratio, zoom: TDoublePoint; ext: TDoubleRect; begin - if ZoomFactor <= 0 then exit; + if (ZoomFactor <= 0) or (ZoomRatio <= 0) then exit; ext := FChart.LogicalExtent; center := FChart.ImageToGraph(APoint); sz := ext.b - ext.a; diff -Nru lazarus-0.9.30/components/tachart/tatypes.pas lazarus-0.9.30.2/components/tachart/tatypes.pas --- lazarus-0.9.30/components/tachart/tatypes.pas 2011-02-04 20:22:08.000000000 +0000 +++ lazarus-0.9.30.2/components/tachart/tatypes.pas 2011-11-23 16:14:30.000000000 +0000 @@ -122,8 +122,12 @@ { TGenericChartMarks } + {$IFNDEF fpdoc} // Workaround for issue #18549. generic TGenericChartMarks<_TLabelBrush, _TLinkPen, _TFramePen> = class(TChartElement) + {$ELSE} + TGenericChartMarks = class(TChartElement) + {$ENDIF} private function GetDistanceToCenter: Boolean; function LabelAngle: Double; inline; @@ -200,8 +204,10 @@ property Color default clYellow; end; + {$IFNDEF fpdoc} // Workaround for issue #18549. TCustomChartMarks = specialize TGenericChartMarks; + {$ENDIF} { TChartMarks } @@ -535,8 +541,10 @@ wasClipping := true; end; - ACanvas.Pen.Assign(LinkPen); - ACanvas.Line(ADataPoint, ALabelCenter); + if LinkPen.Visible then begin + ACanvas.Pen.Assign(LinkPen); + ACanvas.Line(ADataPoint, ALabelCenter); + end; ACanvas.Brush.Assign(LabelBrush); if IsMarginRequired then begin ACanvas.Pen.Assign(Frame); diff -Nru lazarus-0.9.30/components/tdbf/registerdbf.pas lazarus-0.9.30.2/components/tdbf/registerdbf.pas --- lazarus-0.9.30/components/tdbf/registerdbf.pas 2008-11-28 03:17:37.000000000 +0000 +++ lazarus-0.9.30.2/components/tdbf/registerdbf.pas 2011-11-23 16:14:30.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: registerdbf.pas 17618 2008-11-28 03:17:37Z paul $ } +{ $Id$ } { ***************************************************************************** * * diff -Nru lazarus-0.9.30/components/turbopower_ipro/ipconst.pas lazarus-0.9.30.2/components/turbopower_ipro/ipconst.pas --- lazarus-0.9.30/components/turbopower_ipro/ipconst.pas 2007-07-13 13:53:32.000000000 +0000 +++ lazarus-0.9.30.2/components/turbopower_ipro/ipconst.pas 2011-11-23 16:14:30.000000000 +0000 @@ -2,7 +2,7 @@ {* IPCONST.PAS - Miscellaneous String Constants *} {******************************************************************} -{ $Id: ipconst.pas 11492 2007-07-13 13:53:32Z mattias $ } +{ $Id$ } (* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1 diff -Nru lazarus-0.9.30/components/turbopower_ipro/iphtml.pas lazarus-0.9.30.2/components/turbopower_ipro/iphtml.pas --- lazarus-0.9.30/components/turbopower_ipro/iphtml.pas 2010-10-14 03:20:04.000000000 +0000 +++ lazarus-0.9.30.2/components/turbopower_ipro/iphtml.pas 2011-11-23 16:14:30.000000000 +0000 @@ -2,7 +2,7 @@ {* IPHTML.PAS - HTML Browser and associated classes *} {******************************************************************} -{ $Id: iphtml.pas 27703 2010-10-14 03:20:04Z paul $ } +{ $Id$ } (* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1 diff -Nru lazarus-0.9.30/components/turbopower_ipro/ipmsg.pas lazarus-0.9.30.2/components/turbopower_ipro/ipmsg.pas --- lazarus-0.9.30/components/turbopower_ipro/ipmsg.pas 2008-08-25 23:07:34.000000000 +0000 +++ lazarus-0.9.30.2/components/turbopower_ipro/ipmsg.pas 2011-11-23 16:14:30.000000000 +0000 @@ -2,7 +2,7 @@ {* IPMSG.PAS - MIME message classes *} {******************************************************************} -{ $Id: ipmsg.pas 16246 2008-08-25 23:07:34Z mattias $ } +{ $Id$ } (* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1 diff -Nru lazarus-0.9.30/components/turbopower_ipro/ipstrms.pas lazarus-0.9.30.2/components/turbopower_ipro/ipstrms.pas --- lazarus-0.9.30/components/turbopower_ipro/ipstrms.pas 2008-08-25 23:07:34.000000000 +0000 +++ lazarus-0.9.30.2/components/turbopower_ipro/ipstrms.pas 2011-11-23 16:14:30.000000000 +0000 @@ -2,7 +2,7 @@ {* IPSTRMS.PAS - Various stream classes *} {******************************************************************} -{ $Id: ipstrms.pas 16246 2008-08-25 23:07:34Z mattias $ } +{ $Id$ } (* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1 diff -Nru lazarus-0.9.30/converter/convcodetool.pas lazarus-0.9.30.2/converter/convcodetool.pas --- lazarus-0.9.30/converter/convcodetool.pas 2011-01-18 07:35:11.000000000 +0000 +++ lazarus-0.9.30.2/converter/convcodetool.pas 2011-11-23 16:14:30.000000000 +0000 @@ -620,11 +620,14 @@ for i:=0 to ReplaceFuncs.Funcs.Count-1 do begin FuncName:=ReplaceFuncs.Funcs[i]; if (IdentEndPos-xStart=length(FuncName)) - and (CompareIdentifiers(PChar(Pointer(FuncName)),@Src[xStart])=0) + and (CompareIdentifiers(PChar(FuncName),@Src[xStart])=0) and not fDefinedProcNames.Find(FuncName, x) then begin FuncDefInfo:=ReplaceFuncs.FuncAtInd(i); if ReplaceFuncs.Categories.Find(FuncDefInfo.Category, x) + // Categories.Objects[x] is used as a boolean flag. + and Assigned(ReplaceFuncs.Categories.Objects[x]) + // UTF8 funcs are in LCL which console apps don't have -> don't change. and not (aIsConsoleApp and (FuncDefInfo.Category='UTF8Names')) then begin // Create a new replacement object for params, position and other info. diff -Nru lazarus-0.9.30/converter/convertdelphi.pas lazarus-0.9.30.2/converter/convertdelphi.pas --- lazarus-0.9.30/converter/convertdelphi.pas 2011-02-09 20:10:31.000000000 +0000 +++ lazarus-0.9.30.2/converter/convertdelphi.pas 2011-11-23 16:14:30.000000000 +0000 @@ -1113,8 +1113,10 @@ sUnitPath:=GetCachedUnitPath(mUnit); if sUnitPath<>'' then begin // Found from cached paths: add unit path to project's settings. - with CompOpts do + with CompOpts do begin OtherUnitFiles:=MergeSearchPaths(OtherUnitFiles,sUnitPath); + IncludePath:=MergeSearchPaths(IncludePath,sUnitPath); + end; // Rename a unit with different casing if needed. RealFileName:=fCachedRealFileNames[UpperCase(mUnit)]; RealUnitName:=ExtractFileNameOnly(RealFileName); @@ -1373,8 +1375,6 @@ Result:=mrCancel; exit; end; - if (MisUnits<>nil) and (MisUnits.Count>0) then - raise Exception.Create(lisConvDelphiAtThisPointThereShouldBeNoMissingUnits); try // add all units to the project for i:=0 to FoundUnits.Count-1 do begin diff -Nru lazarus-0.9.30/debian/changelog lazarus-0.9.30.2/debian/changelog --- lazarus-0.9.30/debian/changelog 2011-06-10 08:39:46.000000000 +0000 +++ lazarus-0.9.30.2/debian/changelog 2011-11-23 16:55:04.000000000 +0000 @@ -1,3 +1,18 @@ +lazarus (0.9.30.2-1) unstable; urgency=low + + * New upstream release many fixes and new features. + - The detailed list of changes can be found here: + http://wiki.lazarus.freepascal.org/Lazarus_0.9.30_fixes_branch#Fixes_for_0.9.30.1 + * LCL changes: + - Many fixes for Qt widgetset + * IDE changes: + * Debugger / Editor changes: + - Many fixes in debugger and code tool + * Componenets changes: + - Many fixes in TAChart componenet + + -- Abou Al Montacir Tue, 23 Nov 2011 16:05:00 +0100 + lazarus (0.9.30-3) unstable; urgency=low * Enable IDE to rebuild itself when needed. (Closes: Upstream Bug#19074) diff -Nru lazarus-0.9.30/debian/overrides/lazarus lazarus-0.9.30.2/debian/overrides/lazarus --- lazarus-0.9.30/debian/overrides/lazarus 2010-11-22 14:04:53.000000000 +0000 +++ lazarus-0.9.30.2/debian/overrides/lazarus 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -lazarus: debian-revision-should-not-be-zero diff -Nru lazarus-0.9.30/debian/overrides/lazarus-doc lazarus-0.9.30.2/debian/overrides/lazarus-doc --- lazarus-0.9.30/debian/overrides/lazarus-doc 2010-11-22 14:04:53.000000000 +0000 +++ lazarus-0.9.30.2/debian/overrides/lazarus-doc 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -lazarus-doc: debian-revision-should-not-be-zero diff -Nru lazarus-0.9.30/debian/overrides/lazarus-ide lazarus-0.9.30.2/debian/overrides/lazarus-ide --- lazarus-0.9.30/debian/overrides/lazarus-ide 2010-11-22 14:04:53.000000000 +0000 +++ lazarus-0.9.30.2/debian/overrides/lazarus-ide 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -lazarus-ide: debian-revision-should-not-be-zero diff -Nru lazarus-0.9.30/debian/overrides/lazarus-ide-gtk2 lazarus-0.9.30.2/debian/overrides/lazarus-ide-gtk2 --- lazarus-0.9.30/debian/overrides/lazarus-ide-gtk2 2010-11-22 14:04:53.000000000 +0000 +++ lazarus-0.9.30.2/debian/overrides/lazarus-ide-gtk2 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -lazarus-ide-gtk2: debian-revision-should-not-be-zero diff -Nru lazarus-0.9.30/debian/overrides/lazarus-src lazarus-0.9.30.2/debian/overrides/lazarus-src --- lazarus-0.9.30/debian/overrides/lazarus-src 2010-11-22 14:04:53.000000000 +0000 +++ lazarus-0.9.30.2/debian/overrides/lazarus-src 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -lazarus-src: debian-revision-should-not-be-zero diff -Nru lazarus-0.9.30/debian/overrides/lcl lazarus-0.9.30.2/debian/overrides/lcl --- lazarus-0.9.30/debian/overrides/lcl 2010-11-22 14:04:53.000000000 +0000 +++ lazarus-0.9.30.2/debian/overrides/lcl 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -lcl: debian-revision-should-not-be-zero diff -Nru lazarus-0.9.30/debian/overrides/lcl-gtk2 lazarus-0.9.30.2/debian/overrides/lcl-gtk2 --- lazarus-0.9.30/debian/overrides/lcl-gtk2 2010-11-22 14:04:53.000000000 +0000 +++ lazarus-0.9.30.2/debian/overrides/lcl-gtk2 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -lcl-gtk2: debian-revision-should-not-be-zero diff -Nru lazarus-0.9.30/debian/overrides/lcl-nogui lazarus-0.9.30.2/debian/overrides/lcl-nogui --- lazarus-0.9.30/debian/overrides/lcl-nogui 2010-11-22 14:04:53.000000000 +0000 +++ lazarus-0.9.30.2/debian/overrides/lcl-nogui 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -lcl-nogui: debian-revision-should-not-be-zero diff -Nru lazarus-0.9.30/debian/overrides/lcl-units lazarus-0.9.30.2/debian/overrides/lcl-units --- lazarus-0.9.30/debian/overrides/lcl-units 2010-11-22 14:04:53.000000000 +0000 +++ lazarus-0.9.30.2/debian/overrides/lcl-units 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -lcl-units: debian-revision-should-not-be-zero diff -Nru lazarus-0.9.30/debian/overrides/lcl-utils lazarus-0.9.30.2/debian/overrides/lcl-utils --- lazarus-0.9.30/debian/overrides/lcl-utils 2010-11-22 14:04:53.000000000 +0000 +++ lazarus-0.9.30.2/debian/overrides/lcl-utils 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -lcl-utils: debian-revision-should-not-be-zero diff -Nru lazarus-0.9.30/debian/patches/01_topmakefile.diff lazarus-0.9.30.2/debian/patches/01_topmakefile.diff --- lazarus-0.9.30/debian/patches/01_topmakefile.diff 2011-06-10 08:39:46.000000000 +0000 +++ lazarus-0.9.30.2/debian/patches/01_topmakefile.diff 2011-11-23 16:55:29.000000000 +0000 @@ -8,13 +8,13 @@ [target] programs=lazarus startlazarus --dirs=lcl packager/registration ideintf packager components -+dirs=lcl packager/registration ideintf packager components ide tools +-dirs=lcl packager/registration ideintf components ++dirs=lcl packager/registration ideintf components ide tools exampledirs=examples [compiler] @@ -48,10 +48,6 @@ - .PHONY: lcl components packager/registration ideintf packager bigidecomponents ide idepkg idebig bigide starter lazbuilder tools all clean cleanide purge examples install lazbuild + .PHONY: lcl components packager/registration ideintf bigidecomponents ide idepkg idebig bigide starter lazbuilder tools all clean cleanide cleannogui purge examples install lazbuild #----------------------------------------------------------------------------- -ide: @@ -34,12 +34,12 @@ #----------------------------------------------------------------------------- examples: lcl components -@@ -88,7 +83,7 @@ +@@ -88,7 +84,7 @@ tools: lcl examples: lcl components #----------------------------------------------------------------------------- --all: lcl packager/registration ideintf packager components ide starter lazbuilder +-all: packager/registration lcl ideintf components ide starter lazbuilder +all: packager/registration lcl ideintf components bigidecomponents bigide starter lazbuilder tools examples #----------------------------------------------------------------------------- - cleanide: + cleannogui: diff -Nru lazarus-0.9.30/debian/patches/rebuild-ide.diff lazarus-0.9.30.2/debian/patches/rebuild-ide.diff --- lazarus-0.9.30/debian/patches/rebuild-ide.diff 2011-06-09 12:37:17.000000000 +0000 +++ lazarus-0.9.30.2/debian/patches/rebuild-ide.diff 1970-01-01 00:00:00.000000000 +0000 @@ -1,30 +0,0 @@ -This patch enables rebuilding Lazarus IDE when installed in a read only -directory. The output directory could be configured by the user and defaults to -${HOME}/.lazarus. - -diff --git lazarus-0.9.30~/ide/buildlazdialog.pas lazarus-0.9.30/ide/buildlazdialog.pas ---- lazarus-0.9.30~/ide/buildlazdialog.pas -+++ lazarus-0.9.30/ide/buildlazdialog.pas -@@ -490,6 +490,13 @@ begin - end; - NewTargetDirectory:=CleanAndExpandDirectory(NewTargetDirectory); - debugln('CreateBuildLazarusOptions Options.TargetDirectory=',NewTargetDirectory); -+ NewUnitDirectory:=AppendPathDelim(NewTargetDirectory)+'units' -+ +PathDelim+NewTargetCPU+'-'+NewTargetOS; -+ debugln('CreateBuildLazarusOptions UnitsTargetDirectory=',NewUnitDirectory); -+ Result:=ForceDirectoryInteractive(NewUnitDirectory,[]); -+ if Result<>mrOk then exit; -+ NewTargetDirectory:=AppendPathDelim(NewTargetDirectory)+'bin'; -+ debugln('CreateBuildLazarusOptions ExecutableTargetDirectory=',NewTargetDirectory); - Result:=ForceDirectoryInteractive(NewTargetDirectory,[]); - if Result<>mrOk then exit; - if OSLocksExecutables and not CrossCompiling then begin -@@ -588,7 +595,7 @@ begin - if NewUnitDirectory<>'' then - // FPC interpretes '\ ' as an escape for a space in a path, - // so make sure the directory doesn't end with the path delimeter. -- AppendExtraOption('-FU'+ChompPathDelim(NewTargetDirectory)); -+ AppendExtraOption('-FU'+ChompPathDelim(NewUnitDirectory)); - - if NewTargetDirectory<>'' then - // FPC interpretes '\ ' as an escape for a space in a path, diff -Nru lazarus-0.9.30/debian/patches/series lazarus-0.9.30.2/debian/patches/series --- lazarus-0.9.30/debian/patches/series 2011-06-09 12:37:17.000000000 +0000 +++ lazarus-0.9.30.2/debian/patches/series 2011-11-23 16:55:37.000000000 +0000 @@ -1,4 +1,3 @@ 01_topmakefile.diff 02_components.diff default_config.diff -rebuild-ide.diff diff -Nru lazarus-0.9.30/debian/rules lazarus-0.9.30.2/debian/rules --- lazarus-0.9.30/debian/rules 2011-05-12 22:21:57.000000000 +0000 +++ lazarus-0.9.30.2/debian/rules 2011-11-23 16:54:54.000000000 +0000 @@ -167,7 +167,7 @@ sed -e 's/Lazarus.*/& (${DEB_UPSTREAM_MAIN_VERSION})/' -e 's/Exec=startlazarus/&-${DEB_UPSTREAM_MAIN_VERSION}/' $(CURDIR)/install/lazarus.desktop > $(INSTALL_DIR)/usr/share/applications/lazarus-${DEB_UPSTREAM_MAIN_VERSION}.desktop # Install configuration files ${MKDIR} $(INSTALL_DIR)/etc/lazarus-${DEB_UPSTREAM_MAIN_VERSION} - fpcsubst -d LazarusVersion=${DEB_UPSTREAM_MAIN_VERSION} -i ${CURDIR}/tools/install/linux/environmentoptions.xml -o $(INSTALL_DIR)/etc/lazarus-${DEB_UPSTREAM_MAIN_VERSION}/environmentoptions.xml + sed -e "s#__LAZARUSDIR__#/usr/lib/lazarus/${DEB_UPSTREAM_MAIN_VERSION}/#" -e "s#__FPCSRCDIR__#/usr/share/fpcsrc/$$(FPCVER)/#" ${CURDIR}/tools/install/linux/environmentoptions.xml > $(INSTALL_DIR)/etc/lazarus-${DEB_UPSTREAM_MAIN_VERSION}/environmentoptions.xml fpcsubst -d LazarusVersion=${DEB_UPSTREAM_MAIN_VERSION} -i ${CURDIR}/tools/install/linux/helpoptions.xml -o $(INSTALL_DIR)/etc/lazarus-${DEB_UPSTREAM_MAIN_VERSION}/helpoptions.xml # Install contributer list ${MKDIR} ${LIB_DIR}/docs diff -Nru lazarus-0.9.30/debian/source/lintian-overrides lazarus-0.9.30.2/debian/source/lintian-overrides --- lazarus-0.9.30/debian/source/lintian-overrides 2010-11-22 14:04:53.000000000 +0000 +++ lazarus-0.9.30.2/debian/source/lintian-overrides 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -lazarus source: debian-revision-should-not-be-zero diff -Nru lazarus-0.9.30/debugger/assemblerdlg.pp lazarus-0.9.30.2/debugger/assemblerdlg.pp --- lazarus-0.9.30/debugger/assemblerdlg.pp 2011-02-04 20:40:18.000000000 +0000 +++ lazarus-0.9.30.2/debugger/assemblerdlg.pp 2011-11-23 16:14:30.000000000 +0000 @@ -7,8 +7,8 @@ uses Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls, StdCtrls, Grids, ExtCtrls, LclType, LCLIntf, DebuggerDlg, Debugger, - EditorOptions, Maps, Math, LCLProc, Menus, Clipbrd, ActnList, - IDECommands, IDEImagesIntf; + BaseDebugManager, EditorOptions, Maps, Math, LCLProc, Menus, Clipbrd, ActnList, + IDECommands, IDEImagesIntf, CodeToolManager, CodeCache, SourceEditor; type @@ -27,6 +27,7 @@ Addr: TDbgPtr; Dump: String; Statement: String; + PasCode: String; FileName: String; SourceLine: Integer; end; @@ -78,6 +79,7 @@ procedure ToolButtonPowerClick(Sender: TObject); private FDebugger: TDebugger; + FDebugManager: TBaseDebugManager; FDisassembler: TIDEDisassembler; FDisassemblerNotification: TIDEDisassemblerNotification; FCurrentLocation, FLocation: TDBGPtr; @@ -116,14 +118,17 @@ AFirstLine, ALineCount: Integer; var ACachedLine, ACachedIdx: Integer; var ACachedIsSrc, ACachedValid: Boolean; - ACachedUpdate: Boolean + ACachedUpdate: Boolean; + ANoExtraHeader: Boolean = False ); procedure SetSelection(ALine: Integer; AMakeVisible: Boolean; AKeepSelEnd: Boolean = False); procedure SetLineCount(ALineCount: Integer); procedure SetTopLine(ALine: Integer); function IndexOfAddr(const AAddr: TDBGPtr): Integer; procedure UpdateLocation(const AAddr: TDBGPtr); + procedure DoEditorOptsChanged(Sender: TObject; Restore: boolean); protected + function GetSourceCodeLine(SrcFileName: string; SrcLineNumber: Integer): string; procedure InitializeWnd; override; public constructor Create(AOwner: TComponent); override; @@ -131,6 +136,7 @@ procedure SetLocation(ADebugger: TDebugger; const AAddr: TDBGPtr); property Disassembler: TIDEDisassembler read FDisassembler write SetDisassembler; + property DebugManager: TBaseDebugManager read FDebugManager write FDebugManager; end; implementation @@ -210,6 +216,7 @@ Caption := lisDisAssAssembler; + EditorOpts.AddHandlerAfterWrite(@DoEditorOptsChanged); pbAsm.Font.Height := EditorOpts.EditorFontHeight; pbAsm.Font.Name := EditorOpts.EditorFont; Caption := lisMenuViewAssembler; @@ -249,6 +256,7 @@ destructor TAssemblerDlg.Destroy; begin + EditorOpts.RemoveHandlerAfterWrite(@DoEditorOptsChanged); SetDisassembler(nil); SetDebugger(nil); FDisassemblerNotification.OnChange := nil; @@ -323,12 +331,10 @@ i, w: Integer; s: String; begin - if FSelectionEndLine = FSelectLine - then exit; SetLength(ALineMap, abs(FSelectionEndLine - FSelectLine)+1); UpdateLineDataEx(ALineMap, Min(FSelectionEndLine, FSelectLine), - abs(FSelectionEndLine - FSelectLine), - FLastTopLine, FLastTopLineIdx, FLastTopLineIsSrc, FLastTopLineValid, False ); + abs(FSelectionEndLine - FSelectLine)+1, + FLastTopLine, FLastTopLineIdx, FLastTopLineIsSrc, FLastTopLineValid, False, True); if FDebugger = nil then W := 16 else W := FDebugger.TargetWidth div 4; @@ -418,17 +424,9 @@ end; procedure TAssemblerDlg.InitializeWnd; -var - TM: TTextMetric; begin inherited InitializeWnd; - - GetTextMetrics(pbAsm.Canvas.Handle, TM); - FCharWidth := EditorOpts.ExtraCharSpacing + TM.tmMaxCharWidth; - sbHorizontal.SmallChange := FCHarWidth; - - FLineHeight := EditorOpts.ExtraLineSpacing + TM.tmHeight; - SetLineCount(pbAsm.Height div FLineHeight); + DoEditorOptsChanged(nil, False); end; procedure TAssemblerDlg.pbAsmMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); @@ -540,7 +538,9 @@ lmsSource: begin if ALine.SourceLine = 0 then Result := '---' - else Result := Format('%s:%u %s', [ALine.FileName, ALine.SourceLine, ALine.Statement]); + else Result := Format('%-'+IntToStr(W+25)+'s %s', + [Format('%s:%u %s', [ALine.FileName, ALine.SourceLine, ALine.Statement]), + ALine.PasCode]); end; lmsFuncName: Result:= ALine.FileName + ' ' + ALine.Statement; end; @@ -671,6 +671,25 @@ UpdateView; end; +procedure TAssemblerDlg.DoEditorOptsChanged(Sender: TObject; Restore: boolean); +var + TM: TTextMetric; +begin + pbAsm.Font.Height := EditorOpts.EditorFontHeight; + pbAsm.Font.Name := EditorOpts.EditorFont; + if EditorOpts.DisableAntialiasing then + pbAsm.Font.Quality := fqNonAntialiased + else + pbAsm.Font.Quality := fqDefault; + + GetTextMetrics(pbAsm.Canvas.Handle, TM); + FCharWidth := TM.tmMaxCharWidth; // EditorOpts.ExtraCharSpacing + + sbHorizontal.SmallChange := FCHarWidth; + + FLineHeight := EditorOpts.ExtraLineSpacing + TM.tmHeight; + SetLineCount(pbAsm.Height div FLineHeight); +end; + procedure TAssemblerDlg.SetLocation(ADebugger: TDebugger; const AAddr: TDBGPtr); var i: Integer; @@ -766,15 +785,35 @@ UpdateLineData; end; +function TAssemblerDlg.GetSourceCodeLine(SrcFileName: string; SrcLineNumber: Integer): string; +var + PasSource: TCodeBuffer; + Editor: TSourceEditor; +begin + Result := ''; + if SrcLineNumber < 1 then exit; + if not FDebugManager.GetFullFilename(SrcFileName, False) // TODO: maybe ask user? + then exit; + PasSource := CodeToolBoss.LoadFile(SrcFileName, true, false); + if PasSource = nil + then exit; + + Editor := SourceEditorManager.SourceEditorIntfWithFilename(SrcFileName); + if Editor <> nil then SrcLineNumber := Editor.DebugToSourceLine(SrcLineNumber); + + Result := Trim(PasSource.GetLine(SrcLineNumber - 1)); +end; + procedure TAssemblerDlg.UpdateLineData; begin - UpdateLineDataEx(FLineMap, FTopLine, FLineCount, + UpdateLineDataEx(FLineMap, FTopLine, FLineCount + 1, FLastTopLine, FLastTopLineIdx, FLastTopLineIsSrc, FLastTopLineValid, True); end; procedure TAssemblerDlg.UpdateLineDataEx(ALineMap: TAsmDlgLineEntries; AFirstLine, ALineCount: Integer; var ACachedLine, ACachedIdx: Integer; - var ACachedIsSrc, ACachedValid: Boolean; ACachedUpdate: Boolean); + var ACachedIsSrc, ACachedValid: Boolean; ACachedUpdate: Boolean; + ANoExtraHeader: Boolean = False); function GetItem(AIdx: Integer): PDisassemblerEntry; begin @@ -910,7 +949,7 @@ Line := 0; PrevItm := GetItem(Idx - 1); NextItm := GetItem(Idx); - while Line <= ALineCount do begin + while Line < ALineCount do begin PrevItm := Itm; Itm := NextItm; NextItm := GetItem(Idx+1); @@ -934,6 +973,7 @@ ALineMap[Line].State := lmsSource; ALineMap[Line].SourceLine := Itm^.SrcFileLine; ALineMap[Line].FileName := Itm^.SrcFileName; + ALineMap[Line].PasCode := GetSourceCodeLine(Itm^.SrcFileName, Itm^.SrcFileLine); end else begin ALineMap[Line].State := lmsFuncName; @@ -943,7 +983,7 @@ inc(Line); end else - if (Line = 0) // but it's not LineIsSrc + if (Line = 0) and (not ANoExtraHeader) // but it's not LineIsSrc and ( ( (Itm^.SrcFileName <> '') and (Itm^.SrcStatementIndex <> Itm^.SrcStatementCount-1) ) or ( (Itm^.SrcFileName = '') and (Itm^.FuncName <> '') and (NextItm <> nil) and (Itm^.Offset < NextItm^.Offset) ) ) @@ -958,6 +998,7 @@ if NextItm <> nil then ALineMap[Line].Statement := Format('(%d of %d)', [NextItm^.SrcStatementIndex, NextItm^.SrcStatementCount]) else ALineMap[Line].Statement := Format('(??? of %d)', [Itm^.SrcStatementCount]); + ALineMap[Line].PasCode := GetSourceCodeLine(Itm^.SrcFileName, Itm^.SrcFileLine); end else begin ALineMap[Line].State := lmsFuncName; @@ -976,7 +1017,7 @@ end; LineIsSrc := False; // only for topline - if Line > ALineCount + if Line >= ALineCount then break; ALineMap[Line].Addr := Itm^.Addr; diff -Nru lazarus-0.9.30/debugger/breakpointsdlg.pp lazarus-0.9.30.2/debugger/breakpointsdlg.pp --- lazarus-0.9.30/debugger/breakpointsdlg.pp 2010-12-17 01:46:36.000000000 +0000 +++ lazarus-0.9.30.2/debugger/breakpointsdlg.pp 2011-11-23 16:14:30.000000000 +0000 @@ -1,10 +1,10 @@ -{ $Id: breakpointsdlg.pp 28736 2010-12-17 01:46:36Z martin $ } +{ $Id$ } { ---------------------------------------------- breakpointsdlg.pp - Overview of breakpoints ---------------------------------------------- @created(Fri Dec 14st WET 2001) - @lastmod($Date: 2010-12-17 02:46:36 +0100 (Fri, 17 Dec 2010) $) + @lastmod($Date$) @author(Shane Miller) @author(Marc Weustink ) diff -Nru lazarus-0.9.30/debugger/callstackdlg.pp lazarus-0.9.30.2/debugger/callstackdlg.pp --- lazarus-0.9.30/debugger/callstackdlg.pp 2011-02-10 22:22:30.000000000 +0000 +++ lazarus-0.9.30.2/debugger/callstackdlg.pp 2011-11-23 16:14:30.000000000 +0000 @@ -1,10 +1,10 @@ -{ $Id: callstackdlg.pp 29456 2011-02-10 22:22:30Z vincents $ } +{ $Id$ } { ---------------------------------------------- callstackdlg.pp - Overview of the callstack ---------------------------------------------- @created(Sun Apr 28th WET 2002) - @lastmod($Date: 2011-02-10 23:22:30 +0100 (Thu, 10 Feb 2011) $) + @lastmod($Date$) @author(Marc Weustink ) This unit contains the Call Stack debugger dialog. diff -Nru lazarus-0.9.30/debugger/cmdlinedebugger.pp lazarus-0.9.30.2/debugger/cmdlinedebugger.pp --- lazarus-0.9.30/debugger/cmdlinedebugger.pp 2011-01-23 19:06:01.000000000 +0000 +++ lazarus-0.9.30.2/debugger/cmdlinedebugger.pp 2011-11-23 16:14:30.000000000 +0000 @@ -1,11 +1,11 @@ -{ $Id: cmdlinedebugger.pp 29178 2011-01-23 19:06:01Z vincents $ } +{ $Id$ } { ---------------------------------------------- CMDLineDebugger.pp - Debugger class for commandline debuggers ---------------------------------------------- @created(Wed Feb 28st WET 2001) - @lastmod($Date: 2011-01-23 20:06:01 +0100 (Sun, 23 Jan 2011) $) + @lastmod($Date$) @author(Marc Weustink ) This unit contains the Commandline debugger class for external commandline diff -Nru lazarus-0.9.30/debugger/debugeventsform.pp lazarus-0.9.30.2/debugger/debugeventsform.pp --- lazarus-0.9.30/debugger/debugeventsform.pp 2010-04-21 01:39:50.000000000 +0000 +++ lazarus-0.9.30.2/debugger/debugeventsform.pp 2011-11-23 16:14:30.000000000 +0000 @@ -1,10 +1,10 @@ -{ $Id: debugeventsform.pp 24775 2010-04-21 01:39:50Z paul $ } +{ $Id$ } { ------------------------------------------ debugeventsform.pp - Shows target output ------------------------------------------ @created(Wed Mar 1st 2010) - @lastmod($Date: 2010-04-21 03:39:50 +0200 (Wed, 21 Apr 2010) $) + @lastmod($Date$) @author Lazarus Project *************************************************************************** diff -Nru lazarus-0.9.30/debugger/debuggerdlg.pp lazarus-0.9.30.2/debugger/debuggerdlg.pp --- lazarus-0.9.30/debugger/debuggerdlg.pp 2010-12-04 18:40:30.000000000 +0000 +++ lazarus-0.9.30.2/debugger/debuggerdlg.pp 2011-11-23 16:14:30.000000000 +0000 @@ -1,11 +1,11 @@ -{ $Id: debuggerdlg.pp 28620 2010-12-04 18:40:30Z martin $ } +{ $Id$ } { ---------------------------------------- DebuggerDlg.pp - Base class for all debugger related forms ---------------------------------------- @created(Wed Mar 16st WET 2001) - @lastmod($Date: 2010-12-04 19:40:30 +0100 (Sat, 04 Dec 2010) $) + @lastmod($Date$) @author(Marc Weustink ) This unit contains the base class for all debugger related dialogs. @@ -94,6 +94,7 @@ if Assigned(OnProcessCommand) and (Command <> ecNone) then begin OnProcessCommand(Self,Command,Handled); + Key := 0; end; end; diff -Nru lazarus-0.9.30/debugger/debugger.pp lazarus-0.9.30.2/debugger/debugger.pp --- lazarus-0.9.30/debugger/debugger.pp 2011-02-10 22:22:30.000000000 +0000 +++ lazarus-0.9.30.2/debugger/debugger.pp 2011-11-23 16:14:30.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: debugger.pp 29456 2011-02-10 22:22:30Z vincents $ } +{ $Id$ } { ---------------------------------------- Debugger.pp - Debugger base classes ---------------------------------------- @@ -3570,7 +3570,7 @@ procedure TDBGWatch.SetSlave(const ASlave : TBaseWatch); begin - Assert(FSlave = nil, 'TDBGWatch.SetSlave already has a slave'); + Assert((FSlave = nil) or (ASlave = nil), 'TDBGWatch.SetSlave already has a slave'); FSlave := ASlave; end; @@ -3721,7 +3721,7 @@ procedure TIDEWatches.Update(Item: TCollectionItem); var - n, m: Integer; + n, m, c: Integer; Notification: TIDEWatchesNotification; begin // Note: Item will be nil in case all items need to be updated @@ -3732,8 +3732,16 @@ if Item = nil then begin - for m := 0 to Count - 1 do + m := 0; + c := Count; + while m < c do begin; Notification.FOnUpdate(Self, Items[m]); + if c <> Count then begin + m := Max(0, m - Max(0, Count - c)); + c := Count; + end; + inc(m); + end; end else begin Notification.FOnUpdate(Self, TIDEWatch(Item)); diff -Nru lazarus-0.9.30/debugger/debugoutputform.pp lazarus-0.9.30.2/debugger/debugoutputform.pp --- lazarus-0.9.30/debugger/debugoutputform.pp 2010-12-16 18:56:37.000000000 +0000 +++ lazarus-0.9.30.2/debugger/debugoutputform.pp 2011-11-23 16:14:30.000000000 +0000 @@ -1,10 +1,10 @@ -{ $Id: debugoutputform.pp 28730 2010-12-16 18:56:37Z martin $ } +{ $Id$ } { ------------------------------------------ debugoutputform.pp - Shows target output ------------------------------------------ @created(Wed Feb 25st WET 2001) - @lastmod($Date: 2010-12-16 19:56:37 +0100 (Thu, 16 Dec 2010) $) + @lastmod($Date$) @author(Marc Weustink ) *************************************************************************** diff -Nru lazarus-0.9.30/debugger/debugutils.pp lazarus-0.9.30.2/debugger/debugutils.pp --- lazarus-0.9.30/debugger/debugutils.pp 2011-01-23 19:06:01.000000000 +0000 +++ lazarus-0.9.30.2/debugger/debugutils.pp 2011-11-23 16:14:30.000000000 +0000 @@ -1,10 +1,10 @@ -{ $Id: debugutils.pp 29178 2011-01-23 19:06:01Z vincents $ } +{ $Id$ } { ------------------------------------------- dbgutils.pp - Debugger utility routines ------------------------------------------- @created(Sun Apr 28st WET 2002) - @lastmod($Date: 2011-01-23 20:06:01 +0100 (Sun, 23 Jan 2011) $) + @lastmod($Date$) @author(Marc Weustink ) This unit contains a collection of debugger support routines. diff -Nru lazarus-0.9.30/debugger/evaluatedlg.pp lazarus-0.9.30.2/debugger/evaluatedlg.pp --- lazarus-0.9.30/debugger/evaluatedlg.pp 2011-01-23 19:06:01.000000000 +0000 +++ lazarus-0.9.30.2/debugger/evaluatedlg.pp 2011-11-23 16:14:30.000000000 +0000 @@ -1,10 +1,10 @@ -{ $Id: evaluatedlg.pp 29178 2011-01-23 19:06:01Z vincents $ } +{ $Id$ } { ---------------------------------------------- evaluatedlg.pp - Evaluate and Modify ---------------------------------------------- @created(Mon Nov 22st WET 2004) - @lastmod($Date: 2011-01-23 20:06:01 +0100 (Sun, 23 Jan 2011) $) + @lastmod($Date$) @author(Marc Weustink ) This unit contains the evaluate and modify dialog. diff -Nru lazarus-0.9.30/debugger/fpdebug/dbgclasses.pp lazarus-0.9.30.2/debugger/fpdebug/dbgclasses.pp --- lazarus-0.9.30/debugger/fpdebug/dbgclasses.pp 2010-09-11 14:06:32.000000000 +0000 +++ lazarus-0.9.30.2/debugger/fpdebug/dbgclasses.pp 2011-11-23 16:14:30.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: dbgclasses.pp 27305 2010-09-11 14:06:32Z mattias $ } +{ $Id$ } { --------------------------------------------------------------------------- dbgclasses.pp - Native freepascal debugger @@ -9,7 +9,7 @@ --------------------------------------------------------------------------- @created(Mon Apr 10th WET 2006) - @lastmod($Date: 2010-09-11 16:06:32 +0200 (Sat, 11 Sep 2010) $) + @lastmod($Date$) @author(Marc Weustink ) *************************************************************************** diff -Nru lazarus-0.9.30/debugger/fpdebug/dbgdisasx86.pp lazarus-0.9.30.2/debugger/fpdebug/dbgdisasx86.pp --- lazarus-0.9.30/debugger/fpdebug/dbgdisasx86.pp 2010-09-11 14:05:21.000000000 +0000 +++ lazarus-0.9.30.2/debugger/fpdebug/dbgdisasx86.pp 2011-11-23 16:14:30.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: dbgdisasx86.pp 27304 2010-09-11 14:05:21Z mattias $ } +{ $Id$ } { --------------------------------------------------------------------------- dbgdisasx86.pp - Native Freepascal debugger - x86 Disassembler @@ -9,7 +9,7 @@ --------------------------------------------------------------------------- @created(Mon Apr 22th WET 2006) - @lastmod($Date: 2010-09-11 16:05:21 +0200 (Sat, 11 Sep 2010) $) + @lastmod($Date$) @author(Marc Weustink ) *************************************************************************** diff -Nru lazarus-0.9.30/debugger/fpdebug/dbgdwarfconst.pas lazarus-0.9.30.2/debugger/fpdebug/dbgdwarfconst.pas --- lazarus-0.9.30/debugger/fpdebug/dbgdwarfconst.pas 2009-01-16 00:26:10.000000000 +0000 +++ lazarus-0.9.30.2/debugger/fpdebug/dbgdwarfconst.pas 2011-11-23 16:14:30.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: dbgdwarfconst.pas 18302 2009-01-16 00:26:10Z marc $ } +{ $Id$ } { --------------------------------------------------------------------------- dbgdwarfconst.pas - Freepascal debugger - Dwarf constants @@ -9,7 +9,7 @@ --------------------------------------------------------------------------- @created(Fri Jul 7th WET 2006) - @lastmod($Date: 2009-01-16 01:26:10 +0100 (Fri, 16 Jan 2009) $) + @lastmod($Date$) @author(Marc Weustink ) ***************************************************************************** diff -Nru lazarus-0.9.30/debugger/fpdebug/dbgdwarf.pas lazarus-0.9.30.2/debugger/fpdebug/dbgdwarf.pas --- lazarus-0.9.30/debugger/fpdebug/dbgdwarf.pas 2010-09-11 14:06:32.000000000 +0000 +++ lazarus-0.9.30.2/debugger/fpdebug/dbgdwarf.pas 2011-11-23 16:14:30.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: dbgdwarf.pas 27305 2010-09-11 14:06:32Z mattias $ } +{ $Id$ } { --------------------------------------------------------------------------- dbgdwarf.pas - Native Freepascal debugger - Dwarf symbol reader @@ -10,7 +10,7 @@ --------------------------------------------------------------------------- @created(Mon Aug 1st WET 2006) - @lastmod($Date: 2010-09-11 16:06:32 +0200 (Sat, 11 Sep 2010) $) + @lastmod($Date$) @author(Marc Weustink ) *************************************************************************** diff -Nru lazarus-0.9.30/debugger/fpdebug/dbgloader.pp lazarus-0.9.30.2/debugger/fpdebug/dbgloader.pp --- lazarus-0.9.30/debugger/fpdebug/dbgloader.pp 2009-01-16 00:26:10.000000000 +0000 +++ lazarus-0.9.30.2/debugger/fpdebug/dbgloader.pp 2011-11-23 16:14:30.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: dbgloader.pp 18302 2009-01-16 00:26:10Z marc $ } +{ $Id$ } { --------------------------------------------------------------------------- dbgloader.pp - Native Freepascal debugger - Section loader @@ -9,7 +9,7 @@ --------------------------------------------------------------------------- @created(Mon Aug 1st WET 2006) - @lastmod($Date: 2009-01-16 01:26:10 +0100 (Fri, 16 Jan 2009) $) + @lastmod($Date$) @author(Marc Weustink ) *************************************************************************** diff -Nru lazarus-0.9.30/debugger/fpdebug/dbgpetypes.pp lazarus-0.9.30.2/debugger/fpdebug/dbgpetypes.pp --- lazarus-0.9.30/debugger/fpdebug/dbgpetypes.pp 2009-01-16 00:26:10.000000000 +0000 +++ lazarus-0.9.30.2/debugger/fpdebug/dbgpetypes.pp 2011-11-23 16:14:30.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: dbgpetypes.pp 18302 2009-01-16 00:26:10Z marc $ } +{ $Id$ } { --------------------------------------------------------------------------- dbgpetypes.pp - Freepascal debugger - PE types @@ -10,7 +10,7 @@ --------------------------------------------------------------------------- @created(Thu May 4th WET 2006) - @lastmod($Date: 2009-01-16 01:26:10 +0100 (Fri, 16 Jan 2009) $) + @lastmod($Date$) @author(Marc Weustink ) ***************************************************************************** diff -Nru lazarus-0.9.30/debugger/fpdebug/dbgsymbols.pas lazarus-0.9.30.2/debugger/fpdebug/dbgsymbols.pas --- lazarus-0.9.30/debugger/fpdebug/dbgsymbols.pas 2009-01-16 00:26:10.000000000 +0000 +++ lazarus-0.9.30.2/debugger/fpdebug/dbgsymbols.pas 2011-11-23 16:14:30.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: dbgsymbols.pas 18302 2009-01-16 00:26:10Z marc $ } +{ $Id$ } { --------------------------------------------------------------------------- dbgsymbols.pas - Native freepascal debugger - Symbol loader/resolver @@ -9,7 +9,7 @@ --------------------------------------------------------------------------- @created(Sat Jun 24th WET 2006) - @lastmod($Date: 2009-01-16 01:26:10 +0100 (Fri, 16 Jan 2009) $) + @lastmod($Date$) @author(Marc Weustink ) *************************************************************************** diff -Nru lazarus-0.9.30/debugger/fpdebug/dbgutil.pp lazarus-0.9.30.2/debugger/fpdebug/dbgutil.pp --- lazarus-0.9.30/debugger/fpdebug/dbgutil.pp 2009-01-16 00:26:10.000000000 +0000 +++ lazarus-0.9.30.2/debugger/fpdebug/dbgutil.pp 2011-11-23 16:14:30.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: dbgutil.pp 18302 2009-01-16 00:26:10Z marc $ } +{ $Id$ } { --------------------------------------------------------------------------- dbgutil.pp - Native freepascal debugger - Utilities @@ -9,7 +9,7 @@ --------------------------------------------------------------------------- @created(Mon Apr 10th WET 2006) - @lastmod($Date: 2009-01-16 01:26:10 +0100 (Fri, 16 Jan 2009) $) + @lastmod($Date$) @author(Marc Weustink ) *************************************************************************** diff -Nru lazarus-0.9.30/debugger/fpdebug/dbgwinextra.pp lazarus-0.9.30.2/debugger/fpdebug/dbgwinextra.pp --- lazarus-0.9.30/debugger/fpdebug/dbgwinextra.pp 2009-01-16 00:26:10.000000000 +0000 +++ lazarus-0.9.30.2/debugger/fpdebug/dbgwinextra.pp 2011-11-23 16:14:30.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: dbgwinextra.pp 18302 2009-01-16 00:26:10Z marc $ } +{ $Id$ } { --------------------------------------------------------------------------- dbgwinextra.pp - Native Freepascal debugger - Extra windows utilities @@ -9,7 +9,7 @@ --------------------------------------------------------------------------- @created(Mon Apr 10th WET 2006) - @lastmod($Date: 2009-01-16 01:26:10 +0100 (Fri, 16 Jan 2009) $) + @lastmod($Date$) @author(Marc Weustink ) *************************************************************************** diff -Nru lazarus-0.9.30/debugger/fpdebug/fpd/fpdcommand.pas lazarus-0.9.30.2/debugger/fpdebug/fpd/fpdcommand.pas --- lazarus-0.9.30/debugger/fpdebug/fpd/fpdcommand.pas 2009-01-16 00:26:10.000000000 +0000 +++ lazarus-0.9.30.2/debugger/fpdebug/fpd/fpdcommand.pas 2011-11-23 16:14:30.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: fpdcommand.pas 18302 2009-01-16 00:26:10Z marc $ } +{ $Id$ } { --------------------------------------------------------------------------- fpdcommand.pas - FP standalone debugger - Command interpreter @@ -9,7 +9,7 @@ --------------------------------------------------------------------------- @created(Mon Apr 10th WET 2006) - @lastmod($Date: 2009-01-16 01:26:10 +0100 (Fri, 16 Jan 2009) $) + @lastmod($Date$) @author(Marc Weustink ) *************************************************************************** diff -Nru lazarus-0.9.30/debugger/fpdebug/fpd/fpdglobal.pas lazarus-0.9.30.2/debugger/fpdebug/fpd/fpdglobal.pas --- lazarus-0.9.30/debugger/fpdebug/fpd/fpdglobal.pas 2009-01-16 00:26:10.000000000 +0000 +++ lazarus-0.9.30.2/debugger/fpdebug/fpd/fpdglobal.pas 2011-11-23 16:14:30.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: fpdglobal.pas 18302 2009-01-16 00:26:10Z marc $ } +{ $Id$ } { --------------------------------------------------------------------------- fpdglobal.pas - FP standalone debugger - Globals @@ -9,7 +9,7 @@ --------------------------------------------------------------------------- @created(Mon Apr 10th WET 2006) - @lastmod($Date: 2009-01-16 01:26:10 +0100 (Fri, 16 Jan 2009) $) + @lastmod($Date$) @author(Marc Weustink ) *************************************************************************** diff -Nru lazarus-0.9.30/debugger/fpdebug/fpd/fpdloop.pas lazarus-0.9.30.2/debugger/fpdebug/fpd/fpdloop.pas --- lazarus-0.9.30/debugger/fpdebug/fpd/fpdloop.pas 2009-01-16 00:26:10.000000000 +0000 +++ lazarus-0.9.30.2/debugger/fpdebug/fpd/fpdloop.pas 2011-11-23 16:14:30.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: fpdloop.pas 18302 2009-01-16 00:26:10Z marc $ } +{ $Id$ } { --------------------------------------------------------------------------- fpdloop.pas - FP standalone debugger - Debugger main loop @@ -10,7 +10,7 @@ --------------------------------------------------------------------------- @created(Mon Apr 10th WET 2006) - @lastmod($Date: 2009-01-16 01:26:10 +0100 (Fri, 16 Jan 2009) $) + @lastmod($Date$) @author(Marc Weustink ) *************************************************************************** diff -Nru lazarus-0.9.30/debugger/fpdebug/fpd/fpd.lpr lazarus-0.9.30.2/debugger/fpdebug/fpd/fpd.lpr --- lazarus-0.9.30/debugger/fpdebug/fpd/fpd.lpr 2009-01-16 00:26:10.000000000 +0000 +++ lazarus-0.9.30.2/debugger/fpdebug/fpd/fpd.lpr 2011-11-23 16:14:30.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: fpd.lpr 18302 2009-01-16 00:26:10Z marc $ } +{ $Id$ } { --------------------------------------------------------------------------- fpd - FP standalone windows debugger @@ -11,7 +11,7 @@ --------------------------------------------------------------------------- @created(Mon Apr 10th WET 2006) - @lastmod($Date: 2009-01-16 01:26:10 +0100 (Fri, 16 Jan 2009) $) + @lastmod($Date$) @author(Marc Weustink ) *************************************************************************** diff -Nru lazarus-0.9.30/debugger/fpdebug/fpd/fpdpeimage.pas lazarus-0.9.30.2/debugger/fpdebug/fpd/fpdpeimage.pas --- lazarus-0.9.30/debugger/fpdebug/fpd/fpdpeimage.pas 2011-02-10 22:22:30.000000000 +0000 +++ lazarus-0.9.30.2/debugger/fpdebug/fpd/fpdpeimage.pas 2011-11-23 16:14:30.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: fpdpeimage.pas 29456 2011-02-10 22:22:30Z vincents $ } +{ $Id$ } { --------------------------------------------------------------------------- fpdpeimage.pas - FP standalone debugger - PE Image @@ -10,7 +10,7 @@ --------------------------------------------------------------------------- @created(Mon Apr 10th WET 2006) - @lastmod($Date: 2011-02-10 23:22:30 +0100 (Thu, 10 Feb 2011) $) + @lastmod($Date$) @author(Marc Weustink ) *************************************************************************** diff -Nru lazarus-0.9.30/debugger/fpdebug/fpd/fpdtype.pas lazarus-0.9.30.2/debugger/fpdebug/fpd/fpdtype.pas --- lazarus-0.9.30/debugger/fpdebug/fpd/fpdtype.pas 2009-01-16 00:26:10.000000000 +0000 +++ lazarus-0.9.30.2/debugger/fpdebug/fpd/fpdtype.pas 2011-11-23 16:14:30.000000000 +0000 @@ -10,7 +10,7 @@ --------------------------------------------------------------------------- @created(Mon Apr 10th WET 2006) - @lastmod($Date: 2009-01-16 01:26:10 +0100 (Fri, 16 Jan 2009) $) + @lastmod($Date$) @author(Marc Weustink ) ***************************************************************************** diff -Nru lazarus-0.9.30/debugger/fpdebug/fpdd/fpdumpdwarf.lpr lazarus-0.9.30.2/debugger/fpdebug/fpdd/fpdumpdwarf.lpr --- lazarus-0.9.30/debugger/fpdebug/fpdd/fpdumpdwarf.lpr 2007-02-07 23:14:30.000000000 +0000 +++ lazarus-0.9.30.2/debugger/fpdebug/fpdd/fpdumpdwarf.lpr 2011-11-23 16:14:30.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: fpdumpdwarf.lpr 10608 2007-02-07 23:14:30Z marc $ } +{ $Id$ } { --------------------------------------------------------------------------- fpdumpdwarf - DWARF debug dump @@ -9,7 +9,7 @@ --------------------------------------------------------------------------- @created(Sat Jul 1th WET 2006) - @lastmod($Date: 2007-02-08 00:14:30 +0100 (Thu, 08 Feb 2007) $) + @lastmod($Date$) @author(Marc Weustink ) *************************************************************************** diff -Nru lazarus-0.9.30/debugger/gdbmidebugger.pp lazarus-0.9.30.2/debugger/gdbmidebugger.pp --- lazarus-0.9.30/debugger/gdbmidebugger.pp 2011-02-10 22:22:30.000000000 +0000 +++ lazarus-0.9.30.2/debugger/gdbmidebugger.pp 2011-11-23 16:14:30.000000000 +0000 @@ -1,10 +1,10 @@ -{ $Id: gdbmidebugger.pp 29456 2011-02-10 22:22:30Z vincents $ } +{ $Id$ } { ---------------------------------------------- GDBDebugger.pp - Debugger class forGDB ---------------------------------------------- @created(Wed Feb 23rd WET 2002) - @lastmod($Date: 2011-02-10 23:22:30 +0100 (Thu, 10 Feb 2011) $) + @lastmod($Date$) @author(Marc Weustink ) This unit contains debugger class for the GDB/MI debugger. @@ -86,11 +86,20 @@ TGDBMICallback = procedure(const AResult: TGDBMIExecResult; const ATag: PtrInt) of object; TGDBMIPauseWaitState = (pwsNone, pwsInternal, pwsExternal); - TGDBMITargetFlags = set of ( + TGDBMITargetFlag = ( tfHasSymbols, // Debug symbols are present tfRTLUsesRegCall, // the RTL is compiled with RegCall calling convention - tfClassIsPointer // with dwarf class names are pointer. with stabs they are not + tfClassIsPointer, // with dwarf class names are pointer. with stabs they are not + tfExceptionIsPointer, // Can happen, if stabs and dwarf are mixed + tfFlagHasTypeObject, + tfFlagHasTypeException, + tfFlagHasTypeShortstring, + //tfFlagHasTypePShortString, + tfFlagHasTypePointer, + tfFlagHasTypeByte + //tfFlagHasTypeChar ); + TGDBMITargetFlags = set of TGDBMITargetFlag; TGDBMIDebuggerFlags = set of ( dfImplicidTypes, // Debugger supports implicit types (^Type) @@ -227,6 +236,8 @@ function GetStrValue(const AExpression: String; const AValues: array of const): String; function GetIntValue(const AExpression: String; const AValues: array of const): Integer; function GetPtrValue(const AExpression: String; const AValues: array of const; ConvertNegative: Boolean = False): TDbgPtr; + function CheckHasType(TypeName: String; TypeFlag: TGDBMITargetFlag): TGDBMIExecResult; + function PointerTypeCast: string; procedure ProcessFrame(const AFrame: String = ''); procedure DoDbgEvent(const ACategory: TDBGEventCategory; const AText: String); property TargetInfo: PGDBMITargetInfo read GetTargetInfo; @@ -825,16 +836,20 @@ FDisplayFormat: TWatchDisplayFormat; FTextValue: String; FTypeInfo: TGDBType; + FTypeInfoAutoDestroy: Boolean; + function GetTypeInfo: TGDBType; protected function DoExecute: Boolean; override; public constructor Create(AOwner: TGDBMIDebugger; const AExpression: String; const ADisplayFormat: TWatchDisplayFormat); + destructor Destroy; override; function DebugText: String; override; property Expression: String read FExpression; property DisplayFormat: TWatchDisplayFormat read FDisplayFormat; property TextValue: String read FTextValue; - property TypeInfo: TGDBType read FTypeInfo; + property TypeInfo: TGDBType read GetTypeInfo; + property TypeInfoAutoDestroy: Boolean read FTypeInfoAutoDestroy write FTypeInfoAutoDestroy; end; { TGDBMIWatch } @@ -1896,9 +1911,12 @@ var DisAssList: TGDBMIDisassembleResultList; DisAssItm: PDisassemblerEntry; + s: TDBGPtr; begin Result := False; - DisAssList := ExecDisassmble(AStartAddr.GuessedValue -1, AStartAddr.GuessedValue, False); + // TODO: maybe try "info symbol + s := (AStartAddr.GuessedValue -1) div 4 * 4; // 4 byte boundary + DisAssList := ExecDisassmble(s, s+1, False); if DisAssList.Count > 0 then begin DisAssItm := DisAssList.Item[0]; if (DisAssItm^.FuncName <> '') and (DisAssItm^.Addr <> 0) and (DisAssItm^.Offset >= 0) @@ -2024,7 +2042,7 @@ end; procedure AddMemDumpToRange(const ARange: TDBGDisassemblerEntryRange; - AMemDump: TGDBMIMemoryDumpResultList; AFirstAddr, ALastAddr: Integer); + AMemDump: TGDBMIMemoryDumpResultList; AFirstAddr, ALastAddr: TDBGPtr); var i, Cnt, FromIndex: Integer; Itm, NextItm: PDisassemblerEntry; @@ -2774,10 +2792,11 @@ procedure SetTargetInfo(const AFileType: String); var - FoundPtrSize: Boolean; + FoundPtrSize, UseWin64ABI: Boolean; begin + UseWin64ABI := False; // assume some defaults - TargetInfo^.TargetPtrSize := GetIntValue('sizeof(POINTER)', []); + TargetInfo^.TargetPtrSize := GetIntValue('sizeof(%s)', [PointerTypeCast]); FoundPtrSize := (FLastExecResult.State <> dsError) and (TargetInfo^.TargetPtrSize > 0); if not FoundPtrSize then TargetInfo^.TargetPtrSize := 4; @@ -2794,13 +2813,17 @@ 0..3: TargetInfo^.TargetCPU := 'x86'; 4: TargetInfo^.TargetCPU := 'x86_64'; //TODO: should we check, PtrSize must be 8, but what if not? 5: begin + TargetInfo^.TargetCPU := 'x86_64'; //TODO: should we check, PtrSize must be 8, but what if not? + UseWin64ABI := True; + end; + 6: begin //mach-o-be TargetInfo^.TargetIsBE := True; if FTheDebugger.FGDBCPU <> '' then TargetInfo^.TargetCPU := FTheDebugger.FGDBCPU else TargetInfo^.TargetCPU := 'powerpc'; // guess end; - 6: begin + 7: begin //mach-o-le if FoundPtrSize then begin if FTheDebugger.FGDBPtrSize = TargetInfo^.TargetPtrSize @@ -2818,10 +2841,10 @@ else TargetInfo^.TargetCPU := 'x86'; // guess end; end; - 7: begin + 8: begin TargetInfo^.TargetCPU := 'arm'; end; - 8: begin + 9: begin TargetInfo^.TargetIsBE := True; TargetInfo^.TargetCPU := 'arm'; end; @@ -2853,7 +2876,13 @@ TargetInfo^.TargetRegisters[1] := '$edx'; TargetInfo^.TargetRegisters[2] := '$ecx'; end - else begin + else if UseWin64ABI + then begin + TargetInfo^.TargetRegisters[0] := '$rcx'; + TargetInfo^.TargetRegisters[1] := '$rdx'; + TargetInfo^.TargetRegisters[2] := '$r8'; + end else + begin TargetInfo^.TargetRegisters[0] := '$rdi'; TargetInfo^.TargetRegisters[1] := '$rsi'; TargetInfo^.TargetRegisters[2] := '$rdx'; @@ -2977,11 +3006,23 @@ end; // check whether we need class cast dereference - if ExecuteCommand('ptype TObject', R) + R := CheckHasType('TObject', tfFlagHasTypeObject); + if R.State <> dsError then begin - if (LeftStr(R.Values, 15) = 'type = ^TOBJECT') + if UpperCase(LeftStr(R.Values, 15)) = UpperCase('type = ^TOBJECT') then include(TargetInfo^.TargetFlags, tfClassIsPointer); end; + R := CheckHasType('Exception', tfFlagHasTypeException); + if R.State <> dsError + then begin + if UpperCase(LeftStr(R.Values, 17)) = UpperCase('type = ^EXCEPTION') + then include(TargetInfo^.TargetFlags, tfExceptionIsPointer); + end; + CheckHasType('Shortstring', tfFlagHasTypeShortstring); + //CheckHasType('PShortstring', tfFlagHasTypePShortString); + CheckHasType('pointer', tfFlagHasTypePointer); + CheckHasType('byte', tfFlagHasTypeByte); + //CheckHasType('char', tfFlagHasTypeChar); // try Insert Break breakpoint // we might have rtl symbols @@ -3113,8 +3154,7 @@ if DebuggerState = dsPause then ProcessFrame; finally - if assigned(FContinueCommand) - then FContinueCommand.Free; + FreeAndNil(FContinueCommand); end; FSuccess := True; @@ -3258,33 +3298,43 @@ R: TGDBMIExecResult; S: String; begin - Result.SrcLine := -1; - Result.SrcFile := ''; - Result.FuncName := ''; - if tfRTLUsesRegCall in TargetInfo^.TargetFlags - then Result.Address := GetPtrValue(TargetInfo^.TargetRegisters[1], []) - else Result.Address := GetData('$fp+%d', [TargetInfo^.TargetPtrSize * 3]); + FTheDebugger.QueueExecuteLock; + try + Result.SrcLine := -1; + Result.SrcFile := ''; + Result.FuncName := ''; + if tfRTLUsesRegCall in TargetInfo^.TargetFlags + then Result.Address := GetPtrValue(TargetInfo^.TargetRegisters[1], []) + else Result.Address := GetData('$fp+%d', [TargetInfo^.TargetPtrSize * 3]); - Str(Result.Address, S); - if ExecuteCommand('info line * POINTER(%s)', [S], R) - then begin - Result.SrcLine := StrToIntDef(GetPart('Line ', ' of', R.Values), -1); - Result.SrcFile := ConvertGdbPathAndFile(GetPart('\"', '\"', R.Values)); + Str(Result.Address, S); + if ExecuteCommand('info line * POINTER(%s)', [S], R) + then begin + Result.SrcLine := StrToIntDef(GetPart('Line ', ' of', R.Values), -1); + Result.SrcFile := ConvertGdbPathAndFile(GetPart('\"', '\"', R.Values)); + end; + finally + FTheDebugger.QueueExecuteUnlock; end; end; function GetExceptionInfo: TGDBMIExceptionInfo; begin - if tfRTLUsesRegCall in TargetInfo^.TargetFlags - then Result.ObjAddr := TargetInfo^.TargetRegisters[0] - else begin - if dfImplicidTypes in FTheDebugger.DebuggerFlags - then Result.ObjAddr := Format('^POINTER($fp+%d)^', [TargetInfo^.TargetPtrSize * 2]) - else Str(GetData('$fp+%d', [TargetInfo^.TargetPtrSize * 2]), Result.ObjAddr); - end; - Result.Name := GetInstanceClassName(Result.ObjAddr, []); - if Result.Name = '' - then Result.Name := 'Unknown'; + FTheDebugger.QueueExecuteLock; + try + if tfRTLUsesRegCall in TargetInfo^.TargetFlags + then Result.ObjAddr := TargetInfo^.TargetRegisters[0] + else begin + if dfImplicidTypes in FTheDebugger.DebuggerFlags + then Result.ObjAddr := Format('^%s($fp+%d)^', [PointerTypeCast, TargetInfo^.TargetPtrSize * 2]) + else Str(GetData('$fp+%d', [TargetInfo^.TargetPtrSize * 2]), Result.ObjAddr); + end; + Result.Name := GetInstanceClassName(Result.ObjAddr, []); + if Result.Name = '' + then Result.Name := 'Unknown'; + finally + FTheDebugger.QueueExecuteUnlock; + end; end; procedure ProcessException(AInfo: TGDBMIExceptionInfo); @@ -3292,14 +3342,24 @@ ExceptionMessage: String; CanContinue: Boolean; begin - if dfImplicidTypes in FTheDebugger.DebuggerFlags - then begin - if tfClassIsPointer in TargetInfo^.TargetFlags - then ExceptionMessage := GetText('Exception(%s).FMessage', [AInfo.ObjAddr]) - else ExceptionMessage := GetText('^Exception(%s)^.FMessage', [AInfo.ObjAddr]); - //ExceptionMessage := GetText('^^Exception($fp+8)^^.FMessage', []); - end - else ExceptionMessage := '### Not supported on GDB < 5.3 ###'; + FTheDebugger.QueueExecuteLock; + try + if (dfImplicidTypes in FTheDebugger.DebuggerFlags) + then begin + if (tfFlagHasTypeException in TargetInfo^.TargetFlags) then begin + if tfExceptionIsPointer in TargetInfo^.TargetFlags + then ExceptionMessage := GetText('Exception(%s).FMessage', [AInfo.ObjAddr]) + else ExceptionMessage := GetText('^Exception(%s)^.FMessage', [AInfo.ObjAddr]); + //ExceptionMessage := GetText('^^Exception($fp+8)^^.FMessage', []); + end else begin + // Only works if Exception class is not changed. FMessage must be first member + ExceptionMessage := GetText('^^char(^%s(%s)+1)^', [PointerTypeCast, AInfo.ObjAddr]); + end; + end + else ExceptionMessage := '### Not supported on GDB < 5.3 ###'; + finally + FTheDebugger.QueueExecuteUnlock; + end; FTheDebugger.DoException(deInternal, AInfo.Name, ExceptionMessage, CanContinue); if CanContinue @@ -3316,10 +3376,15 @@ ErrorNo: Integer; CanContinue: Boolean; begin - if tfRTLUsesRegCall in TargetInfo^.TargetFlags - then ErrorNo := GetIntValue(TargetInfo^.TargetRegisters[0], []) - else ErrorNo := Integer(GetData('$fp+%d', [TargetInfo^.TargetPtrSize * 2])); - ErrorNo := ErrorNo and $FFFF; + FTheDebugger.QueueExecuteLock; + try + if tfRTLUsesRegCall in TargetInfo^.TargetFlags + then ErrorNo := GetIntValue(TargetInfo^.TargetRegisters[0], []) + else ErrorNo := Integer(GetData('$fp+%d', [TargetInfo^.TargetPtrSize * 2])); + ErrorNo := ErrorNo and $FFFF; + finally + FTheDebugger.QueueExecuteUnlock; + end; FTheDebugger.DoException(deRunError, Format('RunError(%d)', [ErrorNo]), '', CanContinue); if CanContinue @@ -3336,10 +3401,15 @@ ErrorNo: Integer; CanContinue: Boolean; begin - if tfRTLUsesRegCall in TargetInfo^.TargetFlags - then ErrorNo := GetIntValue(TargetInfo^.TargetRegisters[0], []) - else ErrorNo := Integer(GetData('$fp+%d', [TargetInfo^.TargetPtrSize * 2])); - ErrorNo := ErrorNo and $FFFF; + FTheDebugger.QueueExecuteLock; + try + if tfRTLUsesRegCall in TargetInfo^.TargetFlags + then ErrorNo := GetIntValue(TargetInfo^.TargetRegisters[0], []) + else ErrorNo := Integer(GetData('$fp+%d', [TargetInfo^.TargetPtrSize * 2])); + ErrorNo := ErrorNo and $FFFF; + finally + FTheDebugger.QueueExecuteUnlock; + end; FTheDebugger.DoException(deRunError, Format('RunError(%d)', [ErrorNo]), '', CanContinue); if CanContinue @@ -3355,6 +3425,7 @@ var SigInt, CanContinue: Boolean; S, F: String; + fixed: Boolean; begin // TODO: check to run (un)handled @@ -3369,8 +3440,14 @@ or not SigInt then begin {$IFdef MSWindows} + FTheDebugger.QueueExecuteLock; + try + fixed := FixThreadForSigTrap; + finally + FTheDebugger.QueueExecuteUnlock; + end; // Before anything else goes => correct the thred - if FixThreadForSigTrap + if fixed then F := ''; {$ENDIF} SetDebuggerState(dsPause); @@ -3379,9 +3456,14 @@ if not SigInt then FTheDebugger.DoException(deExternal, 'External: ' + S, '', CanContinue); - if not AIgnoreSigIntState - or not SigInt - then ProcessFrame(F); + FTheDebugger.QueueExecuteLock; + try + if not AIgnoreSigIntState + or not SigInt + then ProcessFrame(F); + finally + FTheDebugger.QueueExecuteUnlock; + end; end; var @@ -3392,6 +3474,9 @@ CanContinue: Boolean; ExceptionInfo: TGDBMIExceptionInfo; begin + (* The Queue is not locked / This code can be interupted + Therefore all calls to ExecuteCommand (gdb cmd) must be wrapped in QueueExecuteLock + *) Result := False; FTheDebugger.FCurrentStackFrame := 0; @@ -6020,7 +6105,7 @@ SetBreakpoint; end; dsStop: begin - if AOldState = dsRun + if FBreakID > 0 then ReleaseBreakpoint; end; end; @@ -6172,7 +6257,7 @@ if (Source = ASource) and (Line = ALine) then exit; inherited; if (Debugger = nil) or (Source = '') then Exit; - if TGDBMIDebugger(Debugger).State in [dsStop, dsPause, dsRun] + if TGDBMIDebugger(Debugger).State in [dsPause, dsRun] then SetBreakpoint; end; @@ -6239,7 +6324,7 @@ TGDBMIDebuggerCommandBreakUpdate(FCurrentCmd).UpdateEnabled := True; TGDBMIDebuggerCommandBreakUpdate(FCurrentCmd).Enabled := Enabled; end; - if bufCondition in FUpdateFlags + if bufCondition in AFlags then begin TGDBMIDebuggerCommandBreakUpdate(FCurrentCmd).UpdateExpression := True; TGDBMIDebuggerCommandBreakUpdate(FCurrentCmd).Expression := FParsedExpression; @@ -8428,7 +8513,7 @@ CurLocation := CurLocation + 2; end; until (OneChar = #0); - Result := UTF8Encode(WStr); + Result := UTF16ToUTF8(WStr); end; function TGDBMIDebuggerCommand.GetGDBTypeInfo(const AExpression: String): TGDBType; @@ -8541,8 +8626,11 @@ if dfImplicidTypes in FTheDebugger.DebuggerFlags then begin S := Format(AExpression, AValues); - OK := ExecuteCommand('-data-evaluate-expression ^^shortstring(%s+%d)^^', - [S, TargetInfo^.TargetPtrSize * 3], R); + if tfFlagHasTypeShortstring in TargetInfo^.TargetFlags + then s := Format('^^shortstring(%s+%d)^^', [S, TargetInfo^.TargetPtrSize * 3]) + else s := Format('^^char(%s+%d)^+1', [S, TargetInfo^.TargetPtrSize * 3]); + OK := ExecuteCommand('-data-evaluate-expression %s', + [S], R); if (not OK) or (LastExecResult.State = dsError) then OK := ExecuteCommand('-data-evaluate-expression ^char(^pointer(%s+%d)^+1)', [S, TargetInfo^.TargetPtrSize * 3], R); @@ -8574,7 +8662,7 @@ begin if dfImplicidTypes in FTheDebugger.DebuggerFlags then begin - Result := GetClassName('^POINTER(' + AExpression + ')^', AValues); + Result := GetClassName('^' + PointerTypeCast + '(' + AExpression + ')^', AValues); end else begin Result := GetClassName(GetData(AExpression, AValues)); @@ -8644,6 +8732,27 @@ if e=0 then ; end; +function TGDBMIDebuggerCommand.CheckHasType(TypeName: String; + TypeFlag: TGDBMITargetFlag): TGDBMIExecResult; +begin + if not ExecuteCommand('ptype '+TypeName, Result) then begin + Result.State := dsError; + exit; + end; + if (LeftStr(Result.Values, 6) = 'type =') then + include(TargetInfo^.TargetFlags, TypeFlag); +end; + +function TGDBMIDebuggerCommand.PointerTypeCast: string; +begin + if tfFlagHasTypePointer in TargetInfo^.TargetFlags + then Result := 'POINTER' + // TODO: check dfImplicidTypes support? + else if tfFlagHasTypeByte in TargetInfo^.TargetFlags + then Result := '^byte' + else Result := '^char'; +end; + procedure TGDBMIDebuggerCommand.ProcessFrame(const AFrame: String); var S: String; @@ -8808,6 +8917,12 @@ { TGDBMIDebuggerCommandEvaluate } +function TGDBMIDebuggerCommandEvaluate.GetTypeInfo: TGDBType; +begin + Result := FTypeInfo; + FTypeInfoAutoDestroy := False; +end; + function TGDBMIDebuggerCommandEvaluate.DoExecute: Boolean; function MakePrintable(const AString: String): String; @@ -9442,7 +9557,8 @@ AnExpression := Lowercase(ResultInfo.TypeName); case StringCase(AnExpression, ['char', 'character', 'ansistring', '__vtbl_ptr_type', - 'wchar', 'widechar', 'pointer']) + 'wchar', 'widechar', 'widestring', 'unicodestring', + 'pointer']) of 0, 1, 2: begin // 'char', 'character', 'ansistring' // check for addr 'text' / 0x1234 'abc' @@ -9468,14 +9584,14 @@ FTextValue := 'class of ' + AnExpression + ' ' + FTextValue; end; end; - 4,5: begin // 'wchar', 'widechar' + 4,5,6,7: begin // 'wchar', 'widechar' // widestring handling if Addr = 0 then FTextValue := '''''' else FTextValue := MakePrintable(GetWideText(Addr)); PrintableString := FTextValue; end; - 6: begin // pointer + 8: begin // pointer if Addr = 0 then FTextValue := 'nil'; FTextValue := PascalizePointer(FTextValue); @@ -9837,6 +9953,14 @@ FDisplayFormat := ADisplayFormat; FTextValue := ''; FTypeInfo:=nil; + FTypeInfoAutoDestroy := True; +end; + +destructor TGDBMIDebuggerCommandEvaluate.Destroy; +begin + if FTypeInfoAutoDestroy + then FreeAndNil(FTypeInfo); + inherited Destroy; end; function TGDBMIDebuggerCommandEvaluate.DebugText: String; diff -Nru lazarus-0.9.30/debugger/gdbtypeinfo.pp lazarus-0.9.30.2/debugger/gdbtypeinfo.pp --- lazarus-0.9.30/debugger/gdbtypeinfo.pp 2011-01-23 19:06:01.000000000 +0000 +++ lazarus-0.9.30.2/debugger/gdbtypeinfo.pp 2011-11-23 16:14:30.000000000 +0000 @@ -1,10 +1,10 @@ -{ $Id: gdbtypeinfo.pp 29178 2011-01-23 19:06:01Z vincents $ } +{ $Id$ } { ---------------------------------------------- GDBTypeInfo.pp - Debugger helper class ---------------------------------------------- @created(Wed Mar 29th WET 2003) - @lastmod($Date: 2011-01-23 20:06:01 +0100 (Sun, 23 Jan 2011) $) + @lastmod($Date$) @author(Marc Weustink ) This unit contains a helper class for decoding PType output. diff -Nru lazarus-0.9.30/debugger/localsdlg.pp lazarus-0.9.30.2/debugger/localsdlg.pp --- lazarus-0.9.30/debugger/localsdlg.pp 2010-01-15 02:41:46.000000000 +0000 +++ lazarus-0.9.30.2/debugger/localsdlg.pp 2011-11-23 16:14:30.000000000 +0000 @@ -1,10 +1,10 @@ -{ $Id: localsdlg.pp 23459 2010-01-15 02:41:46Z paul $ } +{ $Id$ } { ---------------------------------------------- localsdlg.pp - Overview of local variables ---------------------------------------------- @created(Thu Mar 14st WET 2002) - @lastmod($Date: 2010-01-15 03:41:46 +0100 (Fri, 15 Jan 2010) $) + @lastmod($Date$) @author(Marc Weustink ) This unit contains the Locals debugger dialog. diff -Nru lazarus-0.9.30/debugger/processdebugger.pp lazarus-0.9.30.2/debugger/processdebugger.pp --- lazarus-0.9.30/debugger/processdebugger.pp 2010-01-18 14:20:38.000000000 +0000 +++ lazarus-0.9.30.2/debugger/processdebugger.pp 2011-11-23 16:14:30.000000000 +0000 @@ -1,11 +1,11 @@ -{ $Id: processdebugger.pp 23483 2010-01-18 14:20:38Z dmitry $ } +{ $Id$ } { ------------------------------------------------ ProcessDebugger.pp - Debugger class which only executes a target ------------------------------------------------ @created(Sun Nov 27st WET 2005) - @lastmod($Date: 2010-01-18 15:20:38 +0100 (Mon, 18 Jan 2010) $) + @lastmod($Date$) @author(Marc Weustink ) This unit contains the process debugger class. It simply creates a process. diff -Nru lazarus-0.9.30/debugger/registersdlg.pp lazarus-0.9.30.2/debugger/registersdlg.pp --- lazarus-0.9.30/debugger/registersdlg.pp 2010-01-15 02:41:46.000000000 +0000 +++ lazarus-0.9.30.2/debugger/registersdlg.pp 2011-11-23 16:14:30.000000000 +0000 @@ -1,10 +1,10 @@ -{ $Id: registersdlg.pp 23459 2010-01-15 02:41:46Z paul $ } +{ $Id$ } { ---------------------------------------------- registersdlg.pp - Overview of registers ---------------------------------------------- @created(Sun Nov 16th WET 2008) - @lastmod($Date: 2010-01-15 03:41:46 +0100 (Fri, 15 Jan 2010) $) + @lastmod($Date$) @author(Marc Weustink ) This unit contains the registers debugger dialog. diff -Nru lazarus-0.9.30/debugger/sshgdbmidebugger.pas lazarus-0.9.30.2/debugger/sshgdbmidebugger.pas --- lazarus-0.9.30/debugger/sshgdbmidebugger.pas 2010-05-13 18:29:46.000000000 +0000 +++ lazarus-0.9.30.2/debugger/sshgdbmidebugger.pas 2011-11-23 16:14:30.000000000 +0000 @@ -1,11 +1,11 @@ -{ $Id: sshgdbmidebugger.pas 25381 2010-05-13 18:29:46Z mattias $ } +{ $Id$ } { ---------------------------------------------- SSHGDBDebugger.pp - Debugger class for GDB through SSH ---------------------------------------------- @created(Wed Jul 23rd WET 2003) - @lastmod($Date: 2010-05-13 20:29:46 +0200 (Thu, 13 May 2010) $) + @lastmod($Date$) @author(Marc Weustink ) This unit contains the debugger class for the GDB/MI debugger through SSH. diff -Nru lazarus-0.9.30/debugger/test/debugtestform.pp lazarus-0.9.30.2/debugger/test/debugtestform.pp --- lazarus-0.9.30/debugger/test/debugtestform.pp 2010-03-12 16:04:05.000000000 +0000 +++ lazarus-0.9.30.2/debugger/test/debugtestform.pp 2011-11-23 16:14:30.000000000 +0000 @@ -1,10 +1,10 @@ -{ $Id: debugtestform.pp 23967 2010-03-12 16:04:05Z vincents $ } +{ $Id$ } { ---------------------------------------- debugtestform.pp - Debugger test app ---------------------------------------- @created(Wed Feb 25st WET 2001) - @lastmod($Date: 2010-03-12 17:04:05 +0100 (Fri, 12 Mar 2010) $) + @lastmod($Date$) @author(Marc Weustink ) *************************************************************************** diff -Nru lazarus-0.9.30/debugger/test/Gdbmi/compilehelpers.pas lazarus-0.9.30.2/debugger/test/Gdbmi/compilehelpers.pas --- lazarus-0.9.30/debugger/test/Gdbmi/compilehelpers.pas 2010-12-08 21:21:29.000000000 +0000 +++ lazarus-0.9.30.2/debugger/test/Gdbmi/compilehelpers.pas 2011-11-23 16:14:30.000000000 +0000 @@ -76,6 +76,7 @@ FpcBuild.ShowWindow := swoHIDE; CmdLine := FpcExe + ' -MObjFPC -FUlib -o'+ ExeName + ' ' + FpcOpts + ' ' + PrgName; + debugln(['**** running compiler: ', CmdLine]); FpcBuild.CommandLine := CmdLine; FpcBuild.CurrentDirectory := ExtractFileDir(PrgName); diff -Nru lazarus-0.9.30/debugger/test/Gdbmi/TestApps/ExceptPrg.pas lazarus-0.9.30.2/debugger/test/Gdbmi/TestApps/ExceptPrg.pas --- lazarus-0.9.30/debugger/test/Gdbmi/TestApps/ExceptPrg.pas 2010-12-07 03:16:08.000000000 +0000 +++ lazarus-0.9.30.2/debugger/test/Gdbmi/TestApps/ExceptPrg.pas 2011-11-23 16:14:30.000000000 +0000 @@ -1,21 +1,66 @@ program ExceptPrg; -{$H-} +{$IFDEF TEST_WITH_HPLUS} + {$H+} +{$ELSE} + {$H-} +{$ENDIF} +//{$DEFINE TEST_NO_EXCEPTION_TYPE}{$DEFINE TEST_NO_POINTER_VAR}{$DEFINE TEST_NO_EXCEPTION_TYPE}{$DEFINE TEST_NO_EXCEPTION_VAR} uses sysutils; +{$IFnDEF TEST_NO_EXCEPTION_TYPE} +type + MyESome = class(Exception) end; + MyEOther = class(Exception) end; +{$ENDIF} + var + i: integer; + {$IFnDEF TEST_NO_POINTER_VAR} p: pointer; // ensure pointer is in symbol info + {$ENDIF} + {$IFnDEF TEST_NO_STRING_VAR} s: string[100]; + {$ENDIF} + {$IFnDEF TEST_NO_EXCEPTION_VAR} x: Exception; + {$ENDIF} + + {$IFnDEF TEST_NO_EXCEPTION_TYPE} + procedure foo; + var a: string; + begin + a:= 'abc'; + raise MyESome.create(a); + end; + {$ENDIF} + begin + {$IFnDEF TEST_NO_POINTER_VAR} p := nil; + {$ENDIF} + //foo; + try + {$IFnDEF TEST_NO_EXCEPTION_VAR} x := Exception.Create('foo'); raise x; + {$ELSE} + raise Exception.Create('foo'); + {$ENDIF} except on e: Exception do begin - s := IntToStr(PtrInt(p)); + {$IFnDEF TEST_NO_STRING_VAR} + s := IntToStr(PtrInt(Pointer(e))); writeln(e.Message + s); + {$ELSE} + writeln(e.Message); + {$ENDIF} end; end; + writeln(1); + {$IFnDEF TEST_NO_EXCEPTION_TYPE} + foo; + {$ENDIF} + writeln(2); end. diff -Nru lazarus-0.9.30/debugger/test/Gdbmi/TestApps/WatchesPrgStruct.inc lazarus-0.9.30.2/debugger/test/Gdbmi/TestApps/WatchesPrgStruct.inc --- lazarus-0.9.30/debugger/test/Gdbmi/TestApps/WatchesPrgStruct.inc 2011-01-23 19:06:01.000000000 +0000 +++ lazarus-0.9.30.2/debugger/test/Gdbmi/TestApps/WatchesPrgStruct.inc 2011-11-23 16:14:30.000000000 +0000 @@ -136,6 +136,8 @@ ValueFoo: TFoo; ValueRec: TRec; FooText: string[20]; + FooString: String; + FooChar: Char; property PropInt: Integer read ValueInt write ValueInt; end; @@ -225,7 +227,9 @@ { Classes } GlobTFoo := TFoo.Create; GlobTFoo.ValueInt := -11; - GlobTFoo.FooText := 'mem of TFoo'; + GlobTFoo.FooText := 'mem of TFoo '' "'; + GlobTFoo.FooString := 'a 1 \ " '' '#9'...'; + GlobTFoo.FooChar := '\'; GlobTFoo1 := TFoo.Create; GlobTFoo1.ValueInt := 31; GlobTFoo2 := TFoo.Create; diff -Nru lazarus-0.9.30/debugger/test/Gdbmi/testbase.pas lazarus-0.9.30.2/debugger/test/Gdbmi/testbase.pas --- lazarus-0.9.30/debugger/test/Gdbmi/testbase.pas 2011-01-23 19:06:01.000000000 +0000 +++ lazarus-0.9.30.2/debugger/test/Gdbmi/testbase.pas 2011-11-23 16:14:30.000000000 +0000 @@ -6,7 +6,8 @@ uses Classes, SysUtils, FileUtil, fpcunit, testutils, testregistry, - EnvironmentOpts, LCLProc, CompileHelpers, Dialogs; + EnvironmentOpts, LCLProc, CompileHelpers, Dialogs, ExtToolDialog, + Debugger, GDBMIDebugger; (* fpclist.txt contains lines of format: @@ -18,7 +19,8 @@ gdblist.txt contains lines of format: [Name] exe=/path/fpc.exe - symbols=gs,gw,gwset,gw3 + version=070201 + symbols=none,gs,gw,gwset,gw3 *) @@ -43,6 +45,7 @@ Name: string; ExeName: string; SymbolTypes: TSymbolTypes; + Version: Integer; end; { TBaseList } @@ -116,7 +119,7 @@ procedure Run(AResult: TTestResult); override; procedure RunTest(ATest: TTest; AResult: TTestResult); override; procedure RegisterDbgTest(ATestClass: TTestCaseClass); - Procedure TestCompile(const PrgName: string; out ExeName: string); + Procedure TestCompile(const PrgName: string; out ExeName: string; NamePostFix: String=''; ExtraArgs: String=''); public property SymbolType: TSymbolType read FSymbolType; property SymbolSwitch: String read FSymbolSwitch; @@ -134,7 +137,7 @@ public constructor Create(AParent: TCompilerSuite; ADebuggerInfo: TDebuggerInfo); procedure RegisterDbgTest(ATestClass: TTestCaseClass); - Procedure TestCompile(const PrgName: string; out ExeName: string); + Procedure TestCompile(const PrgName: string; out ExeName: string; NamePostFix: String=''; ExtraArgs: String=''); public property Parent: TCompilerSuite read FParent; property DebuggerInfo: TDebuggerInfo read FDebuggerInfo; @@ -153,7 +156,7 @@ public constructor Create(AParent: TDebuggerSuite; AClass: TClass); procedure AddTest(ATest: TTest); overload; override; - Procedure TestCompile(const PrgName: string; out ExeName: string); + Procedure TestCompile(const PrgName: string; out ExeName: string; NamePostFix: String=''; ExtraArgs: String=''); public property Parent: TDebuggerSuite read FParent; property DebuggerInfo: TDebuggerInfo read GetDebuggerInfo; @@ -166,11 +169,22 @@ TGDBTestCase = class(TTestCase) private FParent: TGDBTestsuite; + FTestErrors, FIgnoredErrors: String; function GetCompilerInfo: TCompilerInfo; function GetDebuggerInfo: TDebuggerInfo; function GetSymbolType: TSymbolType; + protected + function StartGDB(AppDir, TestExeName: String): TGDBMIDebugger; + procedure ClearTestErrors; + procedure AddTestError(s: string; MinGdbVers: Integer = 0); + procedure TestEquals(Expected, Got: string); + procedure TestEquals(Name: string; Expected, Got: string; MinGdbVers: Integer = 0); + procedure TestEquals(Expected, Got: integer); + procedure TestEquals(Name: string; Expected, Got: integer; MinGdbVers: Integer = 0); + procedure AssertTestErrors; + property TestErrors: string read FTestErrors; public - Procedure TestCompile(const PrgName: string; out ExeName: string); + Procedure TestCompile(const PrgName: string; out ExeName: string; NamePostFix: String=''; ExtraArgs: String=''); public property Parent: TGDBTestsuite read FParent write FParent; property DebuggerInfo: TDebuggerInfo read GetDebuggerInfo; @@ -257,9 +271,81 @@ Result := Parent.SymbolType; end; -procedure TGDBTestCase.TestCompile(const PrgName: string; out ExeName: string); +function TGDBTestCase.StartGDB(AppDir, TestExeName: String): TGDBMIDebugger; +begin + Result := TGDBMIDebugger.Create(DebuggerInfo.ExeName); + Result.Init; + if Result.State = dsError then + Fail(' Failed Init'); + Result.WorkingDir := AppDir; + Result.FileName := TestExeName; + Result.Arguments := ''; + Result.ShowConsole := True; +end; + +procedure TGDBTestCase.ClearTestErrors; +begin + FTestErrors := ''; +end; + +procedure TGDBTestCase.AddTestError(s: string; MinGdbVers: Integer = 0); +var + IgnoreReason: String; + i: Integer; +begin + IgnoreReason := ''; + if MinGdbVers > 0 then begin + i := GetDebuggerInfo.Version; + if (i > 0) and (i < MinGdbVers) then + IgnoreReason := 'GDB ('+IntToStr(i)+') to old, required:'+IntToStr(MinGdbVers); + end; + if IgnoreReason <> '' then + FIgnoredErrors := FIgnoredErrors + '### '+IgnoreReason +' >>> '+s+LineEnding + else + FTestErrors := FTestErrors + s + LineEnding; +end; + +procedure TGDBTestCase.TestEquals(Expected, Got: string); begin - Parent.TestCompile(PrgName, ExeName); + try AssertEquals(Expected, Got); + except on e: exception do AddTestError(e.Message); + end; +end; + +procedure TGDBTestCase.TestEquals(Name: string; Expected, Got: string; MinGdbVers: Integer = 0); +begin + try AssertEquals(Name, Expected, Got); + except on e: exception do AddTestError(e.Message, MinGdbVers); + end; +end; + +procedure TGDBTestCase.TestEquals(Expected, Got: integer); +begin + try AssertEquals(Expected, Got); + except on e: exception do AddTestError(e.Message); + end; +end; + +procedure TGDBTestCase.TestEquals(Name: string; Expected, Got: integer; MinGdbVers: Integer = 0); +begin + try AssertEquals(Name, Expected, Got); + except on e: exception do AddTestError(e.Message, MinGdbVers); + end; +end; + +procedure TGDBTestCase.AssertTestErrors; +var + s: String; +begin + s := FTestErrors; + FTestErrors := ''; + if s <> '' then Fail(s); +end; + +procedure TGDBTestCase.TestCompile(const PrgName: string; out ExeName: string; + NamePostFix: String=''; ExtraArgs: String=''); +begin + Parent.TestCompile(PrgName, ExeName, NamePostFix, ExtraArgs); end; { TBaseList } @@ -380,13 +466,16 @@ procedure TDebuggerList.SetAttribute(AIndex: Integer; const AAttr, AValue: string); begin - case StringCase(AAttr, ['exe', 'symbols'], True, False) of + case StringCase(AAttr, ['exe', 'symbols', 'vers', 'version'], True, False) of 0: begin // exe FList[AIndex].ExeName := AValue; end; 1: begin // symbols FList[AIndex].SymbolTypes := StrToSymbolTypes(AValue); end; + 2,3: begin + FList[AIndex].Version := StrToIntDef(AValue,-1); + end; end; end; @@ -483,7 +572,8 @@ TDebuggerSuite(Test[i]).RegisterDbgTest(ATestClass); end; -procedure TCompilerSuite.TestCompile(const PrgName: string; out ExeName: string); +procedure TCompilerSuite.TestCompile(const PrgName: string; out ExeName: string; + NamePostFix: String=''; ExtraArgs: String=''); var ExePath, ErrMsg: String; begin @@ -492,13 +582,15 @@ ExePath := AppendPathDelim(copy(ExePath, 1, length(ExePath) - length(ExeName))); if DirectoryExistsUTF8(ExePath + 'lib') then ExePath := AppendPathDelim(ExePath + 'lib'); - ExeName := ExePath + ExeName + FFileNameExt + GetExeExt; + ExeName := ExePath + ExeName + FFileNameExt + NamePostFix + GetExeExt; + if ExtraArgs <> '' then + ExtraArgs := ' '+ExtraArgs; if FCompiledList.IndexOf(ExeName) < 0 then begin if FileExists(ExeName) then raise EAssertionFailedError.Create('Found existing file before compiling: ' + ExeName); FCompiledList.Add(ExeName); - ErrMsg := CompileHelpers.TestCompile(PrgName, FSymbolSwitch + ' ' + FCompilerInfo.ExtraOpts, ExeName, CompilerInfo.ExeName); + ErrMsg := CompileHelpers.TestCompile(PrgName, FSymbolSwitch + ' ' + FCompilerInfo.ExtraOpts + ExtraArgs, ExeName, CompilerInfo.ExeName); if ErrMsg <> '' then raise EAssertionFailedError.Create('Compilation Failed: ' + ExeName + LineEnding + ErrMsg); end; @@ -535,9 +627,10 @@ AddTest(NewTest); end; -procedure TDebuggerSuite.TestCompile(const PrgName: string; out ExeName: string); +procedure TDebuggerSuite.TestCompile(const PrgName: string; out ExeName: string; + NamePostFix: String=''; ExtraArgs: String=''); begin - Parent.TestCompile(PrgName, ExeName); + Parent.TestCompile(PrgName, ExeName, NamePostFix, ExtraArgs); end; { TGDBTestsuite } @@ -570,9 +663,10 @@ TGDBTestCase(ATest).Parent := Self; end; -procedure TGDBTestsuite.TestCompile(const PrgName: string; out ExeName: string); +procedure TGDBTestsuite.TestCompile(const PrgName: string; out ExeName: string; + NamePostFix: String=''; ExtraArgs: String=''); begin - Parent.TestCompile(PrgName, ExeName); + Parent.TestCompile(PrgName, ExeName, NamePostFix, ExtraArgs); end; { --- } diff -Nru lazarus-0.9.30/debugger/test/Gdbmi/testexception.pas lazarus-0.9.30.2/debugger/test/Gdbmi/testexception.pas --- lazarus-0.9.30/debugger/test/Gdbmi/testexception.pas 2010-12-08 21:21:29.000000000 +0000 +++ lazarus-0.9.30.2/debugger/test/Gdbmi/testexception.pas 2011-11-23 16:14:30.000000000 +0000 @@ -30,6 +30,12 @@ implementation + //dbg.OnBreakPointHit := @DebuggerBreakPointHit; + //dbg.OnState := @DebuggerChangeState; + //dbg.OnCurrent := @DebuggerCurrentLine; + //dbg.OnDbgOutput := @DebuggerOutput; + //dbg.OnDbgEvent := @DebuggerEvent; + procedure TTestExceptionOne.DoDebuggerException(Sender: TObject; const AExceptionType: TDBGExceptionType; const AExceptionClass: String; const AExceptionText: String; out AContinue: Boolean); @@ -43,41 +49,148 @@ procedure TTestExceptionOne.TestException; var - TestExeName: string; + TestExeName, TstName: string; dbg: TGDBMIDebugger; begin - FGotExceptCount := 0; + ClearTestErrors; - TestCompile(AppDir + 'ExceptPrg.pas', TestExeName); + TestCompile(AppDir + 'ExceptPrg.pas', TestExeName, '', ''); + try + FGotExceptCount := 0; TstName := 'all'; + dbg := StartGDB(AppDir, TestExeName); + dbg.OnException := @DoDebuggerException; + dbg.Run; + TestEquals(TstName+' Got 1 exception', 1, FGotExceptCount); + TestEquals(TstName+' Got class', 'Exception', FGotExceptClass); + TestEquals(TstName+' Got msg', 'foo', FGotExceptMsg, 060000); + dbg.Run; + TestEquals(TstName+' Got 2nd exception', 2, FGotExceptCount); + dbg.Run; + TestEquals(TstName+' Got no more exception', 2, FGotExceptCount); + TestEquals(TstName+' Got class', 'MyESome', FGotExceptClass); + TestEquals(TstName+' Got msg', 'abc', FGotExceptMsg, 050300); + dbg.Stop; + finally + dbg.Free; + end; + + TestCompile(AppDir + 'ExceptPrg.pas', TestExeName, 'no_etype', + '-dTEST_NO_EXCEPTION_TYPE'); try - dbg := TGDBMIDebugger.Create(DebuggerInfo.ExeName); - //dbg.OnBreakPointHit := @DebuggerBreakPointHit; - //dbg.OnState := @DebuggerChangeState; - //dbg.OnCurrent := @DebuggerCurrentLine; - //dbg.OnDbgOutput := @DebuggerOutput; - //dbg.OnDbgEvent := @DebuggerEvent; + FGotExceptCount := 0; TstName := 'no_exp_type'; + dbg := StartGDB(AppDir, TestExeName); dbg.OnException := @DoDebuggerException; - dbg.Init; - if dbg.State = dsError then - Fail(' Failed Init'); - //dbg.Environment + dbg.Run; + TestEquals(TstName+' Got 1 exception', 1, FGotExceptCount); + TestEquals(TstName+' Got class', 'Exception', FGotExceptClass); + TestEquals(TstName+' Got msg', 'foo', FGotExceptMsg, 050300); + dbg.Run; + TestEquals(TstName+' Got no more exception', 1, FGotExceptCount); + dbg.Stop; + finally + dbg.Free; + end; - dbg.WorkingDir := AppDir; - dbg.FileName := TestExeName; - dbg.Arguments := ''; - dbg.ShowConsole := True; + TestCompile(AppDir + 'ExceptPrg.pas', TestExeName, 'no_etype_ptr', + '-dTEST_NO_EXCEPTION_TYPE -dTEST_NO_POINTER_VAR'); + try + FGotExceptCount := 0; TstName := 'no_exp_type_ptr'; + dbg := StartGDB(AppDir, TestExeName); + dbg.OnException := @DoDebuggerException; dbg.Run; + TestEquals(TstName+' Got 1 exception', 1, FGotExceptCount); + TestEquals(TstName+' Got class', 'Exception', FGotExceptClass); + TestEquals(TstName+' Got msg', 'foo', FGotExceptMsg, 050300); + dbg.Run; + TestEquals(TstName+' Got no more exception', 1, FGotExceptCount); dbg.Stop; finally dbg.Free; end; - AssertEquals(' Got 1 exception', 1, FGotExceptCount); - AssertEquals(' Got class', 'Exception', FGotExceptClass); - AssertEquals(' Got msg', 'foo', FGotExceptMsg); + TestCompile(AppDir + 'ExceptPrg.pas', TestExeName, 'no_etype_str', + '-dTEST_NO_EXCEPTION_TYPE -dTEST_NO_STRING_VAR'); + try + FGotExceptCount := 0; TstName := 'no_exp_type_str'; + dbg := StartGDB(AppDir, TestExeName); + dbg.OnException := @DoDebuggerException; + + dbg.Run; + TestEquals(TstName+' Got 1 exception', 1, FGotExceptCount); + TestEquals(TstName+' Got class', 'Exception', FGotExceptClass); + TestEquals(TstName+' Got msg', 'foo', FGotExceptMsg, 050300); + dbg.Run; + TestEquals(TstName+' Got no more exception', 1, FGotExceptCount); + dbg.Stop; + finally + dbg.Free; + end; + + TestCompile(AppDir + 'ExceptPrg.pas', TestExeName, 'no_etype_ptr_str', + '-dTEST_NO_EXCEPTION_TYPE -dTEST_NO_POINTER_VAR'); + try + FGotExceptCount := 0; TstName := 'no_exp_type_ptr_str'; + dbg := StartGDB(AppDir, TestExeName); + dbg.OnException := @DoDebuggerException; + + dbg.Run; + TestEquals(TstName+' Got 1 exception', 1, FGotExceptCount); + TestEquals(TstName+' Got class', 'Exception', FGotExceptClass); + TestEquals(TstName+' Got msg', 'foo', FGotExceptMsg, 050300); + dbg.Run; + TestEquals(TstName+' Got no more exception', 1, FGotExceptCount); + dbg.Stop; + finally + dbg.Free; + end; + + TestCompile(AppDir + 'ExceptPrg.pas', TestExeName, 'no_etype_ptr_str_var', + '-dTEST_NO_EXCEPTION_TYPE -dTEST_NO_POINTER_VAR -dTEST_NO_EXCEPTION_VAR'); + try + FGotExceptCount := 0; TstName := 'no_exp_type_ptr_str_var'; + dbg := StartGDB(AppDir, TestExeName); + dbg.OnException := @DoDebuggerException; + + dbg.Run; + TestEquals(TstName+' Got 1 exception', 1, FGotExceptCount); + TestEquals(TstName+' Got class', 'Exception', FGotExceptClass); + TestEquals(TstName+' Got msg', 'foo', FGotExceptMsg, 050300); + dbg.Run; + TestEquals(TstName+' Got no more exception', 1, FGotExceptCount); + dbg.Stop; + finally + dbg.Free; + end; + + + + TestCompile(AppDir + 'ExceptPrg.pas', TestExeName, 'with_hplus', '-dTEST_WITH_HPLUS'); + try + FGotExceptCount := 0; TstName := 'with_hplus'; + dbg := StartGDB(AppDir, TestExeName); + dbg.OnException := @DoDebuggerException; + + dbg.Run; + TestEquals(TstName+' Got 1 exception', 1, FGotExceptCount); + TestEquals(TstName+' Got class', 'Exception', FGotExceptClass); + TestEquals(TstName+' Got msg', 'foo', FGotExceptMsg, 050300); + dbg.Run; + TestEquals(TstName+' Got 2nd exception', 2, FGotExceptCount); + dbg.Run; + TestEquals(TstName+' Got no more exception', 2, FGotExceptCount); + TestEquals(TstName+' Got class', 'MyESome', FGotExceptClass); + TestEquals(TstName+' Got msg', 'abc', FGotExceptMsg, 050300); + dbg.Stop; + finally + dbg.Free; + end; + + + + AssertTestErrors; end; initialization diff -Nru lazarus-0.9.30/debugger/test/Gdbmi/TestGdbmi.lpi lazarus-0.9.30.2/debugger/test/Gdbmi/TestGdbmi.lpi --- lazarus-0.9.30/debugger/test/Gdbmi/TestGdbmi.lpi 2010-12-09 20:43:41.000000000 +0000 +++ lazarus-0.9.30.2/debugger/test/Gdbmi/TestGdbmi.lpi 2011-11-23 16:14:30.000000000 +0000 @@ -7,7 +7,7 @@ - + @@ -26,6 +26,7 @@ + @@ -54,15 +55,14 @@ - + - + - - + - + @@ -70,12 +70,10 @@ - - @@ -95,18 +93,17 @@ - - - - - + + + + + - - - - - + + + + @@ -118,7 +115,7 @@ - + @@ -132,22 +129,18 @@ - - - - @@ -161,12 +154,10 @@ - - @@ -244,17 +235,15 @@ - - - + @@ -264,31 +253,25 @@ - - - - - - @@ -299,135 +282,77 @@ - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + diff -Nru lazarus-0.9.30/debugger/test/Gdbmi/testwatches.pas lazarus-0.9.30.2/debugger/test/Gdbmi/testwatches.pas --- lazarus-0.9.30/debugger/test/Gdbmi/testwatches.pas 2011-01-23 19:06:01.000000000 +0000 +++ lazarus-0.9.30.2/debugger/test/Gdbmi/testwatches.pas 2011-11-23 16:14:30.000000000 +0000 @@ -479,7 +479,6 @@ end; procedure TTestWatches.TestWatches; -var FailText: String; function SkipTest(const Data: TWatchExpectation): Boolean; begin @@ -517,7 +516,7 @@ then AssertTrue(Name + ' Matches "'+Data.Mtch + '", but was "' + s + '"', rx.Exec(s)); except on e: Exception do - FailText := FailText + LineEnding + e.Message; + AddTestError(e.Message); end; try if Data.TpNm <> '' then begin; @@ -536,7 +535,7 @@ end; except on e: Exception do - FailText := FailText + LineEnding + e.Message; + AddTestError(e.Message); end; FreeAndNil(rx); end; @@ -547,7 +546,12 @@ i: Integer; WList: Array of TTestWatch; begin - TestCompile(AppDir + 'WatchesPrg.pas', TestExeName); + ClearTestErrors; + try + TestCompile(AppDir + 'WatchesPrg.pas', TestExeName); + except + on e: Exception do Fail('Compile error: ' + e.Message); + end; try FWatches := TBaseWatches.Create(TBaseWatch); @@ -626,9 +630,9 @@ dbg.Free; FreeAndNil(FWatches); - if (DbgMemo <> nil) and (FailText <> '') then DbgMemo.Lines.Add(FailText); + if (DbgMemo <> nil) and (TestErrors <> '') then DbgMemo.Lines.Add(TestErrors); //debugln(FailText) - if FailText <> '' then fail(FailText); + AssertTestErrors; end; end; diff -Nru lazarus-0.9.30/debugger/watchesdlg.pp lazarus-0.9.30.2/debugger/watchesdlg.pp --- lazarus-0.9.30/debugger/watchesdlg.pp 2011-01-23 19:06:01.000000000 +0000 +++ lazarus-0.9.30.2/debugger/watchesdlg.pp 2011-11-23 16:14:30.000000000 +0000 @@ -1,10 +1,10 @@ -{ $Id: watchesdlg.pp 29178 2011-01-23 19:06:01Z vincents $ } +{ $Id$ } { ---------------------------------------------- watchesdlg.pp - Overview of watches ---------------------------------------------- @created(Fri Dec 14st WET 2001) - @lastmod($Date: 2011-01-23 20:06:01 +0100 (Sun, 23 Jan 2011) $) + @lastmod($Date$) @author(Shane Miller) @author(Marc Weustink ) @@ -38,12 +38,14 @@ interface uses - Classes, SysUtils, LCLProc, Forms, Controls, Graphics, Dialogs, + Classes, SysUtils, LCLProc, Forms, Controls, Graphics, Dialogs, math, StdCtrls, Buttons, Menus, ComCtrls, LCLType, ActnList, IDEImagesIntf, LazarusIDEStrConsts, Debugger, DebuggerDlg, BaseDebugManager; type + TWatchesDlgStateFlags = set of (wdsfUpdating, wdsfNeedDeleteAll, wdsfNeedDeleteCurrent); + { TWatchesDlg } TWatchesDlg = class(TDebuggerDlg) @@ -105,7 +107,7 @@ FWatchesNotification: TIDEWatchesNotification; FPowerImgIdx, FPowerImgIdxGrey: Integer; FUpdateAllNeeded: Boolean; - procedure DoEndUpdate; override; + FStateFlags: TWatchesDlgStateFlags; function GetSelected: TIDEWatch; procedure SetWatches(const AValue: TIDEWatches); procedure WatchAdd(const ASender: TIDEWatches; const AWatch: TIDEWatch); @@ -116,6 +118,7 @@ procedure UpdateAll; procedure DisableAllActions; protected + procedure DoEndUpdate; override; public constructor Create(AOwner: TComponent); override; destructor Destroy; override; @@ -138,6 +141,7 @@ FWatchesNotification.OnAdd := @WatchAdd; FWatchesNotification.OnUpdate := @WatchUpdate; FWatchesNotification.OnRemove := @WatchRemove; + FStateFlags := []; ActionList1.Images := IDEImages.Images_16; ToolBar1.Images := IDEImages.Images_16; @@ -211,8 +215,6 @@ end; procedure TWatchesDlg.SetWatches(const AValue: TIDEWatches); -var - i: Integer; begin if FWatches = AValue then Exit; @@ -230,9 +232,7 @@ if FWatches <> nil then begin FWatches.AddNotification(FWatchesNotification); - - for i:=0 to FWatches.Count-1 do - WatchUpdate(FWatches, FWatches.Items[i]); + UpdateAll; end; finally @@ -393,7 +393,10 @@ procedure TWatchesDlg.popDeleteAllClick(Sender: TObject); var n: Integer; -begin +begin + Include(FStateFlags, wdsfNeedDeleteAll); + if wdsfUpdating in FStateFlags then exit; + Exclude(FStateFlags, wdsfNeedDeleteAll); try DisableAllActions; for n := lvWatches.Items.Count - 1 downto 0 do @@ -416,6 +419,9 @@ var Item: TIDEWatch; begin + Include(FStateFlags, wdsfNeedDeleteCurrent); + if (wdsfUpdating in FStateFlags) then exit; + Exclude(FStateFlags, wdsfNeedDeleteCurrent); try DisableAllActions; repeat @@ -523,17 +529,32 @@ begin // Expression // Result - AItem.Caption := AWatch.Expression; if (not ToolButtonPower.Down) or (not Visible) then exit; + + include(FStateFlags, wdsfUpdating); + AItem.Caption := AWatch.Expression; AItem.SubItems[0] := ClearMultiline(AWatch.Value); + exclude(FStateFlags, wdsfUpdating); + if wdsfNeedDeleteCurrent in FStateFlags then + popDeleteClick(nil); + if wdsfNeedDeleteAll in FStateFlags then + popDeleteAllClick(nil); end; procedure TWatchesDlg.UpdateAll; var - i: Integer; + i, l: Integer; begin - for i:=0 to FWatches.Count-1 do + l := FWatches.Count; + i := 0; + while i < l do begin WatchUpdate(FWatches, FWatches.Items[i]); + if l <> FWatches.Count then begin + i := Max(0, i - Max(0, FWatches.Count - l)); + l := FWatches.Count; + end; + inc(i); + end; end; procedure TWatchesDlg.DisableAllActions; @@ -558,9 +579,6 @@ Item.Selected := True; end; - Watch := GetSelected; - if Watch <> nil then Watch.Enabled := True; - UpdateItem(Item, AWatch); lvWatchesSelectItem(nil, nil, False); end; diff -Nru lazarus-0.9.30/debugger/watchpropertydlg.pp lazarus-0.9.30.2/debugger/watchpropertydlg.pp --- lazarus-0.9.30/debugger/watchpropertydlg.pp 2010-11-25 23:53:25.000000000 +0000 +++ lazarus-0.9.30.2/debugger/watchpropertydlg.pp 2011-11-23 16:14:30.000000000 +0000 @@ -1,11 +1,11 @@ -{ $Id: watchpropertydlg.pp 28487 2010-11-25 23:53:25Z maxim $ } +{ $Id$ } { ---------------------------------------------- watchproperydlg.pp - property editor for watches ---------------------------------------------- @created(Fri Dec 14st WET 2001) - @lastmod($Date: 2010-11-26 00:53:25 +0100 (Fri, 26 Nov 2010) $) + @lastmod($Date$) @author(Shane Miller) @author(Marc Weustink ) diff -Nru lazarus-0.9.30/designer/designermenu.pp lazarus-0.9.30.2/designer/designermenu.pp --- lazarus-0.9.30/designer/designermenu.pp 2010-01-14 09:26:08.000000000 +0000 +++ lazarus-0.9.30.2/designer/designermenu.pp 2011-11-23 16:14:30.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: designermenu.pp 23443 2010-01-14 09:26:08Z paul $ } +{ $Id$ } { /*************************************************************************** designermenu.pas diff -Nru lazarus-0.9.30/designer/menueditorform.pas lazarus-0.9.30.2/designer/menueditorform.pas --- lazarus-0.9.30/designer/menueditorform.pas 2010-05-24 15:17:55.000000000 +0000 +++ lazarus-0.9.30.2/designer/menueditorform.pas 2011-11-23 16:14:30.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: menueditorform.pas 25611 2010-05-24 15:17:55Z dmitry $ } +{ $Id$ } { /*************************************************************************** menueditorform.pas diff -Nru lazarus-0.9.30/designer/noncontroldesigner.pas lazarus-0.9.30.2/designer/noncontroldesigner.pas --- lazarus-0.9.30/designer/noncontroldesigner.pas 2009-11-17 05:04:57.000000000 +0000 +++ lazarus-0.9.30.2/designer/noncontroldesigner.pas 2011-11-23 16:14:30.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: noncontroldesigner.pas 22635 2009-11-17 05:04:57Z mattias $ } +{ $Id$ } { *************************************************************************** * * diff -Nru lazarus-0.9.30/docs/html/fpdoc.css lazarus-0.9.30.2/docs/html/fpdoc.css --- lazarus-0.9.30/docs/html/fpdoc.css 2009-04-29 09:31:33.000000000 +0000 +++ lazarus-0.9.30.2/docs/html/fpdoc.css 2011-11-23 16:14:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - $Id: fpdoc.css 19686 2009-04-29 09:31:33Z vincents $ + $Id$ Default style sheet for FPDoc reference documentation by Sebastian Guenther, sg@freepascal.org diff -Nru lazarus-0.9.30/docs/xml/fcl/fpquantizer.xml lazarus-0.9.30.2/docs/xml/fcl/fpquantizer.xml --- lazarus-0.9.30/docs/xml/fcl/fpquantizer.xml 2010-02-16 11:03:06.000000000 +0000 +++ lazarus-0.9.30.2/docs/xml/fcl/fpquantizer.xml 2011-11-23 16:14:30.000000000 +0000 @@ -301,7 +301,7 @@ - + diff -Nru lazarus-0.9.30/docs/xml/lcl/comctrls.xml lazarus-0.9.30.2/docs/xml/lcl/comctrls.xml --- lazarus-0.9.30/docs/xml/lcl/comctrls.xml 2010-07-01 12:56:04.000000000 +0000 +++ lazarus-0.9.30.2/docs/xml/lcl/comctrls.xml 2011-11-23 16:14:30.000000000 +0000 @@ -16480,9 +16480,9 @@ - + - Childs - the children of the current node, as an AvgLvlTree + Children - the children of the current node, as an AvgLvlTree diff -Nru lazarus-0.9.30/docs/xml/lcl/intfgraphics.xml lazarus-0.9.30.2/docs/xml/lcl/intfgraphics.xml --- lazarus-0.9.30/docs/xml/lcl/intfgraphics.xml 2010-01-13 13:03:26.000000000 +0000 +++ lazarus-0.9.30.2/docs/xml/lcl/intfgraphics.xml 2011-11-23 16:14:30.000000000 +0000 @@ -1392,7 +1392,7 @@ - + diff -Nru lazarus-0.9.30/docs/xml/lcl/lclbasedowngrade.xml lazarus-0.9.30.2/docs/xml/lcl/lclbasedowngrade.xml --- lazarus-0.9.30/docs/xml/lcl/lclbasedowngrade.xml 1970-01-01 00:00:00.000000000 +0000 +++ lazarus-0.9.30.2/docs/xml/lcl/lclbasedowngrade.xml 2011-11-23 16:14:30.000000000 +0000 @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + diff -Nru lazarus-0.9.30/docs/xml/lcl/ldockctrl.xml lazarus-0.9.30.2/docs/xml/lcl/ldockctrl.xml --- lazarus-0.9.30/docs/xml/lcl/ldockctrl.xml 2009-08-18 12:52:31.000000000 +0000 +++ lazarus-0.9.30.2/docs/xml/lcl/ldockctrl.xml 2011-11-23 16:14:30.000000000 +0000 @@ -572,9 +572,9 @@ ChildCount - the number of child nodes - + - Childs - the child nodes in an indexed list + Children - the child nodes in an indexed list diff -Nru lazarus-0.9.30/examples/designnonlcl/mywidgetdesigner.pas lazarus-0.9.30.2/examples/designnonlcl/mywidgetdesigner.pas --- lazarus-0.9.30/examples/designnonlcl/mywidgetdesigner.pas 2011-02-10 22:22:30.000000000 +0000 +++ lazarus-0.9.30.2/examples/designnonlcl/mywidgetdesigner.pas 2011-11-23 16:14:31.000000000 +0000 @@ -197,7 +197,7 @@ then begin for i:=0 to AWidget.ChildCount-1 do begin SaveHandleState; - Child:=AWidget.Childs[i]; + Child:=AWidget.Children[i]; // clip child area MoveWindowOrgEx(Handle,Child.Left,Child.Top); if IntersectClipRect(Handle,0,0,Child.Width,Child.Height)<>NullRegion then diff -Nru lazarus-0.9.30/examples/designnonlcl/mywidgetset.pas lazarus-0.9.30.2/examples/designnonlcl/mywidgetset.pas --- lazarus-0.9.30/examples/designnonlcl/mywidgetset.pas 2011-02-10 22:22:30.000000000 +0000 +++ lazarus-0.9.30.2/examples/designnonlcl/mywidgetset.pas 2011-11-23 16:14:31.000000000 +0000 @@ -88,7 +88,7 @@ destructor Destroy; override; property Parent: TMyWidget read FParent write SetParent; function ChildCount: integer; - property Childs[Index: integer]: TMyWidget read GetChilds; + property Children[Index: integer]: TMyWidget read GetChilds; procedure SetBounds(NewLeft, NewTop, NewWidth, NewHeight: integer); virtual; procedure InvalidateRect(ARect: TRect; Erase: boolean); procedure Invalidate; @@ -250,8 +250,8 @@ i: Integer; begin for i:=0 to ChildCount-1 do - if Childs[i].Owner=Root then - Proc(Childs[i]); + if Children[i].Owner=Root then + Proc(Children[i]); end; constructor TMyWidget.Create(AOwner: TComponent); @@ -268,7 +268,7 @@ destructor TMyWidget.Destroy; begin Parent:=nil; - while ChildCount>0 do Childs[ChildCount-1].Free; + while ChildCount>0 do Children[ChildCount-1].Free; FreeAndNil(FChilds); inherited Destroy; end; diff -Nru lazarus-0.9.30/examples/groupboxnested.pas lazarus-0.9.30.2/examples/groupboxnested.pas --- lazarus-0.9.30/examples/groupboxnested.pas 2004-12-31 16:41:26.000000000 +0000 +++ lazarus-0.9.30.2/examples/groupboxnested.pas 2011-11-23 16:14:31.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: groupboxnested.pas 6443 2004-12-31 16:41:26Z micha $ } +{ $Id$ } { *************************************************************************** * * diff -Nru lazarus-0.9.30/examples/groupbox.pp lazarus-0.9.30.2/examples/groupbox.pp --- lazarus-0.9.30/examples/groupbox.pp 2004-11-05 10:47:57.000000000 +0000 +++ lazarus-0.9.30.2/examples/groupbox.pp 2011-11-23 16:14:31.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: groupbox.pp 6203 2004-11-05 10:47:57Z micha $ } +{ $Id$ } { /*************************************************************************** diff -Nru lazarus-0.9.30/examples/listview/listview.lpi lazarus-0.9.30.2/examples/listview/listview.lpi --- lazarus-0.9.30/examples/listview/listview.lpi 2007-03-02 09:48:08.000000000 +0000 +++ lazarus-0.9.30.2/examples/listview/listview.lpi 2011-11-23 16:14:31.000000000 +0000 @@ -1,14 +1,19 @@ + - - + + + + - - + + + + @@ -35,29 +40,34 @@ + - - + - + - + - - - + + + + + + + + diff -Nru lazarus-0.9.30/examples/listview/testform.lfm lazarus-0.9.30.2/examples/listview/testform.lfm --- lazarus-0.9.30/examples/listview/testform.lfm 2007-03-02 09:48:08.000000000 +0000 +++ lazarus-0.9.30.2/examples/listview/testform.lfm 2011-11-23 16:14:31.000000000 +0000 @@ -7,22 +7,28 @@ VertScrollBar.Page = 298 ActiveControl = CheckBox3 Caption = 'Listview test' - object Notebook1: TNotebook + ClientHeight = 299 + ClientWidth = 627 + LCLVersion = '0.9.31' + object PageControl1: TPageControl Left = 433 Height = 280 Top = 8 Width = 184 + ActivePage = Page3 Anchors = [akTop, akRight] - PageIndex = 0 - object Page3: TPage + TabIndex = 0 + TabOrder = 0 + object Page3: TTabSheet Caption = 'LV' + ClientHeight = 254 + ClientWidth = 176 object Label11: TLabel Left = 6 Height = 14 Top = 60 Width = 47 Caption = 'Scrollbars' - Color = clNone ParentColor = False end object Label12: TLabel @@ -31,7 +37,6 @@ Top = 122 Width = 56 Caption = 'SortColumn' - Color = clNone ParentColor = False end object Label13: TLabel @@ -40,7 +45,6 @@ Top = 154 Width = 45 Caption = 'SortType' - Color = clNone ParentColor = False end object Label14: TLabel @@ -49,16 +53,14 @@ Top = 186 Width = 47 Caption = 'ViewStyle' - Color = clNone ParentColor = False end object CheckBox3: TCheckBox Left = 6 - Height = 13 + Height = 17 Top = 4 - Width = 70 + Width = 68 Caption = 'Multiselect' - OnChange = CheckBox3Change OnClick = CheckBox3Click TabOrder = 0 end @@ -67,7 +69,7 @@ Height = 21 Top = 52 Width = 95 - AutoCompleteText = [cbactEndOfLineComplete, cbactSearchAscending] + ItemHeight = 13 ItemIndex = 6 Items.Strings = ( 'ssNone' @@ -78,7 +80,6 @@ 'ssAutoVertical' 'ssAutoBoth' ) - MaxLength = 0 OnChange = ComboBox2Change Style = csDropDownList TabOrder = 1 @@ -86,7 +87,7 @@ end object Edit11: TEdit Left = 78 - Height = 23 + Height = 21 Top = 116 Width = 80 OnChange = Edit11Change @@ -98,7 +99,7 @@ Height = 21 Top = 146 Width = 95 - AutoCompleteText = [cbactEndOfLineComplete, cbactSearchAscending] + ItemHeight = 13 ItemIndex = 0 Items.Strings = ( 'stNone' @@ -106,7 +107,6 @@ 'stText' 'stBoth' ) - MaxLength = 0 OnChange = ComboBox3Change Style = csDropDownList TabOrder = 3 @@ -117,7 +117,7 @@ Height = 21 Top = 178 Width = 95 - AutoCompleteText = [cbactEndOfLineComplete, cbactSearchAscending] + ItemHeight = 13 ItemIndex = 3 Items.Strings = ( 'vsIcon' @@ -125,7 +125,6 @@ 'vsList' 'vsReport' ) - MaxLength = 0 OnChange = ComboBox4Change Style = csDropDownList TabOrder = 4 @@ -133,18 +132,18 @@ end object CheckBox4: TCheckBox Left = 6 - Height = 13 + Height = 17 Top = 28 - Width = 72 + Width = 68 Caption = 'RowSelect' OnClick = CheckBox4Click TabOrder = 5 end object CheckBox5: TCheckBox Left = 6 - Height = 13 + Height = 17 Top = 84 - Width = 122 + Width = 119 Caption = 'ShowColumnHeaders' Checked = True OnClick = CheckBox5Click @@ -153,9 +152,9 @@ end object HideSelection: TCheckBox Left = 91 - Height = 13 + Height = 17 Top = 4 - Width = 86 + Width = 82 Caption = 'HideSelection' Checked = True OnChange = HideSelectionChange @@ -163,15 +162,16 @@ TabOrder = 7 end end - object Page1: TPage + object Page1: TTabSheet Caption = 'Items' + ClientHeight = 0 + ClientWidth = 0 object Label6: TLabel Left = 6 Height = 17 Top = 4 Width = 65 Caption = 'Index' - Color = clNone ParentColor = False end object Label7: TLabel @@ -180,7 +180,6 @@ Top = 4 Width = 65 Caption = 'SubIndex' - Color = clNone ParentColor = False end object Label9: TLabel @@ -189,7 +188,6 @@ Top = 116 Width = 65 Caption = 'Text' - Color = clNone ParentColor = False end object Label10: TLabel @@ -198,7 +196,6 @@ Top = 116 Width = 65 Caption = 'ImageIndex' - Color = clNone ParentColor = False end object Button1: TButton @@ -278,15 +275,16 @@ Text = '-1' end end - object Page2: TPage + object Page2: TTabSheet Caption = 'Columns' + ClientHeight = 0 + ClientWidth = 0 object Label1: TLabel Left = 6 Height = 17 Top = 84 Width = 65 Caption = 'Caption' - Color = clNone ParentColor = False end object Label2: TLabel @@ -295,7 +293,6 @@ Top = 84 Width = 65 Caption = 'Width' - Color = clNone ParentColor = False end object Label3: TLabel @@ -304,7 +301,6 @@ Top = 132 Width = 65 Caption = 'Minwidth' - Color = clNone ParentColor = False end object Label4: TLabel @@ -313,7 +309,6 @@ Top = 132 Width = 65 Caption = 'Maxwidth' - Color = clNone ParentColor = False end object Label5: TLabel @@ -322,7 +317,6 @@ Top = 179 Width = 65 Caption = 'Image' - Color = clNone ParentColor = False end object Label8: TLabel @@ -331,7 +325,6 @@ Top = 4 Width = 65 Caption = 'Index' - Color = clNone ParentColor = False end object Button3: TButton @@ -421,15 +414,13 @@ Height = 21 Top = 191 Width = 80 - AutoCompleteText = [cbactEndOfLineComplete, cbactSearchAscending] + ItemHeight = 13 Items.Strings = ( 'taLeftJustify' 'taRightJustify' 'taCenter' ) - MaxLength = 0 OnChange = ComboBox1Change - ParentCtl3D = False TabOrder = 8 end object CheckBox2: TCheckBox @@ -457,10 +448,10 @@ item Caption = 'Two' end> - Items.Data = { - 52FEFFFF0200000000000000FFFFFFFFFFFFFFFF0200000000000000054E6577 - 2031055375622031055375622032FFFFFFFFFFFFFFFFFFFFFFFF000000000000 - 0000054E65772032FFFFFFFFFFFFFFFF + Items.LazData = { + 540000000200000000000000FFFFFFFFFFFFFFFF02000000050000004E657720 + 31050000005375622031050000005375622032FFFFFFFFFFFFFFFFFFFFFFFF00 + 000000050000004E65772032FFFFFFFFFFFFFFFF } ScrollBars = ssAutoBoth SmallImages = ImageList1 @@ -470,241 +461,138 @@ OnSelectItem = ListView1SelectItem end object ImageList1: TImageList - OnChange = ImageList1Change left = 243 top = 509 Bitmap = { - 6C69040000001000000010000000250B00002F2A2058504D202A2F0A73746174 - 69632063686172202A2062746E5F6E6577666F726D5F78706D5B5D203D207B0A - 223135203133203134372032222C0A2220200963204E6F6E65222C0A222E2009 - 632023384438453933222C0A222B2009632023374438333931222C0A22402009 - 632023373938313934222C0A22232009632023383038383944222C0A22242009 - 632023374338343942222C0A22252009632023373437413934222C0A22262009 - 632023383038354132222C0A222A2009632023374238304130222C0A223D2009 - 632023374638344132222C0A222D2009632023374538314130222C0A223B2009 - 632023374438313943222C0A223E2009632023374137433933222C0A222C2009 - 632023383138343935222C0A22272009632023373937423838222C0A22292009 - 632023383638393932222C0A22212009632023374337423844222C0A227E2009 - 632023463946394646222C0A227B2009632023383730303133222C0A225D2009 - 632023414530303133222C0A225E2009632023443330303133222C0A222F2009 - 632023464346344646222C0A22282009632023464546414646222C0A225F2009 - 632023303030303045222C0A223A2009632023383538343936222C0A223C2009 - 632023304130363237222C0A225B2009632023383638363845222C0A227D2009 - 632023463746394646222C0A227C2009632023463946434646222C0A22312009 - 632023464246424646222C0A22322009632023464246414646222C0A22332009 - 632023454545444646222C0A22342009632023463846354646222C0A22352009 - 632023464146384646222C0A22362009632023464246374646222C0A22372009 - 632023464546424646222C0A22382009632023464546434646222C0A22392009 - 632023303530343043222C0A22302009632023383338343836222C0A22612009 - 632023464346464646222C0A22622009632023463246374641222C0A22632009 - 632023433643424345222C0A22642009632023463346394639222C0A22652009 - 632023433343374336222C0A22662009632023433043354331222C0A22672009 - 632023464346464644222C0A22682009632023433343354334222C0A22692009 - 632023464546464646222C0A226A2009632023434143424344222C0A226B2009 - 632023463646374642222C0A226C2009632023434343424431222C0A226D2009 - 632023303130303038222C0A226E2009632023383438363835222C0A226F2009 - 632023463846434642222C0A22702009632023433543414336222C0A22712009 - 632023464346464642222C0A22722009632023443044364343222C0A22732009 - 632023454646334535222C0A22742009632023433643414242222C0A22752009 - 632023463846434542222C0A22762009632023433843434242222C0A22772009 - 632023464146434545222C0A22782009632023443044324337222C0A22792009 - 632023464146424636222C0A227A2009632023433143314333222C0A22412009 - 632023464246384646222C0A22422009632023303230303044222C0A22432009 - 632023383638363836222C0A22442009632023464246444641222C0A22452009 - 632023464546464642222C0A22462009632023433643394332222C0A22472009 - 632023464346464634222C0A22482009632023433943444246222C0A22492009 - 632023464546464631222C0A224A2009632023424543334146222C0A224B2009 - 632023464546464546222C0A224C2009632023434243454244222C0A224D2009 - 632023463646384542222C0A224E2009632023434143424333222C0A224F2009 - 632023464646464644222C0A22502009632023433643344339222C0A22512009 - 632023303130303039222C0A22522009632023464646464646222C0A22532009 - 632023433243324330222C0A22542009632023433743374335222C0A22552009 - 632023464446454639222C0A22562009632023433443354330222C0A22572009 - 632023464246434636222C0A22582009632023433943414334222C0A22592009 - 632023464646464641222C0A225A2009632023433143324243222C0A22602009 - 632023433643354330222C0A22202E09632023303130303030222C0A222E2E09 - 632023383238323832222C0A222B2E09632023464346434643222C0A22402E09 - 632023433243324332222C0A22232E09632023463846384638222C0A22242E09 - 632023433343334333222C0A22252E09632023434543454345222C0A22262E09 - 632023463946394639222C0A222A2E09632023424542454243222C0A223D2E09 - 632023424542444239222C0A222D2E09632023433443344243222C0A223B2E09 - 632023303630363030222C0A223E2E09632023383538353835222C0A222C2E09 - 632023423342334235222C0A22272E09632023443344334433222C0A22292E09 - 632023433043304245222C0A22212E09632023464146414638222C0A227E2E09 - 632023434143414338222C0A227B2E09632023433443344332222C0A225D2E09 - 632023303030303030222C0A225E2E09632023383438343834222C0A222F2E09 - 632023433443344336222C0A22282E09632023463546354637222C0A225F2E09 - 632023434243424344222C0A223A2E09632023463746374639222C0A223C2E09 - 632023434443444346222C0A225B2E09632023463846384641222C0A227D2E09 - 632023433843384341222C0A227C2E09632023443444344434222C0A22312E09 - 632023383038303830222C0A22322E09632023463946394642222C0A22332E09 - 632023434143394345222C0A22342E09632023464646454646222C0A22352E09 - 632023433643354344222C0A22362E09632023464646444646222C0A22372E09 - 632023433943374434222C0A22382E09632023463746354646222C0A22392E09 - 632023434443424438222C0A22302E09632023433943384430222C0A22612E09 - 632023463746364643222C0A22622E09632023433543354337222C0A22632E09 - 632023463446364633222C0A22642E09632023303030323030222C0A22652E09 - 632023393439343934222C0A22662E09632023303630363036222C0A22672E09 - 632023303030303032222C0A22682E09632023303430333038222C0A22692E09 - 632023303030303035222C0A226A2E09632023303030303037222C0A226B2E09 - 632023303030303039222C0A226C2E09632023303430323046222C0A226D2E09 - 632023303830373046222C0A226E2E09632023303230323034222C0A226F2E09 - 632023304430463043222C0A22702E09632023303030313030222C0A222E202B - 20402023202420252026202A203D202D203B203E202C2027202920222C0A2221 - 207E207B207B207B207B207B205D205D205E205E202F205E2028205F20222C0A - 223A207B207B207B207B205D205D205D205E205E205E205E205E203C205F2022 - 2C0A225B207D207C203120312032203320322034203520362037203820382039 - 20222C0A22302061206220632064206520612066206720682069206A206B206C - 206D20222C0A226E206F2070207120722073207420752076207720782079207A - 2041204220222C0A2243204420452046204720482049204A204B204C204D204E - 204F2050205120222C0A224320522053204F205420552056205720582059205A - 20592060205920202E222C0A222E2E2B2E5220402E232E242E5220252E262E2A - 2E4F203D2E59202D2E3B2E222C0A223E2E52202C2E5220272E5220292E4F2054 - 20212E7E2E4F207B2E212E5D2E222C0A225E2E522052202F2E282E2F2E52205F - 2E3A2E3C2E5B2E7D2E52207C2E5D2E222C0A22312E322E332E342E352E362E37 - 2E382E392E362E302E612E622E632E642E222C0A22652E662E672E682E692E6A - 2E6B2E6C2E6B2E6B2E6D2E692E6E2E6F2E702E227D3B0A380200002F2A205850 - 4D202A2F0A7374617469632063686172202A2062746E5F6E6577756E69745F78 - 706D5B5D203D207B0A2231312031332032312031222C0A22200963204E6F6E65 - 222C0A222E09632023303030303030222C0A222B09632023304330433043222C - 0A224009632023464546454645222C0A222309632023464646464646222C0A22 - 2409632023464146414641222C0A222509632023303730373037222C0A222609 - 632023463346334633222C0A222A09632023464346434643222C0A223D096320 - 23303230323032222C0A222D09632023303930393039222C0A223B0963202346 - 3846384638222C0A223E09632023303130313031222C0A222C09632023464246 - 424642222C0A222709632023463046304630222C0A2229096320234644464446 - 44222C0A222109632023463746374637222C0A227E0963202330333033303322 - 2C0A227B09632023304130413041222C0A225D09632023303530353035222C0A - 225E09632023303430343034222C0A222E2E2B2E2E2B2E2E202020222C0A222E - 402323232423252E2020222C0A222E4023234023262E232E20222C0A222E4023 - 23232A403D2E2E2D222C0A222E4023233B23232324232E222C0A222E40232323 - 3B242323233E222C0A222E4023232C402327292C2E222C0A222E402323232321 - 2323233D222C0A222E402323232429232C292E222C0A227E212323232C232329 - 3B25222C0A223E2321232923292323232E222C0A223E2C232C23232124292C2B - 222C0A227B2E2E3D7E2E2E2B5D2E5E227D3B0A1B0900002F2A2058504D202A2F - 0A7374617469632063686172202A2062746E5F6F70656E66696C655F78706D5B - 5D203D207B0A2231382031382039372032222C0A2220200963204E6F6E65222C - 0A222E2009632023303030303030222C0A222B2009632023344533333142222C - 0A22402009632023453541353636222C0A22232009632023464544333941222C - 0A22242009632023464543353835222C0A22252009632023464443353837222C - 0A22262009632023464543323832222C0A222A2009632023463841433632222C - 0A223D2009632023464543383841222C0A222D2009632023353335303444222C - 0A223B2009632023353535323446222C0A223E2009632023354335413537222C - 0A222C2009632023353435313445222C0A22272009632023353635333530222C - 0A22292009632023433438363445222C0A22212009632023353234463443222C - 0A227E2009632023463546354635222C0A227B2009632023454345434543222C - 0A225D2009632023453445344534222C0A225E2009632023444344434443222C - 0A222F2009632023443444344434222C0A22282009632023434243424342222C - 0A225F2009632023433443344334222C0A223A2009632023424342434243222C - 0A223C2009632023423542354235222C0A225B2009632023423342334233222C - 0A227D2009632023333033303330222C0A227C2009632023344133313139222C - 0A22312009632023444244424442222C0A22322009632023444644464445222C - 0A22332009632023453845384537222C0A22342009632023453645364534222C - 0A22352009632023443244324431222C0A22362009632023433743374336222C - 0A22372009632023424142414239222C0A22382009632023414441444143222C - 0A22392009632023413041303946222C0A22302009632023393439343933222C - 0A22612009632023343934393438222C0A22622009632023423737443434222C - 0A22632009632023353335313445222C0A22642009632023444144414441222C - 0A22652009632023444244424441222C0A22662009632023453145314530222C - 0A22672009632023444444444443222C0A22682009632023443644364435222C - 0A22692009632023434243424341222C0A226A2009632023433143314330222C - 0A226B2009632023423642364235222C0A226C2009632023413941394138222C - 0A226D2009632023363836383637222C0A226E2009632023323232323231222C - 0A226F2009632023343933303138222C0A22702009632023434443444344222C - 0A22712009632023434143414339222C0A22722009632023443544354434222C - 0A22732009632023443244324430222C0A22742009632023434343434342222C - 0A22752009632023433243324331222C0A22762009632023423942394238222C - 0A22772009632023414641464145222C0A22782009632023413241324131222C - 0A22792009632023393539353934222C0A227A2009632023434543454345222C - 0A22412009632023424542454243222C0A22422009632023433443344332222C - 0A22432009632023433643364335222C0A22442009632023433343334332222C - 0A22452009632023424642464245222C0A22462009632023414541454144222C - 0A22472009632023413541354134222C0A22482009632023394539453944222C - 0A22492009632023364636463645222C0A224A2009632023313231323132222C - 0A224B2009632023424442444244222C0A224C2009632023413641364135222C - 0A224D2009632023414141414138222C0A224E2009632023414441444142222C - 0A224F2009632023414541454143222C0A22502009632023414241424141222C - 0A22512009632023413741374136222C0A22522009632023413141314130222C - 0A22532009632023394139413939222C0A22542009632023393439343932222C - 0A22552009632023384438443842222C0A22562009632023323332333233222C - 0A22572009632023344134413441222C0A22582009632023344134413439222C - 0A22592009632023344334433442222C0A225A2009632023344334433443222C - 0A22602009632023344234423441222C0A22202E09632023343634363436222C - 0A222E2E09632023343334333433222C0A222B2E09632023343134313430222C - 0A22402E09632023333433343333222C0A22232E09632023314631463145222C - 0A222020202020202020202020202E202E202E202E2020202020202020202020 - 202020202020222C0A22202020202020202020202E202E2020202E202E202E20 - 2E2020202E202020202020202020222C0A2220202020202020202E2020202020 - 2020202020202E202E202E202E202020202020202020222C0A22202020202020 - 202020202020202020202020202020202E202E202E202020202020202020222C - 0A2220202020202020202020202020202020202020202E202E202E202E202020 - 202020202020222C0A2220202B202B202B202B20202020202020202020202020 - 2020202020202020202020202020222C0A222B2040202320242040202B202B20 - 2B202B202B202B202B20202020202020202020202020222C0A222B2023202520 - 26202A202A202A202A202A202A202A202A202E2020202020202020202020222C - 0A222B203D2026202B202D202D203B203E202C202C20272027202C202E202E20 - 2E2020202020222C0A222B202620292021207E207E207B205D205E202F202820 - 5F203A203C205B207D2020202020222C0A222B2026207C203120322033203420 - 32203520362037203820392030206120202020202020222C0A222B2062206320 - 6420652066206720682069206A206B206C2039206D206E20202020202020222C - 0A222B206F207020712072207220732074207520762077207820792061202020 - 202020202020222C0A222B2027207A20412042204320442045206B2046204720 - 482049204A202020202020202020222C0A222B204B204C204D204E204F205020 - 51205220532054205520612020202020202020202020222C0A22562057205820 - 59205A20592060206120202E2E2E2B2E402E232E20202020202020202020222C - 0A22202020202020202020202020202020202020202020202020202020202020 - 202020202020222C0A2220202020202020202020202020202020202020202020 - 2020202020202020202020202020227D3B0A3D0600002F2A2058504D202A2F0A - 7374617469632063686172202A20636F6C6F725F78706D5B5D203D207B0A2232 - 302032302037312031222C0A22200963204E6F6E65222C0A222E096320234245 - 43314242222C0A222B09632023424543324242222C0A22400963202342454331 - 4241222C0A222309632023424643324242222C0A222409632023413941434136 - 222C0A222509632023374638313743222C0A222609632023303030323232222C - 0A222A09632023303130353435222C0A223D09632023303230353436222C0A22 - 2D09632023303130333245222C0A223B09632023313031333344222C0A223E09 - 632023314632373742222C0A222C09632023313432433342222C0A2227096320 - 23314634333539222C0A222909632023314534323538222C0A22210963202330 - 4632313243222C0A227E09632023303330413842222C0A227B09632023303430 - 423843222C0A225D09632023303230373544222C0A225E096320233230323737 - 42222C0A222F09632023334634454636222C0A22280963202332393539373622 - 2C0A225F09632023334538364232222C0A223A09632023334438354231222C0A - 223C09632023303130343345222C0A225B09632023313531413532222C0A227D - 09632023324133344134222C0A227C09632023314233423446222C0A22310963 - 2023303531423137222C0A223209632023304133363245222C0A223309632023 - 303632343146222C0A223409632023303131443131222C0A2235096320233032 - 33423231222C0A223609632023303233423232222C0A22370963202330343445 - 3234222C0A223809632023303737363337222C0A223909632023303333423142 - 222C0A223009632023303933363245222C0A226109632023313336433543222C - 0A226209632023313436443544222C0A226309632023304434383345222C0A22 - 6409632023303337363433222C0A226509632023303939443439222C0A226609 - 632023304545443645222C0A226709632023304445433644222C0A2268096320 - 23313436433543222C0A226909632023313436433544222C0A226A0963202330 - 3434463234222C0A226B09632023343835323041222C0A226C09632023393041 - 353135222C0A226D09632023363036453045222C0A226E096320233532324530 - 32222C0A226F09632023413535443035222C0A22700963202335433134304222 - 2C0A227109632023384231453130222C0A227209632023343530463038222C0A - 227309632023364337433046222C0A227409632023443846383146222C0A2275 - 09632023443946393230222C0A227609632023393041363135222C0A22770963 - 2023374334363034222C0A227809632023463838433038222C0A227909632023 - 443132453139222C0A227A09632023443032443138222C0A2241096320233638 - 31373043222C0A224209632023333633453038222C0A22430963202336433743 - 3130222C0A224409632023343835333041222C0A224509632023334532333032 - 222C0A224609632023333430423036222C0A222E2B2E40232323234040404040 - 40234040404040222C0A222E2425252525252525252525252525252525244022 - 2C0A222E25262A3D3D2D3B3E3E3E3E3B2C272929212540222C0A222E252A7E7B - 7B5D5E2F2F2F2F5E285F3A3A272540222C0A222E252A7E7B7B5D5E2F2F2F2F5E - 285F3A3A272540222C0A222E252A7E7B7B5D5E2F2F2F2F5E285F3A3A27254022 - 2C0A222E252D5D5D5D3C5B7D7D7D7D5B7C2828282C2540222C0A222B25313232 - 323334353536353437383838392540222C0A222E253061626263366464646436 - 65666767382540222C0A222E2530616262633664646464366566676738254022 - 2C0A222B25306869626336646464643665666767382540222C0A222B25306162 - 626336646464643665666767382540222C0A222E253132323233343636363634 - 6A383838392540222C0A222E256B6C6C6C6D6E6F6F6F6F6E7071717172254022 - 2C0A222B25737475757677787878787771797A7A412540222C0A222325737475 - 757677787878787771797A7A412540222C0A222E257374757576777878787877 - 71797A7A412540222C0A222B2542434343444577777777457241414146254022 - 2C0A222B24252525252525252525252525252525252440222C0A222E232E4023 - 232323404040404040234040404040227D3B0A + 4C69040000001000000010000000938E8DFF91837DFF948179FF9D8880FF9B84 + 7CFF947A74FFA28580FFA0807BFFA2847FFFA0817EFF9C817DFF937C7AFF9584 + 81FF887B79FF928986FF000000008D7B7CFFFFF9F9FF130087FF130087FF1300 + 87FF130087FF130087FF1300AEFF1300AEFF1300D3FF1300D3FFFFF4FCFF1300 + D3FFFFFAFEFF0E0000FF00000000968485FF130087FF130087FF130087FF1300 + 87FF1300AEFF1300AEFF1300AEFF1300D3FF1300D3FF1300D3FF1300D3FF1300 + D3FF27060AFF0E0000FF000000008E8686FFFFF9F7FFFFFCF9FFFFFBFBFFFFFB + FBFFFFFAFBFFFFEDEEFFFFFAFBFFFFF5F8FFFFF8FAFFFFF7FBFFFFFBFEFFFFFC + FEFFFFFCFEFF0C0405FF00000000868483FFFFFFFCFFFAF7F2FFCECBC6FFF9F9 + F3FFC6C7C3FFFFFFFCFFC1C5C0FFFDFFFCFFC4C5C3FFFFFFFEFFCDCBCAFFFBF7 + F6FFD1CBCCFF080001FF00000000858684FFFBFCF8FFC6CAC5FFFBFFFCFFCCD6 + D0FFE5F3EFFFBBCAC6FFEBFCF8FFBBCCC8FFEEFCFAFFC7D2D0FFF6FBFAFFC3C1 + C1FFFFF8FBFF0D0002FF00000000868686FFFAFDFBFFFBFFFEFFC2C9C6FFF4FF + FCFFBFCDC9FFF1FFFEFFAFC3BEFFEFFFFEFFBDCECBFFEBF8F6FFC3CBCAFFFDFF + FFFFC9C4C6FF090001FF00000000868686FFFFFFFFFFC0C2C2FFFDFFFFFFC5C7 + C7FFF9FEFDFFC0C5C4FFF6FCFBFFC4CAC9FFFAFFFFFFBCC2C1FFFAFFFFFFC0C5 + C6FFFAFFFFFF000001FF00000000828282FFFCFCFCFFFFFFFFFFC2C2C2FFF8F8 + F8FFC3C3C3FFFFFFFFFFCECECEFFF9F9F9FFBCBEBEFFFDFFFFFFB9BDBEFFFAFF + FFFFBCC4C4FF000606FF00000000858585FFFFFFFFFFB5B3B3FFFFFFFFFFD3D3 + D3FFFFFFFFFFBEC0C0FFFDFFFFFFC5C7C7FFF8FAFAFFC8CACAFFFDFFFFFFC2C4 + C4FFF8FAFAFF000000FF00000000848484FFFFFFFFFFFFFFFFFFC6C4C4FFF7F5 + F5FFC6C4C4FFFFFFFFFFCDCBCBFFF9F7F7FFCFCDCDFFFAF8F8FFCAC8C8FFFFFF + FFFFD4D4D4FF000000FF00000000808080FFFBF9F9FFCEC9CAFFFFFEFFFFCDC5 + C6FFFFFDFFFFD4C7C9FFFFF5F7FFD8CBCDFFFFFDFFFFD0C8C9FFFCF6F7FFC7C5 + C5FFF3F6F4FF000200FF00000000949494FF060606FF020000FF080304FF0500 + 00FF070000FF090000FF0F0204FF090000FF090000FF0F0708FF050000FF0402 + 02FF0C0F0DFF000100FF00000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000FF000000FF0C0C0CFF000000FF0000 + 00FF0C0C0CFF000000FF000000FF000000000000000000000000000000000000 + 0000000000000000000000000000000000FFFEFEFEFFFFFFFFFFFFFFFFFFFFFF + FFFFFAFAFAFFFFFFFFFF070707FF000000FF0000000000000000000000000000 + 0000000000000000000000000000000000FFFEFEFEFFFFFFFFFFFFFFFFFFFEFE + FEFFFFFFFFFFF3F3F3FF000000FFFFFFFFFF000000FF00000000000000000000 + 0000000000000000000000000000000000FFFEFEFEFFFFFFFFFFFFFFFFFFFFFF + FFFFFCFCFCFFFEFEFEFF020202FF000000FF000000FF090909FF000000000000 + 0000000000000000000000000000000000FFFEFEFEFFFFFFFFFFFFFFFFFFF8F8 + F8FFFFFFFFFFFFFFFFFFFFFFFFFFFAFAFAFFFFFFFFFF000000FF000000000000 + 0000000000000000000000000000000000FFFEFEFEFFFFFFFFFFFFFFFFFFFFFF + FFFFF8F8F8FFFAFAFAFFFFFFFFFFFFFFFFFFFFFFFFFF010101FF000000000000 + 0000000000000000000000000000000000FFFEFEFEFFFFFFFFFFFFFFFFFFFBFB + FBFFFEFEFEFFFFFFFFFFF0F0F0FFFDFDFDFFFBFBFBFF000000FF000000000000 + 0000000000000000000000000000000000FFFEFEFEFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFF7F7F7FFFFFFFFFFFFFFFFFFFFFFFFFF020202FF000000000000 + 0000000000000000000000000000000000FFFEFEFEFFFFFFFFFFFFFFFFFFFFFF + FFFFFAFAFAFFFDFDFDFFFFFFFFFFFBFBFBFFFDFDFDFF000000FF000000000000 + 0000000000000000000000000000030303FFF7F7F7FFFFFFFFFFFFFFFFFFFFFF + FFFFFBFBFBFFFFFFFFFFFFFFFFFFFDFDFDFFF8F8F8FF070707FF000000000000 + 0000000000000000000000000000010101FFFFFFFFFFF7F7F7FFFFFFFFFFFDFD + FDFFFFFFFFFFFDFDFDFFFFFFFFFFFFFFFFFFFFFFFFFF000000FF000000000000 + 0000000000000000000000000000010101FFFBFBFBFFFFFFFFFFFBFBFBFFFFFF + FFFFFFFFFFFFF7F7F7FFFAFAFAFFFDFDFDFFFBFBFBFF0C0C0CFF000000000000 + 00000000000000000000000000000A0A0AFF000000FF000000FF020202FF0303 + 03FF000000FF000000FF0C0C0CFF050505FF000000FF040404FF000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000FF000000FF000000FF000000FF00000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000FF000000FF00000000000000FF000000FF000000FF000000FF0000 + 0000000000FF0000000000000000000000000000000000000000000000000000 + 00FF0000000000000000000000000000000000000000000000FF000000FF0000 + 00FF000000FF0000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000FF0000 + 00FF000000FF0000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000000000000000000FF000000FF0000 + 00FF000000FF0000000000000000000000001B334EFF1B334EFF1B334EFF1B33 + 4EFF000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000001B334EFF66A5E5FF9AD3FEFF85C5FEFF66A5 + E5FF1B334EFF1B334EFF1B334EFF1B334EFF1B334EFF1B334EFF1B334EFF0000 + 00000000000000000000000000001B334EFF9AD3FEFF87C5FDFF82C2FEFF62AC + F8FF62ACF8FF62ACF8FF62ACF8FF62ACF8FF62ACF8FF62ACF8FF62ACF8FF0000 + 00FF0000000000000000000000001B334EFF8AC8FEFF82C2FEFF1B334EFF4D50 + 53FF4D5053FF4F5255FF575A5CFF4E5154FF4E5154FF505356FF505356FF4E51 + 54FF000000FF000000FF000000FF1B334EFF82C2FEFF4E86C4FF4C4F52FFF5F5 + F5FFF5F5F5FFECECECFFE4E4E4FFDCDCDCFFD4D4D4FFCBCBCBFFC4C4C4FFBCBC + BCFFB5B5B5FFB3B3B3FF303030FF1B334EFF82C2FEFF19314AFFDBDBDBFFDEDF + DFFFE7E8E8FFE4E6E6FFDEDFDFFFD1D2D2FFC6C7C7FFB9BABAFFACADADFF9FA0 + A0FF939494FF484949FF000000001B334EFF447DB7FF4E5153FFDADADAFFDADB + DBFFE0E1E1FFDCDDDDFFD5D6D6FFCACBCBFFC0C1C1FFB5B6B6FFA8A9A9FF9FA0 + A0FF676868FF212222FF000000001B334EFF183049FFCDCDCDFFC9CACAFFD4D5 + D5FFD4D5D5FFD0D2D2FFCBCCCCFFC1C2C2FFB8B9B9FFAEAFAFFFA1A2A2FF9495 + 95FF484949FF00000000000000001B334EFF505356FFCECECEFFBCBEBEFFC2C4 + C4FFC5C6C6FFC2C3C3FFBEBFBFFFB5B6B6FFADAEAEFFA4A5A5FF9D9E9EFF6E6F + 6FFF121212FF00000000000000001B334EFFBDBDBDFFA5A6A6FFA8AAAAFFABAD + ADFFACAEAEFFAAABABFFA6A7A7FFA0A1A1FF999A9AFF929494FF8B8D8DFF4849 + 49FF000000000000000000000000232323FF4A4A4AFF494A4AFF4B4C4CFF4C4C + 4CFF4B4C4CFF4A4B4BFF484949FF464646FF434343FF404141FF333434FF1E1F + 1FFF000000000000000000000000BBC1BEFFBBC2BEFFBBC1BEFFBAC1BEFFBBC2 + BFFFBBC2BFFFBBC2BFFFBBC2BFFFBAC1BEFFBAC1BEFFBAC1BEFFBAC1BEFFBAC1 + BEFFBAC1BEFFBBC2BFFFBAC1BEFFBBC1BEFFA6ACA9FF7C817FFF7C817FFF7C81 + 7FFF7C817FFF7C817FFF7C817FFF7C817FFF7C817FFF7C817FFF7C817FFF7C81 + 7FFF7C817FFF7C817FFF7C817FFFBBC1BEFF7C817FFF220200FF450501FF4605 + 02FF460502FF2E0301FF3D1310FF7B271FFF7B271FFF7B271FFF7B271FFF3D13 + 10FF3B2C14FF59431FFF58421EFFBBC1BEFF7C817FFF450501FF8B0A03FF8C0B + 04FF8C0B04FF5D0702FF7B2720FFF64E3FFFF64E3FFFF64E3FFFF64E3FFF7B27 + 20FF765929FFB2863EFFB1853DFFBBC1BEFF7C817FFF450501FF8B0A03FF8C0B + 04FF8C0B04FF5D0702FF7B2720FFF64E3FFFF64E3FFFF64E3FFFF64E3FFF7B27 + 20FF765929FFB2863EFFB1853DFFBBC1BEFF7C817FFF450501FF8B0A03FF8C0B + 04FF8C0B04FF5D0702FF7B2720FFF64E3FFFF64E3FFFF64E3FFFF64E3FFF7B27 + 20FF765929FFB2863EFFB1853DFFBBC1BEFF7C817FFF2E0301FF5D0702FF5D07 + 02FF5D0702FF3E0401FF521A15FFA4342AFFA4342AFFA4342AFFA4342AFF521A + 15FF4F3B1BFF765929FF765929FFBBC2BEFF7C817FFF171B05FF2E360AFF2E36 + 0AFF2E360AFF1F2406FF111D01FF213B02FF213B02FF223B02FF213B02FF111D + 01FF244E04FF377607FF377607FFBBC1BEFF7C817FFF2E3609FF5C6C13FF5D6D + 14FF5D6D14FF3E480DFF223B02FF437603FF437603FF437603FF437603FF223B + 02FF499D09FF6EED0EFF6DEC0DFFBBC1BEFF7C817FFF2E3609FF5C6C13FF5D6D + 14FF5D6D14FF3E480DFF223B02FF437603FF437603FF437603FF437603FF223B + 02FF499D09FF6EED0EFF6DEC0DFFBBC2BEFF7C817FFF2E3609FF5C6C14FF5D6C + 14FF5D6D14FF3E480DFF223B02FF437603FF437603FF437603FF437603FF223B + 02FF499D09FF6EED0EFF6DEC0DFFBBC2BEFF7C817FFF2E3609FF5C6C13FF5D6D + 14FF5D6D14FF3E480DFF223B02FF437603FF437603FF437603FF437603FF223B + 02FF499D09FF6EED0EFF6DEC0DFFBBC1BEFF7C817FFF171B05FF2E360AFF2E36 + 0AFF2E360AFF1F2406FF111D01FF223B02FF223B02FF223B02FF223B02FF111D + 01FF244F04FF377607FF377607FFBBC1BEFF7C817FFF0A5248FF15A590FF15A5 + 90FF15A590FF0E6E60FF022E52FF055DA5FF055DA5FF055DA5FF055DA5FF022E + 52FF0B145CFF101E8BFF101E8BFFBBC2BEFF7C817FFF0F7C6CFF1FF8D8FF20F9 + D9FF20F9D9FF15A690FF04467CFF088CF8FF088CF8FF088CF8FF088CF8FF0446 + 7CFF101E8BFF192ED1FF182DD0FFBBC2BFFF7C817FFF0F7C6CFF1FF8D8FF20F9 + D9FF20F9D9FF15A690FF04467CFF088CF8FF088CF8FF088CF8FF088CF8FF0446 + 7CFF101E8BFF192ED1FF182DD0FF } end end diff -Nru lazarus-0.9.30/examples/listview/testform.lrs lazarus-0.9.30.2/examples/listview/testform.lrs --- lazarus-0.9.30/examples/listview/testform.lrs 2007-03-02 09:48:08.000000000 +0000 +++ lazarus-0.9.30.2/examples/listview/testform.lrs 1970-01-01 00:00:00.000000000 +0000 @@ -1,250 +0,0 @@ -{ This is an automatically generated lazarus resource file } - -LazarusResources.Add('TForm1','FORMDATA',[ - 'TPF0'#6'TForm1'#5'Form1'#4'Left'#3'd'#1#6'Height'#3'+'#1#3'Top'#3#150#0#5'Wi' - +'dth'#3's'#2#18'HorzScrollBar.Page'#3'r'#2#18'VertScrollBar.Page'#3'*'#1#13 - +'ActiveControl'#7#9'CheckBox3'#7'Caption'#6#13'Listview test'#0#9'TNotebook' - +#9'Notebook1'#4'Left'#3#177#1#6'Height'#3#24#1#3'Top'#2#8#5'Width'#3#184#0#7 - +'Anchors'#11#5'akTop'#7'akRight'#0#9'PageIndex'#2#0#0#5'TPage'#5'Page3'#7'Ca' - +'ption'#6#2'LV'#0#6'TLabel'#7'Label11'#4'Left'#2#6#6'Height'#2#14#3'Top'#2'<' - +#5'Width'#2'/'#7'Caption'#6#10'Scrollbars'#5'Color'#7#6'clNone'#11'ParentCol' - +'or'#8#0#0#6'TLabel'#7'Label12'#4'Left'#2#6#6'Height'#2#14#3'Top'#2'z'#5'Wid' - +'th'#2'8'#7'Caption'#6#10'SortColumn'#5'Color'#7#6'clNone'#11'ParentColor'#8 - +#0#0#6'TLabel'#7'Label13'#4'Left'#2#6#6'Height'#2#14#3'Top'#3#154#0#5'Width' - +#2'-'#7'Caption'#6#8'SortType'#5'Color'#7#6'clNone'#11'ParentColor'#8#0#0#6 - +'TLabel'#7'Label14'#4'Left'#2#6#6'Height'#2#14#3'Top'#3#186#0#5'Width'#2'/'#7 - +'Caption'#6#9'ViewStyle'#5'Color'#7#6'clNone'#11'ParentColor'#8#0#0#9'TCheck' - +'Box'#9'CheckBox3'#4'Left'#2#6#6'Height'#2#13#3'Top'#2#4#5'Width'#2'F'#7'Cap' - +'tion'#6#11'Multiselect'#8'OnChange'#7#15'CheckBox3Change'#7'OnClick'#7#14'C' - +'heckBox3Click'#8'TabOrder'#2#0#0#0#9'TComboBox'#9'ComboBox2'#4'Left'#2'M'#6 - +'Height'#2#21#3'Top'#2'4'#5'Width'#2'_'#16'AutoCompleteText'#11#22'cbactEndO' - +'fLineComplete'#20'cbactSearchAscending'#0#9'ItemIndex'#2#6#13'Items.Strings' - +#1#6#6'ssNone'#6#12'ssHorizontal'#6#10'ssVertical'#6#6'ssBoth'#6#16'ssAutoHo' - +'rizontal'#6#14'ssAutoVertical'#6#10'ssAutoBoth'#0#9'MaxLength'#2#0#8'OnChan' - +'ge'#7#15'ComboBox2Change'#5'Style'#7#14'csDropDownList'#8'TabOrder'#2#1#4'T' - +'ext'#6#10'ssAutoBoth'#0#0#5'TEdit'#6'Edit11'#4'Left'#2'N'#6'Height'#2#23#3 - +'Top'#2't'#5'Width'#2'P'#8'OnChange'#7#12'Edit11Change'#8'TabOrder'#2#2#4'Te' - +'xt'#6#1'0'#0#0#9'TComboBox'#9'ComboBox3'#4'Left'#2'M'#6'Height'#2#21#3'Top' - +#3#146#0#5'Width'#2'_'#16'AutoCompleteText'#11#22'cbactEndOfLineComplete'#20 - +'cbactSearchAscending'#0#9'ItemIndex'#2#0#13'Items.Strings'#1#6#6'stNone'#6#6 - +'stData'#6#6'stText'#6#6'stBoth'#0#9'MaxLength'#2#0#8'OnChange'#7#15'ComboBo' - +'x3Change'#5'Style'#7#14'csDropDownList'#8'TabOrder'#2#3#4'Text'#6#6'stNone' - +#0#0#9'TComboBox'#9'ComboBox4'#4'Left'#2'N'#6'Height'#2#21#3'Top'#3#178#0#5 - +'Width'#2'_'#16'AutoCompleteText'#11#22'cbactEndOfLineComplete'#20'cbactSear' - +'chAscending'#0#9'ItemIndex'#2#3#13'Items.Strings'#1#6#6'vsIcon'#6#11'vsSmal' - +'lIcon'#6#6'vsList'#6#8'vsReport'#0#9'MaxLength'#2#0#8'OnChange'#7#15'ComboB' - +'ox4Change'#5'Style'#7#14'csDropDownList'#8'TabOrder'#2#4#4'Text'#6#8'vsRepo' - +'rt'#0#0#9'TCheckBox'#9'CheckBox4'#4'Left'#2#6#6'Height'#2#13#3'Top'#2#28#5 - +'Width'#2'H'#7'Caption'#6#9'RowSelect'#7'OnClick'#7#14'CheckBox4Click'#8'Tab' - +'Order'#2#5#0#0#9'TCheckBox'#9'CheckBox5'#4'Left'#2#6#6'Height'#2#13#3'Top'#2 - +'T'#5'Width'#2'z'#7'Caption'#6#17'ShowColumnHeaders'#7'Checked'#9#7'OnClick' - +#7#14'CheckBox5Click'#5'State'#7#9'cbChecked'#8'TabOrder'#2#6#0#0#9'TCheckBo' - +'x'#13'HideSelection'#4'Left'#2'['#6'Height'#2#13#3'Top'#2#4#5'Width'#2'V'#7 - +'Caption'#6#13'HideSelection'#7'Checked'#9#8'OnChange'#7#19'HideSelectionCha' - +'nge'#5'State'#7#9'cbChecked'#8'TabOrder'#2#7#0#0#0#5'TPage'#5'Page1'#7'Capt' - +'ion'#6#5'Items'#0#6'TLabel'#6'Label6'#4'Left'#2#6#6'Height'#2#17#3'Top'#2#4 - +#5'Width'#2'A'#7'Caption'#6#5'Index'#5'Color'#7#6'clNone'#11'ParentColor'#8#0 - +#0#6'TLabel'#6'Label7'#4'Left'#2'^'#6'Height'#2#17#3'Top'#2#4#5'Width'#2'A'#7 - +'Caption'#6#8'SubIndex'#5'Color'#7#6'clNone'#11'ParentColor'#8#0#0#6'TLabel' - +#6'Label9'#4'Left'#2#6#6'Height'#2#17#3'Top'#2't'#5'Width'#2'A'#7'Caption'#6 - +#4'Text'#5'Color'#7#6'clNone'#11'ParentColor'#8#0#0#6'TLabel'#7'Label10'#4'L' - +'eft'#2'^'#6'Height'#2#17#3'Top'#2't'#5'Width'#2'A'#7'Caption'#6#10'ImageInd' - +'ex'#5'Color'#7#6'clNone'#11'ParentColor'#8#0#0#7'TButton'#7'Button1'#4'Left' - +#2#6#6'Height'#2#25#3'Top'#2'4'#5'Width'#2'K'#25'BorderSpacing.InnerBorder'#2 - +#4#7'Caption'#6#6'Insert'#7'OnClick'#7#12'Button1Click'#8'TabOrder'#2#0#0#0#7 - +'TButton'#7'Button2'#4'Left'#2'^'#6'Height'#2#25#3'Top'#2'4'#5'Width'#2'K'#25 - +'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#6'Delete'#7'OnClick'#7#12'Butto' - +'n2Click'#8'TabOrder'#2#1#0#0#7'TButton'#7'Button5'#4'Left'#2#6#6'Height'#2 - +#25#3'Top'#2'T'#5'Width'#2'K'#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6 - +#6'Select'#7'OnClick'#7#12'Button5Click'#8'TabOrder'#2#2#0#0#7'TButton'#7'Bu' - +'tton6'#4'Left'#2'^'#6'Height'#2#25#3'Top'#2'T'#5'Width'#2'K'#25'BorderSpaci' - +'ng.InnerBorder'#2#4#7'Caption'#6#5'Focus'#7'OnClick'#7#12'Button6Click'#8'T' - +'abOrder'#2#3#0#0#5'TEdit'#5'Edit1'#4'Left'#2#6#6'Height'#2#23#3'Top'#2#20#5 - +'Width'#2'P'#8'OnChange'#7#11'Edit1Change'#8'TabOrder'#2#4#4'Text'#6#1'0'#0#0 - +#5'TEdit'#5'Edit4'#4'Left'#2#6#6'Height'#2#23#3'Top'#3#132#0#5'Width'#2'P'#8 - +'OnChange'#7#11'Edit4Change'#8'TabOrder'#2#5#4'Text'#6#5'Edit4'#0#0#5'TEdit' - +#5'Edit5'#4'Left'#2'^'#6'Height'#2#23#3'Top'#2#20#5'Width'#2'P'#8'OnChange'#7 - +#11'Edit5Change'#8'TabOrder'#2#6#4'Text'#6#1'0'#0#0#5'TEdit'#6'Edit10'#4'Lef' - ,'t'#2'^'#6'Height'#2#23#3'Top'#3#132#0#5'Width'#2'P'#8'OnChange'#7#12'Edit10' - +'Change'#8'TabOrder'#2#7#4'Text'#6#2'-1'#0#0#0#5'TPage'#5'Page2'#7'Caption'#6 - +#7'Columns'#0#6'TLabel'#6'Label1'#4'Left'#2#6#6'Height'#2#17#3'Top'#2'T'#5'W' - +'idth'#2'A'#7'Caption'#6#7'Caption'#5'Color'#7#6'clNone'#11'ParentColor'#8#0 - +#0#6'TLabel'#6'Label2'#4'Left'#2'^'#6'Height'#2#17#3'Top'#2'T'#5'Width'#2'A' - +#7'Caption'#6#5'Width'#5'Color'#7#6'clNone'#11'ParentColor'#8#0#0#6'TLabel'#6 - +'Label3'#4'Left'#2#6#6'Height'#2#17#3'Top'#3#132#0#5'Width'#2'A'#7'Caption'#6 - +#8'Minwidth'#5'Color'#7#6'clNone'#11'ParentColor'#8#0#0#6'TLabel'#6'Label4'#4 - +'Left'#2'^'#6'Height'#2#17#3'Top'#3#132#0#5'Width'#2'A'#7'Caption'#6#8'Maxwi' - +'dth'#5'Color'#7#6'clNone'#11'ParentColor'#8#0#0#6'TLabel'#6'Label5'#4'Left' - +#2#6#6'Height'#2#17#3'Top'#3#179#0#5'Width'#2'A'#7'Caption'#6#5'Image'#5'Col' - +'or'#7#6'clNone'#11'ParentColor'#8#0#0#6'TLabel'#6'Label8'#4'Left'#2#6#6'Hei' - +'ght'#2#17#3'Top'#2#4#5'Width'#2'A'#7'Caption'#6#5'Index'#5'Color'#7#6'clNon' - +'e'#11'ParentColor'#8#0#0#7'TButton'#7'Button3'#4'Left'#2#6#6'Height'#2#25#3 - +'Top'#2'4'#5'Width'#2'K'#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#6'In' - +'sert'#7'OnClick'#7#12'Button3Click'#8'TabOrder'#2#0#0#0#7'TButton'#7'Button' - +'4'#4'Left'#2'^'#6'Height'#2#25#3'Top'#2'4'#5'Width'#2'K'#25'BorderSpacing.I' - +'nnerBorder'#2#4#7'Caption'#6#6'Delete'#7'OnClick'#7#12'Button4Click'#8'TabO' - +'rder'#2#1#0#0#5'TEdit'#5'Edit2'#4'Left'#2#6#6'Height'#2#23#3'Top'#2#20#5'Wi' - +'dth'#2'P'#8'OnChange'#7#11'Edit2Change'#8'TabOrder'#2#2#4'Text'#6#1'0'#0#0#5 - +'TEdit'#5'Edit3'#4'Left'#2#6#6'Height'#2#23#3'Top'#2'd'#5'Width'#2'P'#8'OnCh' - +'ange'#7#11'Edit3Change'#8'TabOrder'#2#3#4'Text'#6#5'Edit3'#0#0#5'TEdit'#5'E' - +'dit6'#4'Left'#2'^'#6'Height'#2#23#3'Top'#2'd'#5'Width'#2'P'#8'OnChange'#7#11 - +'Edit6Change'#8'TabOrder'#2#4#4'Text'#6#1'0'#0#0#5'TEdit'#5'Edit7'#4'Left'#2 - +#6#6'Height'#2#23#3'Top'#3#148#0#5'Width'#2'P'#8'OnChange'#7#11'Edit7Change' - +#8'TabOrder'#2#7#4'Text'#6#1'0'#0#0#5'TEdit'#5'Edit8'#4'Left'#2'^'#6'Height' - +#2#23#3'Top'#3#148#0#5'Width'#2'P'#8'OnChange'#7#11'Edit8Change'#8'TabOrder' - +#2#9#4'Text'#6#1'0'#0#0#9'TCheckBox'#9'CheckBox1'#4'Left'#2#6#6'Height'#2#20 - +#3'Top'#3#220#0#5'Width'#2'P'#7'Caption'#6#7'Visible'#7'OnClick'#7#14'CheckB' - +'ox1Click'#8'TabOrder'#2#5#0#0#5'TEdit'#5'Edit9'#4'Left'#2#6#6'Height'#2#23#3 - +'Top'#3#193#0#5'Width'#2'P'#8'TabOrder'#2#6#4'Text'#6#2'-1'#0#0#9'TComboBox' - +#9'ComboBox1'#4'Left'#2'^'#6'Height'#2#21#3'Top'#3#191#0#5'Width'#2'P'#16'Au' - +'toCompleteText'#11#22'cbactEndOfLineComplete'#20'cbactSearchAscending'#0#13 - +'Items.Strings'#1#6#13'taLeftJustify'#6#14'taRightJustify'#6#8'taCenter'#0#9 - +'MaxLength'#2#0#8'OnChange'#7#15'ComboBox1Change'#11'ParentCtl3D'#8#8'TabOrd' - +'er'#2#8#0#0#9'TCheckBox'#9'CheckBox2'#4'Left'#2'^'#6'Height'#2#20#3'Top'#3 - +#220#0#5'Width'#2'P'#7'Caption'#6#8'Autosize'#7'OnClick'#7#14'CheckBox2Click' - +#8'TabOrder'#2#10#0#0#0#0#9'TListView'#9'ListView1'#4'Left'#2#8#6'Height'#3 - +#24#1#3'Top'#2#8#5'Width'#3#161#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight' - +#8'akBottom'#0#11'BorderWidth'#2#2#7'Columns'#14#1#7'Caption'#6#3'One'#0#1#7 - +'Caption'#6#3'Two'#0#0#10'Items.Data'#10'P'#0#0#0'R'#254#255#255#2#0#0#0#0#0 - +#0#0#255#255#255#255#255#255#255#255#2#0#0#0#0#0#0#0#5'New 1'#5'Sub 1'#5'Sub' - +' 2'#255#255#255#255#255#255#255#255#255#255#255#255#0#0#0#0#0#0#0#0#5'New 2' - +#255#255#255#255#255#255#255#255#10'ScrollBars'#7#10'ssAutoBoth'#11'SmallIma' - +'ges'#7#10'ImageList1'#8'TabOrder'#2#1#9'ViewStyle'#7#8'vsReport'#13'OnColum' - +'nClick'#7#20'ListView1ColumnClick'#12'OnSelectItem'#7#19'ListView1SelectIte' - +'m'#0#0#10'TImageList'#10'ImageList1'#8'OnChange'#7#16'ImageList1Change'#4'l' - +'eft'#3#243#0#3'top'#3#253#1#6'Bitmap'#10#211#28#0#0'li'#4#0#0#0#16#0#0#0#16 - +#0#0#0'%'#11#0#0'/* XPM */'#10'static char * btn_newform_xpm[] = {'#10'"15 1' - +'3 147 2",'#10'" '#9'c None",'#10'". '#9'c #8D8E93",'#10'"+ '#9'c #7D8391",' - +#10'"@ '#9'c #798194",'#10'"# '#9'c #80889D",'#10'"$ '#9'c #7C849B",'#10'"% ' - +#9'c #747A94",'#10'"& '#9'c #8085A2",'#10'"* '#9'c #7B80A0",'#10'"= '#9'c #7' - +'F84A2",'#10'"- '#9'c #7E81A0",'#10'"; '#9'c #7D819C",'#10'"> '#9'c #7A7C93"' - +','#10'", '#9'c #818495",'#10'"'' '#9'c #797B88",'#10'") '#9'c #868992",'#10 - +'"! '#9'c #7C7B8D",'#10'"~ '#9'c #F9F9FF",'#10'"{ '#9'c #870013",'#10'"] '#9 - +'c #AE0013",'#10'"^ '#9'c #D30013",'#10'"/ '#9'c #FCF4FF",'#10'"( '#9'c #FEF' - +'AFF",'#10'"_ '#9'c #00000E",'#10'": '#9'c #858496",'#10'"< '#9'c #0A0627",' - +#10'"[ '#9'c #86868E",'#10'"} '#9'c #F7F9FF",'#10'"| '#9'c #F9FCFF",'#10'"1 ' - +#9'c #FBFBFF",'#10'"2 '#9'c #FBFAFF",'#10'"3 '#9'c #EEEDFF",'#10'"4 '#9'c #F' - +'8F5FF",'#10'"5 '#9'c #FAF8FF",'#10'"6 '#9'c #FBF7FF",'#10'"7 '#9'c #FEFBFF"' - +','#10'"8 '#9'c #FEFCFF",'#10'"9 '#9'c #05040C",'#10'"0 '#9'c #838486",'#10 - +'"a '#9'c #FCFFFF",'#10'"b '#9'c #F2F7FA",'#10'"c '#9'c #C6CBCE",'#10'"d '#9 - +'c #F3F9F9",'#10'"e '#9'c #C3C7C6",'#10'"f '#9'c #C0C5C1",'#10'"g '#9'c #FCF' - +'FFD",'#10'"h '#9'c #C3C5C4",'#10'"i '#9'c #FEFFFF",'#10'"j '#9'c #CACBCD",' - ,#10'"k '#9'c #F6F7FB",'#10'"l '#9'c #CCCBD1",'#10'"m '#9'c #010008",'#10'"n ' - +#9'c #848685",'#10'"o '#9'c #F8FCFB",'#10'"p '#9'c #C5CAC6",'#10'"q '#9'c #F' - +'CFFFB",'#10'"r '#9'c #D0D6CC",'#10'"s '#9'c #EFF3E5",'#10'"t '#9'c #C6CABB"' - +','#10'"u '#9'c #F8FCEB",'#10'"v '#9'c #C8CCBB",'#10'"w '#9'c #FAFCEE",'#10 - +'"x '#9'c #D0D2C7",'#10'"y '#9'c #FAFBF6",'#10'"z '#9'c #C1C1C3",'#10'"A '#9 - +'c #FBF8FF",'#10'"B '#9'c #02000D",'#10'"C '#9'c #868686",'#10'"D '#9'c #FBF' - +'DFA",'#10'"E '#9'c #FEFFFB",'#10'"F '#9'c #C6C9C2",'#10'"G '#9'c #FCFFF4",' - +#10'"H '#9'c #C9CDBF",'#10'"I '#9'c #FEFFF1",'#10'"J '#9'c #BEC3AF",'#10'"K ' - +#9'c #FEFFEF",'#10'"L '#9'c #CBCEBD",'#10'"M '#9'c #F6F8EB",'#10'"N '#9'c #C' - +'ACBC3",'#10'"O '#9'c #FFFFFD",'#10'"P '#9'c #C6C4C9",'#10'"Q '#9'c #010009"' - +','#10'"R '#9'c #FFFFFF",'#10'"S '#9'c #C2C2C0",'#10'"T '#9'c #C7C7C5",'#10 - +'"U '#9'c #FDFEF9",'#10'"V '#9'c #C4C5C0",'#10'"W '#9'c #FBFCF6",'#10'"X '#9 - +'c #C9CAC4",'#10'"Y '#9'c #FFFFFA",'#10'"Z '#9'c #C1C2BC",'#10'"` '#9'c #C6C' - +'5C0",'#10'" .'#9'c #010000",'#10'"..'#9'c #828282",'#10'"+.'#9'c #FCFCFC",' - +#10'"@.'#9'c #C2C2C2",'#10'"#.'#9'c #F8F8F8",'#10'"$.'#9'c #C3C3C3",'#10'"%.' - +#9'c #CECECE",'#10'"&.'#9'c #F9F9F9",'#10'"*.'#9'c #BEBEBC",'#10'"=.'#9'c #B' - +'EBDB9",'#10'"-.'#9'c #C4C4BC",'#10'";.'#9'c #060600",'#10'">.'#9'c #858585"' - +','#10'",.'#9'c #B3B3B5",'#10'"''.'#9'c #D3D3D3",'#10'").'#9'c #C0C0BE",'#10 - +'"!.'#9'c #FAFAF8",'#10'"~.'#9'c #CACAC8",'#10'"{.'#9'c #C4C4C2",'#10'"].'#9 - +'c #000000",'#10'"^.'#9'c #848484",'#10'"/.'#9'c #C4C4C6",'#10'"(.'#9'c #F5F' - +'5F7",'#10'"_.'#9'c #CBCBCD",'#10'":.'#9'c #F7F7F9",'#10'"<.'#9'c #CDCDCF",' - +#10'"[.'#9'c #F8F8FA",'#10'"}.'#9'c #C8C8CA",'#10'"|.'#9'c #D4D4D4",'#10'"1.' - +#9'c #808080",'#10'"2.'#9'c #F9F9FB",'#10'"3.'#9'c #CAC9CE",'#10'"4.'#9'c #F' - +'FFEFF",'#10'"5.'#9'c #C6C5CD",'#10'"6.'#9'c #FFFDFF",'#10'"7.'#9'c #C9C7D4"' - +','#10'"8.'#9'c #F7F5FF",'#10'"9.'#9'c #CDCBD8",'#10'"0.'#9'c #C9C8D0",'#10 - +'"a.'#9'c #F7F6FC",'#10'"b.'#9'c #C5C5C7",'#10'"c.'#9'c #F4F6F3",'#10'"d.'#9 - +'c #000200",'#10'"e.'#9'c #949494",'#10'"f.'#9'c #060606",'#10'"g.'#9'c #000' - +'002",'#10'"h.'#9'c #040308",'#10'"i.'#9'c #000005",'#10'"j.'#9'c #000007",' - +#10'"k.'#9'c #000009",'#10'"l.'#9'c #04020F",'#10'"m.'#9'c #08070F",'#10'"n.' - +#9'c #020204",'#10'"o.'#9'c #0D0F0C",'#10'"p.'#9'c #000100",'#10'". + @ # $ ' - +'% & * = - ; > , '' ) ",'#10'"! ~ { { { { { ] ] ^ ^ / ^ ( _ ",'#10'": { { { ' - +'{ ] ] ] ^ ^ ^ ^ ^ < _ ",'#10'"[ } | 1 1 2 3 2 4 5 6 7 8 8 9 ",'#10'"0 a b c' - +' d e a f g h i j k l m ",'#10'"n o p q r s t u v w x y z A B ",'#10'"C D E ' - +'F G H I J K L M N O P Q ",'#10'"C R S O T U V W X Y Z Y ` Y .",'#10'"..+.R' - +' @.#.$.R %.&.*.O =.Y -.;.",'#10'">.R ,.R ''.R ).O T !.~.O {.!.].",'#10'"^.R' - +' R /.(./.R _.:.<.[.}.R |.].",'#10'"1.2.3.4.5.6.7.8.9.6.0.a.b.c.d.",'#10'"e.' - +'f.g.h.i.j.k.l.k.k.m.i.n.o.p."};'#10'8'#2#0#0'/* XPM */'#10'static char * bt' - +'n_newunit_xpm[] = {'#10'"11 13 21 1",'#10'" '#9'c None",'#10'".'#9'c #00000' - +'0",'#10'"+'#9'c #0C0C0C",'#10'"@'#9'c #FEFEFE",'#10'"#'#9'c #FFFFFF",'#10'"' - +'$'#9'c #FAFAFA",'#10'"%'#9'c #070707",'#10'"&'#9'c #F3F3F3",'#10'"*'#9'c #F' - +'CFCFC",'#10'"='#9'c #020202",'#10'"-'#9'c #090909",'#10'";'#9'c #F8F8F8",' - +#10'">'#9'c #010101",'#10'",'#9'c #FBFBFB",'#10'"'''#9'c #F0F0F0",'#10'")'#9 - +'c #FDFDFD",'#10'"!'#9'c #F7F7F7",'#10'"~'#9'c #030303",'#10'"{'#9'c #0A0A0A' - +'",'#10'"]'#9'c #050505",'#10'"^'#9'c #040404",'#10'"..+..+.. ",'#10'".@##' - +'#$#%. ",'#10'".@##@#&.#. ",'#10'".@###*@=..-",'#10'".@##;###$#.",'#10'".@#' - +'##;$###>",'#10'".@##,@#''),.",'#10'".@####!###=",'#10'".@###$)#,).",'#10'"~' - +'!###,##);%",'#10'">#!#)#)###.",'#10'">,#,##!$),+",'#10'"{..=~..+].^"};'#10 - +#27#9#0#0'/* XPM */'#10'static char * btn_openfile_xpm[] = {'#10'"18 18 97 2' - +'",'#10'" '#9'c None",'#10'". '#9'c #000000",'#10'"+ '#9'c #4E331B",'#10'"@' - +' '#9'c #E5A566",'#10'"# '#9'c #FED39A",'#10'"$ '#9'c #FEC585",'#10'"% '#9'c' - +' #FDC587",'#10'"& '#9'c #FEC282",'#10'"* '#9'c #F8AC62",'#10'"= '#9'c #FEC8' - +'8A",'#10'"- '#9'c #53504D",'#10'"; '#9'c #55524F",'#10'"> '#9'c #5C5A57",' - +#10'", '#9'c #54514E",'#10'"'' '#9'c #565350",'#10'") '#9'c #C4864E",'#10'"!' - +' '#9'c #524F4C",'#10'"~ '#9'c #F5F5F5",'#10'"{ '#9'c #ECECEC",'#10'"] '#9'c' - +' #E4E4E4",'#10'"^ '#9'c #DCDCDC",'#10'"/ '#9'c #D4D4D4",'#10'"( '#9'c #CBCB' - +'CB",'#10'"_ '#9'c #C4C4C4",'#10'": '#9'c #BCBCBC",'#10'"< '#9'c #B5B5B5",' - +#10'"[ '#9'c #B3B3B3",'#10'"} '#9'c #303030",'#10'"| '#9'c #4A3119",'#10'"1 ' - +#9'c #DBDBDB",'#10'"2 '#9'c #DFDFDE",'#10'"3 '#9'c #E8E8E7",'#10'"4 '#9'c #E' - +'6E6E4",'#10'"5 '#9'c #D2D2D1",'#10'"6 '#9'c #C7C7C6",'#10'"7 '#9'c #BABAB9"' - +','#10'"8 '#9'c #ADADAC",'#10'"9 '#9'c #A0A09F",'#10'"0 '#9'c #949493",'#10 - +'"a '#9'c #494948",'#10'"b '#9'c #B77D44",'#10'"c '#9'c #53514E",'#10'"d '#9 - +'c #DADADA",'#10'"e '#9'c #DBDBDA",'#10'"f '#9'c #E1E1E0",'#10'"g '#9'c #DDD' - +'DDC",'#10'"h '#9'c #D6D6D5",'#10'"i '#9'c #CBCBCA",'#10'"j '#9'c #C1C1C0",' - +#10'"k '#9'c #B6B6B5",'#10'"l '#9'c #A9A9A8",'#10'"m '#9'c #686867",'#10'"n ' - ,#9'c #222221",'#10'"o '#9'c #493018",'#10'"p '#9'c #CDCDCD",'#10'"q '#9'c #C' - +'ACAC9",'#10'"r '#9'c #D5D5D4",'#10'"s '#9'c #D2D2D0",'#10'"t '#9'c #CCCCCB"' - +','#10'"u '#9'c #C2C2C1",'#10'"v '#9'c #B9B9B8",'#10'"w '#9'c #AFAFAE",'#10 - +'"x '#9'c #A2A2A1",'#10'"y '#9'c #959594",'#10'"z '#9'c #CECECE",'#10'"A '#9 - +'c #BEBEBC",'#10'"B '#9'c #C4C4C2",'#10'"C '#9'c #C6C6C5",'#10'"D '#9'c #C3C' - +'3C2",'#10'"E '#9'c #BFBFBE",'#10'"F '#9'c #AEAEAD",'#10'"G '#9'c #A5A5A4",' - +#10'"H '#9'c #9E9E9D",'#10'"I '#9'c #6F6F6E",'#10'"J '#9'c #121212",'#10'"K ' - +#9'c #BDBDBD",'#10'"L '#9'c #A6A6A5",'#10'"M '#9'c #AAAAA8",'#10'"N '#9'c #A' - +'DADAB",'#10'"O '#9'c #AEAEAC",'#10'"P '#9'c #ABABAA",'#10'"Q '#9'c #A7A7A6"' - +','#10'"R '#9'c #A1A1A0",'#10'"S '#9'c #9A9A99",'#10'"T '#9'c #949492",'#10 - +'"U '#9'c #8D8D8B",'#10'"V '#9'c #232323",'#10'"W '#9'c #4A4A4A",'#10'"X '#9 - +'c #4A4A49",'#10'"Y '#9'c #4C4C4B",'#10'"Z '#9'c #4C4C4C",'#10'"` '#9'c #4B4' - +'B4A",'#10'" .'#9'c #464646",'#10'"..'#9'c #434343",'#10'"+.'#9'c #414140",' - +#10'"@.'#9'c #343433",'#10'"#.'#9'c #1F1F1E",'#10'" . . . . ' - +' ",'#10'" . . . . . . . ",'#10'" . ' - +' . . . . ",'#10'" . . . ",'#10 - +'" . . . . ",'#10'" + + + + ' - +' ",'#10'"+ @ # $ @ + + + + + + + ",'#10'"+ # % & * * * * *' - +' * * * . ",'#10'"+ = & + - - ; > , , '' '' , . . . ",'#10'"+ ' - +'& ) ! ~ ~ { ] ^ / ( _ : < [ } ",'#10'"+ & | 1 2 3 4 2 5 6 7 8 9 0 a ' - +' ",'#10'"+ b c d e f g h i j k l 9 m n ",'#10'"+ o p q r r s t u v ' - +'w x y a ",'#10'"+ '' z A B C D E k F G H I J ",'#10'"+ K L ' - +'M N O P Q R S T U a ",'#10'"V W X Y Z Y ` a ...+.@.#. "' - +','#10'" ",'#10'" ' - +' "};'#10'='#6#0#0'/* XPM */'#10'static char * color_xpm[] = {'#10 - +'"20 20 71 1",'#10'" '#9'c None",'#10'".'#9'c #BEC1BB",'#10'"+'#9'c #BEC2BB"' - +','#10'"@'#9'c #BEC1BA",'#10'"#'#9'c #BFC2BB",'#10'"$'#9'c #A9ACA6",'#10'"%' - +#9'c #7F817C",'#10'"&'#9'c #000222",'#10'"*'#9'c #010545",'#10'"='#9'c #0205' - +'46",'#10'"-'#9'c #01032E",'#10'";'#9'c #10133D",'#10'">'#9'c #1F277B",'#10 - +'",'#9'c #142C3B",'#10'"'''#9'c #1F4359",'#10'")'#9'c #1E4258",'#10'"!'#9'c ' - +'#0F212C",'#10'"~'#9'c #030A8B",'#10'"{'#9'c #040B8C",'#10'"]'#9'c #02075D",' - +#10'"^'#9'c #20277B",'#10'"/'#9'c #3F4EF6",'#10'"('#9'c #295976",'#10'"_'#9 - +'c #3E86B2",'#10'":'#9'c #3D85B1",'#10'"<'#9'c #01043E",'#10'"['#9'c #151A52' - +'",'#10'"}'#9'c #2A34A4",'#10'"|'#9'c #1B3B4F",'#10'"1'#9'c #051B17",'#10'"2' - +#9'c #0A362E",'#10'"3'#9'c #06241F",'#10'"4'#9'c #011D11",'#10'"5'#9'c #023B' - +'21",'#10'"6'#9'c #023B22",'#10'"7'#9'c #044E24",'#10'"8'#9'c #077637",'#10 - +'"9'#9'c #033B1B",'#10'"0'#9'c #09362E",'#10'"a'#9'c #136C5C",'#10'"b'#9'c #' - +'146D5D",'#10'"c'#9'c #0D483E",'#10'"d'#9'c #037643",'#10'"e'#9'c #099D49",' - +#10'"f'#9'c #0EED6E",'#10'"g'#9'c #0DEC6D",'#10'"h'#9'c #146C5C",'#10'"i'#9 - +'c #146C5D",'#10'"j'#9'c #044F24",'#10'"k'#9'c #48520A",'#10'"l'#9'c #90A515' - +'",'#10'"m'#9'c #606E0E",'#10'"n'#9'c #522E02",'#10'"o'#9'c #A55D05",'#10'"p' - +#9'c #5C140B",'#10'"q'#9'c #8B1E10",'#10'"r'#9'c #450F08",'#10'"s'#9'c #6C7C' - +'0F",'#10'"t'#9'c #D8F81F",'#10'"u'#9'c #D9F920",'#10'"v'#9'c #90A615",'#10 - +'"w'#9'c #7C4604",'#10'"x'#9'c #F88C08",'#10'"y'#9'c #D12E19",'#10'"z'#9'c #' - +'D02D18",'#10'"A'#9'c #68170C",'#10'"B'#9'c #363E08",'#10'"C'#9'c #6C7C10",' - +#10'"D'#9'c #48530A",'#10'"E'#9'c #3E2302",'#10'"F'#9'c #340B06",'#10'".+.@#' - +'###@@@@@@#@@@@@",'#10'".$%%%%%%%%%%%%%%%%$@",'#10'".%&*==-;>>>>;,''))!%@",' - +#10'".%*~{{]^////^(_::''%@",'#10'".%*~{{]^////^(_::''%@",'#10'".%*~{{]^////^' - +'(_::''%@",'#10'".%-]]]<[}}}}[|(((,%@",'#10'"+%1222345565478889%@",'#10'".%0' - +'abbc6dddd6efgg8%@",'#10'".%0abbc6dddd6efgg8%@",'#10'"+%0hibc6dddd6efgg8%@",' - +#10'"+%0abbc6dddd6efgg8%@",'#10'".%12223466664j8889%@",'#10'".%klllmnoooonpq' - +'qqr%@",'#10'"+%stuuvwxxxxwqyzzA%@",'#10'"#%stuuvwxxxxwqyzzA%@",'#10'".%stuu' - +'vwxxxxwqyzzA%@",'#10'"+%BCCCDEwwwwErAAAF%@",'#10'"+$%%%%%%%%%%%%%%%%$@",'#10 - +'".#.@####@@@@@@#@@@@@"};'#10#0#0#0 -]); diff -Nru lazarus-0.9.30/examples/listview/testform.pp lazarus-0.9.30.2/examples/listview/testform.pp --- lazarus-0.9.30/examples/listview/testform.pp 2007-03-02 09:48:08.000000000 +0000 +++ lazarus-0.9.30.2/examples/listview/testform.pp 2011-11-23 16:14:31.000000000 +0000 @@ -5,7 +5,7 @@ interface uses - Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, ComCtrls, + Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ComCtrls, Buttons, StdCtrls, ExtCtrls; type @@ -56,10 +56,10 @@ Label8: TLabel; Label9: TLabel; ListView1: TListView; - Notebook1: TNotebook; - Page1: TPage; - Page2: TPage; - Page3: TPage; + PageControl1: TPageControl; + Page1: TTabSheet; + Page2: TTabSheet; + Page3: TTabSheet; procedure Button1Click(Sender: TObject); procedure Button2Click(Sender: TObject); procedure Button3Click(Sender: TObject); @@ -68,7 +68,6 @@ procedure Button6Click(Sender: TObject); procedure CheckBox1Click (Sender: TObject ); procedure CheckBox2Click (Sender: TObject ); - procedure CheckBox3Change(Sender: TObject); procedure CheckBox3Click(Sender: TObject); procedure CheckBox4Click(Sender: TObject); procedure CheckBox5Click(Sender: TObject); @@ -87,7 +86,6 @@ procedure Edit7Change(Sender: TObject); procedure Edit8Change(Sender: TObject); procedure HideSelectionChange(Sender: TObject); - procedure ImageList1Change(Sender: TObject); procedure ListView1ColumnClick(Sender: TObject; Column: TListColumn); procedure ListView1SelectItem(Sender: TObject; Item: TListItem; Selected: Boolean); private @@ -103,6 +101,8 @@ implementation +{$R *.lfm} + { TForm1 } procedure TForm1.Button1Click(Sender: TObject); @@ -170,10 +170,6 @@ Column.Autosize := CheckBox2.Checked; end; -procedure TForm1.CheckBox3Change(Sender: TObject); -begin -end; - procedure TForm1.CheckBox3Click(Sender: TObject); begin Listview1.Multiselect := CheckBox3.Checked; @@ -304,11 +300,6 @@ Listview1.HideSelection := HideSelection.Checked; end; -procedure TForm1.ImageList1Change(Sender: TObject); -begin - -end; - procedure TForm1.ListView1ColumnClick(Sender: TObject; Column: TListColumn); begin Edit2.Text := IntToStr(Column.Index); @@ -360,8 +351,5 @@ CheckBox2.Checked := Column.AutoSize; end; -initialization - {$I testform.lrs} - end. diff -Nru lazarus-0.9.30/examples/notebooktest.pp lazarus-0.9.30.2/examples/notebooktest.pp --- lazarus-0.9.30/examples/notebooktest.pp 2005-10-01 00:38:04.000000000 +0000 +++ lazarus-0.9.30.2/examples/notebooktest.pp 2011-11-23 16:14:31.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: notebooktest.pp 7869 2005-10-01 00:38:04Z mattias $ } +{ $Id$ } { /*************************************************************************** NoteBookTest.pp diff -Nru lazarus-0.9.30/ide/basedebugmanager.pas lazarus-0.9.30.2/ide/basedebugmanager.pas --- lazarus-0.9.30/ide/basedebugmanager.pas 2010-12-16 18:56:37.000000000 +0000 +++ lazarus-0.9.30.2/ide/basedebugmanager.pas 2011-11-23 16:14:31.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: basedebugmanager.pas 28730 2010-12-16 18:56:37Z martin $ } +{ $Id$ } { /*************************************************************************** basedebugmanager.pp diff -Nru lazarus-0.9.30/ide/buildlazdialog.pas lazarus-0.9.30.2/ide/buildlazdialog.pas --- lazarus-0.9.30/ide/buildlazdialog.pas 2011-01-17 22:44:39.000000000 +0000 +++ lazarus-0.9.30.2/ide/buildlazdialog.pas 2011-11-23 16:14:31.000000000 +0000 @@ -490,6 +490,13 @@ end; NewTargetDirectory:=CleanAndExpandDirectory(NewTargetDirectory); debugln('CreateBuildLazarusOptions Options.TargetDirectory=',NewTargetDirectory); + NewUnitDirectory:=AppendPathDelim(NewTargetDirectory)+'units' + +PathDelim+NewTargetCPU+'-'+NewTargetOS; + debugln('CreateBuildLazarusOptions UnitsTargetDirectory=',NewUnitDirectory); + Result:=ForceDirectoryInteractive(NewUnitDirectory,[]); + if Result<>mrOk then exit; + NewTargetDirectory:=AppendPathDelim(NewTargetDirectory)+'bin'; + debugln('CreateBuildLazarusOptions ExecutableTargetDirectory=',NewTargetDirectory); Result:=ForceDirectoryInteractive(NewTargetDirectory,[]); if Result<>mrOk then exit; if OSLocksExecutables and not CrossCompiling then begin @@ -588,7 +595,7 @@ if NewUnitDirectory<>'' then // FPC interpretes '\ ' as an escape for a space in a path, // so make sure the directory doesn't end with the path delimeter. - AppendExtraOption('-FU'+ChompPathDelim(NewTargetDirectory)); + AppendExtraOption('-FU'+ChompPathDelim(NewUnitDirectory)); if NewTargetDirectory<>'' then // FPC interpretes '\ ' as an escape for a space in a path, diff -Nru lazarus-0.9.30/ide/buildprofilemanager.pas lazarus-0.9.30.2/ide/buildprofilemanager.pas --- lazarus-0.9.30/ide/buildprofilemanager.pas 2010-12-16 17:55:43.000000000 +0000 +++ lazarus-0.9.30.2/ide/buildprofilemanager.pas 2011-11-23 16:14:31.000000000 +0000 @@ -650,7 +650,8 @@ else fMakeModes[i]:=mmNone; end; - Add(Profile); + // Return this one as default for fixes branch, when user clicks on build Lazarus. + Result:=Add(Profile); // Build IDE without Packages Profile:=TBuildLazarusProfile.Create(Self, lisLazBuildQBOBuildIDEwithoutPackages); @@ -678,8 +679,7 @@ else fMakeModes[i]:=mmBuild; end; - // Return this one as default. Needed when building packages without saved profiles. - Result:=Add(Profile); + Add(Profile); // Clean Up + Build all Profile:=TBuildLazarusProfile.Create(Self, lisLazBuildQBOCleanUpBuildAll); diff -Nru lazarus-0.9.30/ide/checklfmdlg.pas lazarus-0.9.30.2/ide/checklfmdlg.pas --- lazarus-0.9.30/ide/checklfmdlg.pas 2010-10-02 22:56:52.000000000 +0000 +++ lazarus-0.9.30.2/ide/checklfmdlg.pas 2011-11-23 16:14:31.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: checklfmdlg.pas 27550 2010-10-02 22:56:52Z juha $ } +{ $Id$ } { /*************************************************************************** checklfmdlg.pas diff -Nru lazarus-0.9.30/ide/codeexplorer.pas lazarus-0.9.30.2/ide/codeexplorer.pas --- lazarus-0.9.30/ide/codeexplorer.pas 2010-11-27 18:25:25.000000000 +0000 +++ lazarus-0.9.30.2/ide/codeexplorer.pas 2011-11-23 16:14:31.000000000 +0000 @@ -1279,6 +1279,7 @@ end; begin + if EndPos>Tool.SrcLen then EndPos:=Tool.SrcLen+1; if (StartPos<1) or (StartPos>=EndPos) then exit; CheckWrongIndentation:=cefcWrongIndentation in CodeExplorerOptions.ObserverCategories; FindUnnamedConstants:=cefcUnnamedConsts in CodeExplorerOptions.ObserverCategories; diff -Nru lazarus-0.9.30/ide/compileroptions.pp lazarus-0.9.30.2/ide/compileroptions.pp --- lazarus-0.9.30/ide/compileroptions.pp 2011-02-05 12:45:54.000000000 +0000 +++ lazarus-0.9.30.2/ide/compileroptions.pp 2011-11-23 16:14:31.000000000 +0000 @@ -2727,6 +2727,7 @@ CurOutputDir:=CreateRelativePath(CurOutputDir,BaseDirectory,true); end else CurOutputDir:=''; + debugln(['TBaseCompilerOptions.MakeOptionsString UnitOutputDirectory="',UnitOutputDirectory,'" CurOutputDir="',CurOutputDir,'"']); if CurOutputDir<>'' then switches := switches + ' '+PrepareCmdLineOption('-FU'+CurOutputDir); end; @@ -3435,9 +3436,12 @@ procedure TParsedCompilerOptions.SetOutputDirectoryOverride(const AValue: string ); +var + NewDir: String; begin - if FOutputDirectoryOverride=AValue then exit; - FOutputDirectoryOverride:=AValue; + NewDir:=AppendPathDelim(TrimFilename(AValue)); + if FOutputDirectoryOverride=NewDir then exit; + FOutputDirectoryOverride:=NewDir; if InvalidateParseOnChange then IncreaseCompilerParseStamp;// the output dir is used by other packages if FOutputDirectoryOverride<>'' then diff -Nru lazarus-0.9.30/ide/compiler.pp lazarus-0.9.30.2/ide/compiler.pp --- lazarus-0.9.30/ide/compiler.pp 2010-05-14 16:02:32.000000000 +0000 +++ lazarus-0.9.30.2/ide/compiler.pp 2011-11-23 16:14:31.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: compiler.pp 25404 2010-05-14 16:02:32Z paul $ } +{ $Id$ } { /*************************************************************************** compiler.pp - Lazarus IDE unit diff -Nru lazarus-0.9.30/ide/componentlist.pas lazarus-0.9.30.2/ide/componentlist.pas --- lazarus-0.9.30/ide/componentlist.pas 2010-06-22 22:45:09.000000000 +0000 +++ lazarus-0.9.30.2/ide/componentlist.pas 2011-11-23 16:14:31.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: componentlist.pas 26270 2010-06-22 22:45:09Z mattias $ } +{ $Id$ } { /*************************************************************************** findcomponent.pas diff -Nru lazarus-0.9.30/ide/componentpalette.pas lazarus-0.9.30.2/ide/componentpalette.pas --- lazarus-0.9.30/ide/componentpalette.pas 2010-11-18 18:55:45.000000000 +0000 +++ lazarus-0.9.30.2/ide/componentpalette.pas 2011-11-23 16:14:31.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: componentpalette.pas 28326 2010-11-18 18:55:45Z mattias $ } +{ $Id$ } { /*************************************************************************** componentpalette.pas diff -Nru lazarus-0.9.30/ide/condef.pas lazarus-0.9.30.2/ide/condef.pas --- lazarus-0.9.30/ide/condef.pas 2010-01-15 02:06:37.000000000 +0000 +++ lazarus-0.9.30.2/ide/condef.pas 2011-11-23 16:14:31.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: condef.pas 23458 2010-01-15 02:06:37Z paul $ } +{ $Id$ } { /*************************************************************************** condef.pas - Conditional Defines diff -Nru lazarus-0.9.30/ide/debugmanager.pas lazarus-0.9.30.2/ide/debugmanager.pas --- lazarus-0.9.30/ide/debugmanager.pas 2010-12-16 18:56:37.000000000 +0000 +++ lazarus-0.9.30.2/ide/debugmanager.pas 2011-11-23 16:14:31.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: debugmanager.pas 28730 2010-12-16 18:56:37Z martin $ } +{ $Id$ } { /*************************************************************************** debugmanager.pp @@ -2029,6 +2029,7 @@ begin TheDialog := TAssemblerDlg(FDialogs[ddtAssembler]); TheDialog.Disassembler := FDisassembler; + TheDialog.DebugManager := Self; TheDialog.SetLocation(FDebugger, FCurrentLocation.Address); end; @@ -2537,7 +2538,10 @@ end; if (dmsDebuggerObjectBroken in FManagerStates) - then FreeDebugger; + then begin + FreeDebugger; + FIsInitializingDebugger:= True; // been reset by FreeDebuger + end; // check if debugger is already created with the right type if (FDebugger <> nil) diff -Nru lazarus-0.9.30/ide/dialogprocs.pas lazarus-0.9.30.2/ide/dialogprocs.pas --- lazarus-0.9.30/ide/dialogprocs.pas 2010-10-06 17:42:01.000000000 +0000 +++ lazarus-0.9.30.2/ide/dialogprocs.pas 2011-11-23 16:14:31.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: dialogprocs.pas 27588 2010-10-06 17:42:01Z mattias $ } +{ $Id$ } { /*************************************************************************** dialogprocs.pas diff -Nru lazarus-0.9.30/ide/diffdialog.pas lazarus-0.9.30.2/ide/diffdialog.pas --- lazarus-0.9.30/ide/diffdialog.pas 2010-05-19 09:40:19.000000000 +0000 +++ lazarus-0.9.30.2/ide/diffdialog.pas 2011-11-23 16:14:31.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: diffdialog.pas 25511 2010-05-19 09:40:19Z mattias $ } +{ $Id$ } { /*************************************************************************** diffdialog.pas diff -Nru lazarus-0.9.30/ide/diffpatch.pas lazarus-0.9.30.2/ide/diffpatch.pas --- lazarus-0.9.30/ide/diffpatch.pas 2008-04-21 16:28:13.000000000 +0000 +++ lazarus-0.9.30.2/ide/diffpatch.pas 2011-11-23 16:14:31.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: diffpatch.pas 14921 2008-04-21 16:28:13Z mattias $ } +{ $Id$ } { /*************************************************************************** diffpatch.pas - functions to extract differences between texts diff -Nru lazarus-0.9.30/ide/diskdiffsdialog.pas lazarus-0.9.30.2/ide/diskdiffsdialog.pas --- lazarus-0.9.30/ide/diskdiffsdialog.pas 2010-10-09 13:47:40.000000000 +0000 +++ lazarus-0.9.30.2/ide/diskdiffsdialog.pas 2011-11-23 16:14:31.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: diskdiffsdialog.pas 27631 2010-10-09 13:47:40Z zeljko $ } +{ $Id$ } { /*************************************************************************** diskdiffsdialog.pas diff -Nru lazarus-0.9.30/ide/editoroptions.pp lazarus-0.9.30.2/ide/editoroptions.pp --- lazarus-0.9.30/ide/editoroptions.pp 2011-01-18 07:35:11.000000000 +0000 +++ lazarus-0.9.30.2/ide/editoroptions.pp 2011-11-23 16:14:31.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: editoroptions.pp 29098 2011-01-18 07:35:11Z vincents $ } +{ $Id$ } { *************************************************************************** * * diff -Nru lazarus-0.9.30/ide/encloseselectiondlg.pas lazarus-0.9.30.2/ide/encloseselectiondlg.pas --- lazarus-0.9.30/ide/encloseselectiondlg.pas 2010-01-15 02:06:37.000000000 +0000 +++ lazarus-0.9.30.2/ide/encloseselectiondlg.pas 2011-11-23 16:14:31.000000000 +0000 @@ -35,7 +35,7 @@ interface uses - Classes, SysUtils, Forms, Controls, Graphics, Dialogs, Buttons, + Classes, SysUtils, LCLProc, Forms, Controls, Graphics, Dialogs, Buttons, ExtCtrls, BasicCodeTools, CodeToolManager, SourceChanger, LazarusIDEStrConsts, LazConf, IDEProcs, ButtonPanel; @@ -252,6 +252,7 @@ IndentStr:=GetIndentStr(TemplateIndent-OldSelectionIndent); for CurY:=SelectionStart.Y to SelectionEnd.Y do begin CurLine:=Source[CurY-1]; + //debugln(['InsertSelection CurY=',CurY,' CurLine="',dbgstr(CurLine),'"']); MinX:=1; MaxX:=length(CurLine); if (CurY=SelectionStart.Y) then begin @@ -263,7 +264,7 @@ end; if (CurY=SelectionEnd.Y) and (MaxX>SelectionEnd.X) then MaxX:=SelectionEnd.X; - //writeln('InsertSelection CurY=',CurY,' Range=',MinX,'-',MaxX,' Indent=',length(IndentStr),' "',copy(CurLine,MinX,MaxX-MinX+1),'"'); + //debugln(['InsertSelection CurY=',CurY,' Range=',MinX,'-',MaxX,' Indent="',length(IndentStr),'" "',copy(CurLine,MinX,MaxX-MinX+1),'"']); X:=1; // write indent if (IndentStr<>'') and (CurY<>SelectionStart.Y) then begin @@ -271,7 +272,7 @@ inc(X,length(IndentStr)); end; // write line - if MaxX>MinX then begin + if MaxX>=MinX then begin NewSelect.Write(CurLine[MinX],MaxX-MinX+1); inc(X,MaxX-MinX+1); end; @@ -331,8 +332,7 @@ end; begin - //writeln('EncloseTextSelection A ',SelectionStart.X,',',SelectionStart.Y,'-',SelectionEnd.X,',',SelectionEnd.Y, - // ' indent=',Indent,' Template="',Template,'"'); + //debugln(['EncloseTextSelection A ',SelectionStart.X,',',SelectionStart.Y,'-',SelectionEnd.X,',',SelectionEnd.Y,' indent=',Indent,' Template="',Template,'"']); CutLastLineBreak:=true; if (SelectionEnd.X=1) and (SelectionEnd.Y>SelectionStart.Y) then begin CutLastLineBreak:=false; @@ -380,6 +380,7 @@ if NewSelection<>'' then begin NewSelect.Position:=0; NewSelect.Read(NewSelection[1],length(NewSelection)); + //debugln(['EncloseTextSelection CutLastLineBreak=',CutLastLineBreak,' NewSelection="',NewSelection,'"']); if CutLastLineBreak then begin CutPos:=length(NewSelection); if NewSelection[CutPos] in [#10,#13] then begin diff -Nru lazarus-0.9.30/ide/filereferencelist.pas lazarus-0.9.30.2/ide/filereferencelist.pas --- lazarus-0.9.30/ide/filereferencelist.pas 2010-12-16 15:43:50.000000000 +0000 +++ lazarus-0.9.30.2/ide/filereferencelist.pas 2011-11-23 16:14:31.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: filereferencelist.pas 28728 2010-12-16 15:43:50Z mattias $ } +{ $Id$ } { /*************************************************************************** filereferencelist.pas diff -Nru lazarus-0.9.30/ide/frames/editor_color_options.pas lazarus-0.9.30.2/ide/frames/editor_color_options.pas --- lazarus-0.9.30/ide/frames/editor_color_options.pas 2010-12-27 12:31:31.000000000 +0000 +++ lazarus-0.9.30.2/ide/frames/editor_color_options.pas 2011-11-23 16:14:31.000000000 +0000 @@ -496,6 +496,8 @@ begin AttrToEdit.FrameColor := DefaultToNone(FrameColorBox.Selected); FrameColorUseDefaultCheckBox.Checked := FrameColorBox.Selected <> clDefault; + FrameEdgesBox.Enabled := FrameColorBox.Selected <> clDefault; + FrameStyleBox.Enabled := FrameColorBox.Selected <> clDefault; end; if Sender = FrameEdgesBox then begin diff -Nru lazarus-0.9.30/ide/helpmanager.pas lazarus-0.9.30.2/ide/helpmanager.pas --- lazarus-0.9.30/ide/helpmanager.pas 2010-07-27 16:06:13.000000000 +0000 +++ lazarus-0.9.30.2/ide/helpmanager.pas 2011-11-23 16:14:31.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: helpmanager.pas 26857 2010-07-27 16:06:13Z mattias $ } +{ $Id$ } { /*************************************************************************** helpmanager.pas diff -Nru lazarus-0.9.30/ide/idecmdline.pas lazarus-0.9.30.2/ide/idecmdline.pas --- lazarus-0.9.30/ide/idecmdline.pas 2009-06-17 11:45:51.000000000 +0000 +++ lazarus-0.9.30.2/ide/idecmdline.pas 2011-11-23 16:14:31.000000000 +0000 @@ -98,6 +98,13 @@ end else begin + // pass these parameters to Lazarus + + if LeftStr(Param,length(PrimaryConfPathOptShort))=PrimaryConfPathOptShort + then begin + SetPrimaryConfigPath(copy(Param,length(PrimaryConfPathOptShort)+1,length(Param))); + end; + // Do not add file to the parameter list if not (Copy(Param,1,1) = '-') and (FileExistsUTF8(ExpandFileNameUTF8(Param))) then begin diff -Nru lazarus-0.9.30/ide/idecontexthelpedit.pas lazarus-0.9.30.2/ide/idecontexthelpedit.pas --- lazarus-0.9.30/ide/idecontexthelpedit.pas 2010-12-13 19:29:39.000000000 +0000 +++ lazarus-0.9.30.2/ide/idecontexthelpedit.pas 2011-11-23 16:14:31.000000000 +0000 @@ -168,6 +168,7 @@ TopLine: integer; NewCode: TCodeBuffer; Path: String; + AComponent: TComponent; begin Result:=false; Filename:=''; @@ -183,9 +184,9 @@ debugln(['FindDeclarationOfIDEControl control '+DbgSName(AControl)+' is not on a form/frame']); exit; end; - //debugln(['FindDeclarationOfIDEControl UnitControl=',DbgSName(UnitControl),' Unitname=',UnitControl.UnitName]); + debugln(['FindDeclarationOfIDEControl UnitControl=',DbgSName(UnitControl),' Unitname=',UnitControl.UnitName]); FormFilename:=LazarusIDE.FindUnitFile(GetClassUnitName(UnitControl.ClassType),LazarusIDE); - //debugln(['FindDeclarationOfIDEControl FormFilename=',FormFilename]); + debugln(['FindDeclarationOfIDEControl FormFilename=',FormFilename]); if FormFilename='' then begin debugln(['FindDeclarationOfIDEControl UnitControl=',DbgSName(UnitControl),' Unitname=',GetClassUnitName(UnitControl.ClassType),': unit source not found']); exit; @@ -196,9 +197,13 @@ exit; end; - Path:=UnitControl.ClassName; - if UnitControl<>AControl then - Path:=Path+'.'+AControl.Name; + Path:=''; + AComponent:=AControl; + while (AComponent<>nil) and (AComponent<>UnitControl) do begin + Path:='.'+AComponent.Name+Path; + AComponent:=AComponent.Owner; + end; + Path:=UnitControl.ClassName+Path; if not CodeToolBoss.FindDeclarationOfPropertyPath(Code,Path,NewCode,X,Y,TopLine) then begin debugln(['FindDeclarationOfIDEControl path ',Path,' not found in unit ',Code.Filename]); diff -Nru lazarus-0.9.30/ide/idedefs.pas lazarus-0.9.30.2/ide/idedefs.pas --- lazarus-0.9.30/ide/idedefs.pas 2009-06-12 06:49:14.000000000 +0000 +++ lazarus-0.9.30.2/ide/idedefs.pas 2011-11-23 16:14:31.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: idedefs.pas 20589 2009-06-12 06:49:14Z mattias $ } +{ $Id$ } { /*************************************************************************** idedefs.pas diff -Nru lazarus-0.9.30/ide/ide.lpk lazarus-0.9.30.2/ide/ide.lpk --- lazarus-0.9.30/ide/ide.lpk 2010-12-07 03:16:08.000000000 +0000 +++ lazarus-0.9.30.2/ide/ide.lpk 2011-11-23 16:14:31.000000000 +0000 @@ -4,1612 +4,1563 @@ + - + + + + - + - - - - - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - - - - - + + - - + + - - + + - - + + - - + + - - + + + + + + + + + + + - + - + - + - + - + - + - + - + - + - + - + - + - - + + + - - - + + - - - + + - + - + - + - - + + + - - + + + - + - + - - - + + - + - + - - + + + - + - + - + - - + + + - + - + - + - + - + - + - + - + - + - + - + - - - + + - + - + - - + + + - - - + + - + - + - - + + + - - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - + + - - + + + - + - + - + - + - + - + - + - + - - - + + - - + + + - - - + + - - + + + - - - + + - - + + + - - - + + - - + + + - + - + - - + + + - - - + + - - + + + - + - + - - - + + - + - + - + - - + + + - + - + - - - + + - - + + + - - - + + - - + + + - - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - + + - - - - - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - - - - - + + - - + + - - + + - - - - - - - - - - - - - - + + - - - - - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - - - - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + diff -Nru lazarus-0.9.30/ide/ideoptiondefs.pas lazarus-0.9.30.2/ide/ideoptiondefs.pas --- lazarus-0.9.30/ide/ideoptiondefs.pas 2010-09-18 08:45:04.000000000 +0000 +++ lazarus-0.9.30.2/ide/ideoptiondefs.pas 2011-11-23 16:14:31.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: ideoptiondefs.pas 27402 2010-09-18 08:45:04Z mattias $ } +{ $Id$ } { /*************************************************************************** ideoptionsdefs.pp - Toolbar diff -Nru lazarus-0.9.30/ide/idewindowhelp.pas lazarus-0.9.30.2/ide/idewindowhelp.pas --- lazarus-0.9.30/ide/idewindowhelp.pas 2010-09-18 08:45:04.000000000 +0000 +++ lazarus-0.9.30.2/ide/idewindowhelp.pas 2011-11-23 16:14:31.000000000 +0000 @@ -71,7 +71,7 @@ property Path: string read FPath write SetPath; property Parent: TIWHelpNode read FParent; property Count: integer read GetCount; - property Childs[Index: integer]: TIWHelpNode read GetChilds; default; + property Children[Index: integer]: TIWHelpNode read GetChilds; default; end; { TIWHelpTree } @@ -229,7 +229,7 @@ begin if FItems<>nil then begin for i:=FItems.Count-1 downto 0 do begin - CurChild:=Childs[i]; + CurChild:=Children[i]; CurChild.FParent:=nil; CurChild.Free; end; @@ -298,7 +298,7 @@ Config.SetDeleteValue(CfgPath+'IsRoot',IsRoot,false); Config.SetDeleteValue(CfgPath+'ChildCount',Count,0); for i:=0 to Count-1 do - Childs[i].Save(Config,CfgPath+'Node'+IntToStr(i+1)+'/'); + Children[i].Save(Config,CfgPath+'Node'+IntToStr(i+1)+'/'); end; function TIWHelpNode.FindByName(const ChildName: string): TIWHelpNode; @@ -306,7 +306,7 @@ i: Integer; begin for i := 0 to Count-1 do begin - Result:=Childs[i]; + Result:=Children[i]; if CompareText(Result.Name,ChildName)=0 then exit; end; Result:=nil; @@ -318,7 +318,7 @@ i: Integer; begin for i:=Count-1 downto 0 do begin - CurChild:=Childs[i]; + CurChild:=Children[i]; CurChild.DeleteLeavesWithoutHelp; if (CurChild.Count=0) and (not CurChild.HasHelp) then CurChild.Free; diff -Nru lazarus-0.9.30/ide/inputfiledialog.pas lazarus-0.9.30.2/ide/inputfiledialog.pas --- lazarus-0.9.30/ide/inputfiledialog.pas 2008-08-27 11:25:01.000000000 +0000 +++ lazarus-0.9.30.2/ide/inputfiledialog.pas 2011-11-23 16:14:31.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: inputfiledialog.pas 16272 2008-08-27 11:25:01Z mattias $ } +{ $Id$ } { /*************************************************************************** inputfiledialog.pas diff -Nru lazarus-0.9.30/ide/keymapschemedlg.pas lazarus-0.9.30.2/ide/keymapschemedlg.pas --- lazarus-0.9.30/ide/keymapschemedlg.pas 2010-01-15 02:06:37.000000000 +0000 +++ lazarus-0.9.30.2/ide/keymapschemedlg.pas 2011-11-23 16:14:31.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: keymapschemedlg.pas 23458 2010-01-15 02:06:37Z paul $ } +{ $Id$ } { *************************************************************************** * * @@ -83,7 +83,6 @@ ButtonPanel.HelpButton.OnClick := @HelpButtonClick; with SchemeRadiogroup.Items do begin - BeginUpdate; Clear; // keep order of TKeyMapScheme Add(lisKMLazarusDefault); @@ -91,7 +90,6 @@ Add(lisKMMacOSXApple); Add(lisKMMacOSXLaz); // do not add custom - EndUpdate; end; end; diff -Nru lazarus-0.9.30/ide/lazarus.lpi lazarus-0.9.30.2/ide/lazarus.lpi --- lazarus-0.9.30/ide/lazarus.lpi 2011-02-27 19:52:04.000000000 +0000 +++ lazarus-0.9.30.2/ide/lazarus.lpi 2011-11-23 16:14:31.000000000 +0000 @@ -21,6 +21,7 @@ + diff -Nru lazarus-0.9.30/ide/lazarusmanager.pas lazarus-0.9.30.2/ide/lazarusmanager.pas --- lazarus-0.9.30/ide/lazarusmanager.pas 2009-12-17 16:45:46.000000000 +0000 +++ lazarus-0.9.30.2/ide/lazarusmanager.pas 2011-11-23 16:14:31.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: lazarusmanager.pas 23169 2009-12-17 16:45:46Z mattias $ } +{ $Id$ } { /*************************************************************************** lazarusmanager.pas @@ -246,7 +246,7 @@ MsgResult: TModalResult; StartPath: String; begin - WaitForLazarus; + WaitForLazarus; // if startlazarus was started by lazarus, wait for it to halt try StartPath:=ExpandFileNameUTF8(ParamStrUTF8(0)); if FileIsSymlink(StartPath) then @@ -262,7 +262,7 @@ end; DefaultDir:=AppendPathDelim(DefaultDir); CustomDir:=AppendPathDelim(GetPrimaryConfigPath) + 'bin' + PathDelim; - + debugln(['TLazarusManager.Run DefaultDir="',DefaultDir,'" CustomDir="',CustomDir,'"']); repeat Restart := false; if FShowSplashOption then diff -Nru lazarus-0.9.30/ide/lazarus.pp lazarus-0.9.30.2/ide/lazarus.pp --- lazarus-0.9.30/ide/lazarus.pp 2011-01-18 07:35:11.000000000 +0000 +++ lazarus-0.9.30.2/ide/lazarus.pp 2011-11-23 16:14:31.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: lazarus.pp 29098 2011-01-18 07:35:11Z vincents $ } +{ $Id$ } { /*************************************************************************** Lazarus.pp Binary files /tmp/JqAnQ3wjoe/lazarus-0.9.30/ide/lazarus.res and /tmp/03gaEYs5oe/lazarus-0.9.30.2/ide/lazarus.res differ diff -Nru lazarus-0.9.30/ide/mainbar.pas lazarus-0.9.30.2/ide/mainbar.pas --- lazarus-0.9.30/ide/mainbar.pas 2010-11-22 18:46:25.000000000 +0000 +++ lazarus-0.9.30.2/ide/mainbar.pas 2011-11-23 16:14:31.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: mainbar.pas 28416 2010-11-22 18:46:25Z martin $ } +{ $Id$ } { /*************************************************************************** mainbar.pp - Toolbar diff -Nru lazarus-0.9.30/ide/mainbase.pas lazarus-0.9.30.2/ide/mainbase.pas --- lazarus-0.9.30/ide/mainbase.pas 2010-11-22 18:46:25.000000000 +0000 +++ lazarus-0.9.30.2/ide/mainbase.pas 2011-11-23 16:14:31.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: mainbase.pas 28416 2010-11-22 18:46:25Z martin $ } +{ $Id$ } { /*************************************************************************** mainbase.pas - the "integrated" in IDE diff -Nru lazarus-0.9.30/ide/mainintf.pas lazarus-0.9.30.2/ide/mainintf.pas --- lazarus-0.9.30/ide/mainintf.pas 2010-05-24 00:58:44.000000000 +0000 +++ lazarus-0.9.30.2/ide/mainintf.pas 2011-11-23 16:14:31.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: mainintf.pas 25597 2010-05-24 00:58:44Z mattias $ } +{ $Id$ } { /*************************************************************************** mainintf.pas - the "integrated" in IDE diff -Nru lazarus-0.9.30/ide/main.pp lazarus-0.9.30.2/ide/main.pp --- lazarus-0.9.30/ide/main.pp 2011-02-05 12:53:25.000000000 +0000 +++ lazarus-0.9.30.2/ide/main.pp 2011-11-23 16:14:31.000000000 +0000 @@ -14376,71 +14376,76 @@ exit; end; - if (ActiveSrcEdit=nil) or (ActiveUnitInfo=nil) then - GetCurrentUnit(ActiveSrcEdit,ActiveUnitInfo); - - if AddJumpPoint and (ActiveUnitInfo <> nil) and (ActiveSrcEdit <> nil) - then begin - if (NewSource<>ActiveUnitInfo.Source) - or (ActiveSrcEdit.EditorComponent.CaretX<>NewX) - or (ActiveSrcEdit.EditorComponent.CaretY<>NewY) then - SourceEditorManager.AddJumpPointClicked(Self); - end; + SourceEditorManager.BeginAutoFocusLock; + try + if (ActiveSrcEdit=nil) or (ActiveUnitInfo=nil) then + GetCurrentUnit(ActiveSrcEdit,ActiveUnitInfo); - if (ActiveUnitInfo = nil) or (NewSource<>ActiveUnitInfo.Source) - then begin - // jump to other file -> open it - ActiveUnitInfo := Project1.UnitInfoWithFilename(NewSource.Filename); - AnEditorInfo := nil; - if ActiveUnitInfo <> nil then - AnEditorInfo := GetAvailableUnitEditorInfo(ActiveUnitInfo, Point(NewX,NewY), NewTopLine); - if AnEditorInfo <> nil then begin - SourceEditorManager.ActiveEditor := TSourceEditor(AnEditorInfo.EditorComponent); - Result := mrOK; - end - else - Result:=DoOpenEditorFile(NewSource.Filename,-1,-1, - [ofOnlyIfExists,ofRegularFile,ofDoNotLoadResource]); - if Result<>mrOk then begin - UpdateSourceNames; - exit; + if AddJumpPoint and (ActiveUnitInfo <> nil) and (ActiveSrcEdit <> nil) + then begin + if (NewSource<>ActiveUnitInfo.Source) + or (ActiveSrcEdit.EditorComponent.CaretX<>NewX) + or (ActiveSrcEdit.EditorComponent.CaretY<>NewY) then + SourceEditorManager.AddJumpPointClicked(Self); end; - NewSrcEdit := SourceEditorManager.ActiveEditor; - end - else begin - AnEditorInfo := GetAvailableUnitEditorInfo(ActiveUnitInfo, Point(NewX,NewY), NewTopLine); - if AnEditorInfo <> nil then begin - NewSrcEdit := TSourceEditor(AnEditorInfo.EditorComponent); - SourceEditorManager.ActiveEditor := NewSrcEdit; + + if (ActiveUnitInfo = nil) or (NewSource<>ActiveUnitInfo.Source) + then begin + // jump to other file -> open it + ActiveUnitInfo := Project1.UnitInfoWithFilename(NewSource.Filename); + AnEditorInfo := nil; + if ActiveUnitInfo <> nil then + AnEditorInfo := GetAvailableUnitEditorInfo(ActiveUnitInfo, Point(NewX,NewY), NewTopLine); + if AnEditorInfo <> nil then begin + SourceEditorManager.ActiveEditor := TSourceEditor(AnEditorInfo.EditorComponent); + Result := mrOK; + end + else + Result:=DoOpenEditorFile(NewSource.Filename,-1,-1, + [ofOnlyIfExists,ofRegularFile,ofDoNotLoadResource]); + if Result<>mrOk then begin + UpdateSourceNames; + exit; + end; + NewSrcEdit := SourceEditorManager.ActiveEditor; end - else - NewSrcEdit:=ActiveSrcEdit; - end; - if NewX<1 then NewX:=1; - if NewY<1 then NewY:=1; - //debugln(['[TMainIDE.DoJumpToCodePos] ',NewX,',',NewY,',',NewTopLine]); - try - NewSrcEdit.BeginUpdate; - NewSrcEdit.EditorComponent.MoveLogicalCaretIgnoreEOL(Point(NewX,NewY)); - if not NewSrcEdit.IsLocked then begin - if NewTopLine < 1 then - NewSrcEdit.CenterCursor(True) + else begin + AnEditorInfo := GetAvailableUnitEditorInfo(ActiveUnitInfo, Point(NewX,NewY), NewTopLine); + if AnEditorInfo <> nil then begin + NewSrcEdit := TSourceEditor(AnEditorInfo.EditorComponent); + SourceEditorManager.ActiveEditor := NewSrcEdit; + end else - NewSrcEdit.TopLine:=NewTopLine; + NewSrcEdit:=ActiveSrcEdit; + end; + if NewX<1 then NewX:=1; + if NewY<1 then NewY:=1; + //debugln(['[TMainIDE.DoJumpToCodePos] ',NewX,',',NewY,',',NewTopLine]); + try + NewSrcEdit.BeginUpdate; + NewSrcEdit.EditorComponent.MoveLogicalCaretIgnoreEOL(Point(NewX,NewY)); + if not NewSrcEdit.IsLocked then begin + if NewTopLine < 1 then + NewSrcEdit.CenterCursor(True) + else + NewSrcEdit.TopLine:=NewTopLine; + end; + //DebugLn('TMainIDE.DoJumpToCodePos NewY=',dbgs(NewY),' ',dbgs(TopLine),' ',dbgs(NewTopLine)); + with NewSrcEdit.EditorComponent do + LeftChar:=Max(NewX - (CharsInWindow * 4 div 5), 1); + finally + NewSrcEdit.EndUpdate; end; - //DebugLn('TMainIDE.DoJumpToCodePos NewY=',dbgs(NewY),' ',dbgs(TopLine),' ',dbgs(NewTopLine)); - with NewSrcEdit.EditorComponent do - LeftChar:=Max(NewX - (CharsInWindow * 4 div 5), 1); + if MarkLine then + NewSrcEdit.ErrorLine := NewY; + + if FocusEditor then + SourceEditorManager.ShowActiveWindowOnTop(True); + UpdateSourceNames; + Result:=mrOk; finally - NewSrcEdit.EndUpdate; + SourceEditorManager.EndAutoFocusLock; end; - if MarkLine then - NewSrcEdit.ErrorLine := NewY; - - if FocusEditor then - SourceEditorManager.ShowActiveWindowOnTop(True); - UpdateSourceNames; - Result:=mrOk; end; {------------------------------------------------------------------------------- @@ -15612,40 +15617,42 @@ end; case ToolStatus of itDebugger: begin - if SrcEdit.SelectionAvailable and SrcEdit.CaretInSelection(CaretPos) then - Expression := SrcEdit.GetText(True) - else - Expression := SrcEdit.GetOperandFromCaret(CaretPos); - if Expression='' then exit; - //DebugLn(['TMainIDE.OnSrcNotebookShowHintForSource Expression="',Expression,'"']); - DBGType:=nil; - DBGTypeDerefer:=nil; - if not DebugBoss.Evaluate(Expression, DebugEval, DBGType) or (DebugEval = '') then - DebugEval := '???'; - // deference a pointer - maybe it is a class - if Assigned(DBGType) and (DBGType.Kind in [skPointer]) and - not( StringCase(Lowercase(DBGType.TypeName), ['char', 'character', 'ansistring']) in [0..2] ) - then - begin - if DBGType.Value.AsPointer <> nil then + if EditorOpts.AutoToolTipExprEval then begin + if SrcEdit.SelectionAvailable and SrcEdit.CaretInSelection(CaretPos) then + Expression := SrcEdit.GetText(True) + else + Expression := SrcEdit.GetOperandFromCaret(CaretPos); + if Expression='' then exit; + //DebugLn(['TMainIDE.OnSrcNotebookShowHintForSource Expression="',Expression,'"']); + DBGType:=nil; + DBGTypeDerefer:=nil; + if not DebugBoss.Evaluate(Expression, DebugEval, DBGType) or (DebugEval = '') then + DebugEval := '???'; + // deference a pointer - maybe it is a class + if Assigned(DBGType) and (DBGType.Kind in [skPointer]) and + not( StringCase(Lowercase(DBGType.TypeName), ['char', 'character', 'ansistring']) in [0..2] ) + then begin - if DebugBoss.Evaluate(Expression + '^', DebugEvalDerefer, DBGTypeDerefer) then + if DBGType.Value.AsPointer <> nil then begin - if Assigned(DBGTypeDerefer) and - ( (DBGTypeDerefer.Kind <> skPointer) or - (StringCase(Lowercase(DBGTypeDerefer.TypeName), ['char', 'character', 'ansistring']) in [0..2]) - ) - then - DebugEval := DebugEval + ' = ' + DebugEvalDerefer; + if DebugBoss.Evaluate(Expression + '^', DebugEvalDerefer, DBGTypeDerefer) then + begin + if Assigned(DBGTypeDerefer) and + ( (DBGTypeDerefer.Kind <> skPointer) or + (StringCase(Lowercase(DBGTypeDerefer.TypeName), ['char', 'character', 'ansistring']) in [0..2]) + ) + then + DebugEval := DebugEval + ' = ' + DebugEvalDerefer; + end; end; end; + FreeAndNil(DBGType); + FreeAndNil(DBGTypeDerefer); + Expression := Expression + ' = ' + DebugEval; + if SmartHintStr<>'' then + SmartHintStr:=LineEnding+LineEnding+SmartHintStr; + SmartHintStr:=Expression+SmartHintStr; end; - FreeAndNil(DBGType); - FreeAndNil(DBGTypeDerefer); - Expression := Expression + ' = ' + DebugEval; - if SmartHintStr<>'' then - SmartHintStr:=LineEnding+LineEnding+SmartHintStr; - SmartHintStr:=Expression+SmartHintStr; end; end; diff -Nru lazarus-0.9.30/ide/makeresstrdlg.pas lazarus-0.9.30.2/ide/makeresstrdlg.pas --- lazarus-0.9.30/ide/makeresstrdlg.pas 2010-04-05 22:15:36.000000000 +0000 +++ lazarus-0.9.30.2/ide/makeresstrdlg.pas 2011-11-23 16:14:31.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: makeresstrdlg.pas 24456 2010-04-05 22:15:36Z maxim $ } +{ $Id$ } { /*************************************************************************** makeresstrdlg.pas diff -Nru lazarus-0.9.30/ide/msgview.pp lazarus-0.9.30.2/ide/msgview.pp --- lazarus-0.9.30/ide/msgview.pp 2010-10-10 23:17:00.000000000 +0000 +++ lazarus-0.9.30.2/ide/msgview.pp 2011-11-23 16:14:31.000000000 +0000 @@ -455,7 +455,7 @@ if NewMsg.Parts=nil then NewMsg.Parts:=TStringList.Create; NewMsg.Parts.Assign(Parts); - NewMsg.Filename:=Parts.Values['Filename']; + NewMsg.UpdateSourcePosition; end; //DebugLn('TMessagesView.Add FItems.Count=',dbgs(FItems.Count),' OriginalIndex=',dbgs(OriginalIndex)); diff -Nru lazarus-0.9.30/ide/newdialog.pas lazarus-0.9.30.2/ide/newdialog.pas --- lazarus-0.9.30/ide/newdialog.pas 2010-07-10 17:04:38.000000000 +0000 +++ lazarus-0.9.30.2/ide/newdialog.pas 2011-11-23 16:14:31.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: newdialog.pas 26578 2010-07-10 17:04:38Z maxim $ } +{ $Id$ } { /*************************************************************************** newdialog.pas diff -Nru lazarus-0.9.30/ide/objectlists.pas lazarus-0.9.30.2/ide/objectlists.pas --- lazarus-0.9.30/ide/objectlists.pas 2009-08-18 14:44:25.000000000 +0000 +++ lazarus-0.9.30.2/ide/objectlists.pas 2011-11-23 16:14:31.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: objectlists.pas 21280 2009-08-18 14:44:25Z sekelsenmat $ } +{ $Id$ } { /*************************************************************************** packagedefs.pas diff -Nru lazarus-0.9.30/ide/patheditordlg.pas lazarus-0.9.30.2/ide/patheditordlg.pas --- lazarus-0.9.30/ide/patheditordlg.pas 2010-01-15 02:06:37.000000000 +0000 +++ lazarus-0.9.30.2/ide/patheditordlg.pas 2011-11-23 16:14:31.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: patheditordlg.pas 23458 2010-01-15 02:06:37Z paul $ } +{ $Id$ } { /*************************************************************************** patheditordlg.pp diff -Nru lazarus-0.9.30/ide/procedurelist.pas lazarus-0.9.30.2/ide/procedurelist.pas --- lazarus-0.9.30/ide/procedurelist.pas 2010-10-13 09:52:31.000000000 +0000 +++ lazarus-0.9.30.2/ide/procedurelist.pas 2011-11-23 16:14:31.000000000 +0000 @@ -437,7 +437,7 @@ cbObjects.Items.Insert(1, lisPListNone); finally cbObjects.ItemIndex := 0; // select as the default - if cbObjects.Text = '' then // some widgetsets have issues here so we do this + if (cbObjects.Items.Count > 0) and (cbObjects.Text = '') then // some widgetsets have issues here so we do this cbObjects.Text := cbObjects.Items[0]; end; end; diff -Nru lazarus-0.9.30/ide/projectinspector.pas lazarus-0.9.30.2/ide/projectinspector.pas --- lazarus-0.9.30/ide/projectinspector.pas 2010-08-04 09:49:30.000000000 +0000 +++ lazarus-0.9.30.2/ide/projectinspector.pas 2011-11-23 16:14:31.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: projectinspector.pas 27005 2010-08-04 09:49:30Z mattias $ } +{ $Id$ } { /*************************************************************************** projectinspector.pas @@ -769,7 +769,8 @@ ANode:=ItemsTreeView.Items.GetFirstNode else ANode:=ANode.GetFirstChild; - while ANode.Text<>CurText do ANode:=ANode.GetNextSibling; + while (ANode<>nil) and (ANode.Text<>CurText) do + ANode:=ANode.GetNextSibling; if ANode=nil then break; ASelection.Delete(0); end; diff -Nru lazarus-0.9.30/ide/revision.inc lazarus-0.9.30.2/ide/revision.inc --- lazarus-0.9.30/ide/revision.inc 2011-03-07 08:44:57.000000000 +0000 +++ lazarus-0.9.30.2/ide/revision.inc 2011-11-23 16:35:39.000000000 +0000 @@ -1,2 +1 @@ -// Created by Svn2RevisionInc -const RevisionStr = '29738'; +const RevisionStr = ''; diff -Nru lazarus-0.9.30/ide/searchresultview.pp lazarus-0.9.30.2/ide/searchresultview.pp --- lazarus-0.9.30/ide/searchresultview.pp 2011-01-03 12:21:48.000000000 +0000 +++ lazarus-0.9.30.2/ide/searchresultview.pp 2011-11-23 16:14:31.000000000 +0000 @@ -169,6 +169,8 @@ procedure SearchInListEditKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState ); procedure FilterButtonClick (Sender: TObject ); + procedure TreeViewMouseDown(Sender: TObject; Button: TMouseButton; + Shift: TShiftState; X, Y: Integer); private FMaxItems: integer; FWorkedSearchText: string; @@ -177,8 +179,6 @@ function BeautifyPageName(const APageName: string): string; function GetPageIndex(const APageName: string): integer; function GetTreeView(APageIndex: integer): TLazSearchResultTV; - procedure TreeViewClicked(Sender: TObject); - procedure TreeViewDoubleClicked(Sender: TObject); procedure SetItems(Index: Integer; Value: TStrings); function GetItems(Index: integer): TStrings; procedure SetMaxItems(const AValue: integer); @@ -563,6 +563,24 @@ end;//End if Assigned(CurrentTV) end; +procedure TSearchResultsView.TreeViewMouseDown(Sender: TObject; + Button: TMouseButton; Shift: TShiftState; X, Y: Integer); +var + TV: TCustomTreeView; + Node: TTreeNode; +begin + if Button<>mbLeft then exit; + TV:=Sender as TCustomTreeView; + Node:=TV.GetNodeAt(X,Y); + if Node=nil then exit; + if x 0 then - TSourceEditor(SourceEditors[0]).EditorComponent.Beautifier.OnGetDesiredIndent - := @TSourceNotebook(ActiveSourceWindow).EditorGetIndent; if Assigned(OnCurrentCodeBufferChanged) then OnCurrentCodeBufferChanged(nil); @@ -7707,6 +7704,21 @@ Result:=TSourceMarklingProducer(fProducers[Index]); end; +procedure TSourceEditorManagerBase.BeginAutoFocusLock; +begin + inc(FAutoFocusLock); +end; + +procedure TSourceEditorManagerBase.EndAutoFocusLock; +begin + dec(FAutoFocusLock); +end; + +function TSourceEditorManagerBase.HasAutoFocusLock: Boolean; +begin + Result := FAutoFocusLock > 0; +end; + function TSourceEditorManagerBase.GetActiveCompletionPlugin: TSourceEditorCompletionPlugin; begin Result := FActiveCompletionPlugin; @@ -7834,6 +7846,7 @@ var i: TsemChangeReason; begin + FAutoFocusLock := 0; for i := low(TsemChangeReason) to high(TsemChangeReason) do FChangeNotifyLists[i] := TMethodList.Create; SrcEditorIntf.SourceEditorManagerIntf := Self; diff -Nru lazarus-0.9.30/ide/splash.pp lazarus-0.9.30.2/ide/splash.pp --- lazarus-0.9.30/ide/splash.pp 2010-04-04 09:33:57.000000000 +0000 +++ lazarus-0.9.30.2/ide/splash.pp 2011-11-23 16:14:31.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: splash.pp 24390 2010-04-04 09:33:57Z mattias $ } +{ $Id$ } { /*************************************************************************** Splash.pp diff -Nru lazarus-0.9.30/ide/startlazarus.lpr lazarus-0.9.30.2/ide/startlazarus.lpr --- lazarus-0.9.30/ide/startlazarus.lpr 2010-07-13 08:54:03.000000000 +0000 +++ lazarus-0.9.30.2/ide/startlazarus.lpr 2011-11-23 16:14:31.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: startlazarus.lpr 26615 2010-07-13 08:54:03Z paul $ } +{ $Id$ } { /*************************************************************************** startlazarus.lpr diff -Nru lazarus-0.9.30/ide/transfermacros.pp lazarus-0.9.30.2/ide/transfermacros.pp --- lazarus-0.9.30/ide/transfermacros.pp 2010-12-06 09:01:31.000000000 +0000 +++ lazarus-0.9.30.2/ide/transfermacros.pp 2011-11-23 16:14:31.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: transfermacros.pp 28636 2010-12-06 09:01:31Z mattias $ } +{ $Id$ } { /*************************************************************************** idemacros.pp - macros for tools diff -Nru lazarus-0.9.30/ide/version.inc lazarus-0.9.30.2/ide/version.inc --- lazarus-0.9.30/ide/version.inc 2011-02-27 19:52:04.000000000 +0000 +++ lazarus-0.9.30.2/ide/version.inc 2011-11-23 16:14:31.000000000 +0000 @@ -1 +1 @@ -'0.9.30' +'0.9.30.2' diff -Nru lazarus-0.9.30/ide/viewunit_dlg.pp lazarus-0.9.30.2/ide/viewunit_dlg.pp --- lazarus-0.9.30/ide/viewunit_dlg.pp 2010-07-25 12:40:33.000000000 +0000 +++ lazarus-0.9.30.2/ide/viewunit_dlg.pp 2011-11-23 16:14:31.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: viewunit_dlg.pp 26828 2010-07-25 12:40:33Z maxim $ } +{ $Id$ } { /*************************************************************************** ViewUnit_dlg.pp diff -Nru lazarus-0.9.30/ideintf/actionseditor.pas lazarus-0.9.30.2/ideintf/actionseditor.pas --- lazarus-0.9.30/ideintf/actionseditor.pas 2010-11-18 18:39:12.000000000 +0000 +++ lazarus-0.9.30.2/ideintf/actionseditor.pas 2011-11-23 16:14:31.000000000 +0000 @@ -377,10 +377,10 @@ procedure TActionListEditor.OnComponentRenamed(AComponent: TComponent); begin - if (not Visible) or (FActionList=nil) - or (not Assigned(FActionList.ActionByName(AComponent.Name))) - then Exit; - lstActionName.Items[lstActionName.ItemIndex] := AComponent.Name; + if Visible and Assigned(FActionList) + and (AComponent is TAction) and (TAction(AComponent).ActionList = FActionList) + and Assigned(FActionList.ActionByName(AComponent.Name)) then + lstActionName.Items[lstActionName.ItemIndex] := AComponent.Name; end; procedure TActionListEditor.OnComponentSelection( diff -Nru lazarus-0.9.30/ideintf/componentreg.pas lazarus-0.9.30.2/ideintf/componentreg.pas --- lazarus-0.9.30/ideintf/componentreg.pas 2010-11-18 18:55:45.000000000 +0000 +++ lazarus-0.9.30.2/ideintf/componentreg.pas 2011-11-23 16:14:31.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: componentreg.pas 28326 2010-11-18 18:55:45Z mattias $ } +{ $Id$ } { /*************************************************************************** componentreg.pas diff -Nru lazarus-0.9.30/ideintf/fieldslist.pas lazarus-0.9.30.2/ideintf/fieldslist.pas --- lazarus-0.9.30/ideintf/fieldslist.pas 2010-01-13 12:57:55.000000000 +0000 +++ lazarus-0.9.30.2/ideintf/fieldslist.pas 2011-11-23 16:14:31.000000000 +0000 @@ -78,7 +78,7 @@ begin Result := ''; // FieldName is an ansistring - for i := 0 to Length(AName) do + for i := 1 to Length(AName) do if AName[i] in ['0'..'9','a'..'z','A'..'Z','_'] then Result := Result + AName[i]; if (Length(Result) > 0) and (not (Result[1] in ['0'..'9'])) then diff -Nru lazarus-0.9.30/ideintf/formeditingintf.pas lazarus-0.9.30.2/ideintf/formeditingintf.pas --- lazarus-0.9.30/ideintf/formeditingintf.pas 2011-02-10 22:22:30.000000000 +0000 +++ lazarus-0.9.30.2/ideintf/formeditingintf.pas 2011-11-23 16:14:31.000000000 +0000 @@ -448,7 +448,7 @@ ScrollOffset: TPoint; ChildBounds: TRect; Found: Boolean; - Childs: TFPList; + Children: TFPList; Offset: TPoint; begin Result:=Root; @@ -457,14 +457,14 @@ Offset:=GetComponentOriginOnForm(Result); //DebugLn(['TDesignerMediator.ComponentAtPos Parent=',DbgSName(Result),' Offset=',dbgs(Offset)]); OffsetRect(ClientArea,Offset.X,Offset.Y); - Childs:=TFPList.Create; + Children:=TFPList.Create; try - GetChilds(Result,Childs); + GetChilds(Result,Children); //DebugLn(['TDesignerMediator.ComponentAtPos Result=',DbgSName(Result),' ChildCount=',children.Count,' ClientArea=',dbgs(ClientArea)]); Found:=false; // iterate backwards (z-order) - for i:=Childs.Count-1 downto 0 do begin - Child:=TComponent(Childs[i]); + for i:=Children.Count-1 downto 0 do begin + Child:=TComponent(Children[i]); //DebugLn(['TDesignerMediator.ComponentAtPos Child ',DbgSName(Child)]); if (MinClass<>nil) and (not Child.InheritsFrom(MinClass)) then continue; @@ -485,7 +485,7 @@ end; if not Found then exit; finally - Childs.Free; + Children.Free; end; end; end; diff -Nru lazarus-0.9.30/ideintf/graphpropedits.pas lazarus-0.9.30.2/ideintf/graphpropedits.pas --- lazarus-0.9.30/ideintf/graphpropedits.pas 2010-01-20 15:53:39.000000000 +0000 +++ lazarus-0.9.30.2/ideintf/graphpropedits.pas 2011-11-23 16:14:31.000000000 +0000 @@ -702,6 +702,7 @@ Images: TCustomImageList; I: Integer; begin + Proc(IntToStr(GetDefaultOrdValue)); Images := GetImageList; if Assigned(Images) then for I := 0 to Images.Count - 1 do @@ -726,6 +727,7 @@ R: TRect; OldColor: TColor; begin + Dec(Index); Images := GetImageList; R := ARect; if Assigned(Images) then diff -Nru lazarus-0.9.30/ideintf/idewindowintf.pas lazarus-0.9.30.2/ideintf/idewindowintf.pas --- lazarus-0.9.30/ideintf/idewindowintf.pas 2010-12-20 13:04:39.000000000 +0000 +++ lazarus-0.9.30.2/ideintf/idewindowintf.pas 2011-11-23 16:14:31.000000000 +0000 @@ -1450,8 +1450,10 @@ // auto create a storage for every shown form Layout:=SimpleLayoutStorage.ItemByFormID(AForm.Name); - if Layout=nil then - SimpleLayoutStorage.CreateWindowLayout(AForm) + if Layout=nil then begin + if not (csDesigning in AForm.ComponentState) then + SimpleLayoutStorage.CreateWindowLayout(AForm); + end else Layout.Form:=AForm; diff -Nru lazarus-0.9.30/ideintf/Makefile.fpc lazarus-0.9.30.2/ideintf/Makefile.fpc --- lazarus-0.9.30/ideintf/Makefile.fpc 2008-10-07 12:05:16.000000000 +0000 +++ lazarus-0.9.30.2/ideintf/Makefile.fpc 2011-11-23 16:14:31.000000000 +0000 @@ -1,4 +1,4 @@ -# $Id: Makefile.fpc 16910 2008-10-07 12:05:16Z mattias $ +# $Id$ # # Makefile.fpc for Lazarus for Free Pascal # diff -Nru lazarus-0.9.30/ideintf/menuintf.pas lazarus-0.9.30.2/ideintf/menuintf.pas --- lazarus-0.9.30/ideintf/menuintf.pas 2011-02-10 22:22:30.000000000 +0000 +++ lazarus-0.9.30.2/ideintf/menuintf.pas 2011-11-23 16:14:31.000000000 +0000 @@ -1109,7 +1109,7 @@ else ContainerMenuIndex:=GetContainerIndex(false); {$IFDEF VerboseMenuIntf} - debugln('TIDEMenuSection.UpdateMenuStructure Childs Name="',Name,'" Invalid=',dbgs(FInvalidChildStartIndex),'..',dbgs(FInvalidChildEndIndex),' Count=',dbgs(Count)); + debugln('TIDEMenuSection.UpdateMenuStructure Children Name="',Name,'" Invalid=',dbgs(FInvalidChildStartIndex),'..',dbgs(FInvalidChildEndIndex),' Count=',dbgs(Count)); {$ENDIF} // update TopSeparator diff -Nru lazarus-0.9.30/ideintf/newfield.pas lazarus-0.9.30.2/ideintf/newfield.pas --- lazarus-0.9.30/ideintf/newfield.pas 2010-11-02 20:09:31.000000000 +0000 +++ lazarus-0.9.30.2/ideintf/newfield.pas 2011-11-23 16:14:31.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: newfield.pas 28042 2010-11-02 20:09:31Z jesus $ } +{ $Id$ } { Copyright (C) 2005 Alexandru Alexandrov Date: 11.06.2005 diff -Nru lazarus-0.9.30/ideintf/packageintf.pas lazarus-0.9.30.2/ideintf/packageintf.pas --- lazarus-0.9.30/ideintf/packageintf.pas 2010-08-17 13:56:18.000000000 +0000 +++ lazarus-0.9.30.2/ideintf/packageintf.pas 2011-11-23 16:14:31.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: packageintf.pas 27125 2010-08-17 13:56:18Z mattias $ } +{ $Id$ } { ***************************************************************************** * * diff -Nru lazarus-0.9.30/ideintf/propedits.pp lazarus-0.9.30.2/ideintf/propedits.pp --- lazarus-0.9.30/ideintf/propedits.pp 2011-02-10 22:22:30.000000000 +0000 +++ lazarus-0.9.30.2/ideintf/propedits.pp 2011-11-23 16:14:31.000000000 +0000 @@ -1722,11 +1722,12 @@ const { TypeKinds see typinfo.pp - TTypeKind = (tkUnknown,tkInteger,tkChar,tkEnumeration, - tkFloat,tkSet,tkMethod,tkSString,tkLString,tkAString, + TTypeKind = (tkUnknown,tkInteger,tkChar,tkEnumeration,tkFloat, + tkSet,tkMethod,tkSString,tkLString,tkAString, tkWString,tkVariant,tkArray,tkRecord,tkInterface, tkClass,tkObject,tkWChar,tkBool,tkInt64,tkQWord, - tkDynArray,tkInterfaceRaw); + tkDynArray,tkInterfaceRaw,tkProcVar,tkUString,tkUChar, + tkHelper); } PropClassMap:array[TypInfo.TTypeKind] of TPropertyEditorClass=( @@ -1759,6 +1760,9 @@ nil, // tkUString nil // tkUChar {$ENDIF} +{$IF declared(tkHelper)} + ,nil // tkHelper +{$ENDIF} ); // ----------------------------------------------------------- diff -Nru lazarus-0.9.30/lazarus.app/Contents/Info.plist lazarus-0.9.30.2/lazarus.app/Contents/Info.plist --- lazarus-0.9.30/lazarus.app/Contents/Info.plist 2011-02-27 19:52:04.000000000 +0000 +++ lazarus-0.9.30.2/lazarus.app/Contents/Info.plist 2011-11-23 16:14:33.000000000 +0000 @@ -146,7 +146,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - Lazarus IDE v0.9.30 beta + Lazarus IDE v0.9.30.2 beta CFBundleSignature laza CFBundleVersion diff -Nru lazarus-0.9.30/lcl/alllclunits.pp lazarus-0.9.30.2/lcl/alllclunits.pp --- lazarus-0.9.30/lcl/alllclunits.pp 2010-05-05 07:49:44.000000000 +0000 +++ lazarus-0.9.30.2/lcl/alllclunits.pp 2011-11-23 16:14:33.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: alllclunits.pp 25203 2010-05-05 07:49:44Z sekelsenmat $ } +{ $Id$ } { ***************************************************************************** alllclunits.pp diff -Nru lazarus-0.9.30/lcl/buttonpanel.pas lazarus-0.9.30.2/lcl/buttonpanel.pas --- lazarus-0.9.30/lcl/buttonpanel.pas 2010-11-19 04:27:09.000000000 +0000 +++ lazarus-0.9.30.2/lcl/buttonpanel.pas 2011-11-23 16:14:33.000000000 +0000 @@ -190,13 +190,11 @@ if btn in FShowButtons then begin aButton.Visible := True; - aButton.Enabled := True; if csDesigning in ComponentState then aButton.ControlStyle:=aButton.ControlStyle-[csNoDesignVisible]; end else begin aButton.Visible := False; - aButton.Enabled := False; if csDesigning in ComponentState then aButton.ControlStyle:=aButton.ControlStyle+[csNoDesignVisible]; end; diff -Nru lazarus-0.9.30/lcl/buttons.pp lazarus-0.9.30.2/lcl/buttons.pp --- lazarus-0.9.30/lcl/buttons.pp 2010-10-20 08:02:22.000000000 +0000 +++ lazarus-0.9.30.2/lcl/buttons.pp 2011-11-23 16:14:33.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: buttons.pp 27770 2010-10-20 08:02:22Z paul $} +{ $Id$} { /*************************************************************************** diff -Nru lazarus-0.9.30/lcl/chart.pp lazarus-0.9.30.2/lcl/chart.pp --- lazarus-0.9.30/lcl/chart.pp 2010-06-16 09:55:25.000000000 +0000 +++ lazarus-0.9.30.2/lcl/chart.pp 2011-11-23 16:14:33.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: chart.pp 26150 2010-06-16 09:55:25Z mattias $ } +{ $Id$ } { /*************************************************************************** chart.pp diff -Nru lazarus-0.9.30/lcl/checklst.pas lazarus-0.9.30.2/lcl/checklst.pas --- lazarus-0.9.30/lcl/checklst.pas 2010-10-19 01:02:35.000000000 +0000 +++ lazarus-0.9.30.2/lcl/checklst.pas 2011-11-23 16:14:33.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: checklst.pas 27756 2010-10-19 01:02:35Z paul $ +{ $Id$ /*************************************************************************** checklst.pas ------------ diff -Nru lazarus-0.9.30/lcl/comctrls.pp lazarus-0.9.30.2/lcl/comctrls.pp --- lazarus-0.9.30/lcl/comctrls.pp 2011-02-10 22:22:30.000000000 +0000 +++ lazarus-0.9.30.2/lcl/comctrls.pp 2011-11-23 16:14:33.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: comctrls.pp 29456 2011-02-10 22:22:30Z vincents $} +{ $Id$} { /*************************************************************************** ComCtrls.pp @@ -1390,7 +1390,7 @@ private MinBtn: TControl;// TSpeedButton MaxBtn: TControl;// TSpeedButton - BTimerProc: procedure of Object; + BTimerProc: TProcedureOfObject; BTimerBounds : TRect; FArrowKeys: Boolean; FAssociate: TWinControl; @@ -1424,6 +1424,7 @@ procedure AssociateKeyDown(Sender: TObject; var Key: Word; ShiftState : TShiftState); procedure OnAssociateChangeBounds(Sender: TObject); procedure DoOnResize; override; + procedure SetEnabled(Value: Boolean); override; class function GetControlClassDefaultSize: TSize; override; function CanChange: Boolean; virtual; procedure Notification(AComponent: TComponent; Operation: TOperation); override; @@ -2815,7 +2816,7 @@ TTreeNodeExpandedState = class NodeText: string; - Childs: TAvgLvlTree; + Children: TAvgLvlTree; constructor Create(FirstTreeNode: TTreeNode); constructor Create(TreeView: TCustomTreeView); destructor Destroy; override; diff -Nru lazarus-0.9.30/lcl/controls.pp lazarus-0.9.30.2/lcl/controls.pp --- lazarus-0.9.30/lcl/controls.pp 2011-02-10 22:22:30.000000000 +0000 +++ lazarus-0.9.30.2/lcl/controls.pp 2011-11-23 16:14:33.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: controls.pp 29456 2011-02-10 22:22:30Z vincents $ } +{ $Id$ } { /*************************************************************************** Controls.pp @@ -1479,7 +1479,7 @@ cesScaleChilds, cssScaleChilds Scale children, keep space between them fixed. - Childs are resized to their normal/adviced size. If there is some space + Children are resized to their normal/adviced size. If there is some space left in the client area of the parent, then the children are scaled to fill the space. You can set maximum Constraints. Then the other children are scaled more. @@ -1493,7 +1493,7 @@ cesHomogenousChildGrowth, cssHomogenousChildDecrease Enlarge children equally. - Childs are resized to their normal/adviced size. If there is some space + Children are resized to their normal/adviced size. If there is some space left in the client area of the parent, then the remaining space is distributed equally to each child. For example: 3 child controls A, B, C with A.Width=10, B.Width=20 and @@ -1506,7 +1506,7 @@ cesHomogenousSpaceGrowth Enlarge space between children equally. - Childs are resized to their normal/adviced size. If there is some space + Children are resized to their normal/adviced size. If there is some space left in the client area of the parent, then the space between the children is expanded. For example: 3 child controls A, B, C with A.Width=10, B.Width=20 and @@ -1985,6 +1985,7 @@ procedure Paint; virtual; procedure DoOnChangeBounds; override; procedure DoOnParentHandleDestruction; override; + procedure Update; override; property OnPaint: TNotifyEvent read FOnPaint write FOnPaint; public @@ -2775,7 +2776,8 @@ begin Result := WinControl; Control := WinControl.ControlAtPos(WinControl.ScreenToClient(Position), - [capfAllowDisabled, capfAllowWinControls, capfRecursive]); + [capfAllowDisabled, capfAllowWinControls, capfRecursive, + capfHasScrollOffset]); //debugln(['FindControlAtPosition ',dbgs(Position),' ',DbgSName(WinControl),' ',dbgs(WinControl.ScreenToClient(Position)),' ',DbgSName(Control)]); if Control <> nil then Result := Control; diff -Nru lazarus-0.9.30/lcl/dbctrls.pp lazarus-0.9.30.2/lcl/dbctrls.pp --- lazarus-0.9.30/lcl/dbctrls.pp 2010-12-01 10:15:05.000000000 +0000 +++ lazarus-0.9.30.2/lcl/dbctrls.pp 2011-11-23 16:14:33.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: dbctrls.pp 28579 2010-12-01 10:15:05Z vincents $} +{ $Id$} { /*************************************************************************** DbCtrls.pp @@ -26,7 +26,7 @@ @abstract(common db aware controls, as in Delphi) @author(Andrew Johnson ) @created(Sun Sep 14 2003) -@lastmod($Date: 2010-12-01 11:15:05 +0100 (Wed, 01 Dec 2010) $) +@lastmod($Date$) } unit DbCtrls; diff -Nru lazarus-0.9.30/lcl/dbgrids.pas lazarus-0.9.30.2/lcl/dbgrids.pas --- lazarus-0.9.30/lcl/dbgrids.pas 2010-11-30 05:58:57.000000000 +0000 +++ lazarus-0.9.30.2/lcl/dbgrids.pas 2011-11-23 16:14:33.000000000 +0000 @@ -1,5 +1,5 @@ -{ $Id: dbgrids.pas 28562 2010-11-30 05:58:57Z jesus $} +{ $Id$} { /*************************************************************************** DBGrids.pas @@ -413,7 +413,7 @@ function GridCanModify: boolean; procedure GetSBVisibility(out HsbVisible,VsbVisible:boolean);override; procedure GetSBRanges(const HsbVisible,VsbVisible: boolean; - out HsbRange,VsbRange, HsbPage, VsbPage:Integer); override; + out HsbRange,VsbRange,HsbPage,VsbPage,HsbPos,VsbPos:Integer); override; procedure HeaderClick(IsColumn: Boolean; index: Integer); override; procedure HeaderSized(IsColumn: Boolean; Index: Integer); override; function IsValidChar(AField: TField; AChar: TUTF8Char): boolean; @@ -1134,40 +1134,28 @@ procedure TCustomDBGrid.WMVScroll(var Message: TLMVScroll); var IsSeq: boolean; - aPos: Integer; + aPos, aRange, aPage: Integer; DeltaRec: integer; function MaxPos: Integer; begin if IsSeq then - result := GetRecordCount + result := GetRecordCount - 1 else result := 4; end; - procedure CalcPos(Delta: Integer); - begin - if FDataLink.Dataset.BOF then - aPos := 0 - else if FDatalink.DataSet.EOF then - aPos := MaxPos - else if IsSeq then - aPos := FOldPosition + Delta - else - aPos := 2; - end; - procedure DsMoveBy(Delta: Integer); begin FDataLink.MoveBy(Delta); - CalcPos(Delta); + GetScrollbarParams(aRange, aPage, aPos); end; procedure DsGoto(BOF: boolean); begin if BOF then FDatalink.DataSet.First else FDataLink.DataSet.Last; - CalcPos(0); + GetScrollbarParams(aRange, aPage, aPos); end; begin @@ -1195,12 +1183,14 @@ SB_THUMBPOSITION: begin aPos := Message.Pos; + if aPos=FOldPosition then + exit; if aPos>=MaxPos then dsGoto(False) else if aPos<=0 then dsGoto(True) else if IsSeq then - FDatalink.DataSet.RecNo := aPos + FDatalink.DataSet.RecNo := aPos + 1 else begin DeltaRec := Message.Pos - FOldPosition; if DeltaRec=0 then @@ -2561,16 +2551,15 @@ end; procedure TCustomDBGrid.GetSBRanges(const HsbVisible, VsbVisible: boolean; out - HsbRange, VsbRange, HsbPage, VsbPage: Integer); -var - aPos: Integer; + HsbRange, VsbRange, HsbPage, VsbPage, HsbPos, VsbPos: Integer); begin - inherited GetSBRanges(HsbVisible, VsbVisible, HsbRange, VsbRange, HsbPage, VsbPage); + inherited GetSBRanges(HsbVisible, VsbVisible, HsbRange, VsbRange, HsbPage, VsbPage, HsbPos, VsbPos); if VSbVisible then - GetScrollbarParams(VsbRange, VsbPage, aPos) + GetScrollbarParams(VsbRange, VsbPage, VsbPos) else begin VsbRange := 0; VsbPage := 0; + VsbPos := 0; end; end; diff -Nru lazarus-0.9.30/lcl/extctrls.pp lazarus-0.9.30.2/lcl/extctrls.pp --- lazarus-0.9.30/lcl/extctrls.pp 2010-11-22 15:05:31.000000000 +0000 +++ lazarus-0.9.30.2/lcl/extctrls.pp 2011-11-23 16:14:33.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: extctrls.pp 28407 2010-11-22 15:05:31Z zeljko $ } +{ $Id$ } { /*************************************************************************** extctrls.pp diff -Nru lazarus-0.9.30/lcl/extgraphics.pas lazarus-0.9.30.2/lcl/extgraphics.pas --- lazarus-0.9.30/lcl/extgraphics.pas 2009-06-22 09:30:42.000000000 +0000 +++ lazarus-0.9.30.2/lcl/extgraphics.pas 2011-11-23 16:14:33.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: extgraphics.pas 20712 2009-06-22 09:30:42Z vincents $ } +{ $Id$ } { /*************************************************************************** extgraphics.pas diff -Nru lazarus-0.9.30/lcl/fileutil.pas lazarus-0.9.30.2/lcl/fileutil.pas --- lazarus-0.9.30/lcl/fileutil.pas 2010-09-01 20:18:45.000000000 +0000 +++ lazarus-0.9.30.2/lcl/fileutil.pas 2011-11-23 16:14:33.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: fileutil.pas 27248 2010-09-01 20:18:45Z dmitry $ } +{ $Id$ } { /*************************************************************************** fileutil.pas diff -Nru lazarus-0.9.30/lcl/forms/calendarpopup.pas lazarus-0.9.30.2/lcl/forms/calendarpopup.pas --- lazarus-0.9.30/lcl/forms/calendarpopup.pas 2010-11-05 01:51:03.000000000 +0000 +++ lazarus-0.9.30.2/lcl/forms/calendarpopup.pas 2011-11-23 16:14:33.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: calendarpopup.pas 28084 2010-11-05 01:51:03Z mattias $} +{ $Id$} { ***************************************************************************** * * diff -Nru lazarus-0.9.30/lcl/fpcadds.pas lazarus-0.9.30.2/lcl/fpcadds.pas --- lazarus-0.9.30/lcl/fpcadds.pas 2010-01-06 17:43:33.000000000 +0000 +++ lazarus-0.9.30.2/lcl/fpcadds.pas 2011-11-23 16:14:33.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: fpcadds.pas 23394 2010-01-06 17:43:33Z paul $ } +{ $Id$ } { /*************************************************************************** FPCAdds.pas diff -Nru lazarus-0.9.30/lcl/graphics.pp lazarus-0.9.30.2/lcl/graphics.pp --- lazarus-0.9.30/lcl/graphics.pp 2010-11-19 10:46:12.000000000 +0000 +++ lazarus-0.9.30.2/lcl/graphics.pp 2011-11-23 16:14:33.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: graphics.pp 28343 2010-11-19 10:46:12Z paul $ } +{ $Id$ } { /*************************************************************************** graphics.pp diff -Nru lazarus-0.9.30/lcl/graphtype.pp lazarus-0.9.30.2/lcl/graphtype.pp --- lazarus-0.9.30/lcl/graphtype.pp 2010-10-26 07:37:49.000000000 +0000 +++ lazarus-0.9.30.2/lcl/graphtype.pp 2011-11-23 16:14:33.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: graphtype.pp 27870 2010-10-26 07:37:49Z mattias $ } +{ $Id$ } { /*************************************************************************** graphtype.pp @@ -1284,6 +1284,7 @@ SrcLineStarts, DstLineStarts: TRawImageLineStarts; SrcStartPos, SrcEndPos, DstStartPos: TRawImagePosition; Shift0, Shift1: Byte; + DstW1: Word; SrcPos: PByte; DstPos: PByte; ByteCount: PtrUInt; @@ -1351,7 +1352,8 @@ // dst[byte|bit]: 12 11 10 07 06 05 04 03 : for x := 0 to ByteCount - 1 do begin - DstPos^ := (SrcPos[0] shr Shift0) or (SrcPos[1] shl Shift1); + DstW1 := SrcPos[0] shl Shift0; + DstPos^ := Byte(DstW1 or (SrcPos[1] shr Shift1)); inc(SrcPos); inc(DstPos); end; @@ -1362,7 +1364,8 @@ // dst[byte|bit]: 04 03 02 01 00 17 16 15 : for x := 0 to ByteCount - 1 do begin - DstPos^ := (SrcPos[0] shl Shift0) or (SrcPos[1] shr Shift1); + DstW1 := SrcPos[0] shl Shift0; + DstPos^ := Byte(DstW1 or (SrcPos[1] shr Shift1)); inc(SrcPos); inc(DstPos); end; diff -Nru lazarus-0.9.30/lcl/graphutil.pp lazarus-0.9.30.2/lcl/graphutil.pp --- lazarus-0.9.30/lcl/graphutil.pp 2010-10-14 00:48:35.000000000 +0000 +++ lazarus-0.9.30.2/lcl/graphutil.pp 2011-11-23 16:14:33.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: graphutil.pp 27699 2010-10-14 00:48:35Z paul $ } +{ $Id$ } { /*************************************************************************** graphtype.pp diff -Nru lazarus-0.9.30/lcl/grids.pas lazarus-0.9.30.2/lcl/grids.pas --- lazarus-0.9.30/lcl/grids.pas 2011-02-10 22:27:33.000000000 +0000 +++ lazarus-0.9.30.2/lcl/grids.pas 2011-11-23 16:14:34.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: grids.pas 29458 2011-02-10 22:27:33Z vincents $} +{ $Id$} { /*************************************************************************** Grids.pas @@ -195,7 +195,9 @@ procedure msg_SelectAll(var Msg: TGridMessage); message GM_SELECTALL; procedure msg_SetPos(var Msg: TGridMessage); message GM_SETPOS; public + constructor Create(Aowner : TComponent); override; procedure EditingDone; override; + property OnEditingDone; end; { TButtonCellEditor } @@ -234,6 +236,7 @@ public procedure EditingDone; override; property BorderStyle; + property OnEditingDone; end; { TCompositeCellEditor } @@ -658,7 +661,6 @@ FDragDx: Integer; FMoveLast: TPoint; FUpdateCount: Integer; - FUpdateScrollBarsCount: Integer; FGCache: TGridDataCache; FOptions: TGridOptions; FOnDrawCell: TOnDrawcell; @@ -787,7 +789,6 @@ function StartColSizing(const X, Y: Integer): boolean; procedure ChangeCursor(ACursor: Integer = MAXINT); procedure TryScrollTo(aCol,aRow: integer); - procedure UpdateScrollBarPos(Which: TScrollStyle); procedure UpdateCachedSizes; procedure UpdateSBVisibility; procedure UpdateSizes; @@ -898,14 +899,14 @@ function GetDefaultColumnLayout(Column: Integer): TTextLayout; virtual; function GetDefaultColumnReadOnly(Column: Integer): boolean; virtual; function GetDefaultColumnTitle(Column: Integer): string; virtual; - function GetDefaultEditor(Column: Integer): TWinControl; + function GetDefaultEditor(Column: Integer): TWinControl; virtual; function GetDefaultRowHeight: integer; virtual; function GetImageForCheckBox(const aCol,aRow: Integer; CheckBoxView: TCheckBoxState): TBitmap; virtual; function GetScrollBarPosition(Which: integer): Integer; procedure GetSBVisibility(out HsbVisible,VsbVisible:boolean);virtual; procedure GetSBRanges(const HsbVisible,VsbVisible: boolean; - out HsbRange,VsbRange, HsbPage, VsbPage:Integer); virtual; + out HsbRange,VsbRange,HsbPage,VsbPage,HsbPos,VsbPos:Integer); virtual; procedure GetSelectedState(AState: TGridDrawState; out IsSelected:boolean); virtual; function GetEditMask(ACol, ARow: Longint): string; virtual; function GetEditText(ACol, ARow: Longint): string; virtual; @@ -951,7 +952,7 @@ procedure ResizeRow(aRow, aHeight: Integer); procedure RowHeightsChanged; virtual; procedure SaveContent(cfg: TXMLConfig); virtual; - procedure ScrollBarRange(Which:Integer; aRange,aPage: Integer); + procedure ScrollBarRange(Which:Integer; aRange,aPage,aPos: Integer); procedure ScrollBarPosition(Which, Value: integer); function ScrollBarIsVisible(Which:Integer): Boolean; procedure ScrollBarPage(Which: Integer; aPage: Integer); @@ -972,9 +973,9 @@ procedure TopLeftChanged; virtual; function TryMoveSelection(Relative: Boolean; var DCol, DRow: Integer): Boolean; procedure UnLockEditor; - procedure UpdateHorzScrollBar(const aVisible: boolean; const aRange,aPage: Integer); virtual; + procedure UpdateHorzScrollBar(const aVisible: boolean; const aRange,aPage,aPos: Integer); virtual; procedure UpdateSelectionRange; - procedure UpdateVertScrollbar(const aVisible: boolean; const aRange,aPage: Integer); virtual; + procedure UpdateVertScrollbar(const aVisible: boolean; const aRange,aPage,aPos: Integer); virtual; procedure UpdateBorderStyle; function ValidateEntry(const ACol,ARow:Integer; const OldValue:string; var NewValue:string): boolean; virtual; procedure VisualChange; virtual; @@ -2792,7 +2793,6 @@ begin TopLeftChanged; VisualChange; - updateScrollBarPos(ssBoth); end; procedure TCustomGrid.DrawXORVertLine(X: Integer); @@ -2882,13 +2882,14 @@ HsbVisible, VsbVisible: boolean; HsbRange,VsbRange: Integer; HsbPage, VsbPage: Integer; + HsbPos, VsbPos: Integer; begin with FGCache do begin // Horizontal scrollbar GetSBVisibility(HsbVisible, VsbVisible); - GetSBRanges(HsbVisible,VsbVisible,HsbRange,VsbRange,HsbPage,VsbPage); - UpdateVertScrollBar(VsbVisible, VsbRange, VsbPage); - UpdateHorzScrollBar(HsbVisible, HsbRange, HsbPage); + GetSBRanges(HsbVisible,VsbVisible,HsbRange,VsbRange,HsbPage,VsbPage,HsbPos,VsbPos); + UpdateVertScrollBar(VsbVisible, VsbRange, VsbPage, VsbPos); + UpdateHorzScrollBar(HsbVisible, HsbRange, HsbPage, HsbPos); {$ifdef DbgScroll} DebugLn('VRange=',dbgs(VsbRange),' Visible=',dbgs(VSbVisible)); DebugLn('HRange=',dbgs(HsbRange),' Visible=',dbgs(HSbVisible)); @@ -2939,7 +2940,7 @@ inherited Click; end; -procedure TCustomGrid.ScrollBarRange(Which: Integer; aRange,aPage: Integer); +procedure TCustomGrid.ScrollBarRange(Which: Integer; aRange,aPage,aPos: Integer); var ScrollInfo: TScrollInfo; begin @@ -2949,7 +2950,7 @@ {$endif} FillChar(ScrollInfo, SizeOf(ScrollInfo), 0); ScrollInfo.cbSize := SizeOf(ScrollInfo); - ScrollInfo.fMask := SIF_RANGE or SIF_PAGE or SIF_DISABLENOSCROLL; + ScrollInfo.fMask := SIF_RANGE or SIF_POS or SIF_PAGE or SIF_DISABLENOSCROLL; {$ifdef Unix} ScrollInfo.fMask := ScrollInfo.fMask or SIF_UPDATEPOLICY; if goThumbTracking in Options then @@ -2958,7 +2959,8 @@ ScrollInfo.ntrackPos := SB_POLICY_DISCONTINUOUS; {$endif} ScrollInfo.nMin := 0; - ScrollInfo.nMax := ARange; + ScrollInfo.nMax := aRange; + ScrollInfo.nPos := aPos; if APage<0 then APage := 0; ScrollInfo.nPage := APage; @@ -3170,11 +3172,11 @@ FGCache.TLColOff:=0; if OldTopLeft.y<>FTopLeft.y then FGCache.TLRowOff:=0; - - doTopleftChange(False) + doTopleftChange(False); end else if not (goSmoothScroll in Options) or wResetOffs then ResetOffset(True, True); + end; {Returns a valid TopLeft from a proposed TopLeft[DCol,DRow] which are @@ -3363,8 +3365,6 @@ if ChkRow or ChkCol then begin CacheVisibleGrid; Invalidate; - if ChkCol then updateScrollBarPos(ssHorizontal); - if ChkRow then updateScrollBarPos(ssVertical); end; end; end; @@ -4078,9 +4078,7 @@ FGCache.TLColOff:=0; if TL<>FTopLeft.X then begin - Inc(FUpdateScrollBarsCount); TryScrollTo(Tl, FTopLeft.Y); - Dec(FUpdateScrollBarsCount); end else if goSmoothScroll in Options then begin CacheVisibleGrid; @@ -4184,9 +4182,7 @@ FGCache.TLRowOff:=0; if TL<>FTopLeft.Y then begin - Inc(FUpdateScrollBarsCount); TryScrollTo(FTopLeft.X, Tl); - Dec(FUpdateScrollBarsCount); end else if goSmoothScroll in Options then begin CacheVisibleGrid; @@ -4316,31 +4312,6 @@ Invalidate; end; -{ Reposition the scrollbars according to the current TopLeft } -procedure TCustomGrid.UpdateScrollbarPos(Which: TScrollStyle); -begin - // Adjust ScrollBar Positions - // Special condition only When scrolling by draging - // the scrollbars see: WMHScroll and WVHScroll - if (FUpdateScrollBarsCount=0) and not FixedGrid then begin - if Which in [ssHorizontal, ssBoth] then begin - if FScrollBars in [ssHorizontal,ssBoth,ssAutoHorizontal,ssAutoBoth] then begin - with FGCache do - ScrollBarPosition(SB_HORZ, - integer(PtrUInt(AccumWidth[FTopLeft.x]))-TLColOff-FixedWidth ); - end; - end; - - if Which in [ssVertical, ssBoth] then begin - if FScrollBars in [ssVertical,ssBoth,ssAutoVertical,ssAutoBoth] then begin - with FGCache do - ScrollBarPosition(SB_VERT, - integer(PtrUInt(AccumHeight[FTopLeft.y]))-TLRowOff-FixedHeight); - end; - end; - end; {if FUpd...} -end; - procedure TCustomGrid.UpdateCachedSizes; var i: Integer; @@ -4418,6 +4389,13 @@ if AutoHorz then HsbVisible := HsbVisible and not AutoFillColumns; + // update new cached client values according to visibility + // of scrollbars + if HsbVisible then + FGCache.ClientHeight := ClientH - BarH; + if VsbVisible then + FGCache.ClientWidth := ClientW - BarW; + {$ifdef dbgscroll} DebugLn('TCustomGrid.GetSBVisibility:'); DebugLn([' Horz=',HsbVisible,' GW=',FGCache.GridWidth, @@ -4428,28 +4406,35 @@ end; procedure TCustomGrid.GetSBRanges(const HsbVisible, VsbVisible: boolean; out - HsbRange, VsbRange, HsbPage, VSbPage: Integer); + HsbRange,VsbRange,HsbPage,VSbPage,HsbPos,VsbPos: Integer); var Tw, Th: Integer; begin with FGCache do begin + + HsbRange := 0; + HsbPos := 0; if HsbVisible then begin HsbRange:=GridWidth + 2 - GetBorderWidth; if not (goSmoothScroll in Options) then begin TW:= integer(PtrUInt(AccumWidth[MaxTopLeft.X]))-(HsbRange-ClientWidth); HsbRange:=HsbRange + TW - FixedWidth + 1; end; - end else - HsbRange:=0; + if FTopLeft.x<=ColCount-1 then + HsbPos := integer(PtrUInt(AccumWidth[FTopLeft.x]))-TLColOff-FixedWidth; + end; + VsbRange := 0; + VsbPos := 0; if VsbVisible then begin VSbRange:= GridHeight + 2 - GetBorderWidth; if not (goSmoothScroll in Options) then begin TH:= integer(PtrUInt(accumHeight[MaxTopLeft.Y]))-(VsbRange-ClientHeight); VsbRange:=VsbRange + TH -FixedHeight + 1; end; - end else - VsbRange:= 0; + if FTopLeft.Y<=RowCount-1 then + VsbPos := integer(PtrUInt(AccumHeight[FTopLeft.y]))-TLRowOff-FixedHeight; + end; HsbPage := ClientWidth; VSbPage := ClientHeight; @@ -5767,7 +5752,7 @@ end; gsNormal: - if not FixedGrid then + if not FixedGrid and (Cur.X=FGCache.ClickCell.X) and (Cur.Y=FGCache.ClickCell.Y) then CellClick(cur.x, cur.y, Button); gsSelecting: @@ -5842,6 +5827,7 @@ if IsPushCellActive() then begin ResetPushedCell; end; + FGCache.ClickCell := point(-1, -1); {$IfDef dbgGrid}DebugLn('MouseUP END RND=', FloatToStr(Random));{$Endif} end; @@ -6579,7 +6565,7 @@ end; procedure TCustomGrid.UpdateHorzScrollBar(const aVisible: boolean; - const aRange,aPage: Integer); + const aRange,aPage,aPos: Integer); begin {$ifdef DbgScroll} DebugLn('TCustomGrid.UpdateHorzScrollbar: Vis=',dbgs(aVisible), @@ -6587,11 +6573,11 @@ {$endif} ScrollBarShow(SB_HORZ, aVisible); if aVisible then - ScrollBarRange(SB_HORZ, aRange, aPage); + ScrollBarRange(SB_HORZ, aRange, aPage, aPos); end; procedure TCustomGrid.UpdateVertScrollbar(const aVisible: boolean; - const aRange,aPage: Integer); + const aRange,aPage,aPos: Integer); begin {$ifdef DbgScroll} DebugLn('TCustomGrid.UpdateVertScrollbar: Vis=',dbgs(aVisible), @@ -6599,7 +6585,7 @@ {$endif} ScrollBarShow(SB_VERT, aVisible); if aVisible then - ScrollbarRange(SB_VERT, aRange, aPage ); + ScrollbarRange(SB_VERT, aRange, aPage, aPos ); end; procedure TCustomGrid.UpdateBorderStyle; @@ -8000,6 +7986,7 @@ FRows:=TList.Create; FGCache.AccumWidth:=TList.Create; FGCache.AccumHeight:=TList.Create; + FGCache.ClickCell := point(-1, -1); inherited Create(AOwner); FColumns := CreateColumns; @@ -8059,7 +8046,6 @@ FStringEditor.name :='StringEditor'; FStringEditor.Text:=''; FStringEditor.Visible:=False; - FStringEditor.AutoSize:=False; FStringEditor.Align:=alNone; FStringEditor.BorderStyle := bsNone; @@ -8117,7 +8103,7 @@ Cfg:=TXMLConfig.Create(nil); Try - Cfg.FileName := FileName; + Cfg.FileName := UTF8ToSys(FileName); SaveContent(Cfg); Finally Cfg.Flush; @@ -8173,7 +8159,7 @@ Cfg:=TXMLConfig.Create(nil); Try - Cfg.Filename := FileName; + Cfg.Filename := UTF8ToSys(FileName); Version:=cfg.GetValue('grid/version',-1); if Version=-1 then raise Exception.Create(rsNotAValidGridFile); BeginUpdate; @@ -8599,6 +8585,12 @@ FRow := Msg.Row; end; +constructor TStringCellEditor.Create(Aowner: TComponent); +begin + inherited Create(Aowner); + AutoSize := false; +end; + { TStringGridStrings } function TStringGridStrings.ConvertIndexLineCol(Index: Integer; var Line, Col: Integer): boolean; diff -Nru lazarus-0.9.30/lcl/icnstypes.pas lazarus-0.9.30.2/lcl/icnstypes.pas --- lazarus-0.9.30/lcl/icnstypes.pas 2010-09-04 16:28:08.000000000 +0000 +++ lazarus-0.9.30.2/lcl/icnstypes.pas 2011-11-23 16:14:34.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: icnstypes.pas 27267 2010-09-04 16:28:08Z sekelsenmat $ } +{ $Id$ } { /*************************************************************************** IcnsTypes.pas diff -Nru lazarus-0.9.30/lcl/include/buttons.inc lazarus-0.9.30.2/lcl/include/buttons.inc --- lazarus-0.9.30/lcl/include/buttons.inc 2011-02-10 22:22:30.000000000 +0000 +++ lazarus-0.9.30.2/lcl/include/buttons.inc 2011-11-23 16:14:43.000000000 +0000 @@ -1,5 +1,5 @@ {%MainUnit ../stdctrls.pp} -{ $Id: buttons.inc 29456 2011-02-10 22:22:30Z vincents $} +{ $Id$} {****************************************************************************** TCustomButton diff -Nru lazarus-0.9.30/lcl/include/control.inc lazarus-0.9.30.2/lcl/include/control.inc --- lazarus-0.9.30/lcl/include/control.inc 2010-12-11 05:21:19.000000000 +0000 +++ lazarus-0.9.30.2/lcl/include/control.inc 2011-11-23 16:14:43.000000000 +0000 @@ -1,5 +1,5 @@ {%MainUnit ../controls.pp} -{ $Id: control.inc 28676 2010-12-11 05:21:19Z paul $ } +{ $Id$ } {****************************************************************************** TControl @@ -2905,6 +2905,7 @@ procedure TControl.InvalidateControl(CtrlIsVisible, CtrlIsOpaque: Boolean); var Rect: TRect; + Pt: TPoint; function BackgroundClipped: Boolean; var @@ -2943,7 +2944,9 @@ if (CtrlIsVisible or ((csDesigning in ComponentState) and not (csNoDesignVisible in ControlStyle))) then begin + Pt := Parent.GetClientScrollOffset; Rect := BoundsRect; + OffsetRect(Rect, -Pt.X, -Pt.Y); InvalidateRect(Parent.Handle, @Rect, not (CtrlIsOpaque or (csOpaque in Parent.ControlStyle) or BackgroundClipped)); end; diff -Nru lazarus-0.9.30/lcl/include/custombitmap.inc lazarus-0.9.30.2/lcl/include/custombitmap.inc --- lazarus-0.9.30/lcl/include/custombitmap.inc 2010-09-11 14:05:21.000000000 +0000 +++ lazarus-0.9.30.2/lcl/include/custombitmap.inc 2011-11-23 16:14:43.000000000 +0000 @@ -443,6 +443,7 @@ if UpdateHandles(ABitmap, AMask) then begin FPixelFormatNeedsUpdate := True; + FMasked := AMask <> 0; Changed(Self); end; end; diff -Nru lazarus-0.9.30/lcl/include/customcombobox.inc lazarus-0.9.30.2/lcl/include/customcombobox.inc --- lazarus-0.9.30/lcl/include/customcombobox.inc 2010-08-12 12:24:11.000000000 +0000 +++ lazarus-0.9.30.2/lcl/include/customcombobox.inc 2011-11-23 16:14:43.000000000 +0000 @@ -50,6 +50,7 @@ TWSCustomComboBoxClass(WidgetSetClass).SetArrowKeysTraverseList(Self, FArrowKeysTraverseList); TWSCustomComboBoxClass(WidgetSetClass).SetReadOnly(Self, FReadOnly); TWSCustomComboBoxClass(WidgetSetClass).SetMaxLength(Self, FMaxLength); + TWSCustomComboBoxClass(WidgetSetClass).SetDropDownCount(Self, FDropDownCount); if FSelStart <> FSelLength then begin diff -Nru lazarus-0.9.30/lcl/include/customlistbox.inc lazarus-0.9.30.2/lcl/include/customlistbox.inc --- lazarus-0.9.30/lcl/include/customlistbox.inc 2010-11-18 17:02:45.000000000 +0000 +++ lazarus-0.9.30.2/lcl/include/customlistbox.inc 2011-11-23 16:14:43.000000000 +0000 @@ -113,6 +113,7 @@ // free old items OldItems.Free; TWSCustomListBoxClass(WidgetSetClass).SetSorted(Self, FItems, FSorted); + TWSCustomListBoxClass(WidgetSetClass).SetScrollWidth(Self, FScrollWidth); UnlockSelectionChange; end; @@ -194,6 +195,13 @@ TWSCustomListBoxClass(WidgetSetClass).SetColumnCount(Self, FColumns); end; +procedure TCustomListBox.SetScrollWidth(const AValue: Integer); +begin + FScrollWidth := AValue; + if HandleAllocated then + TWSCustomListBoxClass(WidgetSetClass).SetScrollWidth(Self, FScrollWidth); +end; + {------------------------------------------------------------------------------ function TCustomListBox.GetCount: Integer; ------------------------------------------------------------------------------} @@ -202,6 +210,14 @@ Result := Items.Count; end; +function TCustomListBox.GetScrollWidth: Integer; +begin + if HandleAllocated then + Result := TWSCustomListBoxClass(WidgetSetClass).GetScrollWidth(Self) + else + Result := FScrollWidth; +end; + {------------------------------------------------------------------------------ procedure TCustomListBox.SetTopIndex(const AValue: Integer); ------------------------------------------------------------------------------} @@ -509,6 +525,7 @@ FClickOnSelChange:= True; FItemIndex:=-1; FExtendedSelect := true; + FScrollWidth := 0; FCanvas := TControlCanvas.Create; TControlCanvas(FCanvas).Control := Self; ParentColor := false; diff -Nru lazarus-0.9.30/lcl/include/custommemo.inc lazarus-0.9.30.2/lcl/include/custommemo.inc --- lazarus-0.9.30/lcl/include/custommemo.inc 2010-05-17 07:34:07.000000000 +0000 +++ lazarus-0.9.30.2/lcl/include/custommemo.inc 2011-11-23 16:14:43.000000000 +0000 @@ -1,5 +1,5 @@ {%MainUnit ../stdctrls.pp} -{ $Id: custommemo.inc 25476 2010-05-17 07:34:07Z paul $ } +{ $Id$ } {****************************************************************************** TCustomMemo diff -Nru lazarus-0.9.30/lcl/include/customupdown.inc lazarus-0.9.30.2/lcl/include/customupdown.inc --- lazarus-0.9.30/lcl/include/customupdown.inc 2010-12-02 07:21:19.000000000 +0000 +++ lazarus-0.9.30.2/lcl/include/customupdown.inc 2011-11-23 16:14:43.000000000 +0000 @@ -130,8 +130,11 @@ j : integer; begin Inherited Paint; - - Canvas.Pen.Color := clBtnText;//Not perfect, but it works + + if Enabled then + Canvas.Pen.Color := clBtnText //Not perfect, but it works + else + Canvas.Pen.Color := clGrayText; ah := height div 2; aw := width div 2; @@ -393,6 +396,13 @@ UpdateOrientation; end; +procedure TCustomUpDown.SetEnabled(Value: Boolean); +begin + MinBtn.Enabled := Value; + MaxBtn.Enabled := Value; + inherited SetEnabled(Value); +end; + class function TCustomUpDown.GetControlClassDefaultSize: TSize; begin Result.CX := 17; diff -Nru lazarus-0.9.30/lcl/include/graphiccontrol.inc lazarus-0.9.30.2/lcl/include/graphiccontrol.inc --- lazarus-0.9.30/lcl/include/graphiccontrol.inc 2009-07-17 02:44:31.000000000 +0000 +++ lazarus-0.9.30.2/lcl/include/graphiccontrol.inc 2011-11-23 16:14:43.000000000 +0000 @@ -111,5 +111,19 @@ TControlCanvas(Canvas).FreeHandle; end; -// included by controls.pp +procedure TGraphicControl.Update; +var + R: TRect; + Pt: TPoint; +begin + if Assigned(Parent) and Parent.HandleAllocated and Parent.Visible then + begin + R := ClientRect; + Pt := Parent.GetClientScrollOffset; + OffsetRect(R, Left - Pt.X, Top - Pt.Y); + R.Right := R.Right + Pt.X; + R.Bottom := R.Bottom + Pt.Y; + LCLIntf.InvalidateRect(Parent.Handle, @R, True); + end; +end; diff -Nru lazarus-0.9.30/lcl/include/interfacebase.inc lazarus-0.9.30.2/lcl/include/interfacebase.inc --- lazarus-0.9.30/lcl/include/interfacebase.inc 2010-05-20 10:54:19.000000000 +0000 +++ lazarus-0.9.30.2/lcl/include/interfacebase.inc 2011-11-23 16:14:44.000000000 +0000 @@ -1,5 +1,5 @@ {%MainUnit ../interfacebase.pp} -{ $Id: interfacebase.inc 25535 2010-05-20 10:54:19Z zeljko $ +{ $Id$ ****************************************************************************** TWidgetSet diff -Nru lazarus-0.9.30/lcl/include/intfbaselcl.inc lazarus-0.9.30.2/lcl/include/intfbaselcl.inc --- lazarus-0.9.30/lcl/include/intfbaselcl.inc 2010-11-24 10:12:28.000000000 +0000 +++ lazarus-0.9.30.2/lcl/include/intfbaselcl.inc 2011-11-23 16:14:44.000000000 +0000 @@ -1,5 +1,5 @@ {%MainUnit ../interfacebase.pp} -{ $Id: intfbaselcl.inc 28448 2010-11-24 10:12:28Z paul $ +{ $Id$ ****************************************************************************** TWidgetSet diff -Nru lazarus-0.9.30/lcl/include/intfbasewinapi.inc lazarus-0.9.30.2/lcl/include/intfbasewinapi.inc --- lazarus-0.9.30/lcl/include/intfbasewinapi.inc 2010-09-16 19:02:43.000000000 +0000 +++ lazarus-0.9.30.2/lcl/include/intfbasewinapi.inc 2011-11-23 16:14:44.000000000 +0000 @@ -1,6 +1,6 @@ {%MainUnit ../interfacebase.pp} -{ $Id: intfbasewinapi.inc 27388 2010-09-16 19:02:43Z blikblum $ } +{ $Id$ } {****************************************************************************** TWidgetSet diff -Nru lazarus-0.9.30/lcl/include/lclintf.inc lazarus-0.9.30.2/lcl/include/lclintf.inc --- lazarus-0.9.30/lcl/include/lclintf.inc 2010-11-24 10:12:28.000000000 +0000 +++ lazarus-0.9.30.2/lcl/include/lclintf.inc 2011-11-23 16:14:44.000000000 +0000 @@ -1,5 +1,5 @@ {%MainUnit ../lclintf.pas} -{ $Id: lclintf.inc 28448 2010-11-24 10:12:28Z paul $ +{ $Id$ ****************************************************************************** All interface communication related stuff goes here. This file is used by LCLIntf.pas diff -Nru lazarus-0.9.30/lcl/include/listcolumn.inc lazarus-0.9.30.2/lcl/include/listcolumn.inc --- lazarus-0.9.30/lcl/include/listcolumn.inc 2010-07-27 07:33:03.000000000 +0000 +++ lazarus-0.9.30.2/lcl/include/listcolumn.inc 2011-11-23 16:14:44.000000000 +0000 @@ -1,5 +1,5 @@ {%MainUnit ../comctrls.pp} -{ $Id: listcolumn.inc 26846 2010-07-27 07:33:03Z sekelsenmat $ +{ $Id$ ***************************************************************************** * * diff -Nru lazarus-0.9.30/lcl/include/listcolumns.inc lazarus-0.9.30.2/lcl/include/listcolumns.inc --- lazarus-0.9.30/lcl/include/listcolumns.inc 2009-12-02 03:22:17.000000000 +0000 +++ lazarus-0.9.30.2/lcl/include/listcolumns.inc 2011-11-23 16:14:44.000000000 +0000 @@ -1,6 +1,6 @@ {%MainUnit ../comctrls.pp} -{ $Id: listcolumns.inc 22916 2009-12-02 03:22:17Z paul $ +{ $Id$ ***************************************************************************** * * diff -Nru lazarus-0.9.30/lcl/include/listitem.inc lazarus-0.9.30.2/lcl/include/listitem.inc --- lazarus-0.9.30/lcl/include/listitem.inc 2010-10-30 12:51:58.000000000 +0000 +++ lazarus-0.9.30.2/lcl/include/listitem.inc 2011-11-23 16:14:44.000000000 +0000 @@ -1,5 +1,5 @@ {%MainUnit ../comctrls.pp} -{ $Id: listitem.inc 27975 2010-10-30 12:51:58Z zeljko $ +{ $Id$ ***************************************************************************** * * diff -Nru lazarus-0.9.30/lcl/include/listitems.inc lazarus-0.9.30.2/lcl/include/listitems.inc --- lazarus-0.9.30/lcl/include/listitems.inc 2010-09-11 14:05:21.000000000 +0000 +++ lazarus-0.9.30.2/lcl/include/listitems.inc 2011-11-23 16:14:44.000000000 +0000 @@ -1,5 +1,5 @@ {%MainUnit ../comctrls.pp} -{ $Id: listitems.inc 27304 2010-09-11 14:05:21Z mattias $ +{ $Id$ ***************************************************************************** * * diff -Nru lazarus-0.9.30/lcl/include/treeview.inc lazarus-0.9.30.2/lcl/include/treeview.inc --- lazarus-0.9.30/lcl/include/treeview.inc 2011-02-10 22:22:30.000000000 +0000 +++ lazarus-0.9.30.2/lcl/include/treeview.inc 2011-11-23 16:14:44.000000000 +0000 @@ -195,9 +195,9 @@ procedure TTreeNodeExpandedState.Clear; begin - if Childs<>nil then begin - Childs.FreeAndClear; - FreeThenNil(Childs); + if Children<>nil then begin + Children.FreeAndClear; + FreeThenNil(Children); end; end; @@ -214,9 +214,9 @@ ChildNode:=FirstTreeNode; while ChildNode<>nil do begin if ChildNode.Expanded then begin - if Childs=nil then Childs:=TAvgLvlTree.Create(@CompareExpandedNodes); + if Children=nil then Children:=TAvgLvlTree.Create(@CompareExpandedNodes); NewExpandedNode:=TTreeNodeExpandedState.Create(ChildNode.GetFirstChild); - Childs.Add(NewExpandedNode); + Children.Add(NewExpandedNode); end; ChildNode:=ChildNode.GetNextSibling; end; @@ -228,11 +228,11 @@ ANode: TAvgLvlTreeNode; ChildNodeText: String; begin - if Childs=nil then exit; + if Children=nil then exit; ChildNode:=FirstTreeNode; while ChildNode<>nil do begin ChildNodeText:=ChildNode.Text; - ANode:=Childs.FindKey(PChar(ChildNodeText),@CompareTextWithExpandedNode); + ANode:=Children.FindKey(PChar(ChildNodeText),@CompareTextWithExpandedNode); ChildNode.Expanded:=ANode<>nil; if ANode<>nil then TTreeNodeExpandedState(ANode.Data).Apply(ChildNode.GetFirstChild); diff -Nru lazarus-0.9.30/lcl/include/wincontrol.inc lazarus-0.9.30.2/lcl/include/wincontrol.inc --- lazarus-0.9.30/lcl/include/wincontrol.inc 2011-02-10 22:22:30.000000000 +0000 +++ lazarus-0.9.30.2/lcl/include/wincontrol.inc 2011-11-23 16:14:44.000000000 +0000 @@ -1,5 +1,5 @@ {%MainUnit ../controls.pp} -{ $Id: wincontrol.inc 29456 2011-02-10 22:22:30Z vincents $ } +{ $Id$ } {****************************************************************************** TWinControl @@ -70,8 +70,8 @@ A TAutoSizeBox is a node in a tree. A TAutoSizeBox can be a cell. Then it is a leaf in the tree and can have a Control. - A TAutoSizeBox can be a row or column. Then it has only one Childs array. - A TAutoSizeBox can be a table. Then it has both Childs arrays. + A TAutoSizeBox can be a row or column. Then it has only one Children array. + A TAutoSizeBox can be a table. Then it has both Children arrays. } TAutoSizeBox = class @@ -86,7 +86,7 @@ Parent: array[TAutoSizeBoxOrientation] of TAutoSizeBox; Index: array[TAutoSizeBoxOrientation] of Integer; // index in parent or grandparent ChildCount: array[TAutoSizeBoxOrientation] of Integer; - Childs: array[TAutoSizeBoxOrientation] of PAutoSizeBox; + Children: array[TAutoSizeBoxOrientation] of PAutoSizeBox; NewControlBounds: TRect; // for nodes @@ -936,9 +936,9 @@ //Box.WriteDebugReport('TAutoSizeCtrlData.SetupNonAlignedChilds'); // transfer the coords of the layout for y:=0 to Box.ChildCount[asboVertical]-1 do begin - RowBox:=Box.Childs[asboVertical][y]; + RowBox:=Box.Children[asboVertical][y]; for x:=0 to RowBox.ChildCount[asboHorizontal]-1 do begin - ControlBox:=RowBox.Childs[asboHorizontal][x]; + ControlBox:=RowBox.Children[asboHorizontal][x]; Child:=ControlBox.Control; if Child=nil then continue; NewBounds:=ControlBox.NewControlBounds; @@ -1425,9 +1425,9 @@ Size: Integer; begin Size:=NewChildCount*SizeOf(Pointer); - ReallocMem(Childs[Orientation],Size); + ReallocMem(Children[Orientation],Size); if Size>0 then - FillChar(Childs[Orientation][0],Size,0); + FillChar(Children[Orientation][0],Size,0); ChildCount[Orientation]:=NewChildCount; end; @@ -1457,7 +1457,7 @@ // create columns for x:=0 to ColCount-1 do begin ColBox:=TAutoSizeBox.Create; - Childs[asboHorizontal][x]:=ColBox; + Children[asboHorizontal][x]:=ColBox; ColBox.AllocateChildsArray(asboVertical,RowCount); ColBox.Parent[asboHorizontal]:=Self; ColBox.Index[asboHorizontal]:=x; @@ -1466,7 +1466,7 @@ // create rows for y:=0 to RowCount-1 do begin RowBox:=TAutoSizeBox.Create; - Childs[asboVertical][y]:=RowBox; + Children[asboVertical][y]:=RowBox; RowBox.AllocateChildsArray(asboHorizontal,ColCount); RowBox.Parent[asboVertical]:=Self; RowBox.Index[asboHorizontal]:=-1; @@ -1474,12 +1474,12 @@ end; // create cells for y:=0 to RowCount-1 do begin - RowBox:=Childs[asboVertical][y]; + RowBox:=Children[asboVertical][y]; for x:=0 to ColCount-1 do begin - ColBox:=Childs[asboHorizontal][x]; + ColBox:=Children[asboHorizontal][x]; CellBox:=TAutoSizeBox.Create; - RowBox.Childs[asboHorizontal][x]:=CellBox; - ColBox.Childs[asboVertical][y]:=CellBox; + RowBox.Children[asboHorizontal][x]:=CellBox; + ColBox.Children[asboVertical][y]:=CellBox; CellBox.Parent[asboHorizontal]:=RowBox; CellBox.Parent[asboVertical]:=ColBox; CellBox.Index[asboHorizontal]:=x; @@ -1528,7 +1528,7 @@ Col:=i mod LineMax; if (BiDiMode=bdRightToLeft) then Col:=LineMax-Col-1; - ChildBox:=Childs[asboHorizontal][Col].Childs[asboVertical][Row]; + ChildBox:=Children[asboHorizontal][Col].Children[asboVertical][Row]; ChildBox.SetControl(ChildControl); ChildBox.ApplyChildsizingBorders(ChildSizing); end; @@ -1539,7 +1539,7 @@ Row:=i mod LineMax; if (BiDiMode=bdRightToLeft) then Col:=LineMax-Col-1; - ChildBox:=Childs[asboVertical][Row].Childs[asboHorizontal][Col]; + ChildBox:=Children[asboVertical][Row].Children[asboHorizontal][Col]; ChildBox.SetControl(ChildControl); ChildBox.ApplyChildsizingBorders(ChildSizing); end; @@ -1593,7 +1593,7 @@ FirstChild: TAutoSizeBox; begin if ChildCount[o]>0 then begin - FirstChild:=Childs[o][0]; + FirstChild:=Children[o][0]; MaximumSize[o]:=FirstChild.MaximumSize[o]; MinimumSize[o]:=FirstChild.MinimumSize[o]; PreferredSize[o]:=FirstChild.PreferredSize[o]; @@ -1632,12 +1632,12 @@ Orthogonal:=SizeBoxOrthogonal[Orientation]; if ChildCount[Orientation]>0 then begin for i:=0 to ChildCount[Orientation]-1 do begin - CurChild:=Childs[Orientation][i]; + CurChild:=Children[Orientation][i]; // add border in Orientation CurBorder:=CurChild.BorderLeftTop[Orientation]; if i>0 then - CurBorder:=Max(Childs[Orientation][i-1].BorderRightBottom[Orientation], + CurBorder:=Max(Children[Orientation][i-1].BorderRightBottom[Orientation], CurBorder); if MaximumSize[Orientation]>0 then begin inc(MaximumSize[Orientation],CurBorder); @@ -1673,7 +1673,7 @@ end; // last border - LastChild:=Childs[Orientation][ChildCount[Orientation]-1]; + LastChild:=Children[Orientation][ChildCount[Orientation]-1]; BorderRightBottom[Orientation]:=LastChild.BorderRightBottom[Orientation]; end; end; @@ -1687,12 +1687,12 @@ begin // sum items in rows for y:=0 to ChildCount[asboVertical]-1 do begin - RowBox:=Childs[asboVertical][y]; + RowBox:=Children[asboVertical][y]; RowBox.SumLine(asboHorizontal,true); end; // sum items in columns for x:=0 to ChildCount[asboHorizontal]-1 do begin - ColBox:=Childs[asboHorizontal][x]; + ColBox:=Children[asboHorizontal][x]; ColBox.SumLine(asboVertical,true); end; // sum rows @@ -1709,7 +1709,7 @@ begin CurLeftTop:=0; for i:=0 to ChildCount[Orientation]-1 do begin - Child:=Childs[Orientation][i]; + Child:=Children[Orientation][i]; if i=0 then inc(CurLeftTop,Child.BorderLeftTop[Orientation]); Child.LeftTop[Orientation]:=CurLeftTop; @@ -1738,7 +1738,7 @@ begin Result:=0; for i:=0 to ChildCount[Orientation]-1 do begin - Child:=Childs[Orientation][i]; + Child:=Children[Orientation][i]; if i=0 then inc(Result,Child.BorderLeftTop[Orientation]); if Child.PreferredSize[Orientation]<1 then @@ -1769,7 +1769,7 @@ crsScaleChilds,crsHomogenousChildResize: for i:=0 to ChildCount[Orientation]-1 do begin - Child:=Childs[Orientation][i]; + Child:=Children[Orientation][i]; if (Child.MaximumSize[Orientation]>0) and (Child.PreferredSize[Orientation]>=Child.MaximumSize[Orientation]) then begin @@ -1824,7 +1824,7 @@ for i:=0 to ChildCount[Orientation]-1 do begin if TargetSize=CurSize then break; - Child:=Childs[Orientation][i]; + Child:=Children[Orientation][i]; if (Child.MaximumSize[Orientation]<0) and (Child.PreferredSize[Orientation]>=Child.MaximumSize[Orientation]) then begin @@ -1899,7 +1899,7 @@ crsScaleChilds,crsHomogenousChildResize: for i:=0 to ChildCount[Orientation]-1 do begin - Child:=Childs[Orientation][i]; + Child:=Children[Orientation][i]; if (Child.PreferredSize[Orientation]<=Child.MinimumSize[Orientation]) or (Child.PreferredSize[Orientation]<=1) then begin @@ -1939,7 +1939,7 @@ crsHomogenousSpaceResize: for i:=0 to ChildCount[Orientation]-1 do begin - Child:=Childs[Orientation][i]; + Child:=Children[Orientation][i]; if i=0 then begin CurScale:=double(TargetSize); CurOffset:=Child.BorderLeftTop[Orientation]; @@ -1977,7 +1977,7 @@ OldSize: LongInt; begin for i:=0 to ChildCount[Orientation]-1 do begin - Child:=Childs[Orientation][i]; + Child:=Children[Orientation][i]; if (Child.PreferredSize[Orientation]<=1) or (Child.PreferredSize[Orientation]<=Child.MinimumSize[Orientation]) then begin @@ -2117,7 +2117,7 @@ begin Result:=0; for i:=0 to ChildCount[Orientation]-1 do begin - Child:=Childs[Orientation][i]; + Child:=Children[Orientation][i]; if i=0 then inc(Result,Child.BorderLeftTop[Orientation]); if Child.PreferredSize[Orientation]<1 then @@ -2137,7 +2137,7 @@ dx:=TargetWidth-GetChildTotalSize(Orientation); for i:=ChildCount[Orientation]-1 downto 0 do begin - Child:=Childs[Orientation][i]; + Child:=Children[Orientation][i]; inc(Child.LeftTop[Orientation],dx); end; end; @@ -2158,9 +2158,9 @@ begin //WriteDebugReport; for y:=0 to ChildCount[asboVertical]-1 do begin - RowBox:=Childs[asboVertical][y]; + RowBox:=Children[asboVertical][y]; for x:=0 to RowBox.ChildCount[asboHorizontal]-1 do begin - ControlBox:=RowBox.Childs[asboHorizontal][x]; + ControlBox:=RowBox.Children[asboHorizontal][x]; ColBox:=ControlBox.Parent[asboVertical]; CurControl:=ControlBox.Control; if CurControl=nil then continue; @@ -2237,9 +2237,9 @@ Result:=false; //WriteDebugReport; for y:=0 to ChildCount[asboVertical]-1 do begin - RowBox:=Childs[asboVertical][y]; + RowBox:=Children[asboVertical][y]; for x:=0 to RowBox.ChildCount[asboHorizontal]-1 do begin - ControlBox:=RowBox.Childs[asboHorizontal][x]; + ControlBox:=RowBox.Children[asboHorizontal][x]; CurControl:=ControlBox.Control; if CurControl=nil then continue; NewBounds:=ControlBox.NewControlBounds; @@ -2286,7 +2286,7 @@ DebugLn('TAutoSizeBox.WriteDebugReport '+Title +' ChildCounts=',dbgs(ChildCount[asboHorizontal]),'x',dbgs(ChildCount[asboVertical])); for y:=0 to ChildCount[asboVertical]-1 do begin - RowBox:=Childs[asboVertical][y]; + RowBox:=Children[asboVertical][y]; DbgOut(' Row='+dbgs(y), ' MinY='+dbgs(RowBox.MinimumSize[asboVertical]), ' MaxY='+dbgs(RowBox.MaximumSize[asboVertical]), @@ -2294,7 +2294,7 @@ ' BorderTop=',dbgs(RowBox.BorderLeftTop[asboVertical]), ' #Col='+dbgs(RowBox.ChildCount[asboHorizontal])); for x:=0 to RowBox.ChildCount[asboHorizontal]-1 do begin - CellBox:=RowBox.Childs[asboHorizontal][x]; + CellBox:=RowBox.Children[asboHorizontal][x]; DbgOut(' CellControl=',DbgSName(CellBox.Control), ' Min='+dbgs(CellBox.MinimumSize[asboHorizontal])+'x'+dbgs(CellBox.MinimumSize[asboVertical]), ' Max='+dbgs(CellBox.MaximumSize[asboHorizontal])+'x'+dbgs(CellBox.MaximumSize[asboVertical]), @@ -2306,7 +2306,7 @@ end; DbgOut(' Columns: '); for x:=0 to ChildCount[asboHorizontal]-1 do begin - ColBox:=Childs[asboHorizontal][x]; + ColBox:=Children[asboHorizontal][x]; DbgOut(' Col='+dbgs(ColBox.Index[asboHorizontal]), ' Min='+dbgs(ColBox.MinimumSize[asboHorizontal]), ' Max='+dbgs(ColBox.MaximumSize[asboHorizontal]), @@ -2323,7 +2323,7 @@ // unlink from parent for o:=Low(TAutoSizeBoxOrientation) to high(TAutoSizeBoxOrientation) do if Parent[o]<>nil then - Parent[o].Childs[o][Index[o]]:=nil; + Parent[o].Children[o][Index[o]]:=nil; Clear; inherited Destroy; end; @@ -2336,10 +2336,10 @@ // free all children for o:=Low(TAutoSizeBoxOrientation) to high(TAutoSizeBoxOrientation) do for i:=0 to ChildCount[o]-1 do - Childs[o][i].Free; + Children[o][i].Free; // free children arrays for o:=Low(TAutoSizeBoxOrientation) to high(TAutoSizeBoxOrientation) do - ReallocMem(Childs[o],0); + ReallocMem(Children[o],0); end; {------------------------------------------------------------------------------ diff -Nru lazarus-0.9.30/lcl/inipropstorage.pas lazarus-0.9.30.2/lcl/inipropstorage.pas --- lazarus-0.9.30/lcl/inipropstorage.pas 2008-12-31 03:07:17.000000000 +0000 +++ lazarus-0.9.30.2/lcl/inipropstorage.pas 2011-11-23 16:14:44.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: inipropstorage.pas 18002 2008-12-31 03:07:17Z paul $ } +{ $Id$ } { ***************************************************************************** * * diff -Nru lazarus-0.9.30/lcl/interfaces/carbon/carbonbars.pp lazarus-0.9.30.2/lcl/interfaces/carbon/carbonbars.pp --- lazarus-0.9.30/lcl/interfaces/carbon/carbonbars.pp 2009-09-01 20:27:18.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/carbon/carbonbars.pp 2011-11-23 16:14:44.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: carbonbars.pp 21531 2009-09-01 20:27:18Z sekelsenmat $ +{ $Id$ ------------------------------------- CarbonBars.pp - Carbon bars classes ------------------------------------- diff -Nru lazarus-0.9.30/lcl/interfaces/carbon/carbonbuttons.pp lazarus-0.9.30.2/lcl/interfaces/carbon/carbonbuttons.pp --- lazarus-0.9.30/lcl/interfaces/carbon/carbonbuttons.pp 2010-08-11 05:44:16.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/carbon/carbonbuttons.pp 2011-11-23 16:14:44.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: carbonbuttons.pp 27063 2010-08-11 05:44:16Z dmitry $ +{ $Id$ ------------------------------------------- CarbonButtons.pp - Carbon buttons classes ------------------------------------------- diff -Nru lazarus-0.9.30/lcl/interfaces/carbon/carboncanvas.pp lazarus-0.9.30.2/lcl/interfaces/carbon/carboncanvas.pp --- lazarus-0.9.30/lcl/interfaces/carbon/carboncanvas.pp 2010-12-12 20:05:49.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/carbon/carboncanvas.pp 2011-11-23 16:14:44.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: carboncanvas.pp 28699 2010-12-12 20:05:49Z dmitry $ +{ $Id$ ----------------------------------------- carboncanvas.pp - Carbon device context ----------------------------------------- diff -Nru lazarus-0.9.30/lcl/interfaces/carbon/carbonclipboard.pp lazarus-0.9.30.2/lcl/interfaces/carbon/carbonclipboard.pp --- lazarus-0.9.30/lcl/interfaces/carbon/carbonclipboard.pp 2010-06-06 16:24:35.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/carbon/carbonclipboard.pp 2011-11-23 16:14:44.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: carbonclipboard.pp 25955 2010-06-06 16:24:35Z dmitry $ +{ $Id$ --------------------------------------- carbonclipboard.pp - Carbon clipboard --------------------------------------- diff -Nru lazarus-0.9.30/lcl/interfaces/carbon/carbondebug.pp lazarus-0.9.30.2/lcl/interfaces/carbon/carbondebug.pp --- lazarus-0.9.30/lcl/interfaces/carbon/carbondebug.pp 2008-11-25 15:00:12.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/carbon/carbondebug.pp 2011-11-23 16:14:44.000000000 +0000 @@ -1,11 +1,11 @@ -{ $Id: carbondebug.pp 17582 2008-11-25 15:00:12Z tombo $ } +{ $Id$ } { ------------------------------------- carbondebug.pp - graphic dump utils ------------------------------------- @created(Mon Jun 18th WET 2007) - @lastmod($Date: 2008-11-25 16:00:12 +0100 (Tue, 25 Nov 2008) $) + @lastmod($Date$) @author(Marc Weustink ) This unit contains utility functions to show the contents of graphics diff -Nru lazarus-0.9.30/lcl/interfaces/carbon/carbondef.pp lazarus-0.9.30.2/lcl/interfaces/carbon/carbondef.pp --- lazarus-0.9.30/lcl/interfaces/carbon/carbondef.pp 2010-10-21 08:47:54.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/carbon/carbondef.pp 2011-11-23 16:14:44.000000000 +0000 @@ -1,10 +1,10 @@ -{ $Id: carbondef.pp 27782 2010-10-21 08:47:54Z mattias $ +{ $Id$ ----------------------------------------- carbondef.pp - Type & Const definitions ----------------------------------------- @created(Wed Aug 26st WET 2005) - @lastmod($Date: 2010-10-21 10:47:54 +0200 (Thu, 21 Oct 2010) $) + @lastmod($Date$) @author(Marc Weustink ) This unit contains type & const definitions needed in the Carbon <-> LCL interface @@ -61,6 +61,7 @@ TCarbonWidget = class private + FScrollOffset: TPoint; FEventProcCount: Integer; FProperties: TStringList; FCursor: HCURSOR; @@ -69,6 +70,7 @@ FBoundsReported: Boolean; function GetPainting: Boolean; function GetProperty(AIndex: String): Pointer; + function GetScrollOffset: TPoint; procedure SetProperty(AIndex: String; const AValue: Pointer); protected procedure RegisterEvents; virtual; abstract; @@ -142,6 +144,7 @@ - processes track and draw event } property Content: ControlRef read GetContent; property Cursor: HCURSOR read FCursor; + property ScrollOffset: TPoint read GetScrollOffset; // scrolled offset of ScrollingWinControl property HasCaret: Boolean read FHasCaret write FHasCaret; property Painting: Boolean read GetPainting; property Properties[AIndex: String]: Pointer read GetProperty write SetProperty; @@ -405,6 +408,11 @@ Result := nil; end; +function TCarbonWidget.GetScrollOffset: TPoint; +begin + Result := Point(-FScrollOffset.X, -FScrollOffset.Y); +end; + {------------------------------------------------------------------------------ Method: TCarbonWidget.GetPainting Returns: If the widget is being repaint @@ -687,6 +695,7 @@ constructor TCarbonWidget.Create(const AObject: TWinControl; const AParams: TCreateParams); begin + FScrollOffset := Point(0, 0); LCLObject := AObject; FProperties := nil; Widget := nil; @@ -954,6 +963,11 @@ Self, SName, 'HIViewGetBounds'); OSError(HIViewSetBoundsOrigin(Content, R.origin.x + DX, R.origin.y + DY), Self, SName, 'HIViewSetBoundsOrigin'); + with FScrollOffset do + begin + X := X + DX; + Y := Y + DY; + end; end; {------------------------------------------------------------------------------ diff -Nru lazarus-0.9.30/lcl/interfaces/carbon/carbonedits.pp lazarus-0.9.30.2/lcl/interfaces/carbon/carbonedits.pp --- lazarus-0.9.30/lcl/interfaces/carbon/carbonedits.pp 2010-11-30 12:51:57.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/carbon/carbonedits.pp 2011-11-23 16:14:44.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: carbonedits.pp 28569 2010-11-30 12:51:57Z paul $ +{ $Id$ -------------------------------------------- carbonedits.pp - Carbon edit-like controls -------------------------------------------- diff -Nru lazarus-0.9.30/lcl/interfaces/carbon/carbongdiobjects.pp lazarus-0.9.30.2/lcl/interfaces/carbon/carbongdiobjects.pp --- lazarus-0.9.30/lcl/interfaces/carbon/carbongdiobjects.pp 2010-08-23 07:35:36.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/carbon/carbongdiobjects.pp 2011-11-23 16:14:44.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: carbongdiobjects.pp 27170 2010-08-23 07:35:36Z dmitry $ +{ $Id$ ------------------------------------------ carbongdiobjects.pp - Carbon GDI objects ------------------------------------------ diff -Nru lazarus-0.9.30/lcl/interfaces/carbon/carbonlclintf.inc lazarus-0.9.30.2/lcl/interfaces/carbon/carbonlclintf.inc --- lazarus-0.9.30/lcl/interfaces/carbon/carbonlclintf.inc 2010-04-23 20:30:18.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/carbon/carbonlclintf.inc 2011-11-23 16:14:44.000000000 +0000 @@ -1,6 +1,6 @@ {%MainUnit carbonint.pas} -{ $Id: carbonlclintf.inc 24863 2010-04-23 20:30:18Z dmitry $ } +{ $Id$ } {****************************************************************************** All Carbon interface communication implementations. This are the implementation of the overrides of the Carbon Interface for the diff -Nru lazarus-0.9.30/lcl/interfaces/carbon/carbonobject.inc lazarus-0.9.30.2/lcl/interfaces/carbon/carbonobject.inc --- lazarus-0.9.30/lcl/interfaces/carbon/carbonobject.inc 2010-08-29 16:09:32.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/carbon/carbonobject.inc 2011-11-23 16:14:44.000000000 +0000 @@ -1,6 +1,6 @@ {%MainUnit carbonint.pas} -{ $Id: carbonobject.inc 27234 2010-08-29 16:09:32Z dmitry $ } +{ $Id$ } {****************************************************************************** All utility method implementations of the TCarbonWidgetSet class are here. diff -Nru lazarus-0.9.30/lcl/interfaces/carbon/carbonprivatecontrol.inc lazarus-0.9.30.2/lcl/interfaces/carbon/carbonprivatecontrol.inc --- lazarus-0.9.30/lcl/interfaces/carbon/carbonprivatecontrol.inc 2010-11-20 08:32:17.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/carbon/carbonprivatecontrol.inc 2011-11-23 16:14:44.000000000 +0000 @@ -1,5 +1,5 @@ {%MainUnit carbonprivate.pp} -{ $Id: carbonprivatecontrol.inc 28364 2010-11-20 08:32:17Z paul $} +{ $Id$} { ***************************************************************************** * * diff -Nru lazarus-0.9.30/lcl/interfaces/carbon/carbonproc.pp lazarus-0.9.30.2/lcl/interfaces/carbon/carbonproc.pp --- lazarus-0.9.30/lcl/interfaces/carbon/carbonproc.pp 2010-12-27 12:31:31.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/carbon/carbonproc.pp 2011-11-23 16:14:44.000000000 +0000 @@ -1,10 +1,10 @@ -{ $Id: carbonproc.pp 28827 2010-12-27 12:31:31Z vincents $ +{ $Id$ ---------------------------------------- carbonproc.pp - Carbon interface procs ---------------------------------------- @created(Wed Aug 26st WET 2005) - @lastmod($Date: 2010-12-27 13:31:31 +0100 (Mon, 27 Dec 2010) $) + @lastmod($Date$) @author(Marc Weustink ) This unit contains procedures/functions needed for the Carbon <-> LCL interface diff -Nru lazarus-0.9.30/lcl/interfaces/carbon/carbonstrings.pp lazarus-0.9.30.2/lcl/interfaces/carbon/carbonstrings.pp --- lazarus-0.9.30/lcl/interfaces/carbon/carbonstrings.pp 2010-02-16 10:49:51.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/carbon/carbonstrings.pp 2011-11-23 16:14:44.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: carbonstrings.pp 23715 2010-02-16 10:49:51Z dmitry $ +{ $Id$ ----------------------------------- carbonstrings.pp - Carbon strings ----------------------------------- diff -Nru lazarus-0.9.30/lcl/interfaces/carbon/carbontabs.pp lazarus-0.9.30.2/lcl/interfaces/carbon/carbontabs.pp --- lazarus-0.9.30/lcl/interfaces/carbon/carbontabs.pp 2010-05-13 12:58:08.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/carbon/carbontabs.pp 2011-11-23 16:14:44.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: carbontabs.pp 25360 2010-05-13 12:58:08Z dmitry $ +{ $Id$ ---------------------------------------------- carbontabs.pp - Carbon tabs Control and tabs ---------------------------------------------- diff -Nru lazarus-0.9.30/lcl/interfaces/carbon/carbonutils.pas lazarus-0.9.30.2/lcl/interfaces/carbon/carbonutils.pas --- lazarus-0.9.30/lcl/interfaces/carbon/carbonutils.pas 2009-09-01 20:27:18.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/carbon/carbonutils.pas 2011-11-23 16:14:44.000000000 +0000 @@ -1,10 +1,10 @@ -{ $Id: carbonutils.pas 21531 2009-09-01 20:27:18Z sekelsenmat $ +{ $Id$ ------------------------------------------ carbonutils.pp - Common carbon utilities ------------------------------------------ @created(Wed Aug 26st WET 2005) - @lastmod($Date: 2009-09-01 22:27:18 +0200 (Tue, 01 Sep 2009) $) + @lastmod($Date$) @author(Marc Weustink ) This unit contains common carbon untilities (usable by other projects) diff -Nru lazarus-0.9.30/lcl/interfaces/carbon/carbonwinapi.inc lazarus-0.9.30.2/lcl/interfaces/carbon/carbonwinapi.inc --- lazarus-0.9.30/lcl/interfaces/carbon/carbonwinapi.inc 2010-12-12 20:05:49.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/carbon/carbonwinapi.inc 2011-11-23 16:14:44.000000000 +0000 @@ -88,6 +88,7 @@ function TCarbonWidgetSet.ClientToScreen(Handle: HWND; var P: TPoint): Boolean; var R: TRect; + Pt: TPoint; begin Result := False; @@ -109,7 +110,11 @@ begin Inc(P.X, R.Left); Inc(P.Y, R.Top); + Pt := TCarbonWidget(Handle).ScrollOffset; + Dec(P.X, Pt.X); + Dec(P.Y, Pt.Y); end; + end; {$IFDEF VerboseWinAPI} diff -Nru lazarus-0.9.30/lcl/interfaces/carbon/carbonwsarrow.pp lazarus-0.9.30.2/lcl/interfaces/carbon/carbonwsarrow.pp --- lazarus-0.9.30/lcl/interfaces/carbon/carbonwsarrow.pp 2009-04-12 08:46:31.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/carbon/carbonwsarrow.pp 2011-11-23 16:14:44.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: carbonwsarrow.pp 19376 2009-04-12 08:46:31Z paul $} +{ $Id$} { ***************************************************************************** * CarbonWSArrow.pp * diff -Nru lazarus-0.9.30/lcl/interfaces/carbon/carbonwsbuttons.pp lazarus-0.9.30.2/lcl/interfaces/carbon/carbonwsbuttons.pp --- lazarus-0.9.30/lcl/interfaces/carbon/carbonwsbuttons.pp 2009-11-16 07:06:39.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/carbon/carbonwsbuttons.pp 2011-11-23 16:14:44.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: carbonwsbuttons.pp 22614 2009-11-16 07:06:39Z dmitry $} +{ $Id$} { ***************************************************************************** * CarbonWSButtons.pp * diff -Nru lazarus-0.9.30/lcl/interfaces/carbon/carbonwscalendar.pp lazarus-0.9.30.2/lcl/interfaces/carbon/carbonwscalendar.pp --- lazarus-0.9.30/lcl/interfaces/carbon/carbonwscalendar.pp 2009-09-22 13:24:16.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/carbon/carbonwscalendar.pp 2011-11-23 16:14:44.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: carbonwscalendar.pp 21818 2009-09-22 13:24:16Z dmitry $} +{ $Id$} { ***************************************************************************** * CarbonWSCalendar.pp * diff -Nru lazarus-0.9.30/lcl/interfaces/carbon/carbonwschecklst.pp lazarus-0.9.30.2/lcl/interfaces/carbon/carbonwschecklst.pp --- lazarus-0.9.30/lcl/interfaces/carbon/carbonwschecklst.pp 2009-09-01 20:27:18.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/carbon/carbonwschecklst.pp 2011-11-23 16:14:44.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: carbonwschecklst.pp 21531 2009-09-01 20:27:18Z sekelsenmat $} +{ $Id$} { ***************************************************************************** * CarbonWSCheckLst.pp * diff -Nru lazarus-0.9.30/lcl/interfaces/carbon/carbonwscomctrls.pp lazarus-0.9.30.2/lcl/interfaces/carbon/carbonwscomctrls.pp --- lazarus-0.9.30/lcl/interfaces/carbon/carbonwscomctrls.pp 2010-10-24 07:56:36.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/carbon/carbonwscomctrls.pp 2011-11-23 16:14:44.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: carbonwscomctrls.pp 27827 2010-10-24 07:56:36Z sekelsenmat $} +{ $Id$} { ***************************************************************************** * CarbonWSComCtrls.pp * diff -Nru lazarus-0.9.30/lcl/interfaces/carbon/carbonwscontrols.pp lazarus-0.9.30.2/lcl/interfaces/carbon/carbonwscontrols.pp --- lazarus-0.9.30/lcl/interfaces/carbon/carbonwscontrols.pp 2010-03-20 10:04:28.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/carbon/carbonwscontrols.pp 2011-11-23 16:14:44.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: carbonwscontrols.pp 24108 2010-03-20 10:04:28Z dmitry $} +{ $Id$} { ***************************************************************************** * CarbonWSControls.pp * diff -Nru lazarus-0.9.30/lcl/interfaces/carbon/carbonwsdialogs.pp lazarus-0.9.30.2/lcl/interfaces/carbon/carbonwsdialogs.pp --- lazarus-0.9.30/lcl/interfaces/carbon/carbonwsdialogs.pp 2009-09-01 20:27:18.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/carbon/carbonwsdialogs.pp 2011-11-23 16:14:44.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: carbonwsdialogs.pp 21531 2009-09-01 20:27:18Z sekelsenmat $} +{ $Id$} { ***************************************************************************** * CarbonWSDialogs.pp * diff -Nru lazarus-0.9.30/lcl/interfaces/carbon/carbonwsextctrls.pp lazarus-0.9.30.2/lcl/interfaces/carbon/carbonwsextctrls.pp --- lazarus-0.9.30/lcl/interfaces/carbon/carbonwsextctrls.pp 2010-06-27 14:29:29.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/carbon/carbonwsextctrls.pp 2011-11-23 16:14:44.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: carbonwsextctrls.pp 26295 2010-06-27 14:29:29Z dmitry $} +{ $Id$} { ***************************************************************************** * CarbonWSExtCtrls.pp * diff -Nru lazarus-0.9.30/lcl/interfaces/carbon/carbonwsextdlgs.pp lazarus-0.9.30.2/lcl/interfaces/carbon/carbonwsextdlgs.pp --- lazarus-0.9.30/lcl/interfaces/carbon/carbonwsextdlgs.pp 2008-11-25 15:00:12.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/carbon/carbonwsextdlgs.pp 2011-11-23 16:14:44.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: carbonwsextdlgs.pp 17582 2008-11-25 15:00:12Z tombo $} +{ $Id$} { ***************************************************************************** * CarbonWSExtDlgs.pp * diff -Nru lazarus-0.9.30/lcl/interfaces/carbon/carbonwsfilectrl.pp lazarus-0.9.30.2/lcl/interfaces/carbon/carbonwsfilectrl.pp --- lazarus-0.9.30/lcl/interfaces/carbon/carbonwsfilectrl.pp 2008-11-25 15:00:12.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/carbon/carbonwsfilectrl.pp 2011-11-23 16:14:44.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: carbonwsfilectrl.pp 17582 2008-11-25 15:00:12Z tombo $} +{ $Id$} { ***************************************************************************** * CarbonWSFileCtrl.pp * diff -Nru lazarus-0.9.30/lcl/interfaces/carbon/carbonwsforms.pp lazarus-0.9.30.2/lcl/interfaces/carbon/carbonwsforms.pp --- lazarus-0.9.30/lcl/interfaces/carbon/carbonwsforms.pp 2010-09-01 20:11:57.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/carbon/carbonwsforms.pp 2011-11-23 16:14:44.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: carbonwsforms.pp 27247 2010-09-01 20:11:57Z dmitry $} +{ $Id$} { ***************************************************************************** * CarbonWSForms.pp * diff -Nru lazarus-0.9.30/lcl/interfaces/carbon/carbonwsgrids.pp lazarus-0.9.30.2/lcl/interfaces/carbon/carbonwsgrids.pp --- lazarus-0.9.30/lcl/interfaces/carbon/carbonwsgrids.pp 2009-04-12 08:46:31.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/carbon/carbonwsgrids.pp 2011-11-23 16:14:44.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: carbonwsgrids.pp 19376 2009-04-12 08:46:31Z paul $} +{ $Id$} { ***************************************************************************** * CarbonWSGrids.pp * diff -Nru lazarus-0.9.30/lcl/interfaces/carbon/carbonwsimglist.pp lazarus-0.9.30.2/lcl/interfaces/carbon/carbonwsimglist.pp --- lazarus-0.9.30/lcl/interfaces/carbon/carbonwsimglist.pp 2008-11-25 15:00:12.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/carbon/carbonwsimglist.pp 2011-11-23 16:14:44.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: carbonwsimglist.pp 17582 2008-11-25 15:00:12Z tombo $} +{ $Id$} { ***************************************************************************** * CarbonWSImgList.pp * diff -Nru lazarus-0.9.30/lcl/interfaces/carbon/carbonwsmenus.pp lazarus-0.9.30.2/lcl/interfaces/carbon/carbonwsmenus.pp --- lazarus-0.9.30/lcl/interfaces/carbon/carbonwsmenus.pp 2009-09-01 20:27:18.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/carbon/carbonwsmenus.pp 2011-11-23 16:14:44.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: carbonwsmenus.pp 21531 2009-09-01 20:27:18Z sekelsenmat $} +{ $Id$} { ***************************************************************************** * CarbonWSMenus.pp * diff -Nru lazarus-0.9.30/lcl/interfaces/carbon/carbonwspairsplitter.pp lazarus-0.9.30.2/lcl/interfaces/carbon/carbonwspairsplitter.pp --- lazarus-0.9.30/lcl/interfaces/carbon/carbonwspairsplitter.pp 2009-04-12 08:46:31.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/carbon/carbonwspairsplitter.pp 2011-11-23 16:14:44.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: carbonwspairsplitter.pp 19376 2009-04-12 08:46:31Z paul $} +{ $Id$} { ***************************************************************************** * CarbonWSPairSplitter.pp * diff -Nru lazarus-0.9.30/lcl/interfaces/carbon/carbonwsspin.pp lazarus-0.9.30.2/lcl/interfaces/carbon/carbonwsspin.pp --- lazarus-0.9.30/lcl/interfaces/carbon/carbonwsspin.pp 2009-09-01 20:27:18.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/carbon/carbonwsspin.pp 2011-11-23 16:14:44.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: carbonwsspin.pp 21531 2009-09-01 20:27:18Z sekelsenmat $} +{ $Id$} { ***************************************************************************** * CarbonWSSpin.pp * diff -Nru lazarus-0.9.30/lcl/interfaces/carbon/carbonwsstdctrls.pp lazarus-0.9.30.2/lcl/interfaces/carbon/carbonwsstdctrls.pp --- lazarus-0.9.30/lcl/interfaces/carbon/carbonwsstdctrls.pp 2010-11-23 08:25:04.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/carbon/carbonwsstdctrls.pp 2011-11-23 16:14:44.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: carbonwsstdctrls.pp 28427 2010-11-23 08:25:04Z zeljko $} +{ $Id$} { ***************************************************************************** * CarbonWSStdCtrls.pp * diff -Nru lazarus-0.9.30/lcl/interfaces/carbon/Makefile.fpc lazarus-0.9.30.2/lcl/interfaces/carbon/Makefile.fpc --- lazarus-0.9.30/lcl/interfaces/carbon/Makefile.fpc 2010-09-28 17:19:25.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/carbon/Makefile.fpc 2011-11-23 16:14:44.000000000 +0000 @@ -1,4 +1,4 @@ -# $Id: Makefile.fpc 27512 2010-09-28 17:19:25Z mattias $ +# $Id$ # # Makefile.fpc for Lazarus for Free Pascal # diff -Nru lazarus-0.9.30/lcl/interfaces/fpgui/fpguiwsprivate.pp lazarus-0.9.30.2/lcl/interfaces/fpgui/fpguiwsprivate.pp --- lazarus-0.9.30/lcl/interfaces/fpgui/fpguiwsprivate.pp 2010-05-14 03:20:46.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/fpgui/fpguiwsprivate.pp 2011-11-23 16:14:45.000000000 +0000 @@ -903,7 +903,7 @@ if (fpgmsg.Sender is TfpgMenuBar) then begin //Invalidate clientRectCache to force LCL to recalibrate //the available space in the form after a menubar visibility change. - //Childs are needed to invalidate for TLabel and others custom draw. + //Children are needed to invalidate for TLabel and others custom draw. FLCLObject.InvalidateClientRectCache(true); end; Inherited; diff -Nru lazarus-0.9.30/lcl/interfaces/gtk/gtk1def.pp lazarus-0.9.30.2/lcl/interfaces/gtk/gtk1def.pp --- lazarus-0.9.30/lcl/interfaces/gtk/gtk1def.pp 2009-05-20 01:59:15.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/gtk/gtk1def.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,10 +1,10 @@ -{ $Id: gtk1def.pp 20056 2009-05-20 01:59:15Z paul $ +{ $Id$ ------------------------------- gtk1def.pp - Type definitions ------------------------------- @created(Tue Nov 20st WET 2007) - @lastmod($Date: 2009-05-20 03:59:15 +0200 (Wed, 20 May 2009) $) + @lastmod($Date$) @author(Marc Weustink ) This unit contains type definitions needed in the GTK1 <-> LCL interface diff -Nru lazarus-0.9.30/lcl/interfaces/gtk/gtk1extrah.inc lazarus-0.9.30.2/lcl/interfaces/gtk/gtk1extrah.inc --- lazarus-0.9.30/lcl/interfaces/gtk/gtk1extrah.inc 2009-09-21 09:07:13.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/gtk/gtk1extrah.inc 2011-11-23 16:14:45.000000000 +0000 @@ -1,5 +1,5 @@ {%MainUnit gtkextra.pp} -{ $Id: gtk1extrah.inc 21796 2009-09-21 09:07:13Z paul $ } +{ $Id$ } { ***************************************************************************** * * diff -Nru lazarus-0.9.30/lcl/interfaces/gtk/gtk1extra.inc lazarus-0.9.30.2/lcl/interfaces/gtk/gtk1extra.inc --- lazarus-0.9.30/lcl/interfaces/gtk/gtk1extra.inc 2009-09-23 10:27:34.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/gtk/gtk1extra.inc 2011-11-23 16:14:45.000000000 +0000 @@ -1,5 +1,5 @@ {%MainUnit gtkproc.pp}{%MainUnit gtkint.pp} -{ $Id: gtk1extra.inc 21833 2009-09-23 10:27:34Z paul $ } +{ $Id$ } { ***************************************************************************** * * diff -Nru lazarus-0.9.30/lcl/interfaces/gtk/gtk1memostringsh.inc lazarus-0.9.30.2/lcl/interfaces/gtk/gtk1memostringsh.inc --- lazarus-0.9.30/lcl/interfaces/gtk/gtk1memostringsh.inc 2008-07-22 09:48:15.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/gtk/gtk1memostringsh.inc 2011-11-23 16:14:45.000000000 +0000 @@ -1,5 +1,5 @@ {%mainunit gtkwsstdctrls.pp} -{ $Id: gtk1memostringsh.inc 15834 2008-07-22 09:48:15Z mattias $} +{ $Id$} { ***************************************************************************** * * diff -Nru lazarus-0.9.30/lcl/interfaces/gtk/gtk1memostrings.inc lazarus-0.9.30.2/lcl/interfaces/gtk/gtk1memostrings.inc --- lazarus-0.9.30/lcl/interfaces/gtk/gtk1memostrings.inc 2009-02-25 02:58:44.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/gtk/gtk1memostrings.inc 2011-11-23 16:14:45.000000000 +0000 @@ -1,5 +1,5 @@ {%mainunit gtkwsstdctrls.pp} -{ $Id: gtk1memostrings.inc 18821 2009-02-25 02:58:44Z paul $} +{ $Id$} { ***************************************************************************** * * diff -Nru lazarus-0.9.30/lcl/interfaces/gtk/gtk1wsprivate.pp lazarus-0.9.30.2/lcl/interfaces/gtk/gtk1wsprivate.pp --- lazarus-0.9.30/lcl/interfaces/gtk/gtk1wsprivate.pp 2008-07-22 09:48:15.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/gtk/gtk1wsprivate.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,11 +1,11 @@ -{ $Id: gtk1wsprivate.pp 15834 2008-07-22 09:48:15Z mattias $ } +{ $Id$ } { ---------------------------------------- gtk1private.pp - Gtk1 internal classes ---------------------------------------- @created(Thu Feb 1st WET 2007) - @lastmod($Date: 2008-07-22 11:48:15 +0200 (Tue, 22 Jul 2008) $) + @lastmod($Date$) @author(Marc Weustink ) This unit contains the private classhierarchy for the gtk implemetations diff -Nru lazarus-0.9.30/lcl/interfaces/gtk/gtkdebug.pp lazarus-0.9.30.2/lcl/interfaces/gtk/gtkdebug.pp --- lazarus-0.9.30/lcl/interfaces/gtk/gtkdebug.pp 2010-09-11 14:05:21.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/gtk/gtkdebug.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,11 +1,11 @@ -{ $Id: gtkdebug.pp 27304 2010-09-11 14:05:21Z mattias $ } +{ $Id$ } { ---------------------------------- gtkdebug.pp - graphic dump utils ---------------------------------- @created(Wed May 10th WET 2007) - @lastmod($Date: 2010-09-11 16:05:21 +0200 (Sat, 11 Sep 2010) $) + @lastmod($Date$) @author(Marc Weustink ) This unit contains utility functions to show the contents of graphics diff -Nru lazarus-0.9.30/lcl/interfaces/gtk/gtkdefines.inc lazarus-0.9.30.2/lcl/interfaces/gtk/gtkdefines.inc --- lazarus-0.9.30/lcl/interfaces/gtk/gtkdefines.inc 2010-01-06 17:43:33.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/gtk/gtkdefines.inc 2011-11-23 16:14:45.000000000 +0000 @@ -1,5 +1,5 @@ {%MainUnit gtkproc.pp}{%MainUnit gtkint.pp} -{ $Id: gtkdefines.inc 23394 2010-01-06 17:43:33Z paul $ } +{ $Id$ } {****************************************************************************** Centralized includefile for some common gtk defines diff -Nru lazarus-0.9.30/lcl/interfaces/gtk/gtkdef.pp lazarus-0.9.30.2/lcl/interfaces/gtk/gtkdef.pp --- lazarus-0.9.30/lcl/interfaces/gtk/gtkdef.pp 2010-06-02 13:58:31.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/gtk/gtkdef.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,10 +1,10 @@ -{ $Id: gtkdef.pp 25842 2010-06-02 13:58:31Z zeljko $ +{ $Id$ ------------------------------ gtkdef.pp - Type definitions ------------------------------ @created(Wed Jan 24st WET 2001) - @lastmod($Date: 2010-06-02 15:58:31 +0200 (Wed, 02 Jun 2010) $) + @lastmod($Date$) @author(Marc Weustink ) This unit contains type definitions needed in the GTK <-> LCL interface diff -Nru lazarus-0.9.30/lcl/interfaces/gtk/gtkextra.pp lazarus-0.9.30.2/lcl/interfaces/gtk/gtkextra.pp --- lazarus-0.9.30/lcl/interfaces/gtk/gtkextra.pp 2010-01-27 08:34:20.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/gtk/gtkextra.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: gtkextra.pp 23568 2010-01-27 08:34:20Z paul $ } +{ $Id$ } { --------------------------------------------------------------------------- gtkextra.pp - GTK(2) widgetset - additional gdk/gtk functions @@ -10,7 +10,7 @@ --------------------------------------------------------------------------- @created(Sun Jan 28th WET 2006) - @lastmod($Date: 2010-01-27 09:34:20 +0100 (Wed, 27 Jan 2010) $) + @lastmod($Date$) @author(Marc Weustink ) ***************************************************************************** diff -Nru lazarus-0.9.30/lcl/interfaces/gtk/gtklclintfh.inc lazarus-0.9.30.2/lcl/interfaces/gtk/gtklclintfh.inc --- lazarus-0.9.30/lcl/interfaces/gtk/gtklclintfh.inc 2008-07-22 09:48:15.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/gtk/gtklclintfh.inc 2011-11-23 16:14:45.000000000 +0000 @@ -1,5 +1,5 @@ {%MainUnit gtkint.pp} -{ $Id: gtklclintfh.inc 15834 2008-07-22 09:48:15Z mattias $ } +{ $Id$ } {****************************************************************************** All GTK interface communication implementations. diff -Nru lazarus-0.9.30/lcl/interfaces/gtk/gtklclintf.inc lazarus-0.9.30.2/lcl/interfaces/gtk/gtklclintf.inc --- lazarus-0.9.30/lcl/interfaces/gtk/gtklclintf.inc 2010-09-11 14:06:32.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/gtk/gtklclintf.inc 2011-11-23 16:14:45.000000000 +0000 @@ -1,5 +1,5 @@ {%MainUnit gtkint.pp} -{ $Id: gtklclintf.inc 27305 2010-09-11 14:06:32Z mattias $ } +{ $Id$ } {****************************************************************************** All GTK interface communication implementations. Initial Revision : Sun Nov 23 23:53:53 2003 diff -Nru lazarus-0.9.30/lcl/interfaces/gtk/gtkproc.pp lazarus-0.9.30.2/lcl/interfaces/gtk/gtkproc.pp --- lazarus-0.9.30/lcl/interfaces/gtk/gtkproc.pp 2010-07-14 08:47:02.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/gtk/gtkproc.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,9 +1,9 @@ -{ $Id: gtkproc.pp 26637 2010-07-14 08:47:02Z paul $ +{ $Id$ ---------------------------------- gtkproc.pp - gtk interface procs ---------------------------------- - @lastmod($Date: 2010-07-14 10:47:02 +0200 (Wed, 14 Jul 2010) $) + @lastmod($Date$) @author(Marc Weustink ) This unit contains procedures/functions needed for the gtk <-> LCL interface diff -Nru lazarus-0.9.30/lcl/interfaces/gtk/gtkwinapih.inc lazarus-0.9.30.2/lcl/interfaces/gtk/gtkwinapih.inc --- lazarus-0.9.30/lcl/interfaces/gtk/gtkwinapih.inc 2010-06-22 20:36:58.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/gtk/gtkwinapih.inc 2011-11-23 16:14:45.000000000 +0000 @@ -1,5 +1,5 @@ {%MainUnit gtkint.pp} -{ $Id: gtkwinapih.inc 26265 2010-06-22 20:36:58Z blikblum $ } +{ $Id$ } (****************************************************************************** All GTK Winapi related stuff goes here. diff -Nru lazarus-0.9.30/lcl/interfaces/gtk/gtkwinapi.inc lazarus-0.9.30.2/lcl/interfaces/gtk/gtkwinapi.inc --- lazarus-0.9.30/lcl/interfaces/gtk/gtkwinapi.inc 2010-09-11 14:06:32.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/gtk/gtkwinapi.inc 2011-11-23 16:14:45.000000000 +0000 @@ -1,5 +1,5 @@ {%MainUnit gtkint.pp} -{ $Id: gtkwinapi.inc 27305 2010-09-11 14:06:32Z mattias $ } +{ $Id$ } {****************************************************************************** All GTK Winapi implementations. diff -Nru lazarus-0.9.30/lcl/interfaces/gtk/gtkwinapiwindow.pp lazarus-0.9.30.2/lcl/interfaces/gtk/gtkwinapiwindow.pp --- lazarus-0.9.30/lcl/interfaces/gtk/gtkwinapiwindow.pp 2010-09-11 14:05:21.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/gtk/gtkwinapiwindow.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: gtkwinapiwindow.pp 27304 2010-09-11 14:05:21Z mattias $ } +{ $Id$ } { /*************************************************************************** GTKWinapiWindow.pp diff -Nru lazarus-0.9.30/lcl/interfaces/gtk/gtkwsarrow.pp lazarus-0.9.30.2/lcl/interfaces/gtk/gtkwsarrow.pp --- lazarus-0.9.30/lcl/interfaces/gtk/gtkwsarrow.pp 2009-04-12 08:46:31.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/gtk/gtkwsarrow.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: gtkwsarrow.pp 19376 2009-04-12 08:46:31Z paul $} +{ $Id$} { ***************************************************************************** * GtkWSArrow.pp * diff -Nru lazarus-0.9.30/lcl/interfaces/gtk/gtkwsbuttons.pp lazarus-0.9.30.2/lcl/interfaces/gtk/gtkwsbuttons.pp --- lazarus-0.9.30/lcl/interfaces/gtk/gtkwsbuttons.pp 2010-09-11 14:05:21.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/gtk/gtkwsbuttons.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: gtkwsbuttons.pp 27304 2010-09-11 14:05:21Z mattias $} +{ $Id$} { ***************************************************************************** * GtkWSButtons.pp * diff -Nru lazarus-0.9.30/lcl/interfaces/gtk/gtkwscalendar.pp lazarus-0.9.30.2/lcl/interfaces/gtk/gtkwscalendar.pp --- lazarus-0.9.30/lcl/interfaces/gtk/gtkwscalendar.pp 2009-04-12 08:46:31.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/gtk/gtkwscalendar.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: gtkwscalendar.pp 19376 2009-04-12 08:46:31Z paul $} +{ $Id$} { ***************************************************************************** * GtkWSCalendar.pp * diff -Nru lazarus-0.9.30/lcl/interfaces/gtk/gtkwschecklst.pp lazarus-0.9.30.2/lcl/interfaces/gtk/gtkwschecklst.pp --- lazarus-0.9.30/lcl/interfaces/gtk/gtkwschecklst.pp 2009-04-12 08:46:31.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/gtk/gtkwschecklst.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: gtkwschecklst.pp 19376 2009-04-12 08:46:31Z paul $} +{ $Id$} { ***************************************************************************** * GtkWSCheckLst.pp * diff -Nru lazarus-0.9.30/lcl/interfaces/gtk/gtkwscomctrls.pp lazarus-0.9.30.2/lcl/interfaces/gtk/gtkwscomctrls.pp --- lazarus-0.9.30/lcl/interfaces/gtk/gtkwscomctrls.pp 2009-04-12 08:46:31.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/gtk/gtkwscomctrls.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: gtkwscomctrls.pp 19376 2009-04-12 08:46:31Z paul $} +{ $Id$} { ***************************************************************************** * GtkWSComCtrls.pp * diff -Nru lazarus-0.9.30/lcl/interfaces/gtk/gtkwscontrols.pp lazarus-0.9.30.2/lcl/interfaces/gtk/gtkwscontrols.pp --- lazarus-0.9.30/lcl/interfaces/gtk/gtkwscontrols.pp 2010-04-16 02:58:01.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/gtk/gtkwscontrols.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: gtkwscontrols.pp 24644 2010-04-16 02:58:01Z paul $} +{ $Id$} { ***************************************************************************** * GtkWSControls.pp * diff -Nru lazarus-0.9.30/lcl/interfaces/gtk/gtkwscustomlistview.inc lazarus-0.9.30.2/lcl/interfaces/gtk/gtkwscustomlistview.inc --- lazarus-0.9.30/lcl/interfaces/gtk/gtkwscustomlistview.inc 2009-09-20 22:15:10.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/gtk/gtkwscustomlistview.inc 2011-11-23 16:14:45.000000000 +0000 @@ -1,5 +1,5 @@ {%MainUnit gtkwscomctrls.pp} -{ $Id: gtkwscustomlistview.inc 21786 2009-09-20 22:15:10Z mattias $ +{ $Id$ ***************************************************************************** * * diff -Nru lazarus-0.9.30/lcl/interfaces/gtk/gtkwsdialogs.pp lazarus-0.9.30.2/lcl/interfaces/gtk/gtkwsdialogs.pp --- lazarus-0.9.30/lcl/interfaces/gtk/gtkwsdialogs.pp 2010-09-11 14:06:32.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/gtk/gtkwsdialogs.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: gtkwsdialogs.pp 27305 2010-09-11 14:06:32Z mattias $} +{ $Id$} { ***************************************************************************** * GtkWSDialogs.pp * diff -Nru lazarus-0.9.30/lcl/interfaces/gtk/gtkwsextctrls.pp lazarus-0.9.30.2/lcl/interfaces/gtk/gtkwsextctrls.pp --- lazarus-0.9.30/lcl/interfaces/gtk/gtkwsextctrls.pp 2010-05-29 09:15:15.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/gtk/gtkwsextctrls.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: gtkwsextctrls.pp 25748 2010-05-29 09:15:15Z zeljko $} +{ $Id$} { ***************************************************************************** * GtkWSExtCtrls.pp * diff -Nru lazarus-0.9.30/lcl/interfaces/gtk/gtkwsextdlgs.pp lazarus-0.9.30.2/lcl/interfaces/gtk/gtkwsextdlgs.pp --- lazarus-0.9.30/lcl/interfaces/gtk/gtkwsextdlgs.pp 2009-04-12 08:46:31.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/gtk/gtkwsextdlgs.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: gtkwsextdlgs.pp 19376 2009-04-12 08:46:31Z paul $} +{ $Id$} { ***************************************************************************** * GtkWSExtDlgs.pp * diff -Nru lazarus-0.9.30/lcl/interfaces/gtk/gtkwsforms.pp lazarus-0.9.30.2/lcl/interfaces/gtk/gtkwsforms.pp --- lazarus-0.9.30/lcl/interfaces/gtk/gtkwsforms.pp 2011-02-13 11:58:04.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/gtk/gtkwsforms.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: gtkwsforms.pp 29511 2011-02-13 11:58:04Z vincents $} +{ $Id$} { ***************************************************************************** * GtkWSForms.pp * diff -Nru lazarus-0.9.30/lcl/interfaces/gtk/gtkwsgrids.pp lazarus-0.9.30.2/lcl/interfaces/gtk/gtkwsgrids.pp --- lazarus-0.9.30/lcl/interfaces/gtk/gtkwsgrids.pp 2010-10-02 19:39:41.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/gtk/gtkwsgrids.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: gtkwsgrids.pp 27549 2010-10-02 19:39:41Z jesus $} +{ $Id$} { ***************************************************************************** * GtkWSGrids.pp * diff -Nru lazarus-0.9.30/lcl/interfaces/gtk/gtkwsimglist.pp lazarus-0.9.30.2/lcl/interfaces/gtk/gtkwsimglist.pp --- lazarus-0.9.30/lcl/interfaces/gtk/gtkwsimglist.pp 2009-04-12 08:46:31.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/gtk/gtkwsimglist.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: gtkwsimglist.pp 19376 2009-04-12 08:46:31Z paul $} +{ $Id$} { ***************************************************************************** * GtkWSImgList.pp * diff -Nru lazarus-0.9.30/lcl/interfaces/gtk/gtkwsmenus.pp lazarus-0.9.30.2/lcl/interfaces/gtk/gtkwsmenus.pp --- lazarus-0.9.30/lcl/interfaces/gtk/gtkwsmenus.pp 2010-05-09 10:31:59.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/gtk/gtkwsmenus.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: gtkwsmenus.pp 25272 2010-05-09 10:31:59Z mattias $} +{ $Id$} { ***************************************************************************** * GtkWSMenus.pp * diff -Nru lazarus-0.9.30/lcl/interfaces/gtk/gtkwspairsplitter.pp lazarus-0.9.30.2/lcl/interfaces/gtk/gtkwspairsplitter.pp --- lazarus-0.9.30/lcl/interfaces/gtk/gtkwspairsplitter.pp 2009-04-12 08:46:31.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/gtk/gtkwspairsplitter.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: gtkwspairsplitter.pp 19376 2009-04-12 08:46:31Z paul $} +{ $Id$} { ***************************************************************************** * GtkWSPairSplitter.pp * diff -Nru lazarus-0.9.30/lcl/interfaces/gtk/gtkwsprivate.pp lazarus-0.9.30.2/lcl/interfaces/gtk/gtkwsprivate.pp --- lazarus-0.9.30/lcl/interfaces/gtk/gtkwsprivate.pp 2011-02-10 22:22:30.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/gtk/gtkwsprivate.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,11 +1,11 @@ -{ $Id: gtkwsprivate.pp 29456 2011-02-10 22:22:30Z vincents $ } +{ $Id$ } { ---------------------------------------- GtkWSprivate.pp - Gtk internal classes ---------------------------------------- @created(Thu Feb 1st WET 2007) - @lastmod($Date: 2011-02-10 23:22:30 +0100 (Thu, 10 Feb 2011) $) + @lastmod($Date$) @author(Marc Weustink ) This unit contains the private classhierarchy for the gtk implemetations diff -Nru lazarus-0.9.30/lcl/interfaces/gtk/gtkwsspin.pp lazarus-0.9.30.2/lcl/interfaces/gtk/gtkwsspin.pp --- lazarus-0.9.30/lcl/interfaces/gtk/gtkwsspin.pp 2009-05-06 14:17:30.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/gtk/gtkwsspin.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: gtkwsspin.pp 19826 2009-05-06 14:17:30Z vincents $} +{ $Id$} { ***************************************************************************** * GtkWSSpin.pp * diff -Nru lazarus-0.9.30/lcl/interfaces/gtk/gtkwsstdctrls.pp lazarus-0.9.30.2/lcl/interfaces/gtk/gtkwsstdctrls.pp --- lazarus-0.9.30/lcl/interfaces/gtk/gtkwsstdctrls.pp 2010-05-04 19:16:18.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/gtk/gtkwsstdctrls.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,7 +1,7 @@ -{ $Id: gtkwsstdctrls.pp 25190 2010-05-04 19:16:18Z mattias $} +{ $Id$} { ***************************************************************************** * GtkWSStdCtrls.pp * diff -Nru lazarus-0.9.30/lcl/interfaces/gtk/Makefile.fpc lazarus-0.9.30.2/lcl/interfaces/gtk/Makefile.fpc --- lazarus-0.9.30/lcl/interfaces/gtk/Makefile.fpc 2008-06-12 22:48:13.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/gtk/Makefile.fpc 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -# $Id: Makefile.fpc 15397 2008-06-12 22:48:13Z vincents $ +# $Id$ # # Makefile.fpc for Lazarus for Free Pascal # diff -Nru lazarus-0.9.30/lcl/interfaces/gtk2/gtk2callback.inc lazarus-0.9.30.2/lcl/interfaces/gtk2/gtk2callback.inc --- lazarus-0.9.30/lcl/interfaces/gtk2/gtk2callback.inc 2011-02-02 09:33:39.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/gtk2/gtk2callback.inc 2011-11-23 16:14:45.000000000 +0000 @@ -1310,6 +1310,7 @@ var DesignOnlySignal: boolean; ShiftState: TShiftState; + ACtl: TWinControl; begin Result := CallBackDefaultReturn; @@ -1360,8 +1361,17 @@ Result := CallBackDefaultReturn; // why not True if we want to stop it? end; - DeliverMouseMoveMessage(Widget,Event,TWinControl(Data)); - if TControl(Data).FCompStyle = csWinControl then + ACtl := TWinControl(Data); + if not (csCaptureMouse in ACtl.ControlStyle) and + ([ssLeft,ssRight,ssMiddle]*ShiftState <> []) and + not (ACtl is TCustomForm) and not DragManager.IsDragging then + begin + if (Event^.x < 0) or (Event^.y < 0) or + (Event^.x > ACtl.Width) or (Event^.y > ACtl.Height) then + Exit(True); + end; + DeliverMouseMoveMessage(Widget,Event, ACtl); + if ACtl.FCompStyle = csWinControl then Result := True; // stop signal end; @@ -1576,6 +1586,7 @@ FillChar(Mess,SizeOf(Mess),0); Mess.msg := LM_SelChange; DeliverMessage(TWinControl(Data), Mess); + g_signal_stop_emission_by_name(PGTKObject(Widget), 'button-press-event'); end; end; diff -Nru lazarus-0.9.30/lcl/interfaces/gtk2/gtk2debug.pp lazarus-0.9.30.2/lcl/interfaces/gtk2/gtk2debug.pp --- lazarus-0.9.30/lcl/interfaces/gtk2/gtk2debug.pp 2011-01-15 09:33:23.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/gtk2/gtk2debug.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,11 +1,11 @@ -{ $Id: gtk2debug.pp 29026 2011-01-15 09:33:23Z vincents $ } +{ $Id$ } { ---------------------------------- gtkdebug.pp - graphic dump utils ---------------------------------- @created(Wed May 10th WET 2007) - @lastmod($Date: 2011-01-15 10:33:23 +0100 (Sat, 15 Jan 2011) $) + @lastmod($Date$) @author(Marc Weustink ) This unit contains utility functions to show the contents of graphics diff -Nru lazarus-0.9.30/lcl/interfaces/gtk2/gtk2defines.inc lazarus-0.9.30.2/lcl/interfaces/gtk2/gtk2defines.inc --- lazarus-0.9.30/lcl/interfaces/gtk2/gtk2defines.inc 2011-01-15 09:33:23.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/gtk2/gtk2defines.inc 2011-11-23 16:14:45.000000000 +0000 @@ -1,5 +1,5 @@ {%MainUnit gtk2proc.pp}{%MainUnit gtkint.pp} -{ $Id: gtk2defines.inc 29026 2011-01-15 09:33:23Z vincents $ } +{ $Id$ } {****************************************************************************** Centralized includefile for some common gtk defines diff -Nru lazarus-0.9.30/lcl/interfaces/gtk2/gtk2def.pp lazarus-0.9.30.2/lcl/interfaces/gtk2/gtk2def.pp --- lazarus-0.9.30/lcl/interfaces/gtk2/gtk2def.pp 2010-08-02 02:52:27.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/gtk2/gtk2def.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,10 +1,10 @@ -{ $Id: gtk2def.pp 26974 2010-08-02 02:52:27Z paul $ +{ $Id$ ------------------------------- gtk2def.pp - Type definitions ------------------------------- @created(Tue Nov 20st WET 2007) - @lastmod($Date: 2010-08-02 04:52:27 +0200 (Mon, 02 Aug 2010) $) + @lastmod($Date$) @author(Marc Weustink ) This unit contains type definitions needed in the GTK2 <-> LCL interface diff -Nru lazarus-0.9.30/lcl/interfaces/gtk2/gtk2extrah.inc lazarus-0.9.30.2/lcl/interfaces/gtk2/gtk2extrah.inc --- lazarus-0.9.30/lcl/interfaces/gtk2/gtk2extrah.inc 2010-10-30 09:34:19.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/gtk2/gtk2extrah.inc 2011-11-23 16:14:45.000000000 +0000 @@ -1,5 +1,5 @@ {%MainUnit Gtk2Extra.pp} -{ $Id: gtk2extrah.inc 27967 2010-10-30 09:34:19Z zeljko $ } +{ $Id$ } { ***************************************************************************** * * diff -Nru lazarus-0.9.30/lcl/interfaces/gtk2/gtk2extra.inc lazarus-0.9.30.2/lcl/interfaces/gtk2/gtk2extra.inc --- lazarus-0.9.30/lcl/interfaces/gtk2/gtk2extra.inc 2010-06-09 23:01:52.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/gtk2/gtk2extra.inc 2011-11-23 16:14:45.000000000 +0000 @@ -1,5 +1,5 @@ {%MainUnit Gtk2Extra.pp} -{ $Id: gtk2extra.inc 26012 2010-06-09 23:01:52Z marc $ } +{ $Id$ } { ***************************************************************************** * * diff -Nru lazarus-0.9.30/lcl/interfaces/gtk2/gtk2extra.pp lazarus-0.9.30.2/lcl/interfaces/gtk2/gtk2extra.pp --- lazarus-0.9.30/lcl/interfaces/gtk2/gtk2extra.pp 2011-01-15 09:33:23.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/gtk2/gtk2extra.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: gtk2extra.pp 29026 2011-01-15 09:33:23Z vincents $ } +{ $Id$ } { --------------------------------------------------------------------------- gtk2extra.pp - GTK(2) widgetset - additional gdk/gtk functions @@ -10,7 +10,7 @@ --------------------------------------------------------------------------- @created(Sun Jan 28th WET 2006) - @lastmod($Date: 2011-01-15 10:33:23 +0100 (Sat, 15 Jan 2011) $) + @lastmod($Date$) @author(Marc Weustink ) ***************************************************************************** diff -Nru lazarus-0.9.30/lcl/interfaces/gtk2/gtk2int.pas lazarus-0.9.30.2/lcl/interfaces/gtk2/gtk2int.pas --- lazarus-0.9.30/lcl/interfaces/gtk2/gtk2int.pas 2010-12-20 10:45:16.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/gtk2/gtk2int.pas 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: gtk2int.pas 28788 2010-12-20 10:45:16Z martin $ } +{ $Id$ } { /*************************************************************************** gtk2int.pas - GTK2 Interface Object diff -Nru lazarus-0.9.30/lcl/interfaces/gtk2/gtk2lclintfh.inc lazarus-0.9.30.2/lcl/interfaces/gtk2/gtk2lclintfh.inc --- lazarus-0.9.30/lcl/interfaces/gtk2/gtk2lclintfh.inc 2011-01-15 09:33:23.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/gtk2/gtk2lclintfh.inc 2011-11-23 16:14:45.000000000 +0000 @@ -1,5 +1,5 @@ {%MainUnit gtk2int.pp} -{ $Id: gtk2lclintfh.inc 29026 2011-01-15 09:33:23Z vincents $ } +{ $Id$ } {****************************************************************************** All GTK2 interface communication implementations. diff -Nru lazarus-0.9.30/lcl/interfaces/gtk2/gtk2lclintf.inc lazarus-0.9.30.2/lcl/interfaces/gtk2/gtk2lclintf.inc --- lazarus-0.9.30/lcl/interfaces/gtk2/gtk2lclintf.inc 2011-02-02 09:33:39.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/gtk2/gtk2lclintf.inc 2011-11-23 16:14:45.000000000 +0000 @@ -1,5 +1,5 @@ {%MainUnit gtk2int.pas} -{ $Id: gtk2lclintf.inc 29327 2011-02-02 09:33:39Z vincents $ } +{ $Id$ } {****************************************************************************** All GTK2 interface communication implementations. Initial Revision : Sat Jan 17 19:00:00 2004 @@ -442,7 +442,13 @@ if ARawImage.IsMasked(False) then Drawable := gdk_bitmap_create_from_data(nil, ImgMask, ImgWidth, ImgHeight) - else Drawable := gdk_pixmap_new(nil, ImgWidth, ImgHeight, 1); + else begin + Drawable := gdk_pixmap_new(nil, ImgWidth, ImgHeight, 1); + // clear drawable, the contents of a new pixmap are indefined + GC := gdk_gc_new(Drawable); + gdk_draw_rectangle(Drawable, GC, 1, 0, 0, ImgWidth, ImgHeight); + gdk_gc_unref(GC); + end; GdiMaskObject := NewGDIObject(gdiBitmap); GdiMaskObject^.Depth := 1; diff -Nru lazarus-0.9.30/lcl/interfaces/gtk2/gtk2listviewtreemodel.pas lazarus-0.9.30.2/lcl/interfaces/gtk2/gtk2listviewtreemodel.pas --- lazarus-0.9.30/lcl/interfaces/gtk2/gtk2listviewtreemodel.pas 2010-04-18 08:40:27.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/gtk2/gtk2listviewtreemodel.pas 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: gtk2listviewtreemodel.pas 24690 2010-04-18 08:40:27Z paul $ +{ $Id$ ***************************************************************************** * * diff -Nru lazarus-0.9.30/lcl/interfaces/gtk2/gtk2winapih.inc lazarus-0.9.30.2/lcl/interfaces/gtk2/gtk2winapih.inc --- lazarus-0.9.30/lcl/interfaces/gtk2/gtk2winapih.inc 2011-01-15 09:33:23.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/gtk2/gtk2winapih.inc 2011-11-23 16:14:45.000000000 +0000 @@ -1,5 +1,5 @@ {%MainUnit gtk2int.pas} -{ $Id: gtk2winapih.inc 29026 2011-01-15 09:33:23Z vincents $ } +{ $Id$ } // included by gtk2int.pp diff -Nru lazarus-0.9.30/lcl/interfaces/gtk2/gtk2winapi.inc lazarus-0.9.30.2/lcl/interfaces/gtk2/gtk2winapi.inc --- lazarus-0.9.30/lcl/interfaces/gtk2/gtk2winapi.inc 2011-01-15 09:33:23.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/gtk2/gtk2winapi.inc 2011-11-23 16:14:45.000000000 +0000 @@ -1,5 +1,5 @@ {%MainUnit gtk2int.pas} -{ $Id: gtk2winapi.inc 29026 2011-01-15 09:33:23Z vincents $ } +{ $Id$ } {****************************************************************************** All GTK Winapi implementations. @@ -9021,13 +9021,18 @@ function TGtk2WidgetSet.ShowWindow(hWnd: HWND; nCmdShow: Integer): Boolean; var GtkWindow: PGtkWindow; + B: Boolean; begin Result := False; GtkWindow := PGtkWindow(hWnd); if GtkWindow = nil then RaiseGDBException('TGtk2WidgetSet.ShowWindow hWnd is nil'); - if not GTK_IS_WINDOW(PGtkWidget(GtkWindow)) then + B := (PGtkWidget(GtkWindow)^.parent <> nil) and + (PGtkWidget(GtkWindow)^.parent^.window <> nil) and + (PGtkWidget(GtkWindow)^.parent^.window = PGtkWidget(GtkWindow)^.window); + + if not B and not GTK_IS_WINDOW(PGtkWidget(GtkWindow)) then begin DebugLn(['TGtk2WidgetSet.ShowWindow ',GetWidgetDebugReport(PGTKWidget(GtkWindow))]); RaiseGDBException('TGtk2WidgetSet.ShowWindow hWnd is not a gtkwindow'); @@ -9039,18 +9044,29 @@ SW_SHOWNORMAL: begin - gtk_window_deiconify(GtkWindow); - gtk_window_unmaximize(GtkWindow); + if B then + gtk_widget_show(PGtkWidget(GtkWindow)) + else + begin + if not GTK_WIDGET_VISIBLE(PGtkWidget(GtkWindow)) then + gtk_widget_show(PGtkWidget(GtkWindow)); + gtk_window_deiconify(GtkWindow); + gtk_window_unmaximize(GtkWindow); + end; end; SW_HIDE: - gdk_window_hide(PgtkWidget(GtkWindow)^.Window); + gtk_widget_hide(PGtkWidget(GtkWindow)); SW_MINIMIZE: - gtk_window_iconify(GtkWindow); + if not B then + gtk_window_iconify(GtkWindow); SW_SHOWMAXIMIZED: - gtk_window_maximize(GtkWindow); + if B then + gtk_widget_show(PGtkWidget(GtkWindow)) + else + gtk_window_maximize(GtkWindow); end; diff -Nru lazarus-0.9.30/lcl/interfaces/gtk2/gtk2winapiwindow.pp lazarus-0.9.30.2/lcl/interfaces/gtk2/gtk2winapiwindow.pp --- lazarus-0.9.30/lcl/interfaces/gtk2/gtk2winapiwindow.pp 2011-01-15 09:33:23.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/gtk2/gtk2winapiwindow.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: gtk2winapiwindow.pp 29026 2011-01-15 09:33:23Z vincents $ } +{ $Id$ } { /*************************************************************************** Gtk2WinapiWindow.pp diff -Nru lazarus-0.9.30/lcl/interfaces/gtk2/gtk2wsarrow.pp lazarus-0.9.30.2/lcl/interfaces/gtk2/gtk2wsarrow.pp --- lazarus-0.9.30/lcl/interfaces/gtk2/gtk2wsarrow.pp 2010-06-09 23:01:52.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/gtk2/gtk2wsarrow.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: gtk2wsarrow.pp 26012 2010-06-09 23:01:52Z marc $} +{ $Id$} { ***************************************************************************** * Gtk2WSArrow.pp * diff -Nru lazarus-0.9.30/lcl/interfaces/gtk2/gtk2wsbuttons.pp lazarus-0.9.30.2/lcl/interfaces/gtk2/gtk2wsbuttons.pp --- lazarus-0.9.30/lcl/interfaces/gtk2/gtk2wsbuttons.pp 2010-12-08 13:35:07.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/gtk2/gtk2wsbuttons.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: gtk2wsbuttons.pp 28647 2010-12-08 13:35:07Z blikblum $} +{ $Id$} { ***************************************************************************** * Gtk2WSButtons.pp * diff -Nru lazarus-0.9.30/lcl/interfaces/gtk2/gtk2wscalendar.pp lazarus-0.9.30.2/lcl/interfaces/gtk2/gtk2wscalendar.pp --- lazarus-0.9.30/lcl/interfaces/gtk2/gtk2wscalendar.pp 2010-06-09 23:01:52.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/gtk2/gtk2wscalendar.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: gtk2wscalendar.pp 26012 2010-06-09 23:01:52Z marc $} +{ $Id$} { ***************************************************************************** * Gtk2WSCalendar.pp * @@ -45,7 +45,7 @@ TGtk2WSCustomCalendar = class(TWSCustomCalendar) protected class procedure SetCallbacks(const AGtkWidget: PGtkWidget; const AWidgetInfo: PWidgetInfo); virtual; - class function GetCalendar(const ACalendar: TCustomCalendar): PGtkCalendar; inline; + class function GetCalendar(const ACalendar: TCustomCalendar): PGtkCalendar; //inline; published class function CreateHandle(const AWinControl: TWinControl; const AParams: TCreateParams): TLCLIntfHandle; override; class procedure DestroyHandle(const AWinControl: TWinControl); override; @@ -106,7 +106,7 @@ end; end; -class function TGtk2WSCustomCalendar.GetCalendar(const ACalendar: TCustomCalendar): PGtkCalendar; inline; +class function TGtk2WSCustomCalendar.GetCalendar(const ACalendar: TCustomCalendar): PGtkCalendar; //inline; begin Result := PGtkCalendar(GetWidgetInfo(PGtkWidget(ACalendar.Handle))^.CoreWidget); end; @@ -118,11 +118,14 @@ FrameWidget, CalendarWidget: PGtkWidget; WidgetInfo: PWidgetInfo; Allocation: TGtkAllocation; + Requisition: TGtkRequisition; begin FrameWidget := gtk_frame_new(nil); CalendarWidget := gtk_calendar_new(); gtk_container_add(PGtkContainer(FrameWidget), CalendarWidget); gtk_widget_show_all(FrameWidget); + // if we don't request it - we have a SIGFPE sometimes + gtk_widget_size_request(CalendarWidget, @Requisition); Result := TLCLIntfHandle(PtrUInt(FrameWidget)); {$IFDEF DebugLCLComponents} diff -Nru lazarus-0.9.30/lcl/interfaces/gtk2/gtk2wschecklst.pp lazarus-0.9.30.2/lcl/interfaces/gtk2/gtk2wschecklst.pp --- lazarus-0.9.30/lcl/interfaces/gtk2/gtk2wschecklst.pp 2010-06-09 23:01:52.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/gtk2/gtk2wschecklst.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: gtk2wschecklst.pp 26012 2010-06-09 23:01:52Z marc $} +{ $Id$} { ***************************************************************************** * Gtk2WSCheckLst.pp * diff -Nru lazarus-0.9.30/lcl/interfaces/gtk2/gtk2wscomctrls.pp lazarus-0.9.30.2/lcl/interfaces/gtk2/gtk2wscomctrls.pp --- lazarus-0.9.30/lcl/interfaces/gtk2/gtk2wscomctrls.pp 2011-02-13 12:57:08.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/gtk2/gtk2wscomctrls.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: gtk2wscomctrls.pp 29520 2011-02-13 12:57:08Z vincents $} +{ $Id$} { ***************************************************************************** * Gtk2WSComCtrls.pp * diff -Nru lazarus-0.9.30/lcl/interfaces/gtk2/gtk2wscontrols.pp lazarus-0.9.30.2/lcl/interfaces/gtk2/gtk2wscontrols.pp --- lazarus-0.9.30/lcl/interfaces/gtk2/gtk2wscontrols.pp 2010-11-17 08:59:09.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/gtk2/gtk2wscontrols.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: gtk2wscontrols.pp 28288 2010-11-17 08:59:09Z zeljko $} +{ $Id$} { ***************************************************************************** * Gtk2WSControls.pp * @@ -924,7 +924,7 @@ var DC: TGtkDeviceContext absolute ADC; - procedure PaintWindow(AWindow: PGdkWindow; AOffset: TPoint); + procedure PaintWindow(AWindow: PGdkWindow); var W, H: gint; Pixbuf: PGdkPixbuf; @@ -932,7 +932,7 @@ gdk_window_get_size(AWindow, @W, @H); // for some reason gdk_window_copy_area does not work Pixbuf := gdk_pixbuf_get_from_drawable(nil, AWindow, nil, - AOffset.X, AOffset.Y, 0, 0, W, H); + 0, 0, 0, 0, W, H); gdk_pixbuf_render_to_drawable(Pixbuf, DC.Drawable, DC.GC, 0, 0, X, Y, -1, -1, GDK_RGB_DITHER_NONE, 0, 0); gdk_pixbuf_unref(Pixbuf); @@ -944,10 +944,9 @@ AWindow: PGdkWindow; begin AWindow := GetControlWindow(AWidget); - AOffset := Point(AWidget^.allocation.x, AWidget^.allocation.y); if AWindow <> nil then - PaintWindow(AWindow, AOffset); + PaintWindow(AWindow); end; begin diff -Nru lazarus-0.9.30/lcl/interfaces/gtk2/gtk2wscustomlistview.inc lazarus-0.9.30.2/lcl/interfaces/gtk2/gtk2wscustomlistview.inc --- lazarus-0.9.30/lcl/interfaces/gtk2/gtk2wscustomlistview.inc 2010-11-24 08:13:15.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/gtk2/gtk2wscustomlistview.inc 2011-11-23 16:14:45.000000000 +0000 @@ -1,5 +1,5 @@ {%MainUnit gtk2wscomctrls.pp} -{ $Id: gtk2wscustomlistview.inc 28444 2010-11-24 08:13:15Z zeljko $ +{ $Id$ ***************************************************************************** * * @@ -1434,6 +1434,7 @@ // already created in TGtkWSBaseScrollingWinControl // Replace the ScrollingInfo with our info WidgetInfo := GetWidgetInfo(ScrollWidget); + WidgetInfo^.DefaultCursor:=0; OrigScrollingData := WidgetInfo^.UserData; Widgets^.ScrollingData := OrigScrollingData^; diff -Nru lazarus-0.9.30/lcl/interfaces/gtk2/gtk2wsdialogs.pp lazarus-0.9.30.2/lcl/interfaces/gtk2/gtk2wsdialogs.pp --- lazarus-0.9.30/lcl/interfaces/gtk2/gtk2wsdialogs.pp 2010-11-15 08:11:31.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/gtk2/gtk2wsdialogs.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: gtk2wsdialogs.pp 28239 2010-11-15 08:11:31Z paul $} +{ $Id$} { ***************************************************************************** * Gtk2WSDialogs.pp * diff -Nru lazarus-0.9.30/lcl/interfaces/gtk2/gtk2wsextctrls.pp lazarus-0.9.30.2/lcl/interfaces/gtk2/gtk2wsextctrls.pp --- lazarus-0.9.30/lcl/interfaces/gtk2/gtk2wsextctrls.pp 2011-02-13 12:57:08.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/gtk2/gtk2wsextctrls.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: gtk2wsextctrls.pp 29520 2011-02-13 12:57:08Z vincents $} +{ $Id$} { ***************************************************************************** * Gtk2WSExtCtrls.pp * diff -Nru lazarus-0.9.30/lcl/interfaces/gtk2/gtk2wsextdlgs.pp lazarus-0.9.30.2/lcl/interfaces/gtk2/gtk2wsextdlgs.pp --- lazarus-0.9.30/lcl/interfaces/gtk2/gtk2wsextdlgs.pp 2009-04-12 08:46:31.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/gtk2/gtk2wsextdlgs.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: gtk2wsextdlgs.pp 19376 2009-04-12 08:46:31Z paul $} +{ $Id$} { ***************************************************************************** * Gtk2WSExtDlgs.pp * diff -Nru lazarus-0.9.30/lcl/interfaces/gtk2/gtk2wsforms.pp lazarus-0.9.30.2/lcl/interfaces/gtk2/gtk2wsforms.pp --- lazarus-0.9.30/lcl/interfaces/gtk2/gtk2wsforms.pp 2011-02-10 22:22:30.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/gtk2/gtk2wsforms.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: gtk2wsforms.pp 29456 2011-02-10 22:22:30Z vincents $} +{ $Id$} { ***************************************************************************** * Gtk2WSForms.pp * diff -Nru lazarus-0.9.30/lcl/interfaces/gtk2/gtk2wsgrids.pp lazarus-0.9.30.2/lcl/interfaces/gtk2/gtk2wsgrids.pp --- lazarus-0.9.30/lcl/interfaces/gtk2/gtk2wsgrids.pp 2009-04-12 08:46:31.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/gtk2/gtk2wsgrids.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: gtk2wsgrids.pp 19376 2009-04-12 08:46:31Z paul $} +{ $Id$} { ***************************************************************************** * Gtk2WSGrids.pp * diff -Nru lazarus-0.9.30/lcl/interfaces/gtk2/gtk2wsimglist.pp lazarus-0.9.30.2/lcl/interfaces/gtk2/gtk2wsimglist.pp --- lazarus-0.9.30/lcl/interfaces/gtk2/gtk2wsimglist.pp 2009-04-12 08:46:31.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/gtk2/gtk2wsimglist.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: gtk2wsimglist.pp 19376 2009-04-12 08:46:31Z paul $} +{ $Id$} { ***************************************************************************** * Gtk2WSImgList.pp * diff -Nru lazarus-0.9.30/lcl/interfaces/gtk2/gtk2wsmenus.pp lazarus-0.9.30.2/lcl/interfaces/gtk2/gtk2wsmenus.pp --- lazarus-0.9.30/lcl/interfaces/gtk2/gtk2wsmenus.pp 2010-06-09 23:01:52.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/gtk2/gtk2wsmenus.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: gtk2wsmenus.pp 26012 2010-06-09 23:01:52Z marc $} +{ $Id$} { ***************************************************************************** * Gtk2WSMenus.pp * @@ -114,9 +114,6 @@ EventTrace('activate', data); {$ENDIF} - if not ((Widget^.flag0 = GDK_BUTTON_RELEASE) and (Widget^.timer = 0)) and (Widget^.submenu <> nil) then - exit(False); - ResetDefaultIMContext; if LockOnChange(PgtkObject(Widget),0) > 0 then Exit; diff -Nru lazarus-0.9.30/lcl/interfaces/gtk2/gtk2wspairsplitter.pp lazarus-0.9.30.2/lcl/interfaces/gtk2/gtk2wspairsplitter.pp --- lazarus-0.9.30/lcl/interfaces/gtk2/gtk2wspairsplitter.pp 2009-04-12 08:46:31.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/gtk2/gtk2wspairsplitter.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: gtk2wspairsplitter.pp 19376 2009-04-12 08:46:31Z paul $} +{ $Id$} { ***************************************************************************** * Gtk2WSPairSplitter.pp * diff -Nru lazarus-0.9.30/lcl/interfaces/gtk2/gtk2wsprivate.pp lazarus-0.9.30.2/lcl/interfaces/gtk2/gtk2wsprivate.pp --- lazarus-0.9.30/lcl/interfaces/gtk2/gtk2wsprivate.pp 2011-02-10 22:22:30.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/gtk2/gtk2wsprivate.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,11 +1,11 @@ -{ $Id: gtk2wsprivate.pp 29456 2011-02-10 22:22:30Z vincents $ } +{ $Id$ } { ------------------------------------------ gtk2wsprivate.pp - Gtk2 internal classes ------------------------------------------ @created(Thu Feb 1st WET 2007) - @lastmod($Date: 2011-02-10 23:22:30 +0100 (Thu, 10 Feb 2011) $) + @lastmod($Date$) @author(Marc Weustink ) This unit contains the private classhierarchy for the gtk implemetations diff -Nru lazarus-0.9.30/lcl/interfaces/gtk2/gtk2wsspin.pp lazarus-0.9.30.2/lcl/interfaces/gtk2/gtk2wsspin.pp --- lazarus-0.9.30/lcl/interfaces/gtk2/gtk2wsspin.pp 2010-06-09 23:01:52.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/gtk2/gtk2wsspin.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: gtk2wsspin.pp 26012 2010-06-09 23:01:52Z marc $} +{ $Id$} { ***************************************************************************** * Gtk2WSSpin.pp * @@ -176,6 +176,7 @@ Result := TLCLIntfHandle(PtrUInt(Widget)); WidgetInfo := CreateWidgetInfo(Widget, AWinControl, AParams); + WidgetInfo^.DefaultCursor:=0; Set_RC_Name(AWinControl, Widget); SetCallbacks(Widget, WidgetInfo); end; diff -Nru lazarus-0.9.30/lcl/interfaces/gtk2/gtk2wsstdctrls.pp lazarus-0.9.30.2/lcl/interfaces/gtk2/gtk2wsstdctrls.pp --- lazarus-0.9.30/lcl/interfaces/gtk2/gtk2wsstdctrls.pp 2011-02-13 12:01:33.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/gtk2/gtk2wsstdctrls.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: gtk2wsstdctrls.pp 29512 2011-02-13 12:01:33Z vincents $} +{ $Id$} { ***************************************************************************** * Gtk2WSStdCtrls.pp * @@ -162,6 +162,7 @@ class function GetIndexAtXY(const ACustomListBox: TCustomListBox; X, Y: integer): integer; override; class function GetItemIndex(const ACustomListBox: TCustomListBox): integer; override; class function GetItemRect(const ACustomListBox: TCustomListBox; Index: integer; var ARect: TRect): boolean; override; + class function GetScrollWidth(const ACustomListBox: TCustomListBox): Integer; override; class function GetSelCount(const ACustomListBox: TCustomListBox): integer; override; class function GetSelected(const ACustomListBox: TCustomListBox; const AIndex: integer): boolean; override; class function GetStrings(const ACustomListBox: TCustomListBox): TStrings; override; @@ -171,6 +172,7 @@ class procedure SetBorder(const ACustomListBox: TCustomListBox); override; class procedure SetColor(const AWinControl: TWinControl); override; class procedure SetItemIndex(const ACustomListBox: TCustomListBox; const AIndex: integer); override; + class procedure SetScrollWidth(const ACustomListBox: TCustomListBox; const AScrollWidth: Integer); override; class procedure SetSelectionMode(const ACustomListBox: TCustomListBox; const AExtendedSelect, AMultiSelect: boolean); override; class procedure SetSorted(const ACustomListBox: TCustomListBox; AList: TStrings; ASorted: boolean); override; @@ -497,8 +499,15 @@ end; end; -class function TGtk2WSCustomListBox.GetTopIndex( - const ACustomListBox: TCustomListBox): integer; +class function TGtk2WSCustomListBox.GetScrollWidth(const ACustomListBox: TCustomListBox): Integer; +var + Adjustment: PGtkAdjustment; +begin + Adjustment := gtk_scrolled_window_get_hadjustment(PGtkScrolledWindow(ACustomListBox.Handle)); + Result := Trunc(Adjustment^.upper); +end; + +class function TGtk2WSCustomListBox.GetTopIndex(const ACustomListBox: TCustomListBox): integer; begin Result := GetIndexAtXY(ACustomListBox, 0, 1); end; @@ -597,6 +606,21 @@ Dec(WidgetInfo^.ChangeLock); end; +class procedure TGtk2WSCustomListBox.SetScrollWidth( + const ACustomListBox: TCustomListBox; const AScrollWidth: Integer); +const + BoolToPolicy: array[Boolean] of TGtkPolicyType = (GTK_POLICY_NEVER, GTK_POLICY_ALWAYS); +var + Adjustment: PGtkAdjustment; + ScrolledWindow: PGtkScrolledWindow; +begin + ScrolledWindow := PGtkScrolledWindow(ACustomListBox.Handle); + gtk_scrolled_window_set_policy(ScrolledWindow, BoolToPolicy[AScrollWidth > PgtkWidget(ScrolledWindow)^.allocation.width], GTK_POLICY_AUTOMATIC); + Adjustment := gtk_scrolled_window_get_hadjustment(ScrolledWindow); + Adjustment^.upper := AScrollWidth; + gtk_adjustment_changed(Adjustment); +end; + class procedure TGtk2WSCustomListBox.SetSelectionMode( const ACustomListBox: TCustomListBox; const AExtendedSelect, AMultiSelect: boolean); @@ -705,8 +729,9 @@ GTK_WIDGET_UNSET_FLAGS(PGtkScrolledWindow(p)^.hscrollbar, GTK_CAN_FOCUS); GTK_WIDGET_UNSET_FLAGS(PGtkScrolledWindow(p)^.vscrollbar, GTK_CAN_FOCUS); + // by default horz scrollbar is invisible. it is set by SetScrollWidth gtk_scrolled_window_set_policy(PGtkScrolledWindow(p), - GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); + GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); //Set BorderStyle according to the provided Params if (AParams.ExStyle and WS_EX_CLIENTEDGE) > 0 then gtk_scrolled_window_set_shadow_type(PGtkScrolledWindow(p), GTK_SHADOW_ETCHED_IN) @@ -1342,13 +1367,20 @@ g_object_set_data(G_OBJECT(renderer), 'widgetinfo', AWidgetInfo); gtk_cell_layout_clear(PGtkCellLayout(AWidget)); gtk_cell_layout_pack_start(PGtkCellLayout(AWidget), renderer, True); - gtk_cell_layout_set_attributes(PGtkCellLayout(AWidget), renderer, ['text', 0, nil]); + if not (ACustomComboBox.Style in [csOwnerDrawFixed, csOwnerDrawVariable]) then + gtk_cell_layout_set_attributes(PGtkCellLayout(AWidget), renderer, ['text', 0, nil]); gtk_cell_layout_set_cell_data_func(PGtkCellLayout(AWidget), renderer, @LCLIntfCellRenderer_CellDataFunc, nil, nil); end; +procedure GtkComboFocus(AWidget: PGtkWidget; WidgetInfo: PWidgetInfo); cdecl; +begin + LCLSendSetFocusMsg(TControl(WidgetInfo^.LCLObject)); +end; + procedure GtkPopupShowCB(AMenu: PGtkMenuShell; WidgetInfo: PWidgetInfo); cdecl; begin + LCLSendSetFocusMsg(TControl(WidgetInfo^.LCLObject)); // let the LCL change the items on the fly: LCLSendDropDownMsg(TControl(WidgetInfo^.LCLObject)); end; @@ -1372,6 +1404,7 @@ begin if pspec^.name = 'popup-shown' then begin + LCLSendSetFocusMsg(TControl(WidgetInfo^.LCLObject)); FillChar(AValue, SizeOf(AValue), 0); // fill by zeros g_value_init(@AValue, G_TYPE_BOOLEAN); // initialize for boolean g_object_get_property(AObject, pspec^.name, @AValue); // get property value @@ -1490,10 +1523,8 @@ end; // if we are a GtkComboBoxEntry - if GtkWidgetIsA(PGtkWidget(AEntry), GTK_TYPE_ENTRY) then - begin - // Anything? - end; + if not GtkWidgetIsA(PGtkWidget(AEntry), GTK_TYPE_ENTRY) then + g_signal_connect(Combowidget, 'grab-focus', TGCallback(@GtkComboFocus), AWidgetInfo); AMenu := nil; if (APrivate^.popup_widget <> nil) @@ -1525,7 +1556,7 @@ (csDesigning in AWinControl.ComponentState) then Exit; Value.g_type := G_TYPE_BOOLEAN; - Value.data[0].v_int := gTRUE; + Value.data[0].v_int := longint(gTRUE); g_object_set_property(PGObject(AWidget), 'button-sensitivity', @Value); end; @@ -1588,9 +1619,10 @@ // if the combo is an editable ... Entry := GetComboBoxEntry(WidgetInfo^.CoreWidget); - if Entry<>nil then begin - if gtk_editable_get_selection_bounds(PGtkEditable(Entry), @AStart, @AEnd) = False then - Exit(gtk_editable_get_position(PGtkEditable(Entry))); + if Entry<>nil then + begin + if not gtk_editable_get_selection_bounds(PGtkEditable(Entry), @AStart, @AEnd) then + Exit(0); Result := ABS(AStart - AEnd); end; end; @@ -1755,11 +1787,10 @@ csDropDown, csSimple: NeedEntry := True; - csDropDownList: - NeedEntry := False; + csDropDownList, csOwnerDrawFixed, csOwnerDrawVariable: - NeedEntry := not ACustomComboBox.ReadOnly; + NeedEntry := False; end; if gtk_is_combo_box_entry(p) = NeedEntry then Exit; ReCreateCombo(ACustomComboBox, NeedEntry, WidgetInfo); @@ -1779,6 +1810,9 @@ if ACustomComboBox.Style in [csDropDown, csSimple] then gtk_entry_set_editable(PGtkEntry(Entry), not NewReadOnly) else + if ACustomComboBox.Style in [csOwnerDrawFixed, csOwnerDrawVariable] then + ReCreateCombo(ACustomCombobox, False, WidgetInfo) + else if (PGtkEntry(Entry)^.flag0 and $1) = Ord(NewReadOnly) then ReCreateCombo(ACustomCombobox, not NewReadOnly, WidgetInfo); end @@ -1933,11 +1967,10 @@ csDropDown, csSimple: NeedEntry := True; - csDropDownList: - NeedEntry := False; + csDropDownList, csOwnerDrawFixed, csOwnerDrawVariable: - NeedEntry := not ACustomComboBox.ReadOnly; + NeedEntry := False; end; if NeedEntry then ComboWidget := gtk_combo_box_entry_new_with_model(GTK_TREE_MODEL (ListStore), 0) diff -Nru lazarus-0.9.30/lcl/interfaces/gtk2/Makefile.fpc lazarus-0.9.30.2/lcl/interfaces/gtk2/Makefile.fpc --- lazarus-0.9.30/lcl/interfaces/gtk2/Makefile.fpc 2010-06-09 23:01:52.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/gtk2/Makefile.fpc 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -# $Id: Makefile.fpc 26012 2010-06-09 23:01:52Z marc $ +# $Id$ # # Makefile.fpc for Lazarus for Free Pascal # diff -Nru lazarus-0.9.30/lcl/interfaces/lcl1.lpk lazarus-0.9.30.2/lcl/interfaces/lcl1.lpk --- lazarus-0.9.30/lcl/interfaces/lcl1.lpk 2010-09-28 21:37:02.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/lcl1.lpk 1970-01-01 00:00:00.000000000 +0000 @@ -1,126 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru lazarus-0.9.30/lcl/interfaces/lcl1.pas lazarus-0.9.30.2/lcl/interfaces/lcl1.pas --- lazarus-0.9.30/lcl/interfaces/lcl1.pas 2010-09-28 18:29:03.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/lcl1.pas 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -{ This file was automatically created by Lazarus. Do not edit! - This source is only used to compile and install the package. - } - -unit LCL1; - -interface - -uses - LCLIntfCompile, LazarusPackageIntf; - -implementation - -procedure Register; -begin -end; - -initialization - RegisterPackage('LCL1', @Register); -end. diff -Nru lazarus-0.9.30/lcl/interfaces/Makefile.fpc lazarus-0.9.30.2/lcl/interfaces/Makefile.fpc --- lazarus-0.9.30/lcl/interfaces/Makefile.fpc 2008-10-07 12:05:16.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/Makefile.fpc 2011-11-23 16:14:44.000000000 +0000 @@ -1,5 +1,5 @@ # -# $Id: Makefile.fpc 16910 2008-10-07 12:05:16Z mattias $ +# $Id$ # # Makefile.fpc for Lazarus for Free Pascal # diff -Nru lazarus-0.9.30/lcl/interfaces/qt/Makefile.fpc lazarus-0.9.30.2/lcl/interfaces/qt/Makefile.fpc --- lazarus-0.9.30/lcl/interfaces/qt/Makefile.fpc 2007-10-16 22:47:51.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/qt/Makefile.fpc 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -# $Id: Makefile.fpc 12495 2007-10-16 22:47:51Z mattias $ +# $Id$ # # Makefile.fpc for Lazarus for Free Pascal # diff -Nru lazarus-0.9.30/lcl/interfaces/qt/qtint.pp lazarus-0.9.30.2/lcl/interfaces/qt/qtint.pp --- lazarus-0.9.30/lcl/interfaces/qt/qtint.pp 2011-02-15 21:16:06.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/qt/qtint.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: qtint.pp 29564 2011-02-15 21:16:06Z vincents $ } +{ $Id$ } { /*************************************************************************** QTINT.pp - QTInterface Object diff -Nru lazarus-0.9.30/lcl/interfaces/qt/qtlclintfh.inc lazarus-0.9.30.2/lcl/interfaces/qt/qtlclintfh.inc --- lazarus-0.9.30/lcl/interfaces/qt/qtlclintfh.inc 2010-11-24 13:59:27.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/qt/qtlclintfh.inc 2011-11-23 16:14:45.000000000 +0000 @@ -1,5 +1,5 @@ {%MainUnit qtint.pp} -{ $Id: qtlclintfh.inc 28454 2010-11-24 13:59:27Z paul $ } +{ $Id$ } {****************************************************************************** All QT interface communication implementations. diff -Nru lazarus-0.9.30/lcl/interfaces/qt/qtlclintf.inc lazarus-0.9.30.2/lcl/interfaces/qt/qtlclintf.inc --- lazarus-0.9.30/lcl/interfaces/qt/qtlclintf.inc 2010-11-25 09:00:13.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/qt/qtlclintf.inc 2011-11-23 16:14:45.000000000 +0000 @@ -1,5 +1,5 @@ {%MainUnit qtint.pp} -{ $Id: qtlclintf.inc 28475 2010-11-25 09:00:13Z paul $ } +{ $Id$ } {****************************************************************************** All QT interface support routines @@ -754,11 +754,10 @@ cx := x; cy := y; end; - - Pixmap := TQtPixmap.Create(@DCSize); - + if Context.Parent <> nil then begin + Pixmap := TQtPixmap.Create(@DCSize); WinID := QWidget_winId(Context.Parent); try // if you have dual monitors then getDeviceSize return @@ -779,6 +778,13 @@ if Context.vImage <> nil then RawImage_FromImage(Context.vImage.Handle) else + if Context.ParentPixmap <> nil then + begin + Image := QImage_create(); + QPixmap_toImage(Context.ParentPixmap, Image); + RawImage_FromImage(Image); + QImage_destroy(Image); + end else Result := False; end; diff -Nru lazarus-0.9.30/lcl/interfaces/qt/qtobjects.pas lazarus-0.9.30.2/lcl/interfaces/qt/qtobjects.pas --- lazarus-0.9.30/lcl/interfaces/qt/qtobjects.pas 2010-09-17 06:33:19.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/qt/qtobjects.pas 2011-11-23 16:14:45.000000000 +0000 @@ -1289,10 +1289,13 @@ {$endif} if CreateHandle then - Widget := QFont_create; + Widget := QFont_create + else + Widget := nil; FShared := False; FMetrics := nil; + FDefaultFont := nil; end; {------------------------------------------------------------------------------ @@ -1551,7 +1554,9 @@ {$endif} if CreateHandle then - Widget := QBrush_create; + Widget := QBrush_create + else + Widget := nil; FShared := False; FSelected := False; @@ -1628,7 +1633,9 @@ {$endif} if CreateHandle then - Widget := QPen_create; + Widget := QPen_create + else + Widget := nil; FShared := False; FIsExtPen := False; end; @@ -1769,7 +1776,10 @@ {$endif} FPolygon := nil; // Creates the widget - if CreateHandle then Widget := QRegion_create(); + if CreateHandle then + Widget := QRegion_create() + else + Widget := nil; end; {------------------------------------------------------------------------------ @@ -1798,7 +1808,8 @@ if H < 0 then H := 0; Widget := QRegion_create(X1, Y1, W, H, RegionType); - end; + end else + Widget := nil; end; constructor TQtRegion.Create(CreateHandle: Boolean; Poly: QPolygonH; @@ -1812,7 +1823,8 @@ begin FPolygon := QPolygon_create(Poly); Widget := QRegion_create(FPolygon, Fill); - end; + end else + Widget := nil; end; @@ -1918,13 +1930,15 @@ {NOTE FOR QT DEVELOPERS: Whenever you call TQtDeviceContext.Create() outside of TQtWidgetSet.BeginPaint() SET APaintEvent TO FALSE !} + Parent := nil; + ParentPixmap := nil; + FMetrics := nil; + if AWidget = nil then begin - Parent := nil; ParentPixmap := QPixmap_Create(10, 10); Widget := QPainter_Create(QPaintDeviceH(ParentPixmap)); - end - else + end else begin Parent := AWidget; if not APaintEvent then @@ -1938,14 +1952,10 @@ ParentPixmap := QPixmap_Create(W, H); Widget := QPainter_create(QPaintDeviceH(ParentPixmap)); - end - else - begin + end else Widget := QPainter_create(QWidget_to_QPaintDevice(Parent)); - end; end; - FMetrics := nil; FRopMode := R2_COPYPEN; FOwnPainter := True; CreateObjects; @@ -1990,15 +2000,21 @@ dispose(vClipRect); if FMetrics <> nil then - FMetrics.Free; + FreeThenNil(FMetrics); DestroyObjects; if (Widget <> nil) and FOwnPainter then + begin QPainter_destroy(Widget); + Widget := nil; + end; if ParentPixmap <> nil then + begin QPixmap_destroy(ParentPixmap); + ParentPixmap := nil; + end; inherited Destroy; end; @@ -2038,7 +2054,11 @@ FreeAndNil(vBrush); vPen.Widget := nil; FreeAndNil(vPen); - vRegion.Widget := nil; + if vRegion.Widget <> nil then + begin + QRegion_destroy(vRegion.Widget); + vRegion.Widget := nil; + end; FreeAndNil(vRegion); vBackgroundBrush.Widget := nil; FreeAndNil(vBackgroundBrush); @@ -2146,6 +2166,8 @@ var AppPalette: QPaletteH; begin + if (w < 0) or (h < 0) then + exit; AppPalette := nil; if Palette = nil then begin @@ -2171,6 +2193,10 @@ i: integer; AppPalette: QPaletteH; begin + + if (w < 0) or (h < 0) then + exit; + AppPalette := nil; if Palette = nil then begin @@ -2191,6 +2217,7 @@ dec(w, 2); dec(h, 2); end; + if lineWidth > 1 then q_DrawWinPanel(Widget, x, y, w, h, Palette, Sunken, FillBrush) else @@ -3712,7 +3739,7 @@ List[i] := RegisterFormat(Str); end; - Result := Count > 0; + Result := True; finally QStringList_destroy(QtList); diff -Nru lazarus-0.9.30/lcl/interfaces/qt/qtproc.pp lazarus-0.9.30.2/lcl/interfaces/qt/qtproc.pp --- lazarus-0.9.30/lcl/interfaces/qt/qtproc.pp 2010-08-11 01:52:41.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/qt/qtproc.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,10 +1,10 @@ -{ $Id: qtproc.pp 27061 2010-08-11 01:52:41Z blikblum $ } +{ $Id$ } { ---------------------------------- qtproc.pp - qt interface procs ---------------------------------- - @lastmod($Date: 2010-08-11 03:52:41 +0200 (Wed, 11 Aug 2010) $) + @lastmod($Date$) @author(Marc Weustink ) This unit contains procedures/functions needed for the qt <-> LCL interface diff -Nru lazarus-0.9.30/lcl/interfaces/qt/qtwidgets.pas lazarus-0.9.30.2/lcl/interfaces/qt/qtwidgets.pas --- lazarus-0.9.30/lcl/interfaces/qt/qtwidgets.pas 2011-02-15 21:16:06.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/qt/qtwidgets.pas 2011-11-23 16:14:45.000000000 +0000 @@ -53,6 +53,7 @@ ccwComboBox, ccwTreeWidget, ccwAbstractScrollArea, + ccwCustomControl, ccwScrollingWinControl, ccwTabWidget); @@ -122,6 +123,7 @@ function GetPalette: TQtWidgetPalette; function GetProps(const AnIndex: String): pointer; + function getScrolledOffset: TPoint; function GetStyleSheet: WideString; function GetWidget: QWidgetH; function LCLKeyToQtKey(AKey: Word): Integer; @@ -183,7 +185,7 @@ procedure SlotNCMouse(Sender: QObjectH; Event: QEventH); cdecl; function SlotMouseEnter(Sender: QObjectH; Event: QEventH): Boolean; cdecl; function SlotMouseMove(Sender: QObjectH; Event: QEventH): Boolean; cdecl; - procedure SlotMouseWheel(Sender: QObjectH; Event: QEventH); cdecl; + function SlotMouseWheel(Sender: QObjectH; Event: QEventH): Boolean; cdecl; procedure SlotMove(Event: QEventH); cdecl; procedure SlotPaintBg(Sender: QObjectH; Event: QEventH); cdecl; procedure SlotPaint(Sender: QObjectH; Event: QEventH); cdecl; @@ -285,6 +287,7 @@ property HasPaint: Boolean read FHasPaint write FHasPaint; property KeysToEat: TByteSet read FKeysToEat write FKeysToEat; property LastCaretPos: TQtPoint read FLastCaretPos write SetLastCaretPos; + property ScrolledOffset: TPoint read getScrolledOffset; property StyleSheet: WideString read GetStyleSheet write SetStyleSheet; property PaintData: TPaintData read FPaintData write FPaintData; property Palette: TQtWidgetPalette read GetPalette; @@ -371,6 +374,7 @@ protected function CreateWidget(const AParams: TCreateParams):QWidgetH; override; public + function CanPaintBackground: Boolean; override; procedure setFocusPolicy(const APolicy: QtFocusPolicy); override; procedure setFrameStyle(p1: Integer); procedure setFrameShape(p1: QFrameShape); @@ -490,6 +494,7 @@ TQtPushButton = class(TQtAbstractButton) private FClickedHook: QAbstractButton_hookH; + FToggledHook: QAbstractButton_hookH; protected function CreateWidget(const AParams: TCreateParams): QWidgetH; override; public @@ -499,7 +504,16 @@ procedure AttachEvents; override; procedure DetachEvents; override; - procedure SlotClicked; cdecl; + procedure SlotClicked; cdecl; virtual; + procedure SlotToggled(AChecked: Boolean); cdecl; virtual; + end; + + { TQtToggleBox } + + TQtToggleBox = class(TQtPushButton) + public + procedure SlotClicked; cdecl; override; + procedure SlotToggled(AChecked: Boolean); cdecl; override; end; { TQtMainWindow } @@ -754,6 +768,7 @@ { TQtTabBar } TQtTabBar = class(TQtWidget) private + FSavedIndexOnPageChanging: Integer; // used to handle OnPageChanging AllowChange param FTabBarChangedHook: QTabBar_hookH; public procedure AttachEvents; override; @@ -1089,6 +1104,7 @@ public procedure AttachEvents; override; procedure DetachEvents; override; + procedure InitializeWidget; override; function EventFilter(Sender: QObjectH; Event: QEventH): Boolean; cdecl; override; function itemViewViewportEventFilter(Sender: QObjectH; Event: QEventH): Boolean; cdecl; override; @@ -1120,7 +1136,7 @@ procedure setItemText(AIndex: Integer; AText: String); overload; procedure setItemText(AIndex: Integer; AText: String; AAlignment: Integer); overload; procedure setItemSelected(AItem: QListWidgetItemH; const ASelect: Boolean); - procedure setItemVisible(AItem: QListWidgetItemH; Const AVisible: Boolean); + procedure setItemVisible(AItem: QListWidgetItemH; const AVisible: Boolean); procedure scrollToItem(row: integer; hint: QAbstractItemViewScrollHint); procedure removeItem(AIndex: Integer); function rowCount: integer; @@ -1643,6 +1659,8 @@ const DblClickThreshold = 3;// max Movement between two clicks of a DblClick + Forbid_TCN_SELCHANGE = -3; + Allow_TCN_SELCHANGE = -2; type TWinControlAccess = class(TWinControl) @@ -2152,10 +2170,7 @@ QEventMouseButtonRelease, QEventMouseButtonDblClick: Result := SlotMouse(Sender, Event); QEventMouseMove: Result := SlotMouseMove(Sender, Event); - QEventWheel: - begin - SlotMouseWheel(Sender, Event); - end; + QEventWheel: Result := SlotMouseWheel(Sender, Event); QEventMove: SlotMove(Event); QEventResize: SlotResize(Event); QEventContentsRectChange: LCLObject.DoAdjustClientRectChange(False); @@ -2342,7 +2357,7 @@ for i := 0 to QStringList_size(QStrList) - 1 do begin QStringList_at(QStrList, @WStr, i); - GotFiles := WStr = 'text/uri-list'; + GotFiles := WStr = 'text/plain'; if GotFiles then break; end; @@ -2961,7 +2976,8 @@ if not (csCaptureMouse in LCLObject.ControlStyle) and (QApplication_mouseButtons() <> QtNoButton) and - ((MousePos.X < 0) or (MousePos.Y < 0)) then + (((MousePos.X < 0) or (MousePos.Y < 0)) or + ((MousePos.X > getWidth) or (MousePos.Y > getHeight))) then begin if not QWidget_underMouse(Widget) then exit; @@ -3000,13 +3016,14 @@ Msg.WheelData: -1 for up, 1 for down ------------------------------------------------------------------------------} -procedure TQtWidget.SlotMouseWheel(Sender: QObjectH; Event: QEventH); cdecl; +function TQtWidget.SlotMouseWheel(Sender: QObjectH; Event: QEventH): Boolean; cdecl; var Msg: TLMMouseEvent; MousePos: TQtPoint; Modifiers: QtKeyboardModifiers; ModifierState: PtrInt; begin + Result := False; if not CanSendLCLMessage then exit; @@ -3040,14 +3057,14 @@ Msg.WheelDelta := QWheelEvent_delta(QWheelEventH(Event)); NotifyApplicationUserInput(Msg.Msg); - DeliverMessage(Msg); + Result := DeliverMessage(Msg) <> 0; {propagate mousewheel to parent if our sender is TPanel, fixes problem with mousewheel scroll with lazreport} if not (csDesigning in LCLObject.ComponentState) and (LCLObject is TPanel) and Assigned(LCLObject.Parent) then - TQtWidget(LCLObject.Parent.Handle).DeliverMessage(Msg); + Result := TQtWidget(LCLObject.Parent.Handle).DeliverMessage(Msg) <> 0; end; procedure TQtWidget.SlotMove(Event: QEventH); cdecl; @@ -4004,7 +4021,7 @@ QtKey_Flip, QtKey_unknown: Result := VK_UNKNOWN; else - if AKey <= $FF then // Qt:AKey = VK_KEY in many cases + if AKey in [0..255] then // Qt:AKey = VK_KEY in many cases Result := AKey else if AText <> '' then @@ -4366,6 +4383,11 @@ result := nil; end; +function TQtWidget.getScrolledOffset: TPoint; +begin + Result := Point(-FScrollX, -FScrollY); +end; + function TQtWidget.GetStyleSheet: WideString; var WStr: WideString; @@ -4678,11 +4700,15 @@ FClickedHook := QAbstractButton_hook_create(Widget); QAbstractButton_hook_hook_clicked2(FClickedHook, @SlotClicked); + + FToggledHook := QAbstractButton_hook_create(Widget); + QAbstractButton_hook_hook_toggled(FToggledHook, @SlotToggled); end; procedure TQtPushButton.DetachEvents; begin QAbstractButton_hook_destroy(FClickedHook); + QAbstractButton_hook_destroy(FToggledHook); inherited DetachEvents; end; @@ -4700,6 +4726,31 @@ DeliverMessage(Msg); end; +procedure TQtPushButton.SlotToggled(AChecked: Boolean); cdecl; +begin + // override later (eg. TQtToggleBox) +end; + +{ TQtToggleBox } + +procedure TQtToggleBox.SlotClicked; cdecl; +begin + // do nothing with ToggleBox +end; + +procedure TQtToggleBox.SlotToggled(AChecked: Boolean); cdecl; +var + Msg: TLMessage; +begin + if InUpdate then + exit; + + FillChar(Msg, SizeOf(Msg), #0); + Msg.Msg := LM_CHANGED; + DeliverMessage(Msg); +end; + + { TQtMainWindow } function TQtMainWindow.CreateWidget(const AParams: TCreateParams): QWidgetH; @@ -5587,6 +5638,17 @@ QWidget_setAutoFillBackground(Result, True); end; +function TQtFrame.CanPaintBackground: Boolean; +begin + Result := CanSendLCLMessage and getEnabled and + (LCLObject.Color <> clBackground); + if Result and (LCLObject is TCustomPanel) then + begin + Result := (TCustomPanel(LCLObject).BevelInner = bvNone) and + (TCustomPanel(LCLObject).BevelOuter = bvNone); + end; +end; + procedure TQtFrame.setFocusPolicy(const APolicy: QtFocusPolicy); begin if Assigned(LCLObject) and not LCLObject.TabStop then @@ -5736,9 +5798,12 @@ begin { TODO: find out what needs to be done on rangeChanged event Possibilities: repaint or recount pageSize() } - {$ifdef VerboseQt} + {$ifdef VerboseQt} writeln('TQtAbstractSlider.rangeChanged() to min=',minimum,' max=',maximum); - {$endif} + {$endif} + if (FOwner <> nil) and + (FOwner.FChildOfComplexWidget = ccwScrollingWinControl) then + LCLObject.InvalidateClientRectCache(True); end; {------------------------------------------------------------------------------ @@ -6083,7 +6148,19 @@ QEventWheel, QEventPaint, QEventKeyPress, - QEventKeyRelease: Result := False; + QEventKeyRelease: + begin + if FOwnWidget and (FOwner = nil) and + ((QEvent_type(Event) = QEventKeyPress) or + (QEvent_type(Event) = QEventKeyRelease)) then + Result := inherited EventFilter(Sender, Event) + else + if (QEvent_type(Event) = QEventWheel) and Assigned(FOwner) and + (FOwner is TQtCustomControl) then + Result := inherited EventFilter(Sender, Event) + else + Result := False; + end; else if FOwnWidget then Result := inherited EventFilter(Sender, Event); @@ -6807,7 +6884,7 @@ Result := False; QEvent_accept(Event); case QEvent_type(Event) of - QEventContextMenu: SlotContextMenu(Sender, Event); + QEventContextMenu: Result := SlotContextMenu(Sender, Event); QEventMouseButtonPress, QEventMouseButtonRelease, QEventMouseButtonDblClick: Result := SlotMouse(Sender, Event); @@ -6874,6 +6951,9 @@ if LCLObject = nil then Exit; + if TQtTabWidget(LCLObject.Handle).InUpdate then + exit; + FillChar(Msg, SizeOf(Msg), 0); Msg.Msg := LM_NOTIFY; FillChar(Hdr, SizeOf(Hdr), 0); @@ -6883,16 +6963,19 @@ Hdr.idFrom := PtrUInt(TQtTabWidget(LCLObject.Handle).GetLCLPageIndex(Index)); Msg.NMHdr := @Hdr; Msg.Result := 0; - DeliverMessage(Msg); + if FSavedIndexOnPageChanging = Forbid_TCN_SELCHANGE then + FSavedIndexOnPageChanging := Allow_TCN_SELCHANGE + else + DeliverMessage(Msg); end; function TQtTabBar.SlotTabBarMouse(Sender: QObjectH; Event: QEventH): Boolean; cdecl; var MousePos: TQtPoint; - NewIndex, CurIndex: Integer; - Msg: TLMNotify; - Hdr: TNmHdr; +// NewIndex, CurIndex: Integer; +// Msg: TLMNotify; +// Hdr: TNmHdr; NewEvent: QMouseEventH; R: TRect; R1: TRect; @@ -6904,6 +6987,7 @@ exit; MousePos := QMouseEvent_pos(QMouseEventH(Event))^; +{ Merge conflict solved! NewIndex := QTabBar_tabAt(QTabBarH(Sender), @MousePos); CurIndex := QTabBar_currentIndex(QTabBarH(Sender)); if (NewIndex <> CurIndex) and (NewIndex <> -1) and (CurIndex <> -1) then @@ -6911,22 +6995,7 @@ FillChar(Msg, SizeOf(Msg), 0); Msg.Msg := LM_NOTIFY; FillChar(Hdr, SizeOf(Hdr), 0); - - Hdr.hwndFrom := LCLObject.Handle; - Hdr.Code := TCN_SELCHANGING; - Hdr.idFrom := TQtTabWidget(LCLObject.Handle).GetLCLPageIndex(CurIndex); - Msg.NMHdr := @Hdr; - Msg.Result := 0; - DeliverMessage(Msg); - - if Msg.Result <> 0 then - begin - QEvent_accept(Event); - Result := True; - Exit; - end; - end; - +} if Assigned(FOwner) then begin R := TQtTabWidget(FOwner).getGeometry; @@ -6999,13 +7068,20 @@ end; {$ENDIF} QEventKeyPress, - QEventKeyRelease: SlotKey(Sender, Event); + QEventKeyRelease: + begin + if (QEvent_type(Event) = QEventKeyPress) then + FSavedIndexOnPageChanging := QTabBar_currentIndex(QTabBarH(Widget)); + SlotKey(Sender, Event); + end; QEventMouseButtonPress, QEventMouseButtonRelease, QEventMouseButtonDblClick: begin if QMouseEvent_button(QMouseEventH(Event)) = QtLeftButton then begin + if (QEvent_type(Event) = QEventMouseButtonPress) then + FSavedIndexOnPageChanging := QTabBar_currentIndex(QTabBarH(Widget)); Result := SlotTabBarMouse(Sender, Event); SetNoMousePropagation(QWidgetH(Sender), False); end; @@ -7028,6 +7104,7 @@ {$IFDEF QT_ENABLE_LCL_PAINT_TABS} FTabBar.HasPaint := True; {$ENDIF} + FTabBar.FSavedIndexOnPageChanging := Allow_TCN_SELCHANGE; FTabBar.FOwner := Self; FTabBar.AttachEvents; end; @@ -7307,12 +7384,14 @@ var Msg: TLMNotify; Hdr: TNmHdr; + i: Integer; begin - if LCLObject = nil then - Exit; - - if InUpdate then + if (LCLObject = nil) or InUpdate or not GetVisible then + begin + if TabBar.FSavedIndexOnPageChanging <> Forbid_TCN_SELCHANGE then + TabBar.FSavedIndexOnPageChanging := Allow_TCN_SELCHANGE; exit; + end; FillChar(Msg, SizeOf(Msg), 0); Msg.Msg := LM_NOTIFY; @@ -7323,7 +7402,18 @@ Hdr.idFrom := PtrUInt(GetLCLPageIndex(Index)); Msg.NMHdr := @Hdr; Msg.Result := 0; - DeliverMessage(Msg); + if (DeliverMessage(Msg) <> 0) and (Index >= 0) and + (TabBar.FSavedIndexOnPageChanging >= 0) then + begin + BeginUpdate; + try + i := TabBar.FSavedIndexOnPageChanging; + FTabBar.FSavedIndexOnPageChanging := Forbid_TCN_SELCHANGE; + setCurrentIndex(i); + finally + EndUpdate; + end; + end; end; procedure TQtTabWidget.SignalCloseRequested(Index: Integer); cdecl; @@ -8636,6 +8726,13 @@ inherited DetachEvents; end; +procedure TQtListWidget.InitializeWidget; +begin + inherited InitializeWidget; + // by default horz scrollbars is off. it is set by SetScrollWidth + setScrollBarPolicy(False, QtScrollBarAlwaysOff); +end; + function TQtListWidget.EventFilter(Sender: QObjectH; Event: QEventH): Boolean; cdecl; var @@ -10103,8 +10200,10 @@ AIndex: Integer; ASubIndex: Integer; begin - if ((FSelection.Count > 0) and (FSelection.IndexOf(AItem) <> -1)) or - (QTreeWidget_isItemSelected(QTreeWidgetH(Widget), AItem) = ASelect) then + + if not InUpdate and + (((FSelection.Count > 0) and (FSelection.IndexOf(AItem) <> -1)) or + (QTreeWidget_isItemSelected(QTreeWidgetH(Widget), AItem) = ASelect)) then exit; FillChar(Msg, SizeOf(Msg), #0); @@ -10137,7 +10236,6 @@ Msg.NMHdr := @NMLV.hdr; QTreeWidget_setItemSelected(QTreeWidgetH(Widget), AItem, ASelect); - if not FSyncingItems then DeliverMessage(Msg); end; @@ -11078,10 +11176,19 @@ since qt won't do that for us.} if (QMouseEvent_button(QMouseEventH(Event)) = QtLeftButton) and Assigned(FMenuItem.OnClick) and - (TempAction = nil) then + (TempAction = nil) and not (FMenuItem.IsInMenuBar) then SlotTriggered(); end; end; + QEventShowtoParent: + begin + if Assigned(FMenuItem) and Assigned(FMenuItem.OnClick) + and not (FMenuItem.Menu is TPopupMenu) then + begin + SlotTriggered(); + Result:=True; + end; + end; end; end; @@ -11481,7 +11588,7 @@ function TQtViewPort.CanPaintBackground: Boolean; begin Result := CanSendLCLMessage and getEnabled and - (FChildOfComplexWidget = ccwScrollingWinControl) and + (FChildOfComplexWidget in [ccwCustomControl, ccwScrollingWinControl]) and (LCLObject.Color <> clBtnFace) and (LCLObject.Color <> clBackground); end; @@ -11489,6 +11596,7 @@ var HaveVertBar: Boolean; HaveHorzBar: Boolean; + ScrollBar: QScrollBarH; begin Result := False; {$IF DEFINED(VerboseQt) OR DEFINED(VerboseQtEvents)} @@ -11517,13 +11625,36 @@ end else LCLObject.DoAdjustClientRectChange; end; - QEventLayoutRequest: ; // nothing to do here QEventWheel: - begin - inherited EventFilter(Sender, Event); - Result := True; - QEvent_ignore(Event); - end; + if (QtVersionMajor = 4) and (QtVersionMinor < 7) then + begin + Result := SlotMouseWheel(Sender, Event); + if not Result then + case QWheelEvent_orientation(QWheelEventH(Event)) of + QtVertical: + begin + if TQtCustomControl(FOwner).verticalScrollBar.getVisible then + begin + ScrollBar := QScrollBarH(TQtCustomControl(FOwner).verticalScrollBar.Widget); + QScrollBar_event(ScrollBar, Event); + end else + Result := inherited EventFilter(Sender, Event); + end; + QtHorizontal: + begin + if TQtCustomControl(FOwner).horizontalScrollBar.getVisible then + begin + ScrollBar := QScrollBarH(TQtCustomControl(FOwner).horizontalScrollBar.Widget); + QScrollBar_event(ScrollBar, Event); + end else + Result := inherited EventFilter(Sender, Event); + end; + end; + Result := True; + QEvent_ignore(Event); + end; + + QEventLayoutRequest: ; // nothing to do here else Result := inherited EventFilter(Sender, Event); end; @@ -11833,6 +11964,8 @@ Parent := nil; Result := QLCLAbstractScrollArea_create(Parent); + FChildOfComplexWidget := ccwCustomControl; + if (LCLObject is TScrollingWinControl) then begin if (QtVersionMajor = 4) and (QtVersionMinor < 6) and @@ -11878,10 +12011,11 @@ else if QEvent_type(Event) = QEventWheel then begin - if not horizontalScrollBar.getVisible and not verticalScrollBar.getVisible then + if not horizontalScrollBar.getVisible and + not verticalScrollBar.getVisible then Result := inherited EventFilter(Sender, Event) else - Result := False; + Result := False; end else {$IFDEF MSWINDOWS} {sometimes our IDE completely freezes, after screensaver activated @@ -11923,7 +12057,8 @@ (QEvent_type(Event) = QEventMouseButtonDblClick) or (QEvent_type(Event) = QEventWheel); - if QEvent_type(Event) = QEventWheel then + if (QEvent_type(Event) = QEventWheel) and + (QtVersionMajor = 4) and (QtVersionMinor > 6) then QLCLAbstractScrollArea_InheritedViewportEvent(QLCLAbstractScrollAreaH(Widget), event); retval^ := True; @@ -12127,6 +12262,7 @@ i: integer; Children: TPtrIntArray; AnObject: QObjectH; + WP: QWidgetH; begin inherited AttachEvents; @@ -12152,7 +12288,9 @@ {do not localize !!} if QObject_inherits(AnObject,'QAbstractScrollArea') then begin - FCalViewportEventHook := QObject_hook_create(QAbstractScrollArea_viewport(QAbstractScrollAreaH(AnObject))); + WP := QAbstractScrollArea_viewport(QAbstractScrollAreaH(AnObject)); + QWidget_setMouseTracking(WP, True); + FCalViewportEventHook := QObject_hook_create(WP); QObject_hook_hook_events(FCalViewportEventHook, @calViewportEventFilter); end; end; @@ -12181,6 +12319,9 @@ if (LCLObject <> nil) then begin case QEvent_type(Event) of + QEventMouseMove: Result := SlotMouseMove(Sender, Event); + QEventEnter, + QEventLeave: Result := SlotMouseEnter(Sender, Event); QEventMouseButtonDblClick: FMouseDoubleClicked := True; end; end; diff -Nru lazarus-0.9.30/lcl/interfaces/qt/qtwinapi.inc lazarus-0.9.30.2/lcl/interfaces/qt/qtwinapi.inc --- lazarus-0.9.30/lcl/interfaces/qt/qtwinapi.inc 2011-01-23 19:37:54.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/qt/qtwinapi.inc 2011-11-23 16:14:45.000000000 +0000 @@ -1,5 +1,5 @@ {%MainUnit qtint.pp} -{ $Id: qtwinapi.inc 29180 2011-01-23 19:37:54Z vincents $ } +{ $Id$ } {****************************************************************************** All QT Winapi implementations. This are the implementations of the overrides of the QT Interface for the @@ -154,6 +154,7 @@ function TQtWidgetSet.ClientToScreen(Handle: HWND; var P: TPoint) : Boolean; var APoint: TQtPoint; + Pt: TPoint; begin Result := Handle <> 0; if Result then @@ -161,6 +162,12 @@ APoint := QtPoint(P.X, P.Y); QWidget_mapToGlobal(TQtWidget(Handle).GetContainerWidget, @APoint, @APoint); + if TQtWidget(Handle).ChildOfComplexWidget = ccwScrollingWinControl then + begin + Pt := TQtCustomControl(Handle).viewport.ScrolledOffset; + dec(APoint.X, Pt.X); + dec(APoint.Y, Pt.Y); + end; P := Point(APoint.x, APoint.y); end; end; @@ -629,11 +636,8 @@ AIcon := TQtIcon.Create; AIcon.addPixmap(APixmap); Result := HICON(AIcon); - end - else - begin + end else Result := HCURSOR(TQtCursor.Create(APixmap, IconInfo^.xHotspot, IconInfo^.yHotspot)); - end; QPixmap_destroy(APixmap); end; end; @@ -2062,7 +2066,7 @@ ARegion: QRegionH; Pt: TPoint; begin - Result := SIMPLEREGION; + Result := NULLREGION; if lpRect <> nil then lpRect^ := Rect(0,0,0,0); @@ -2098,10 +2102,14 @@ finally QRegion_destroy(ARegion); end; + Result := SIMPLEREGION; end else if vImage <> nil then + begin lpRect^ := Rect(0, 0, vImage.width, vImage.height); + Result := SIMPLEREGION; + end; {$ifdef VerboseQtWinAPI} WriteLn('TQtWidgetSet.GetClipBox Rect=', dbgs(lprect^)); {$endif} @@ -2292,24 +2300,24 @@ var QtDC: TQtDeviceContext; PaintDevice: QPaintDeviceH; - w: QWidgetH; + PaintEngine: QPaintEngineH; begin {$ifdef VerboseQtWinAPI} WriteLn('[WinAPI GetDeviceCaps] DC ' + dbghex(DC)); {$endif} Result := 0; + if DC = 0 then + DC := HDC(QtScreenContext); + if not IsValidDC(DC) then exit; QtDC := TQtDeviceContext(DC); - if QtDC.Parent <> nil - then - w := QtDC.Parent - else - w := QApplication_desktop; - - PaintDevice := QWidget_to_QPaintDevice(w); + PaintEngine := QtDC.PaintEngine; + if PaintEngine = nil then + exit; + PaintDevice := QPaintEngine_paintDevice(PaintEngine); case Index of HORZSIZE: @@ -4742,7 +4750,7 @@ Event: QLCLMessageEventH; begin Result := 0; - if HandleWnd <> 0 then + if (HandleWnd <> 0) and (Widget.Widget <> nil) then begin Event := QLCLMessageEvent_create(QEventLCLMessage, Msg, wParam, lParam, 0); try @@ -4968,13 +4976,29 @@ var OldVisible: Boolean; Flags: QtWindowFlags; + W: TQtWidget; begin + {$ifdef VerboseQtWinAPI} + writeln('[WinApi SetParent] child: ',dbgHex(PtrUInt(hwndChild)), + ' parent: ',dbgHex(PtrUInt(hWndParent))); + {$endif} + Result := 0; + if not IsValidHandle(hwndChild) then + exit; Result := GetParent(hWndChild); - OldVisible := TQtWidget(hWndChild).getVisible; - Flags := TQtWidget(hWndChild).windowFlags; - TQtWidget(hWndChild).setParent(TQtWidget(hWndParent).GetContainerWidget); - TQtWidget(hWndChild).setWindowFlags(Flags); - TQtWidget(hWndChild).setVisible(OldVisible); + if (Result = hwndParent) then + exit; + W := TQtWidget(hWndChild); + OldVisible := W.getVisible; + Flags := W.windowFlags; + if IsValidHandle(hWndParent) then + W.setParent(TQtWidget(hWndParent).GetContainerWidget) + else + begin + W.setParent(nil); + W.setWindowFlags(Flags); + end; + W.setVisible(OldVisible); end; function TQtWidgetSet.SetMapMode(DC: HDC; fnMapMode : Integer): Integer; @@ -5524,7 +5548,7 @@ Widget: TQtWidget; begin {$ifdef VerboseQtWinAPI} - WriteLn('[WinAPI ShowWindow]'); + WriteLn('[WinAPI ShowWindow] hwnd ',dbgHex(PtrUInt(hWnd)),' nCmdShow ',nCmdShow); {$endif} Result := False; diff -Nru lazarus-0.9.30/lcl/interfaces/qt/qtwsarrow.pp lazarus-0.9.30.2/lcl/interfaces/qt/qtwsarrow.pp --- lazarus-0.9.30/lcl/interfaces/qt/qtwsarrow.pp 2010-09-11 14:05:21.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/qt/qtwsarrow.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: qtwsarrow.pp 27304 2010-09-11 14:05:21Z mattias $} +{ $Id$} { ***************************************************************************** * QtWSArrow.pp * diff -Nru lazarus-0.9.30/lcl/interfaces/qt/qtwsbuttons.pp lazarus-0.9.30.2/lcl/interfaces/qt/qtwsbuttons.pp --- lazarus-0.9.30/lcl/interfaces/qt/qtwsbuttons.pp 2009-05-10 15:52:24.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/qt/qtwsbuttons.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: qtwsbuttons.pp 19909 2009-05-10 15:52:24Z paul $} +{ $Id$} { ***************************************************************************** * QtWSButtons.pp * diff -Nru lazarus-0.9.30/lcl/interfaces/qt/qtwscalendar.pp lazarus-0.9.30.2/lcl/interfaces/qt/qtwscalendar.pp --- lazarus-0.9.30/lcl/interfaces/qt/qtwscalendar.pp 2010-05-04 13:04:34.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/qt/qtwscalendar.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: qtwscalendar.pp 25181 2010-05-04 13:04:34Z zeljko $} +{ $Id$} { ***************************************************************************** * QtWSCalendar.pp * diff -Nru lazarus-0.9.30/lcl/interfaces/qt/qtwschecklst.pp lazarus-0.9.30.2/lcl/interfaces/qt/qtwschecklst.pp --- lazarus-0.9.30/lcl/interfaces/qt/qtwschecklst.pp 2010-08-30 12:26:21.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/qt/qtwschecklst.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: qtwschecklst.pp 27237 2010-08-30 12:26:21Z zeljko $} +{ $Id$} { ***************************************************************************** * QtWSCheckLst.pp * diff -Nru lazarus-0.9.30/lcl/interfaces/qt/qtwscomctrls.pp lazarus-0.9.30.2/lcl/interfaces/qt/qtwscomctrls.pp --- lazarus-0.9.30/lcl/interfaces/qt/qtwscomctrls.pp 2011-02-13 11:44:00.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/qt/qtwscomctrls.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: qtwscomctrls.pp 29510 2011-02-13 11:44:00Z vincents $} +{ $Id$} { ***************************************************************************** * QtWSComCtrls.pp * @@ -188,18 +188,13 @@ TQtWSToolButton = class(TWSToolButton) published -{$ifdef WSToolBar} - class function CreateHandle(const AWinControl: TWinControl; const AParams: TCreateParams): TLCLIntfHandle; override; -{$endif} end; { TQtWSToolBar } TQtWSToolBar = class(TWSToolBar) published -{$ifdef WSToolBar} class function CreateHandle(const AWinControl: TWinControl; const AParams: TCreateParams): TLCLIntfHandle; override; -{$endif} end; { TQtWSTrackBar } @@ -226,6 +221,7 @@ implementation + const TickMarkToQtSliderTickPositionMap: array[TTickMark] of QSliderTickPosition = ( @@ -253,31 +249,23 @@ {iaLeft} QListViewLeftToRight ); -{ TQtWSToolButton } - -{$ifdef WSToolBar} -class function TQtWSToolButton.CreateHandle(const AWinControl: TWinControl; const AParams: TCreateParams): TLCLIntfHandle; -var - QtToolButton: TQtToolButton; -begin - QtToolButton := TQtToolButton.Create(AWinControl, AParams); - QtToolButton.AttachEvents; - - Result := TLCLIntfHandle(QtToolButton); -end; - { TQtWSToolBar } class function TQtWSToolBar.CreateHandle(const AWinControl: TWinControl; const AParams: TCreateParams): TLCLIntfHandle; var - QtToolBar: TQtToolBar; + QtToolBar: TQtCustomControl; begin - QtToolBar := TQtToolBar.Create(AWinControl, AParams); + {$note TToolBar implementation under LCL is wrong. TToolBar isn't + TCustomControl but TWinControl. + To avoid theoretical crashes we use TQtCustomControl here, but indeed it + should be TQtWidget - so no viewport.} + QtToolBar := TQtCustomControl.Create(AWinControl, AParams); + QtToolBar.setFrameShape(QFrameNoFrame); + QtToolBar.viewportNeeded; + QtToolBar.setFocusPolicy(QtTabFocus); QtToolBar.AttachEvents; - Result := TLCLIntfHandle(QtToolBar); end; -{$endif} { TQtWSTrackBar } @@ -992,8 +980,13 @@ TQtListWidget(ALV.Handle).removeItem(AIndex) else begin - QtTreeWidget := TQtTreeWidget(ALV.Handle); - QtTreeWidget.DeleteItem(AIndex); + TQtListWidget(ALV.Handle).BeginUpdate; + try + QtTreeWidget := TQtTreeWidget(ALV.Handle); + QtTreeWidget.DeleteItem(AIndex); + finally + TQtListWidget(ALV.Handle).EndUpdate; + end; end; end; @@ -1253,7 +1246,7 @@ lisFocused: QtTreeWidget.setCurrentItem(TWI); lisSelected: begin - if ALV.RowSelect and AIsSet then + if ALV.RowSelect and AIsSet and not ALV.MultiSelect then QtTreeWidget.setCurrentItem(TWI); QtTreeWidget.setItemSelected(TWI, AIsSet); end; diff -Nru lazarus-0.9.30/lcl/interfaces/qt/qtwscontrols.pp lazarus-0.9.30.2/lcl/interfaces/qt/qtwscontrols.pp --- lazarus-0.9.30/lcl/interfaces/qt/qtwscontrols.pp 2010-11-22 06:37:37.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/qt/qtwscontrols.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: qtwscontrols.pp 28396 2010-11-22 06:37:37Z paul $} +{ $Id$} { ***************************************************************************** * QtWSControls.pp * @@ -415,12 +415,35 @@ ------------------------------------------------------------------------------} class procedure TQtWSWinControl.SetBounds(const AWinControl: TWinControl; const ALeft, ATop, AWidth, AHeight: Integer); +var + Pt: TQtPoint; + R: TRect; + Box: TQtWidget; begin if not WSCheckHandleAllocated(AWincontrol, 'SetBounds') then Exit; + R := Rect(ALeft, ATop, AWidth, AHeight); + + Box := nil; + if Assigned(AWinControl.Parent) and + AWinControl.Parent.HandleAllocated then + Box := TQtWidget(AWinControl.Parent.Handle); + + if Assigned(Box) and + (Box.ChildOfComplexWidget = ccwScrollingWinControl) then + begin + Pt := TQtWidget(AWinControl.Handle).getPos; + + R := Rect(ALeft - TQtCustomControl(Box).horizontalScrollBar.getValue, + ATop - TQtCustomControl(Box).verticalScrollBar.getValue, AWidth, AHeight); + end; + TQtWidget(AWinControl.Handle).BeginUpdate; - TQtWidget(AWinControl.Handle).move(ALeft, ATop); - TQtWidget(AWinControl.Handle).resize(AWidth, AHeight); + with R do + begin + TQtWidget(AWinControl.Handle).move(Left, Top); + TQtWidget(AWinControl.Handle).resize(Right, Bottom); + end; TQtWidget(AWinControl.Handle).EndUpdate; end; diff -Nru lazarus-0.9.30/lcl/interfaces/qt/qtwsdialogs.pp lazarus-0.9.30.2/lcl/interfaces/qt/qtwsdialogs.pp --- lazarus-0.9.30/lcl/interfaces/qt/qtwsdialogs.pp 2010-10-15 10:25:27.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/qt/qtwsdialogs.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: qtwsdialogs.pp 27717 2010-10-15 10:25:27Z sekelsenmat $} +{ $Id$} { ***************************************************************************** * QtWSDialogs.pp * diff -Nru lazarus-0.9.30/lcl/interfaces/qt/qtwsextctrls.pp lazarus-0.9.30.2/lcl/interfaces/qt/qtwsextctrls.pp --- lazarus-0.9.30/lcl/interfaces/qt/qtwsextctrls.pp 2010-10-21 11:10:57.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/qt/qtwsextctrls.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: qtwsextctrls.pp 27789 2010-10-21 11:10:57Z zeljko $} +{ $Id$} { ***************************************************************************** * QtWSExtCtrls.pp * diff -Nru lazarus-0.9.30/lcl/interfaces/qt/qtwsextdlgs.pp lazarus-0.9.30.2/lcl/interfaces/qt/qtwsextdlgs.pp --- lazarus-0.9.30/lcl/interfaces/qt/qtwsextdlgs.pp 2009-04-12 08:46:31.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/qt/qtwsextdlgs.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: qtwsextdlgs.pp 19376 2009-04-12 08:46:31Z paul $} +{ $Id$} { ***************************************************************************** * QtWSExtDlgs.pp * diff -Nru lazarus-0.9.30/lcl/interfaces/qt/qtwsfactory.pas lazarus-0.9.30.2/lcl/interfaces/qt/qtwsfactory.pas --- lazarus-0.9.30/lcl/interfaces/qt/qtwsfactory.pas 2010-05-23 08:12:37.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/qt/qtwsfactory.pas 2011-11-23 16:14:45.000000000 +0000 @@ -184,22 +184,13 @@ function RegisterCustomToolButton: Boolean; alias : 'WSRegisterCustomToolButton'; begin -{$ifdef WSToolBar} - RegisterWSComponent(TCustomToolButton, TQtWSToolButton); - Result := True; -{$else} Result := False; -{$endif} end; function RegisterToolBar: Boolean; alias : 'WSRegisterToolBar'; begin -{$ifdef WSToolBar} - RegisterWSComponent(TCustomToolBar, TQtWSToolBar); + RegisterWSComponent(TToolBar, TQtWSToolBar); Result := True; -{$else} - Result := False; -{$endif} end; function RegisterCustomTrackBar: Boolean; alias : 'WSRegisterCustomTrackBar'; diff -Nru lazarus-0.9.30/lcl/interfaces/qt/qtwsforms.pp lazarus-0.9.30.2/lcl/interfaces/qt/qtwsforms.pp --- lazarus-0.9.30/lcl/interfaces/qt/qtwsforms.pp 2011-02-15 21:16:06.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/qt/qtwsforms.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: qtwsforms.pp 29564 2011-02-15 21:16:06Z vincents $} +{ $Id$} { ***************************************************************************** * QtWSForms.pp * diff -Nru lazarus-0.9.30/lcl/interfaces/qt/qtwsgrids.pp lazarus-0.9.30.2/lcl/interfaces/qt/qtwsgrids.pp --- lazarus-0.9.30/lcl/interfaces/qt/qtwsgrids.pp 2009-04-12 08:46:31.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/qt/qtwsgrids.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: qtwsgrids.pp 19376 2009-04-12 08:46:31Z paul $} +{ $Id$} { ***************************************************************************** * QtWSGrids.pp * diff -Nru lazarus-0.9.30/lcl/interfaces/qt/qtwsimglist.pp lazarus-0.9.30.2/lcl/interfaces/qt/qtwsimglist.pp --- lazarus-0.9.30/lcl/interfaces/qt/qtwsimglist.pp 2009-04-12 08:46:31.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/qt/qtwsimglist.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: qtwsimglist.pp 19376 2009-04-12 08:46:31Z paul $} +{ $Id$} { ***************************************************************************** * QtWSImgList.pp * diff -Nru lazarus-0.9.30/lcl/interfaces/qt/qtwsmenus.pp lazarus-0.9.30.2/lcl/interfaces/qt/qtwsmenus.pp --- lazarus-0.9.30/lcl/interfaces/qt/qtwsmenus.pp 2010-07-08 20:35:48.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/qt/qtwsmenus.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: qtwsmenus.pp 26536 2010-07-08 20:35:48Z zeljko $} +{ $Id$} { ***************************************************************************** * QtWSMenus.pp * diff -Nru lazarus-0.9.30/lcl/interfaces/qt/qtwspairsplitter.pp lazarus-0.9.30.2/lcl/interfaces/qt/qtwspairsplitter.pp --- lazarus-0.9.30/lcl/interfaces/qt/qtwspairsplitter.pp 2010-05-23 08:12:37.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/qt/qtwspairsplitter.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: qtwspairsplitter.pp 25585 2010-05-23 08:12:37Z zeljko $} +{ $Id$} { ***************************************************************************** * QtWSPairSplitter.pp * diff -Nru lazarus-0.9.30/lcl/interfaces/qt/qtwsspin.pp lazarus-0.9.30.2/lcl/interfaces/qt/qtwsspin.pp --- lazarus-0.9.30/lcl/interfaces/qt/qtwsspin.pp 2010-03-18 11:31:31.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/qt/qtwsspin.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: qtwsspin.pp 24079 2010-03-18 11:31:31Z zeljko $} +{ $Id$} { ***************************************************************************** * QtWSSpin.pp * diff -Nru lazarus-0.9.30/lcl/interfaces/qt/qtwsstdctrls.pp lazarus-0.9.30.2/lcl/interfaces/qt/qtwsstdctrls.pp --- lazarus-0.9.30/lcl/interfaces/qt/qtwsstdctrls.pp 2010-11-27 15:27:40.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/qt/qtwsstdctrls.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: qtwsstdctrls.pp 28509 2010-11-27 15:27:40Z zeljko $} +{ $Id$} { ***************************************************************************** * QtWSStdCtrls.pp * @@ -113,6 +113,7 @@ class function GetIndexAtXY(const ACustomListBox: TCustomListBox; X, Y: integer): integer; override; class function GetItemIndex(const ACustomListBox: TCustomListBox): integer; override; class function GetItemRect(const ACustomListBox: TCustomListBox; Index: integer; var ARect: TRect): boolean; override; + class function GetScrollWidth(const ACustomListBox: TCustomListBox): Integer; override; class function GetSelCount(const ACustomListBox: TCustomListBox): integer; override; class function GetSelected(const ACustomListBox: TCustomListBox; const AIndex: integer): boolean; override; class function GetStrings(const ACustomListBox: TCustomListBox): TStrings; override; @@ -122,6 +123,7 @@ class procedure SetBorder(const ACustomListBox: TCustomListBox); override; class procedure SetColumnCount(const ACustomListBox: TCustomListBox; ACount: Integer); override; class procedure SetItemIndex(const ACustomListBox: TCustomListBox; const AIndex: integer); override; + class procedure SetScrollWidth(const ACustomListBox: TCustomListBox; const AScrollWidth: Integer); override; class procedure SetSelectionMode(const ACustomListBox: TCustomListBox; const AExtendedSelect, AMultiSelect: boolean); override; class procedure SetSorted(const ACustomListBox: TCustomListBox; AList: TStrings; ASorted: boolean); override; class procedure SetStyle(const ACustomListBox: TCustomListBox); override; @@ -502,6 +504,15 @@ ARect := Rect(-1,-1,-1,-1); end; +class function TQtWSCustomListBox.GetScrollWidth( + const ACustomListBox: TCustomListBox): Integer; +var + QtListWidget: TQtListWidget; +begin + QtListWidget := TQtListWidget(ACustomListBox.Handle); + Result := QtListWidget.horizontalScrollBar.getMax; +end; + {------------------------------------------------------------------------------ Method: TQtWSCustomListBox.GetTopIndex Params: None @@ -567,6 +578,20 @@ TQtListWidget(ACustomListBox.Handle).setCurrentRow(AIndex); end; +class procedure TQtWSCustomListBox.SetScrollWidth(const ACustomListBox: TCustomListBox; const AScrollWidth: Integer); +const + BoolToPolicy: array[Boolean] of QtScrollBarPolicy = (QtScrollBarAlwaysOff, QtScrollBarAlwaysOn); +var + QtListWidget: TQtListWidget; + ClientWidth: Integer; +begin + QtListWidget := TQtListWidget(ACustomListBox.Handle); + QtListWidget.horizontalScrollBar.setMaximum(AScrollWidth); + with QtListWidget.getClientBounds do + ClientWidth := Right - Left; + QtListWidget.ScrollBarPolicy[False] := BoolToPolicy[AScrollWidth > ClientWidth]; +end; + {------------------------------------------------------------------------------ Method: TQtWSCustomListBox.SetSelectionMode Params: None @@ -1490,7 +1515,9 @@ ------------------------------------------------------------------------------} class function TQtWSToggleBox.RetrieveState(const ACustomCheckBox: TCustomCheckBox): TCheckBoxState; begin - if TQtPushButton(ACustomCheckBox.Handle).isDown then + if not WSCheckHandleAllocated(ACustomCheckBox, 'RetrieveState') then + Exit; + if TQtToggleBox(ACustomCheckBox.Handle).isChecked then Result := cbChecked else Result := cbUnChecked; @@ -1504,7 +1531,9 @@ class procedure TQtWSToggleBox.SetShortCut(const ACustomCheckBox: TCustomCheckBox; const OldShortCut, NewShortCut: TShortCut); begin - TQtPushButton(ACustomCheckBox.Handle).setShortcut(NewShortCut); + if not WSCheckHandleAllocated(ACustomCheckBox, 'SetShortCut') then + Exit; + TQtToggleBox(ACustomCheckBox.Handle).setShortcut(NewShortCut); end; {------------------------------------------------------------------------------ @@ -1514,7 +1543,11 @@ ------------------------------------------------------------------------------} class procedure TQtWSToggleBox.SetState(const ACustomCheckBox: TCustomCheckBox; const NewState: TCheckBoxState); begin - TQtPushButton(ACustomCheckBox.Handle).setDown(NewState = cbChecked) + if not WSCheckHandleAllocated(ACustomCheckBox, 'SetState') then + Exit; + TQtToggleBox(ACustomCheckBox.Handle).BeginUpdate; + TQtToggleBox(ACustomCheckBox.Handle).setChecked(NewState = cbChecked); + TQtToggleBox(ACustomCheckBox.Handle).EndUpdate; end; {------------------------------------------------------------------------------ @@ -1526,9 +1559,9 @@ ------------------------------------------------------------------------------} class function TQtWSToggleBox.CreateHandle(const AWinControl: TWinControl; const AParams: TCreateParams): TLCLIntfHandle; var - QtToggleBox: TQtPushButton; + QtToggleBox: TQtToggleBox; begin - QtToggleBox := TQtPushButton.Create(AWinControl, AParams); + QtToggleBox := TQtToggleBox.Create(AWinControl, AParams); QtToggleBox.setCheckable(True); QtToggleBox.AttachEvents; diff -Nru lazarus-0.9.30/lcl/interfaces/win32/Makefile.fpc lazarus-0.9.30.2/lcl/interfaces/win32/Makefile.fpc --- lazarus-0.9.30/lcl/interfaces/win32/Makefile.fpc 2007-10-16 22:47:51.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/win32/Makefile.fpc 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -# $Id: Makefile.fpc 12495 2007-10-16 22:47:51Z mattias $ +# $Id$ # # Makefile.fpc for Lazarus for Free Pascal # diff -Nru lazarus-0.9.30/lcl/interfaces/win32/win32callback.inc lazarus-0.9.30.2/lcl/interfaces/win32/win32callback.inc --- lazarus-0.9.30/lcl/interfaces/win32/win32callback.inc 2010-11-18 02:50:43.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/win32/win32callback.inc 2011-11-23 16:14:45.000000000 +0000 @@ -2552,7 +2552,7 @@ // we cannot tell for sure windows didn't want the key // for WM_CHAR check WM_GETDLGCODE/DLGC_WANTCHARS // winapi too inconsistent about return value - if (lWinControl <> nil) and (PLMsg^.Result = 0) then + if (lWinControl <> nil) and (PLMsg^.Result = 0) and (LMKey.CharCode<>0) then DeliverMessage(lWinControl, PLMsg^); // handle Ctrl-A for edit controls diff -Nru lazarus-0.9.30/lcl/interfaces/win32/win32debug.pp lazarus-0.9.30.2/lcl/interfaces/win32/win32debug.pp --- lazarus-0.9.30/lcl/interfaces/win32/win32debug.pp 2008-11-25 02:29:28.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/win32/win32debug.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,11 +1,11 @@ -{ $Id: win32debug.pp 17576 2008-11-25 02:29:28Z paul $ } +{ $Id$ } { ------------------------------------ win32debug.pp - graphic dump utils ------------------------------------ @created(Fri Jun 1th WET 2007) - @lastmod($Date: 2008-11-25 03:29:28 +0100 (Tue, 25 Nov 2008) $) + @lastmod($Date$) @author(Marc Weustink ) This unit contains utility functions to show the contents of graphics diff -Nru lazarus-0.9.30/lcl/interfaces/win32/win32def.pp lazarus-0.9.30.2/lcl/interfaces/win32/win32def.pp --- lazarus-0.9.30/lcl/interfaces/win32/win32def.pp 2010-01-10 18:57:23.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/win32/win32def.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,10 +1,10 @@ -{ $Id: win32def.pp 23417 2010-01-10 18:57:23Z marc $ +{ $Id$ ------------------------------ win32def.pp - Type definitions ------------------------------ @created(Wed Jan 24st WET 2001) - @lastmod($Date: 2010-01-10 19:57:23 +0100 (Sun, 10 Jan 2010) $) + @lastmod($Date$) @author(Marc Weustink ) This unit contains type definitions needed in the Windows <-> LCL interface diff -Nru lazarus-0.9.30/lcl/interfaces/win32/win32int.pp lazarus-0.9.30.2/lcl/interfaces/win32/win32int.pp --- lazarus-0.9.30/lcl/interfaces/win32/win32int.pp 2010-11-13 07:42:13.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/win32/win32int.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: win32int.pp 28198 2010-11-13 07:42:13Z paul $ } +{ $Id$ } { /*************************************************************************** WIN32INT.pp - Win32Interface Object diff -Nru lazarus-0.9.30/lcl/interfaces/win32/win32lclintfh.inc lazarus-0.9.30.2/lcl/interfaces/win32/win32lclintfh.inc --- lazarus-0.9.30/lcl/interfaces/win32/win32lclintfh.inc 2010-11-24 10:12:28.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/win32/win32lclintfh.inc 2011-11-23 16:14:45.000000000 +0000 @@ -1,5 +1,5 @@ {%MainUnit win32int.pp} -{ $Id: win32lclintfh.inc 28448 2010-11-24 10:12:28Z paul $ } +{ $Id$ } {****************************************************************************** All GTK interface communication implementations. Initial Revision : Sun Nov 23 23:53:53 2003 diff -Nru lazarus-0.9.30/lcl/interfaces/win32/win32lclintf.inc lazarus-0.9.30.2/lcl/interfaces/win32/win32lclintf.inc --- lazarus-0.9.30/lcl/interfaces/win32/win32lclintf.inc 2010-11-24 10:12:28.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/win32/win32lclintf.inc 2011-11-23 16:14:45.000000000 +0000 @@ -1,5 +1,5 @@ {%MainUnit win32int.pp} -{ $Id: win32lclintf.inc 28448 2010-11-24 10:12:28Z paul $ } +{ $Id$ } {****************************************************************************** All GTK interface communication implementations. Initial Revision : Sun Nov 23 23:53:53 2003 diff -Nru lazarus-0.9.30/lcl/interfaces/win32/win32winapih.inc lazarus-0.9.30.2/lcl/interfaces/win32/win32winapih.inc --- lazarus-0.9.30/lcl/interfaces/win32/win32winapih.inc 2010-11-24 14:33:23.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/win32/win32winapih.inc 2011-11-23 16:14:45.000000000 +0000 @@ -1,5 +1,5 @@ {%MainUnit win32int.pp} -{ $Id: win32winapih.inc 28457 2010-11-24 14:33:23Z vincents $ } +{ $Id$ } {****************************************************************************** All Windows API related stuff goes here. @@ -85,6 +85,7 @@ function ExtSelectClipRGN(dc: hdc; rgn : hrgn; Mode : Longint) : Integer; override; function FillRect(DC: HDC; Const Rect: TRect; Brush: HBRUSH): Boolean; override; +function FillRgn(DC: HDC; RegionHnd: HRGN; hbr: HBRUSH): BOOL; override; function FloodFill(DC: HDC; X, Y: Integer; Color: TGraphicsColor; FillStyle: TGraphicsFillStyle; Brush: HBRUSH): Boolean; override; { Draws a 3D border in GTK native style. } function Frame3D(DC: HDC; var ARect: TRect; Const FrameWidth: Integer; Const Style: TBevelCut): Boolean; override; @@ -207,6 +208,7 @@ function SetProp(Handle: hwnd; Str: PChar; Data: Pointer): Boolean; override; function SetROP2(DC: HDC; Mode: Integer): Integer; override; function SetScrollInfo(Handle: HWND; SBStyle: Integer; ScrollInfo: TScrollInfo; BRedraw: Boolean): Integer; override; +function SetStretchBltMode(DC: HDC; StretchMode: Integer): Integer; override; function SetSysColors(CElements: Integer; Const LPAElements; Const LPARgbValues): Boolean; override; function SetTextCharacterExtra(_HDC: HDC; NCharExtra: Integer): Integer; override; function SetTextColor(DC: HDC; Color: TColorRef): TColorRef; override; diff -Nru lazarus-0.9.30/lcl/interfaces/win32/win32winapi.inc lazarus-0.9.30.2/lcl/interfaces/win32/win32winapi.inc --- lazarus-0.9.30/lcl/interfaces/win32/win32winapi.inc 2010-12-27 12:31:31.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/win32/win32winapi.inc 2011-11-23 16:14:45.000000000 +0000 @@ -1,5 +1,5 @@ {%MainUnit win32int.pp} -{ $Id: win32winapi.inc 28827 2010-12-27 12:31:31Z vincents $ } +{ $Id$ } {****************************************************************************** All Windows API implementations. @@ -1459,6 +1459,24 @@ Assert(False, Format('trace:< [TWin32WidgetSet.FillRect] DC: 0x%x; Rect: ((%d,%d)(%d,%d)); Brush: %x', [Integer(DC), R.left, R.top, R.right, R.bottom, brush])); end; +{------------------------------------------------------------------------------ + Method: FillRgn + Params: DC - handle to device context + RegionHnd - handle to region + Brush - handle to brush + Returns: If the function succeeds + + The FillRgn function fills a region by using the specified brush. + ------------------------------------------------------------------------------} +function TWin32WidgetSet.FillRgn(DC: HDC; RegionHnd: HRGN; hbr: HBRUSH): BOOL; +var + OldBrush: HGDIOBJ; +begin + OldBrush := Windows.SelectObject(DC, hbr); + Result := {Boolean}(Windows.FillRgn(DC, RegionHnd, hbr)); + Windows.SelectObject(DC, OldBrush); +end; + function TWin32WidgetSet.FloodFill(DC: HDC; X, Y: Integer; Color: TGraphicsColor; FillStyle: TGraphicsFillStyle; Brush: HBRUSH): Boolean; const @@ -3194,6 +3212,19 @@ end; {------------------------------------------------------------------------------ + Method: SetStretchBltMode + Params: DC - handle of device context + StretchMode - strech mode + Returns: 0 if unsuccesful + + The SetStretchBltMode function sets the StrechBlt mode. + ------------------------------------------------------------------------------} +function TWin32WidgetSet.SetStretchBltMode(DC: HDC; StretchMode: Integer): Integer; +begin + Result := Windows.SetStretchBltMode(DC, StretchMode); +end; + +{------------------------------------------------------------------------------ Method: SetSysColors Params: CElements - the number of elements LPAElements - array with element numbers diff -Nru lazarus-0.9.30/lcl/interfaces/win32/win32wsactnlist.pp lazarus-0.9.30.2/lcl/interfaces/win32/win32wsactnlist.pp --- lazarus-0.9.30/lcl/interfaces/win32/win32wsactnlist.pp 2008-11-25 02:29:28.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/win32/win32wsactnlist.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: win32wsactnlist.pp 17576 2008-11-25 02:29:28Z paul $} +{ $Id$} { ***************************************************************************** * Win32WSActnList.pp * diff -Nru lazarus-0.9.30/lcl/interfaces/win32/win32wsarrow.pp lazarus-0.9.30.2/lcl/interfaces/win32/win32wsarrow.pp --- lazarus-0.9.30/lcl/interfaces/win32/win32wsarrow.pp 2010-02-04 04:06:00.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/win32/win32wsarrow.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: win32wsarrow.pp 23626 2010-02-04 04:06:00Z paul $} +{ $Id$} { ***************************************************************************** * Win32WSArrow.pp * diff -Nru lazarus-0.9.30/lcl/interfaces/win32/win32wsbuttons.pp lazarus-0.9.30.2/lcl/interfaces/win32/win32wsbuttons.pp --- lazarus-0.9.30/lcl/interfaces/win32/win32wsbuttons.pp 2010-11-18 02:50:43.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/win32/win32wsbuttons.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: win32wsbuttons.pp 28308 2010-11-18 02:50:43Z paul $} +{ $Id$} { ***************************************************************************** * Win32WSButtons.pp * @@ -38,7 +38,7 @@ LCLType, LCLProc, LCLMessageGlue, LMessages, Themes, //////////////////////////////////////////////////// WSProc, WSButtons, Win32WSControls, Win32WSImgList, - Win32UxTheme, Win32Themes; + UxTheme, Win32Themes; type @@ -184,7 +184,7 @@ AEffect: TGraphicsDrawEffect; TmpDC: HDC; PaintBuffer: HPAINTBUFFER; - Options: TDTTOpts; + Options: DTTOpts; Details: TThemedElementDetails; ShowAccel: Boolean; Color: TColor; @@ -305,8 +305,8 @@ if Color = clDefault then Color := BitBtn.GetDefaultColor(dctFont); Options.crText := ThemeServices.ColorToRGB(Color, @Details); - Options.crShadow := Options.crText; - Options.dwFlags := Options.dwFlags or DTT_TEXTCOLOR; + Options.iFontPropId := TMT_GLYPHFONT; + Options.dwFlags := Options.dwFlags or DTT_TEXTCOLOR or DTT_FONTPROP; end; TWin32ThemeServices(ThemeServices).DrawTextEx(TmpDC, Details, ButtonCaption, Rect(XDestText, YDestText, XDestText + TextSize.cx, YDestText + TextSize.cy), diff -Nru lazarus-0.9.30/lcl/interfaces/win32/win32wscalendar.pp lazarus-0.9.30.2/lcl/interfaces/win32/win32wscalendar.pp --- lazarus-0.9.30/lcl/interfaces/win32/win32wscalendar.pp 2010-04-19 03:17:58.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/win32/win32wscalendar.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: win32wscalendar.pp 24709 2010-04-19 03:17:58Z paul $} +{ $Id$} { ***************************************************************************** * Win32WSCalendar.pp * diff -Nru lazarus-0.9.30/lcl/interfaces/win32/win32wschecklst.pp lazarus-0.9.30.2/lcl/interfaces/win32/win32wschecklst.pp --- lazarus-0.9.30/lcl/interfaces/win32/win32wschecklst.pp 2010-11-18 02:50:43.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/win32/win32wschecklst.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: win32wschecklst.pp 28308 2010-11-18 02:50:43Z paul $} +{ $Id$} { ***************************************************************************** * Win32WSCheckLst.pp * diff -Nru lazarus-0.9.30/lcl/interfaces/win32/win32wscomctrls.pp lazarus-0.9.30.2/lcl/interfaces/win32/win32wscomctrls.pp --- lazarus-0.9.30/lcl/interfaces/win32/win32wscomctrls.pp 2010-11-18 09:28:03.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/win32/win32wscomctrls.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: win32wscomctrls.pp 28312 2010-11-18 09:28:03Z paul $} +{ $Id$} { ***************************************************************************** * Win32WSComCtrls.pp * diff -Nru lazarus-0.9.30/lcl/interfaces/win32/win32wscontrols.pp lazarus-0.9.30.2/lcl/interfaces/win32/win32wscontrols.pp --- lazarus-0.9.30/lcl/interfaces/win32/win32wscontrols.pp 2010-11-08 10:29:58.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/win32/win32wscontrols.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: win32wscontrols.pp 28153 2010-11-08 10:29:58Z paul $} +{ $Id$} { ***************************************************************************** * Win32WSControls.pp * diff -Nru lazarus-0.9.30/lcl/interfaces/win32/win32wscustomlistview.inc lazarus-0.9.30.2/lcl/interfaces/win32/win32wscustomlistview.inc --- lazarus-0.9.30/lcl/interfaces/win32/win32wscustomlistview.inc 2010-11-18 02:50:43.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/win32/win32wscustomlistview.inc 2011-11-23 16:14:45.000000000 +0000 @@ -1,5 +1,5 @@ {%MainUnit win32wscomctrls.pp} -{ $Id: win32wscustomlistview.inc 28308 2010-11-18 02:50:43Z paul $ +{ $Id$ ***************************************************************************** * * diff -Nru lazarus-0.9.30/lcl/interfaces/win32/win32wsdbctrls.pp lazarus-0.9.30.2/lcl/interfaces/win32/win32wsdbctrls.pp --- lazarus-0.9.30/lcl/interfaces/win32/win32wsdbctrls.pp 2008-11-25 02:29:28.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/win32/win32wsdbctrls.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: win32wsdbctrls.pp 17576 2008-11-25 02:29:28Z paul $} +{ $Id$} { ***************************************************************************** * Win32WSDbCtrls.pp * diff -Nru lazarus-0.9.30/lcl/interfaces/win32/win32wsdbgrids.pp lazarus-0.9.30.2/lcl/interfaces/win32/win32wsdbgrids.pp --- lazarus-0.9.30/lcl/interfaces/win32/win32wsdbgrids.pp 2008-11-25 02:29:28.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/win32/win32wsdbgrids.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: win32wsdbgrids.pp 17576 2008-11-25 02:29:28Z paul $} +{ $Id$} { ***************************************************************************** * Win32WSDBGrids.pp * diff -Nru lazarus-0.9.30/lcl/interfaces/win32/win32wsdialogs.pp lazarus-0.9.30.2/lcl/interfaces/win32/win32wsdialogs.pp --- lazarus-0.9.30/lcl/interfaces/win32/win32wsdialogs.pp 2011-02-10 22:22:30.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/win32/win32wsdialogs.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: win32wsdialogs.pp 29456 2011-02-10 22:22:30Z vincents $} +{ $Id$} { ***************************************************************************** * Win32WSDialogs.pp * @@ -153,7 +153,7 @@ {$endif} function OpenFileDialogCallBack(Wnd: HWND; uMsg: UINT; wParam: WPARAM; - lParam: LPARAM): UINT; stdcall; + lParam: LPARAM): UINT_PTR; stdcall; function SaveApplicationState: TApplicationState; procedure RestoreApplicationState(AState: TApplicationState); @@ -477,7 +477,7 @@ } function OpenFileDialogCallBack(Wnd: HWND; uMsg: UINT; wParam: WPARAM; - lParam: LPARAM): UINT; stdcall; + lParam: LPARAM): UINT_PTR; stdcall; var OpenFileNotify: LPOFNOTIFY; OpenFileName: Windows.POPENFILENAME; @@ -698,7 +698,7 @@ {$endif} nMaxFile := FileNameBufferLen + 1; // Size in TCHARs - lpfnHook := @OpenFileDialogCallBack; + lpfnHook := Windows.LPOFNHOOKPROC(@OpenFileDialogCallBack); Flags := GetFlagsFromOptions(AOpenDialog.Options); New(DialogRec); // new initializes the filename fields, because ansistring and widestring diff -Nru lazarus-0.9.30/lcl/interfaces/win32/win32wseditbtn.pp lazarus-0.9.30.2/lcl/interfaces/win32/win32wseditbtn.pp --- lazarus-0.9.30/lcl/interfaces/win32/win32wseditbtn.pp 2008-11-25 02:29:28.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/win32/win32wseditbtn.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: win32wseditbtn.pp 17576 2008-11-25 02:29:28Z paul $} +{ $Id$} { ***************************************************************************** * Win32WSEditBtn.pp * diff -Nru lazarus-0.9.30/lcl/interfaces/win32/win32wsextdlgs.pp lazarus-0.9.30.2/lcl/interfaces/win32/win32wsextdlgs.pp --- lazarus-0.9.30/lcl/interfaces/win32/win32wsextdlgs.pp 2010-11-17 07:51:14.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/win32/win32wsextdlgs.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: win32wsextdlgs.pp 28286 2010-11-17 07:51:14Z paul $} +{ $Id$} { ***************************************************************************** * Win32WSExtDlgs.pp * @@ -99,7 +99,7 @@ {$R *.res} function OpenPictureDialogCallBack(hWnd: Handle; uMsg: UINT; wParam: WPARAM; - lParam: LPARAM): UINT; stdcall; + lParam: LPARAM): UINT_PTR; stdcall; var OpenFileName: Windows.POPENFILENAME; DialogRec: POpenFileDialogRec; @@ -162,7 +162,7 @@ Move(PChar(AnsiString(ResName))^, lpTemplateName^, Length(ResName)); end; Flags := Flags or OFN_ENABLETEMPLATE; - lpfnHook := @OpenPictureDialogCallBack; + lpfnHook := LPOFNHOOKPROC(@OpenPictureDialogCallBack); end; end; diff -Nru lazarus-0.9.30/lcl/interfaces/win32/win32wsfilectrl.pp lazarus-0.9.30.2/lcl/interfaces/win32/win32wsfilectrl.pp --- lazarus-0.9.30/lcl/interfaces/win32/win32wsfilectrl.pp 2008-11-25 02:29:28.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/win32/win32wsfilectrl.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: win32wsfilectrl.pp 17576 2008-11-25 02:29:28Z paul $} +{ $Id$} { ***************************************************************************** * Win32WSFileCtrl.pp * diff -Nru lazarus-0.9.30/lcl/interfaces/win32/win32wsforms.pp lazarus-0.9.30.2/lcl/interfaces/win32/win32wsforms.pp --- lazarus-0.9.30/lcl/interfaces/win32/win32wsforms.pp 2010-11-13 09:12:04.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/win32/win32wsforms.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: win32wsforms.pp 28200 2010-11-13 09:12:04Z paul $} +{ $Id$} { ***************************************************************************** * Win32WSForms.pp * diff -Nru lazarus-0.9.30/lcl/interfaces/win32/win32wsgrids.pp lazarus-0.9.30.2/lcl/interfaces/win32/win32wsgrids.pp --- lazarus-0.9.30/lcl/interfaces/win32/win32wsgrids.pp 2010-02-05 07:53:33.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/win32/win32wsgrids.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: win32wsgrids.pp 23636 2010-02-05 07:53:33Z paul $} +{ $Id$} { ***************************************************************************** * Win32WSGrids.pp * diff -Nru lazarus-0.9.30/lcl/interfaces/win32/win32wsimglist.pp lazarus-0.9.30.2/lcl/interfaces/win32/win32wsimglist.pp --- lazarus-0.9.30/lcl/interfaces/win32/win32wsimglist.pp 2009-06-12 14:05:30.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/win32/win32wsimglist.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: win32wsimglist.pp 20595 2009-06-12 14:05:30Z paul $} +{ $Id$} { ***************************************************************************** * Win32WSImgList.pp * diff -Nru lazarus-0.9.30/lcl/interfaces/win32/win32wsmaskedit.pp lazarus-0.9.30.2/lcl/interfaces/win32/win32wsmaskedit.pp --- lazarus-0.9.30/lcl/interfaces/win32/win32wsmaskedit.pp 2008-11-25 02:29:28.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/win32/win32wsmaskedit.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: win32wsmaskedit.pp 17576 2008-11-25 02:29:28Z paul $} +{ $Id$} { ***************************************************************************** * Win32WSMaskEdit.pp * diff -Nru lazarus-0.9.30/lcl/interfaces/win32/win32wsmenus.pp lazarus-0.9.30.2/lcl/interfaces/win32/win32wsmenus.pp --- lazarus-0.9.30/lcl/interfaces/win32/win32wsmenus.pp 2010-11-16 13:25:54.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/win32/win32wsmenus.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: win32wsmenus.pp 28270 2010-11-16 13:25:54Z paul $} +{ $Id$} { ***************************************************************************** * Win32WSMenus.pp * @@ -190,11 +190,11 @@ MenuItemIndex: integer; ItemInfo: MENUITEMINFO; FirstMenuItem: TMenuItem; - SiblingMenuItem: TmenuItem; + SiblingMenuItem: TMenuItem; HotKeyIndex: integer; i: integer; begin - Result := MakeLResult(0, 0); + Result := MakeLResult(0, MNC_IGNORE); MenuItemIndex := -1; ItemInfo.cbSize := menuiteminfosize; ItemInfo.fMask := MIIM_DATA; @@ -206,13 +206,12 @@ begin SiblingMenuItem := FirstMenuItem.Parent.Items[i]; HotKeyIndex := SearchMenuItemHotKeyIndex('&', SiblingMenuItem.Caption); - if (HotKeyIndex > 0) and - (Upcase(ACharCode) = Upcase(SiblingMenuItem.Caption[HotKeyIndex])) then - MenuItemIndex := i; + if (HotKeyIndex > 0) and (Upcase(ACharCode) = Upcase(SiblingMenuItem.Caption[HotKeyIndex])) then + MenuItemIndex := SiblingMenuItem.MenuVisibleIndex; inc(i); end; - if MenuItemIndex > -1 then Result := MakeLResult(MenuItemIndex, 2) - else Result := MakeLResult(0, 0); + if MenuItemIndex > -1 then + Result := MakeLResult(MenuItemIndex, MNC_EXECUTE); end; function GetMenuItemFont(const AFlags: TCaptionFlagsSet): HFONT; diff -Nru lazarus-0.9.30/lcl/interfaces/win32/win32wspairsplitter.pp lazarus-0.9.30.2/lcl/interfaces/win32/win32wspairsplitter.pp --- lazarus-0.9.30/lcl/interfaces/win32/win32wspairsplitter.pp 2009-04-12 08:46:31.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/win32/win32wspairsplitter.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: win32wspairsplitter.pp 19376 2009-04-12 08:46:31Z paul $} +{ $Id$} { ***************************************************************************** * Win32WSPairSplitter.pp * diff -Nru lazarus-0.9.30/lcl/interfaces/win32/win32wsspin.pp lazarus-0.9.30.2/lcl/interfaces/win32/win32wsspin.pp --- lazarus-0.9.30/lcl/interfaces/win32/win32wsspin.pp 2011-01-23 19:33:52.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/win32/win32wsspin.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: win32wsspin.pp 29179 2011-01-23 19:33:52Z vincents $} +{ $Id$} { ***************************************************************************** * Win32WSSpin.pp * diff -Nru lazarus-0.9.30/lcl/interfaces/win32/win32wsstdctrls.pp lazarus-0.9.30.2/lcl/interfaces/win32/win32wsstdctrls.pp --- lazarus-0.9.30/lcl/interfaces/win32/win32wsstdctrls.pp 2011-01-03 12:21:48.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/win32/win32wsstdctrls.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: win32wsstdctrls.pp 28858 2011-01-03 12:21:48Z vincents $} +{ $Id$} { ***************************************************************************** * Win32WSStdCtrls.pp * @@ -124,6 +124,7 @@ class function GetIndexAtXY(const ACustomListBox: TCustomListBox; X, Y: integer): integer; override; class function GetItemIndex(const ACustomListBox: TCustomListBox): integer; override; class function GetItemRect(const ACustomListBox: TCustomListBox; Index: integer; var ARect: TRect): boolean; override; + class function GetScrollWidth(const ACustomListBox: TCustomListBox): Integer; override; class function GetSelCount(const ACustomListBox: TCustomListBox): integer; override; class function GetSelected(const ACustomListBox: TCustomListBox; const AIndex: integer): boolean; override; class function GetStrings(const ACustomListBox: TCustomListBox): TStrings; override; @@ -133,6 +134,7 @@ class procedure SetBorder(const ACustomListBox: TCustomListBox); override; class procedure SetColumnCount(const ACustomListBox: TCustomListBox; ACount: Integer); override; class procedure SetItemIndex(const ACustomListBox: TCustomListBox; const AIndex: integer); override; + class procedure SetScrollWidth(const ACustomListBox: TCustomListBox; const AScrollWidth: Integer); override; class procedure SetSelectionMode(const ACustomListBox: TCustomListBox; const AExtendedSelect, AMultiSelect: boolean); override; class procedure SetStyle(const ACustomListBox: TCustomListBox); override; @@ -646,12 +648,19 @@ Result := SendMessage(ACustomListBox.Handle, LB_GETCURSEL, 0, 0); end; -class function TWin32WSCustomListBox.GetItemRect( - const ACustomListBox: TCustomListBox; Index: integer; var ARect: TRect - ): boolean; +class function TWin32WSCustomListBox.GetItemRect(const ACustomListBox: TCustomListBox; Index: integer; var ARect: TRect): Boolean; +var + Handle: HWND; +begin + Handle := ACustomListBox.Handle; + // The check for GetProp is required because of some division error which happens + // if call LB_GETITEMRECT on window initialization + Result := (GetProp(Handle, 'WinControl') <> 0) and (Windows.SendMessage(Handle, LB_GETITEMRECT, Index, LPARAM(@ARect)) <> LB_ERR); +end; + +class function TWin32WSCustomListBox.GetScrollWidth(const ACustomListBox: TCustomListBox): Integer; begin - Result := Windows.SendMessage(ACustomListBox.Handle, LB_GETITEMRECT, Index, - LPARAM(@ARect)) <> LB_ERR; + Result := Windows.SendMessage(ACustomListBox.Handle, LB_GETHORIZONTALEXTENT, 0, 0); end; class function TWin32WSCustomListBox.GetSelCount(const ACustomListBox: TCustomListBox): integer; @@ -746,6 +755,12 @@ Windows.SendMessage(Handle, LB_SETCURSEL, Windows.WParam(AIndex), 0); end; +class procedure TWin32WSCustomListBox.SetScrollWidth( + const ACustomListBox: TCustomListBox; const AScrollWidth: Integer); +begin + Windows.SendMessage(ACustomListBox.Handle, LB_SETHORIZONTALEXTENT, AScrollWidth, 0); +end; + class procedure TWin32WSCustomListBox.SetSelectionMode(const ACustomListBox: TCustomListBox; const AExtendedSelect, AMultiSelect: boolean); begin @@ -1391,6 +1406,7 @@ var MsgResult: Windows.LResult; var WinProcess: Boolean): Boolean; var Info: PWin32WindowInfo; + TextColor: TColor; begin Result := False; case Msg of @@ -1401,9 +1417,13 @@ if Result then begin ThemeServices.DrawParentBackground(HWND(LParam), HDC(WParam), nil, False); - MsgResult := GetStockObject(HOLLOW_BRUSH); + MsgResult := Windows.GetStockObject(HOLLOW_BRUSH); WinProcess := False; - SetBkMode(HDC(WParam), TRANSPARENT); + Windows.SetBkMode(HDC(WParam), TRANSPARENT); + TextColor := Info^.WinControl.Font.Color; + if TextColor = clDefault then + TextColor := Info^.WinControl.GetDefaultColor(dctFont); + Windows.SetTextColor(HDC(WParam), ColorToRGB(TextColor)); end; end; end; diff -Nru lazarus-0.9.30/lcl/interfaces/win32/win32wstoolwin.pp lazarus-0.9.30.2/lcl/interfaces/win32/win32wstoolwin.pp --- lazarus-0.9.30/lcl/interfaces/win32/win32wstoolwin.pp 2008-11-25 02:29:28.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/win32/win32wstoolwin.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: win32wstoolwin.pp 17576 2008-11-25 02:29:28Z paul $} +{ $Id$} { ***************************************************************************** * Win32WSToolwin.pp * diff -Nru lazarus-0.9.30/lcl/interfaces/wince/wincewinapi.inc lazarus-0.9.30.2/lcl/interfaces/wince/wincewinapi.inc --- lazarus-0.9.30/lcl/interfaces/wince/wincewinapi.inc 2010-11-24 14:13:37.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/wince/wincewinapi.inc 2011-11-23 16:14:45.000000000 +0000 @@ -3585,7 +3585,7 @@ procedure TWinCEWidgetSet.EnterCriticalSection(var CritSection: TCriticalSection); begin { An OS Compatible TCriticalSection needs to be defined} - Windows.LeaveCriticalSection(LPCRITICAL_SECTION(CritSection)); + Windows.ENTERCRITICALSECTION(LPCRITICAL_SECTION(CritSection)); end; {We interprete CritSection as a pointer to a LPCRITICAL_SECTION structure} diff -Nru lazarus-0.9.30/lcl/interfaces/wince/wincewsstdctrls.pp lazarus-0.9.30.2/lcl/interfaces/wince/wincewsstdctrls.pp --- lazarus-0.9.30/lcl/interfaces/wince/wincewsstdctrls.pp 2011-01-03 12:21:48.000000000 +0000 +++ lazarus-0.9.30.2/lcl/interfaces/wince/wincewsstdctrls.pp 2011-11-23 16:14:45.000000000 +0000 @@ -114,6 +114,7 @@ class function GetIndexAtXY(const ACustomListBox: TCustomListBox; X, Y: integer): integer; override; class function GetItemIndex(const ACustomListBox: TCustomListBox): integer; override; class function GetItemRect(const ACustomListBox: TCustomListBox; Index: integer; var ARect: TRect): boolean; override; + class function GetScrollWidth(const ACustomListBox: TCustomListBox): Integer; override; class function GetSelCount(const ACustomListBox: TCustomListBox): integer; override; class function GetSelected(const ACustomListBox: TCustomListBox; const AIndex: integer): boolean; override; class function GetStrings(const ACustomListBox: TCustomListBox): TStrings; override; @@ -123,6 +124,7 @@ class procedure SetBorder(const ACustomListBox: TCustomListBox); override; class procedure SetColumnCount(const ACustomListBox: TCustomListBox; ACount: Integer); override; class procedure SetItemIndex(const ACustomListBox: TCustomListBox; const AIndex: integer); override; + class procedure SetScrollWidth(const ACustomListBox: TCustomListBox; const AScrollWidth: Integer); override; class procedure SetSelectionMode(const ACustomListBox: TCustomListBox; const AExtendedSelect, AMultiSelect: boolean); override; class procedure SetStyle(const ACustomListBox: TCustomListBox); override; @@ -500,6 +502,11 @@ LPARAM(@ARect)) <> LB_ERR; end; +class function TWinCEWSCustomListBox.GetScrollWidth(const ACustomListBox: TCustomListBox): Integer; +begin + Result := Windows.SendMessage(ACustomListBox.Handle, LB_GETHORIZONTALEXTENT, 0, 0); +end; + class function TWinCEWSCustomListBox.GetSelCount(const ACustomListBox: TCustomListBox): integer; begin // GetSelCount only works for multiple-selection listboxes @@ -589,6 +596,12 @@ Windows.SendMessage(Handle, LB_SETCURSEL, Windows.WParam(AIndex), 0); end; +class procedure TWinCEWSCustomListBox.SetScrollWidth( + const ACustomListBox: TCustomListBox; const AScrollWidth: Integer); +begin + Windows.SendMessage(ACustomListBox.Handle, LB_SETHORIZONTALEXTENT, AScrollWidth, 0); +end; + class procedure TWinCEWSCustomListBox.SetSelectionMode(const ACustomListBox: TCustomListBox; const AExtendedSelect, AMultiSelect: boolean); begin diff -Nru lazarus-0.9.30/lcl/intfgraphics.pas lazarus-0.9.30.2/lcl/intfgraphics.pas --- lazarus-0.9.30/lcl/intfgraphics.pas 2010-10-12 15:00:44.000000000 +0000 +++ lazarus-0.9.30.2/lcl/intfgraphics.pas 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: intfgraphics.pas 27667 2010-10-12 15:00:44Z sekelsenmat $ } +{ $Id$ } { /*************************************************************************** intfgraphics.pp @@ -312,7 +312,7 @@ public Parent: TArrayNode; Value: integer; - Childs: PArrayNode; + Children: PArrayNode; StartValue: integer; Capacity: integer; Data: Pointer; @@ -4498,11 +4498,11 @@ var i: Integer; begin - if Childs<>nil then begin + if Children<>nil then begin for i:=0 to Capacity-1 do - Childs[i].Free; - FreeMem(Childs); - Childs:=nil; + Children[i].Free; + FreeMem(Children); + Children:=nil; Capacity:=0; end; end; @@ -4510,7 +4510,7 @@ procedure TArrayNode.UnbindFromParent; begin if Parent<>nil then begin - Parent.Childs[Value-Parent.StartValue]:=nil; + Parent.Children[Value-Parent.StartValue]:=nil; Parent:=nil; end; end; @@ -4524,7 +4524,7 @@ NewNode.Value:=ChildValue; NewNode.Parent:=Self; Index:=ChildValue-StartValue; - Childs[Index]:=NewNode; + Children[Index]:=NewNode; end; function TArrayNode.GetChildNode(ChildValue: integer; CreateIfNotExists: boolean @@ -4540,10 +4540,10 @@ Expand(ChildValue); Index:=ChildValue-StartValue; end; - Result:=Childs[Index]; + Result:=Children[Index]; if (Result=nil) and CreateIfNotExists then begin CreateChildNode(ChildValue); - Result:=Childs[Index]; + Result:=Children[Index]; end; end; @@ -4558,7 +4558,7 @@ OldSize: Integer; begin //DebugLn('TArrayNode.Expand A ',ValueToInclude,' Capacity=',Capacity,' StartValue=',StartValue); - if Childs=nil then begin + if Children=nil then begin NewStartValue:=ValueToInclude; NewCapacity:=4; end else begin @@ -4585,12 +4585,12 @@ NewSize:=SizeOf(Pointer)*NewCapacity; GetMem(NewChilds,NewSize); FillChar(NewChilds^,NewSize,0); - if Childs<>nil then begin + if Children<>nil then begin OldSize:=SizeOf(Pointer)*Capacity; - System.Move(Childs^,NewChilds[StartValue-NewStartValue],OldSize); - FreeMem(Childs); + System.Move(Children^,NewChilds[StartValue-NewStartValue],OldSize); + FreeMem(Children); end; - Childs:=NewChilds; + Children:=NewChilds; StartValue:=NewStartValue; Capacity:=NewCapacity; end; @@ -4603,8 +4603,8 @@ if Parent=nil then exit; i:=Value-Parent.StartValue-1; while (i>=0) do begin - if Parent.Childs[i]<>nil then begin - Result:=Parent.Childs[i]; + if Parent.Children[i]<>nil then begin + Result:=Parent.Children[i]; exit; end; dec(i); @@ -4619,8 +4619,8 @@ if Parent=nil then exit; i:=Value-Parent.StartValue+1; while (inil then begin - Result:=Parent.Childs[i]; + if Parent.Children[i]<>nil then begin + Result:=Parent.Children[i]; exit; end; inc(i); @@ -4659,8 +4659,8 @@ if Capacity=0 then exit; i:=0; while inil then begin - Result:=Childs[i]; + if Children[i]<>nil then begin + Result:=Children[i]; exit; end; inc(i); @@ -4675,8 +4675,8 @@ if Capacity=0 then exit; i:=Capacity-1; while i>=0 do begin - if Childs[i]<>nil then begin - Result:=Childs[i]; + if Children[i]<>nil then begin + Result:=Children[i]; exit; end; dec(i); @@ -4721,10 +4721,10 @@ i: Integer; ChildNode: TArrayNode; begin - if Childs<>nil then begin + if Children<>nil then begin if Capacity<=0 then R('Capacity too small'); for i:=0 to Capacity-1 do begin - ChildNode:=Childs[i]; + ChildNode:=Children[i]; if ChildNode<>nil then begin if ChildNode.Value<>i+StartValue then R('Value wrong'); diff -Nru lazarus-0.9.30/lcl/lazconfigstorage.pas lazarus-0.9.30.2/lcl/lazconfigstorage.pas --- lazarus-0.9.30/lcl/lazconfigstorage.pas 2010-04-24 18:08:28.000000000 +0000 +++ lazarus-0.9.30.2/lcl/lazconfigstorage.pas 2011-11-23 16:14:45.000000000 +0000 @@ -86,7 +86,7 @@ Name: string; Value: string; Parent: TConfigMemStorageNode; - Childs: TAvgLvlTree; // tree of TConfigMemStorageNode + Children: TAvgLvlTree; // tree of TConfigMemStorageNode procedure ClearChilds; constructor Create(AParent: TConfigMemStorageNode; const AName: string); destructor Destroy; override; @@ -94,6 +94,9 @@ TConfigMemStorageModification = (cmsmSet, cmsmGet, cmsmDelete, cmsmDeleteValue); +const + ConfigMemStorageFormatVersion = 2; // change this when format changes +type { TConfigMemStorage } TConfigMemStorage = class(TConfigStorage) @@ -415,7 +418,7 @@ procedure TConfigMemStorage.CreateChilds(Node: TConfigMemStorageNode); begin - Node.Childs:=TAvgLvlTree.Create(@CompareConfigMemStorageNodes); + Node.Children:=TAvgLvlTree.Create(@CompareConfigMemStorageNodes); end; procedure TConfigMemStorage.Modify(const APath: string; @@ -448,11 +451,11 @@ while (not (p^ in ['/',#0])) do inc(p); //DebugLn(['TConfigMemStorage.Modify Node="',Node.Name,'" StartPos="',StartPos,'"']); // child node - if Node.Childs=nil then begin + if Node.Children=nil then begin if Mode in [cmsmDelete,cmsmDeleteValue] then exit; CreateChilds(Node); end; - ChildNode:=Node.Childs.FindKey(StartPos,@ComparePCharWithConfigMemStorageNode); + ChildNode:=Node.Children.FindKey(StartPos,@ComparePCharWithConfigMemStorageNode); if ChildNode=nil then begin if Mode in [cmsmDelete,cmsmDeleteValue] then exit; NewName:=''; @@ -461,7 +464,7 @@ System.Move(StartPos^,NewName[1],p-StartPos); //DebugLn(['TConfigMemStorage.Modify Adding "',NewName,'"']); Child:=TConfigMemStorageNode.Create(Node,NewName); - Node.Childs.Add(Child); + Node.Children.Add(Child); end else Child:=TConfigMemStorageNode(ChildNode.Data); Node:=Child; @@ -478,7 +481,7 @@ Node.Value:=''; if Mode=cmsmDelete then Node.ClearChilds; - while (Node<>nil) and ((Node.Childs=nil) or (Node.Childs.Count=0)) + while (Node<>nil) and ((Node.Children=nil) or (Node.Children.Count=0)) do begin Child:=Node; Node:=Node.Parent; @@ -627,25 +630,29 @@ SubPath:=SubPath+'_'+Node.Name+'/'; Config.SetDeleteValue(SubPath+'Value',Node.Value,''); Names:=''; - if Node.Childs<>nil then begin - ChildNode:=Node.Childs.FindLowest; + if Node.Children<>nil then begin + ChildNode:=Node.Children.FindLowest; while ChildNode<>nil do begin Child:=TConfigMemStorageNode(ChildNode.Data); if Names<>'' then Names:=Names+'/'; Names:=Names+Child.Name; Save(Child,SubPath); - ChildNode:=Node.Childs.FindSuccessor(ChildNode); + ChildNode:=Node.Children.FindSuccessor(ChildNode); end; end; - Config.SetDeleteValue(SubPath+'Childs',Names,''); + Config.SetDeleteValue(SubPath+'Items',Names,''); end; begin Save(Root,APath); + if (Root<>nil) and ((Root.Value<>'') or (Root.Children<>nil)) then + Config.SetValue(APath+'Version',ConfigMemStorageFormatVersion); end; procedure TConfigMemStorage.LoadFromConfig(Config: TConfigStorage; const APath: string); +var + StorageVersion: LongInt; procedure Load(Node: TConfigMemStorageNode; SubPath: string); var @@ -659,7 +666,10 @@ if (Node<>Root) then SubPath:=SubPath+'_'+Node.Name+'/'; Node.Value:=Config.GetValue(SubPath+'Value',''); - ChildNames:=Config.GetValue(SubPath+'Childs',''); + if StorageVersion<2 then + ChildNames:=Config.GetValue(SubPath+'Childs','') + else + ChildNames:=Config.GetValue(SubPath+'Items',''); //DebugLn(['Load SubPath="',SubPath,'" Value="',Node.Value,'" ChildNames="',ChildNames,'"']); if ChildNames<>'' then begin p:=PChar(ChildNames); @@ -671,9 +681,9 @@ if ChildName<>'' then System.Move(StartPos^,ChildName[1],p-StartPos); Child:=TConfigMemStorageNode.Create(Node,ChildName); - if Node.Childs=nil then + if Node.Children=nil then CreateChilds(Node); - Node.Childs.Add(Child); + Node.Children.Add(Child); Load(Child,SubPath); if p^=#0 then break; inc(p); @@ -686,6 +696,8 @@ Clear; if Root=nil then CreateRoot; + StorageVersion:=Config.GetValue(APath+'Version',0); + //debugln(['TConfigMemStorage.LoadFromConfig ',APath,' Version=',StorageVersion]); Load(Root,APath); end; @@ -697,11 +709,11 @@ begin if Node=nil then exit; DebugLn(['TConfigMemStorage.WriteDebugReport ',Prefix,'Name="',Node.Name,'" Value="',Node.Value,'"']); - if Node.Childs<>nil then begin - AVLNode:=Node.Childs.FindLowest; + if Node.Children<>nil then begin + AVLNode:=Node.Children.FindLowest; while AVLNode<>nil do begin w(TConfigMemStorageNode(AVLNode.Data),Prefix+' '); - AVLNode:=Node.Childs.FindSuccessor(AVLNode); + AVLNode:=Node.Children.FindSuccessor(AVLNode); end; end; end; @@ -717,9 +729,9 @@ var OldChilds: TAvgLvlTree; begin - if Childs<>nil then begin - OldChilds:=Childs; - Childs:=nil; + if Children<>nil then begin + OldChilds:=Children; + Children:=nil; OldChilds.FreeAndClear; OldChilds.Free; end; @@ -735,8 +747,8 @@ destructor TConfigMemStorageNode.Destroy; begin ClearChilds; - if (Parent<>nil) and (Parent.Childs<>nil) then - Parent.Childs.Remove(Self); + if (Parent<>nil) and (Parent.Children<>nil) then + Parent.Children.Remove(Self); inherited Destroy; end; diff -Nru lazarus-0.9.30/lcl/lazhelpintf.pas lazarus-0.9.30.2/lcl/lazhelpintf.pas --- lazarus-0.9.30/lcl/lazhelpintf.pas 2010-04-06 12:36:09.000000000 +0000 +++ lazarus-0.9.30.2/lcl/lazhelpintf.pas 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: lazhelpintf.pas 24467 2010-04-06 12:36:09Z mattias $ } +{ $Id$ } { ***************************************************************************** * * diff -Nru lazarus-0.9.30/lcl/lclbasedowngrade.pas lazarus-0.9.30.2/lcl/lclbasedowngrade.pas --- lazarus-0.9.30/lcl/lclbasedowngrade.pas 1970-01-01 00:00:00.000000000 +0000 +++ lazarus-0.9.30.2/lcl/lclbasedowngrade.pas 2011-11-23 16:14:45.000000000 +0000 @@ -0,0 +1,18 @@ +unit lclbasedowngrade; + +{$mode objfpc}{$H+} + +{$error Your project depends on LCLBase. Replace the dependency with LCL in the project inspector. } +{ LCLBase does not work without LCL. LCLBase works only with 0.9.31+. + Simply use only LCL as dependency in the project inspector. This will + work with all versions of Lazarus. } + +interface + +uses + Classes, SysUtils; + +implementation + +end. + diff -Nru lazarus-0.9.30/lcl/lclbase.lpk lazarus-0.9.30.2/lcl/lclbase.lpk --- lazarus-0.9.30/lcl/lclbase.lpk 2011-02-27 19:52:04.000000000 +0000 +++ lazarus-0.9.30.2/lcl/lclbase.lpk 2011-11-23 16:14:45.000000000 +0000 @@ -1,1203 +1,22 @@ - - - + - - - + - - - - - + - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru lazarus-0.9.30/lcl/lclbase.pas lazarus-0.9.30.2/lcl/lclbase.pas --- lazarus-0.9.30/lcl/lclbase.pas 2010-09-28 11:31:36.000000000 +0000 +++ lazarus-0.9.30.2/lcl/lclbase.pas 2011-11-23 16:14:45.000000000 +0000 @@ -2,66 +2,19 @@ This source is only used to compile and install the package. } -unit LCLBase; +unit lclbase; interface uses - Chart, CheckLst, Clipbrd, ColorBox, ComCtrls, Controls, CustomTimer, - DBActns, DbCtrls, DBGrids, DefaultTranslator, Dialogs, DynamicArray, - DynHashArray, DynQueue, EditBtn, ExtCtrls, ExtDlgs, ExtendedStrings, - extgraphics, FileCtrl, FileUtil, Forms, FPCAdds, Graphics, GraphMath, - GraphType, GraphUtil, Grids, HelpIntfs, IcnsTypes, ImageListCache, ImgList, - IniPropStorage, InterfaceBase, IntfGraphics, LazConfigStorage, LazHelpHTML, - LazHelpIntf, LazLinkedList, LCLClasses, LCLIntf, LCLMemManager, - LCLMessageGlue, LCLProc, LCLResCache, LCLStrConsts, LCLType, LCLUnicodeData, - LCLVersion, LConvEncoding, LDockCtrl, LDockCtrlEdit, LDockTree, LMessages, - LResources, maps, MaskEdit, Masks, Menus, PairSplitter, PopupNotifier, - PostScriptCanvas, PostScriptPrinter, postscriptunicode, Printers, - PropertyStorage, RubberBand, ShellCtrls, Spin, StdActns, StdCtrls, - StringHashList, TextStrings, Themes, TmSchema, Toolwin, Translations, - UTF8Process, UTrace, XMLPropStorage, WSArrow, WSButtons, WSCalendar, - WSCheckLst, WSComCtrls, WSControls, WSDesigner, WSDialogs, WSExtCtrls, - WSExtDlgs, WSFactory, WSForms, WSGrids, WSImgList, WSLCLClasses, WSMenus, - WSPairSplitter, WSProc, WSReferences, WSSpin, WSStdCtrls, WSToolwin, - LazarusPackageIntf; + lclbasedowngrade, LazarusPackageIntf; implementation procedure Register; begin - RegisterUnit('Chart', @Chart.Register); - RegisterUnit('CheckLst', @CheckLst.Register); - RegisterUnit('ColorBox', @ColorBox.Register); - RegisterUnit('ComCtrls', @ComCtrls.Register); - RegisterUnit('Controls', @Controls.Register); - RegisterUnit('DBActns', @DBActns.Register); - RegisterUnit('DbCtrls', @DbCtrls.Register); - RegisterUnit('DBGrids', @DBGrids.Register); - RegisterUnit('Dialogs', @Dialogs.Register); - RegisterUnit('EditBtn', @EditBtn.Register); - RegisterUnit('ExtCtrls', @ExtCtrls.Register); - RegisterUnit('ExtDlgs', @ExtDlgs.Register); - RegisterUnit('FileCtrl', @FileCtrl.Register); - RegisterUnit('Forms', @Forms.Register); - RegisterUnit('Graphics', @Graphics.Register); - RegisterUnit('Grids', @Grids.Register); - RegisterUnit('IniPropStorage', @IniPropStorage.Register); - RegisterUnit('LazHelpHTML', @LazHelpHTML.Register); - RegisterUnit('LDockCtrl', @LDockCtrl.Register); - RegisterUnit('LResources', @LResources.Register); - RegisterUnit('MaskEdit', @MaskEdit.Register); - RegisterUnit('Menus', @Menus.Register); - RegisterUnit('PairSplitter', @PairSplitter.Register); - RegisterUnit('PopupNotifier', @PopupNotifier.Register); - RegisterUnit('ShellCtrls', @ShellCtrls.Register); - RegisterUnit('Spin', @Spin.Register); - RegisterUnit('StdActns', @StdActns.Register); - RegisterUnit('StdCtrls', @StdCtrls.Register); - RegisterUnit('UTF8Process', @UTF8Process.Register); - RegisterUnit('XMLPropStorage', @XMLPropStorage.Register); end; initialization - RegisterPackage('LCLBase', @Register); + RegisterPackage('lclbase', @Register); end. diff -Nru lazarus-0.9.30/lcl/lclclasses.pp lazarus-0.9.30.2/lcl/lclclasses.pp --- lazarus-0.9.30/lcl/lclclasses.pp 2010-06-02 09:39:49.000000000 +0000 +++ lazarus-0.9.30.2/lcl/lclclasses.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: lclclasses.pp 25837 2010-06-02 09:39:49Z blikblum $} +{ $Id$} { ***************************************************************************** * lclclasses.pp * diff -Nru lazarus-0.9.30/lcl/lclintf.pas lazarus-0.9.30.2/lcl/lclintf.pas --- lazarus-0.9.30/lcl/lclintf.pas 2010-10-12 09:54:03.000000000 +0000 +++ lazarus-0.9.30.2/lcl/lclintf.pas 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: lclintf.pas 27661 2010-10-12 09:54:03Z sekelsenmat $ } +{ $Id$ } { /*************************************************************************** LCLIntf.pas diff -Nru lazarus-0.9.30/lcl/lclmessageglue.pas lazarus-0.9.30.2/lcl/lclmessageglue.pas --- lazarus-0.9.30/lcl/lclmessageglue.pas 2010-07-14 08:47:02.000000000 +0000 +++ lazarus-0.9.30.2/lcl/lclmessageglue.pas 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: lclmessageglue.pas 26637 2010-07-14 08:47:02Z paul $ } +{ $Id$ } { ***************************************************************************** * LCLMessageGlue.pas * diff -Nru lazarus-0.9.30/lcl/lclproc.pas lazarus-0.9.30.2/lcl/lclproc.pas --- lazarus-0.9.30/lcl/lclproc.pas 2010-11-23 11:02:58.000000000 +0000 +++ lazarus-0.9.30.2/lcl/lclproc.pas 2011-11-23 16:14:45.000000000 +0000 @@ -366,8 +366,8 @@ Src: PWideChar; SrcWideCharCount: SizeUInt; Options: TConvertOptions; out ActualCharCount: SizeUInt): TConvertResult; -function UTF8ToUTF16(const S: UTF8String): UTF16String; -function UTF16ToUTF8(const S: UTF16String): UTF8String; +function UTF8ToUTF16(const S: AnsiString): UTF16String; +function UTF16ToUTF8(const S: UTF16String): AnsiString; // locale procedure LCLGetLanguageIDs(var Lang, FallbackLang: String); @@ -2282,6 +2282,7 @@ NewLen: Integer; begin NewLen := DebugNestLvl * DebugLnNestLvlIndent; + if NewLen < 0 then NewLen := 0; if (NewLen >= DebugLnMaxNestPrefixLen) then begin NewLen := DebugLnMaxNestPrefixLen; s := IntToStr(DebugNestLvl); @@ -2346,6 +2347,7 @@ procedure DebugLnExit(const s: string); begin dec(DebugNestLvl); + if DebugNestLvl < 0 then DebugNestLvl := 0; DebugLnNestCreatePrefix; if not DebugNestAtBOL then DebugLn; @@ -2356,6 +2358,7 @@ procedure DebugLnExit(Args: array of const); begin dec(DebugNestLvl); + if DebugNestLvl < 0 then DebugNestLvl := 0; DebugLnNestCreatePrefix; if not DebugNestAtBOL then DebugLn; @@ -4437,7 +4440,7 @@ Avoid copying the result string since on windows a widestring requires a full copy ------------------------------------------------------------------------------} -function UTF8ToUTF16(const S: UTF8String): UTF16String; +function UTF8ToUTF16(const S: AnsiString): UTF16String; var L: SizeUInt; begin @@ -4462,10 +4465,10 @@ Converts the specified UTF-16 encoded string (system endian) to UTF-8 encoded ------------------------------------------------------------------------------} -function UTF16ToUTF8(const S: UTF16String): UTF8String; +function UTF16ToUTF8(const S: UTF16String): AnsiString; var L: SizeUInt; - R: UTF8String; + R: AnsiString; begin Result := ''; if S = '' then Exit; diff -Nru lazarus-0.9.30/lcl/lclstrconsts.pas lazarus-0.9.30.2/lcl/lclstrconsts.pas --- lazarus-0.9.30/lcl/lclstrconsts.pas 2010-09-04 16:28:08.000000000 +0000 +++ lazarus-0.9.30.2/lcl/lclstrconsts.pas 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: lclstrconsts.pas 27267 2010-09-04 16:28:08Z sekelsenmat $ } +{ $Id$ } { /*************************************************************************** lclstrconsts.pas diff -Nru lazarus-0.9.30/lcl/lcltype.pp lazarus-0.9.30.2/lcl/lcltype.pp --- lazarus-0.9.30/lcl/lcltype.pp 2010-12-06 13:25:51.000000000 +0000 +++ lazarus-0.9.30.2/lcl/lcltype.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: lcltype.pp 28637 2010-12-06 13:25:51Z vincents $ } +{ $Id$ } { /*************************************************************************** LCLType.pp diff -Nru lazarus-0.9.30/lcl/lclversion.pas lazarus-0.9.30.2/lcl/lclversion.pas --- lazarus-0.9.30/lcl/lclversion.pas 2011-02-27 19:52:04.000000000 +0000 +++ lazarus-0.9.30.2/lcl/lclversion.pas 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: lclversion.pas 29688 2011-02-27 19:52:04Z vincents $ } +{ $Id$ } { /*************************************************************************** lclversion.pas @@ -30,8 +30,8 @@ lcl_major = 0; lcl_minor = 9; lcl_release = 30; - lcl_patch = 0; - lcl_version = '0.9.30'; + lcl_patch = 2; + lcl_version = '0.9.30.2'; lcl_fullversion = ((lcl_major * 100 + lcl_minor) * 100 + lcl_release) * 100 + lcl_patch; implementation diff -Nru lazarus-0.9.30/lcl/ldockctrl.pas lazarus-0.9.30.2/lcl/ldockctrl.pas --- lazarus-0.9.30/lcl/ldockctrl.pas 2011-02-10 22:22:30.000000000 +0000 +++ lazarus-0.9.30.2/lcl/ldockctrl.pas 2011-11-23 16:14:45.000000000 +0000 @@ -127,7 +127,7 @@ property Parent: TLazDockConfigNode read FParent write SetParent; property Sides[Side: TAnchorKind]: string read GetSides write SetSides; property ChildCount: Integer read GetChildCount; - property Childs[Index: integer]: TLazDockConfigNode read GetChilds; default; + property Children[Index: integer]: TLazDockConfigNode read GetChilds; default; published property TheType: TLDConfigNodeType read FTheType write SetTheType default ldcntControl; @@ -1085,9 +1085,9 @@ PagesNode:=PageNode.Parent; PageNodeIndex:=PagesNode.IndexOf(PageNode.Name); if PageNodeIndex>0 then - NeighbourNode:=PagesNode.Childs[PageNodeIndex-1].Childs[0] + NeighbourNode:=PagesNode.Children[PageNodeIndex-1].Children[0] else - NeighbourNode:=PagesNode.Childs[PageNodeIndex+1].Childs[0]; + NeighbourNode:=PagesNode.Children[PageNodeIndex+1].Children[0]; NeighbourControl:=Manager.FindControlByDockerName(NeighbourNode.Name); if NeighbourControl=nil then begin DebugLn(['TCustomLazControlDocker.DockAsPage NeighbourControl not found "',NeighbourNode.Name,'"']); @@ -1853,7 +1853,7 @@ if AControl is TCustomForm then Result.WindowState:=TCustomForm(AControl).WindowState; - // Childs + // Children if (AControl is TWinControl) then begin // check if children need nodes NeedChildNodes:=(AControl is TLazDockPages) @@ -2609,7 +2609,7 @@ // anchored to the other side of DeletingNode OppositeSide:=OppositeAnchor[Side]; for i:=0 to DeletingNode.Parent.ChildCount-1 do begin - Sibling:=DeletingNode.Parent.Childs[i]; + Sibling:=DeletingNode.Parent.Children[i]; if CompareText(Sibling.Sides[OppositeSide],SplitterNode.Name)=0 then Sibling.Sides[OppositeSide]:=DeletingNode.Sides[OppositeSide]; end; @@ -2650,7 +2650,7 @@ // 2. anchor all siblings using LeftSplitter to now use RightSplitter for i:=0 to DeletingNode.Parent.ChildCount-1 do begin - Sibling:=DeletingNode.Parent.Childs[i]; + Sibling:=DeletingNode.Parent.Children[i]; if Sibling=DeletingNode then continue; if CompareText(Sibling.Sides[akLeft],LeftSplitter.Name)=0 then Sibling.Sides[akLeft]:=RightSplitter.Name; @@ -2713,12 +2713,12 @@ if ParentNode=nil then RaiseGDBException(''); if (PagesNode.TheType<>ldcntPages) then RaiseGDBException(''); if PagesNode.ChildCount<>1 then RaiseGDBException(''); - PageNode:=PagesNode.Childs[0]; + PageNode:=PagesNode.Children[0]; PagesBounds:=PagesNode.Bounds; OffsetX:=PagesBounds.Left; OffsetY:=PagesBounds.Top; for i:=0 to PageNode.ChildCount-1 do begin - Child:=PageNode.Childs[i]; + Child:=PageNode.Children[i]; // changes parent of child Child.Parent:=ParentNode; // move children to place where PagesNode was @@ -2754,7 +2754,7 @@ FormBounds:=FormNode.Bounds; OffsetX:=FormBounds.Left; OffsetY:=FormBounds.Top; - Child:=FormNode.Childs[0]; + Child:=FormNode.Children[0]; // changes parent of child Child.Parent:=FormNode.Parent; Child.WindowState:=FormNode.WindowState; @@ -2789,7 +2789,7 @@ // remove unneeded children i:=Node.ChildCount-1; while i>=0 do begin - Child:=Node.Childs[i]; + Child:=Node.Children[i]; RemoveEmptyNodes(Child);// beware: this can delete more than one child dec(i); if i>=Node.ChildCount then i:=Node.ChildCount-1; @@ -2873,7 +2873,7 @@ end; // check children for i:=0 to Node.ChildCount-1 do - if not Check(Node.Childs[i]) then exit(false); + if not Check(Node.Children[i]) then exit(false); Result:=true; end; @@ -2920,7 +2920,7 @@ begin ParentNode:=Node.Parent; for i:=0 to ParentNode.ChildCount-1 do begin - Result:=ParentNode.Childs[i]; + Result:=ParentNode.Children[i]; if CompareText(Result.Name,DockerName)=0 then continue; if Result.TheType=ldcntControl then exit; @@ -2949,13 +2949,13 @@ PageIndex:=PagesNode.IndexOf(PageNode.Name); if (PageIndex>0) and (PagesNode[PageIndex-1].ChildCount=1) then begin - Result:=PagesNode[PageIndex-1].Childs[0]; + Result:=PagesNode[PageIndex-1].Children[0]; if Result.TheType=ldcntControl then exit; end; // check if right page has only one control if (PageIndex0) then exit(Node); for i:=0 to Node.ChildCount-1 do begin - Result:=FindOtherNodeWithControl(Node.Childs[i]); + Result:=FindOtherNodeWithControl(Node.Children[i]); if Result<>nil then exit; end; end; @@ -3166,7 +3166,7 @@ if Node.Sides[Side1]='' then exit; if Node.Sides[Side2]='' then exit; for i:=0 to Node.Parent.ChildCount-1 do begin - Child:=Node.Parent.Childs[i]; + Child:=Node.Parent.Children[i]; if Child=Node then continue; if (CompareText(Node.Sides[Side1],Child.Sides[Side1])=0) and (CompareText(Node.Sides[Side2],Child.Sides[Side2])=0) then begin @@ -3217,8 +3217,8 @@ if not CheckHasParent then exit; if not CheckHasChilds then exit; for i:=0 to Node.ChildCount-1 do - if Node.Childs[i].TheType<>ldcntPage then begin - Error('Childs[i].TheType<>ldcntPage'); + if Node.Children[i].TheType<>ldcntPage then begin + Error('Children[i].TheType<>ldcntPage'); exit; end; if not CheckAllSidesAnchored then exit; @@ -3269,7 +3269,7 @@ // check children for i:=0 to Node.ChildCount-1 do - if not CheckNode(Node.Childs[i]) then exit; + if not CheckNode(Node.Children[i]) then exit; Result:=true; end; @@ -3380,7 +3380,7 @@ i: Integer; begin if FChilds=nil then exit; - for i:=ChildCount-1 downto 0 do Childs[i].Free; + for i:=ChildCount-1 downto 0 do Children[i].Free; FChilds.Clear; end; @@ -3403,7 +3403,7 @@ FSides[a]:=Src.FSides[a]; FTheType:=Src.FTheType; for i:=0 to Src.ChildCount-1 do begin - SrcChild:=Src.Childs[i]; + SrcChild:=Src.Children[i]; NewChild:=TLazDockConfigNode.Create(Self); NewChild.Assign(SrcChild); end; @@ -3419,7 +3419,7 @@ if WithRoot and (CompareText(Name,AName)=0) then exit(Self); if FChilds<>nil then for i:=0 to FChilds.Count-1 do begin - Result:=Childs[i]; + Result:=Children[i]; if CompareText(Result.Name,AName)=0 then exit; if Recursive then begin Result:=Result.FindByName(AName,true,false); @@ -3433,7 +3433,7 @@ begin if FChilds<>nil then begin Result:=FChilds.Count-1; - while (Result>=0) and (CompareText(Childs[Result].Name,AName)<>0) do + while (Result>=0) and (CompareText(Children[Result].Name,AName)<>0) do dec(Result); end else begin Result:=-1; @@ -3471,7 +3471,7 @@ Result:=nil; ParentNode:=Parent; for i:=0 to ParentNode.ChildCount-1 do begin - Child:=ParentNode.Childs[i]; + Child:=ParentNode.Children[i]; if Child=Self then continue; if IgnoreSplitters and (Child.TheType in [ldcntSplitterLeftRight,ldcntSplitterUpDown]) then @@ -3520,9 +3520,9 @@ Config.SetDeleteValue(Path+'Sides/'+AnchorNames[a]+'/Name',Sides[a],''); // children - Config.SetDeleteValue(Path+'Childs/Count',ChildCount,0); + Config.SetDeleteValue(Path+'Children/Count',ChildCount,0); for i:=0 to ChildCount-1 do begin - Child:=Childs[i]; + Child:=Children[i]; SubPath:=Path+'Child'+IntToStr(i+1)+'/'; Child.SaveToConfig(Config,SubPath); end; @@ -3552,7 +3552,7 @@ Sides[a]:=Config.GetValue(Path+'Sides/'+AnchorNames[a]+'/Name',''); // children - NewChildCount:=Config.GetValue(Path+'Childs/Count',0); + NewChildCount:=Config.GetValue(Path+'Children/Count',0); for i:=0 to NewChildCount-1 do begin SubPath:=Path+'Child'+IntToStr(i+1)+'/'; NewChildName:=Config.GetValue(SubPath+'Name/Value',''); @@ -3575,7 +3575,7 @@ DbgOut(' Type=',GetEnumName(TypeInfo(TLDConfigNodeType),ord(ANode.TheType))); DbgOut(' Bounds='+dbgs(ANode.Bounds)); DbgOut(' ClientBounds='+dbgs(ANode.ClientBounds)); - DbgOut(' Childs='+dbgs(ANode.ChildCount)); + DbgOut(' Children='+dbgs(ANode.ChildCount)); DbgOut(' WindowState='+WindowStateToStr(ANode.WindowState)); for a:=Low(TAnchorKind) to High(TAnchorKind) do begin s:=ANode.Sides[a]; @@ -3749,7 +3749,7 @@ end; if Node.Parent<>nil then begin for i:=0 to Node.Parent.ChildCount-1 do begin - Sibling:=Node.Parent.Childs[i]; + Sibling:=Node.Parent.Children[i]; if CompareText(Sibling.Sides[OppositeAnchor[Side]],Node.Name)=0 then Improve(Sibling); end; @@ -3783,13 +3783,13 @@ if Node.TheType=ldcntPages then begin // maximum size of all pages for i:=0 to Node.ChildCount-1 do begin - ChildMinSize:=GetMinSize(Node.Childs[i]); + ChildMinSize:=GetMinSize(Node.Children[i]); Result.X:=Max(Result.X,ChildMinSize.X); Result.Y:=Max(Result.Y,ChildMinSize.Y); end; end else begin for i:=0 to Node.ChildCount-1 do begin - Child:=Node.Childs[i]; + Child:=Node.Children[i]; ChildSize:=GetMinSize(Child); Result.X:=Max(Result.X,GetMinPos(Child,akLeft)+ChildSize.X); Result.Y:=Max(Result.Y,GetMinPos(Child,akTop)+ChildSize.Y); @@ -3846,7 +3846,7 @@ w(ARect.Left+1,ARect.Top,Node.Name,ARect.Right); for i := 0 to Node.ChildCount-1 do begin - Child:=Node.Childs[i]; + Child:=Node.Children[i]; ChildRect.Left:=ARect.Left+1+GetMinPos(Child,akLeft); ChildRect.Top:=ARect.Top+1+GetMinPos(Child,akTop); ChildSize:=GetMinSize(Child); diff -Nru lazarus-0.9.30/lcl/lmessages.pp lazarus-0.9.30.2/lcl/lmessages.pp --- lazarus-0.9.30/lcl/lmessages.pp 2010-10-29 07:34:20.000000000 +0000 +++ lazarus-0.9.30.2/lcl/lmessages.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: lmessages.pp 27940 2010-10-29 07:34:20Z mattias $ } +{ $Id$ } { /*************************************************************************** lMessages.pp diff -Nru lazarus-0.9.30/lcl/lresources.pp lazarus-0.9.30.2/lcl/lresources.pp --- lazarus-0.9.30/lcl/lresources.pp 2010-12-02 07:21:19.000000000 +0000 +++ lazarus-0.9.30.2/lcl/lresources.pp 2011-11-23 16:14:45.000000000 +0000 @@ -2644,13 +2644,6 @@ Output.Write(s[1], Length(s)); end; - procedure WriteWideString(const s: WideString); - begin - WriteLRSInteger(Output,Length(s)); - if Length(s) > 0 then - Output.Write(s[1], Length(s)*2); - end; - procedure WriteInteger(value: LongInt); begin if (value >= -128) and (value <= 127) then begin @@ -2755,7 +2748,7 @@ WriteLRSExtended(Output,flt); ParserNextToken; end; - toString: + toString,toWString: begin toStringBuf := parser.TokenString; //DebugLn(['ProcessValue toStringBuf="',toStringBuf,'" ',dbgstr(toStringBuf)]); @@ -2776,20 +2769,6 @@ WriteLongString(toStringBuf); end; end; - toWString: - begin - toStringBuf := parser.TokenString; - //DebugLn(['ProcessValue toStringBuf="',toStringBuf,'" ',dbgstr(toStringBuf)]); - while ParserNextToken = '+' do - begin - ParserNextToken; // Get next string fragment - if not (parser.Token in [toString,toWString]) then - parser.CheckToken(toString); - toStringBuf := toStringBuf + parser.TokenString; - end; - Output.WriteByte(Ord(vaWString)); - WriteWideString(UTF8Decode(toStringBuf)); - end; toSymbol: begin if CompareText(parser.TokenString, 'True') = 0 then diff -Nru lazarus-0.9.30/lcl/Makefile.fpc lazarus-0.9.30.2/lcl/Makefile.fpc --- lazarus-0.9.30/lcl/Makefile.fpc 2009-11-25 22:16:26.000000000 +0000 +++ lazarus-0.9.30.2/lcl/Makefile.fpc 2011-11-23 16:14:33.000000000 +0000 @@ -1,4 +1,4 @@ -# $Id: Makefile.fpc 22777 2009-11-25 22:16:26Z mattias $ +# $Id$ # # Makefile.fpc for Lazarus for Free Pascal # diff -Nru lazarus-0.9.30/lcl/maps.pp lazarus-0.9.30.2/lcl/maps.pp --- lazarus-0.9.30/lcl/maps.pp 2010-03-29 11:51:36.000000000 +0000 +++ lazarus-0.9.30.2/lcl/maps.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: maps.pp 24281 2010-03-29 11:51:36Z marc $ } +{ $Id$ } { ***************************************************************************** * * diff -Nru lazarus-0.9.30/lcl/pairsplitter.pas lazarus-0.9.30.2/lcl/pairsplitter.pas --- lazarus-0.9.30/lcl/pairsplitter.pas 2011-02-10 22:22:30.000000000 +0000 +++ lazarus-0.9.30.2/lcl/pairsplitter.pas 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: pairsplitter.pas 29456 2011-02-10 22:22:30Z vincents $ } +{ $Id$ } { /*************************************************************************** pairsplitter.pas @@ -362,7 +362,8 @@ with GetControlClassDefaultSize do SetInitialBounds(0, 0, CX, CY); FPosition:=45; - CreateSides; + if not (csDesigning in ComponentState) then + CreateSides; end; destructor TCustomPairSplitter.Destroy; @@ -382,6 +383,7 @@ i: Integer; APosition: Integer; begin + CreateSides; inherited CreateWnd; for i := Low(FSides) to High(FSides) do if FSides[i] <> nil then diff -Nru lazarus-0.9.30/lcl/propertystorage.pas lazarus-0.9.30.2/lcl/propertystorage.pas --- lazarus-0.9.30/lcl/propertystorage.pas 2009-08-07 08:32:45.000000000 +0000 +++ lazarus-0.9.30.2/lcl/propertystorage.pas 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: propertystorage.pas 21127 2009-08-07 08:32:45Z vincents $ } +{ $Id$ } { ***************************************************************************** * * diff -Nru lazarus-0.9.30/lcl/shellctrls.pas lazarus-0.9.30.2/lcl/shellctrls.pas --- lazarus-0.9.30/lcl/shellctrls.pas 2010-10-07 11:15:16.000000000 +0000 +++ lazarus-0.9.30.2/lcl/shellctrls.pas 2011-11-23 16:14:45.000000000 +0000 @@ -315,11 +315,16 @@ end; function TCustomShellTreeView.CanExpand(Node: TTreeNode): Boolean; +var + OldAutoExpand: Boolean; begin Result:=inherited CanExpand(Node); if not Result then exit; + OldAutoExpand:=AutoExpand; + AutoExpand:=False; Node.DeleteChildren; Result := PopulateTreeNodeWithFiles(Node, GetPathFromNode(Node)); + AutoExpand:=OldAutoExpand; end; constructor TCustomShellTreeView.Create(AOwner: TComponent); diff -Nru lazarus-0.9.30/lcl/stdctrls.pp lazarus-0.9.30.2/lcl/stdctrls.pp --- lazarus-0.9.30/lcl/stdctrls.pp 2010-11-19 10:46:12.000000000 +0000 +++ lazarus-0.9.30.2/lcl/stdctrls.pp 2011-11-23 16:14:45.000000000 +0000 @@ -497,13 +497,16 @@ FOnDrawItem: TDrawItemEvent; FOnMeasureItem: TMeasureItemEvent; FOnSelectionChange: TSelectionChangeEvent; + FScrollWidth: Integer; FSorted: boolean; FStyle: TListBoxStyle; FTopIndex: integer; function GetCount: Integer; + function GetScrollWidth: Integer; function GetTopIndex: Integer; procedure RaiseIndexOutOfBounds(AIndex: integer); procedure SetColumns(const AValue: Integer); + procedure SetScrollWidth(const AValue: Integer); procedure SetTopIndex(const AValue: Integer); procedure UpdateSelectionMode; procedure UpdateSorted; @@ -603,6 +606,7 @@ property ParentFont; property ParentShowHint; property PopupMenu; + property ScrollWidth: Integer read GetScrollWidth write SetScrollWidth default 0; property SelCount: integer read GetSelCount; property Selected[Index: integer]: boolean read GetSelected write SetSelected; property ShowHint; @@ -670,6 +674,7 @@ property ParentShowHint; property ParentFont; property PopupMenu; + property ScrollWidth; property ShowHint; property Sorted; property Style; diff -Nru lazarus-0.9.30/lcl/themes.pas lazarus-0.9.30.2/lcl/themes.pas --- lazarus-0.9.30/lcl/themes.pas 2010-09-11 14:05:21.000000000 +0000 +++ lazarus-0.9.30.2/lcl/themes.pas 2011-11-23 16:14:45.000000000 +0000 @@ -1903,8 +1903,8 @@ img.Canvas.Pen.Width:=2; img.Canvas.Line(4,4,img.Width-3, img.Height-3); img.Canvas.Line(img.Width-4, 4, 3, img.Height-3); - Image:=img.ReleaseHandle; - Mask:=0; + Mask:=img.ReleaseMaskHandle; + Image:=img.ReleaseHandle; img.Free; Result:=True; end; @@ -2151,6 +2151,13 @@ begin if Details.Part in [TVP_GLYPH, TVP_HOTGLYPH] then begin + with ARect do + begin + if not odd(Right - Left) then + Dec(Right); + if not odd(Bottom - Top) then + Dec(Bottom); + end; Rectangle(DC, ARect.Left, ARect.Top, ARect.Right, ARect.Bottom); Tmp := (ARect.Bottom + ARect.Top) shr 1; MoveToEx(DC, ARect.Left + 2, Tmp, nil); diff -Nru lazarus-0.9.30/lcl/translations.pas lazarus-0.9.30.2/lcl/translations.pas --- lazarus-0.9.30/lcl/translations.pas 2011-01-25 12:02:56.000000000 +0000 +++ lazarus-0.9.30.2/lcl/translations.pas 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: translations.pas 29193 2011-01-25 12:02:56Z vincents $} +{ $Id$} { ***************************************************************************** * * diff -Nru lazarus-0.9.30/lcl/widgetset/wsarrow.pp lazarus-0.9.30.2/lcl/widgetset/wsarrow.pp --- lazarus-0.9.30/lcl/widgetset/wsarrow.pp 2010-02-04 04:06:00.000000000 +0000 +++ lazarus-0.9.30.2/lcl/widgetset/wsarrow.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: wsarrow.pp 23626 2010-02-04 04:06:00Z paul $} +{ $Id$} { ***************************************************************************** * WSArrow.pp * diff -Nru lazarus-0.9.30/lcl/widgetset/wsbuttons.pp lazarus-0.9.30.2/lcl/widgetset/wsbuttons.pp --- lazarus-0.9.30/lcl/widgetset/wsbuttons.pp 2010-08-12 12:49:38.000000000 +0000 +++ lazarus-0.9.30.2/lcl/widgetset/wsbuttons.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: wsbuttons.pp 27073 2010-08-12 12:49:38Z blikblum $} +{ $Id$} { ***************************************************************************** * WSButtons.pp * diff -Nru lazarus-0.9.30/lcl/widgetset/wscalendar.pp lazarus-0.9.30.2/lcl/widgetset/wscalendar.pp --- lazarus-0.9.30/lcl/widgetset/wscalendar.pp 2010-08-12 12:49:38.000000000 +0000 +++ lazarus-0.9.30.2/lcl/widgetset/wscalendar.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: wscalendar.pp 27073 2010-08-12 12:49:38Z blikblum $} +{ $Id$} { ***************************************************************************** * WSCalendar.pp * diff -Nru lazarus-0.9.30/lcl/widgetset/wschecklst.pp lazarus-0.9.30.2/lcl/widgetset/wschecklst.pp --- lazarus-0.9.30/lcl/widgetset/wschecklst.pp 2009-04-12 08:46:31.000000000 +0000 +++ lazarus-0.9.30.2/lcl/widgetset/wschecklst.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: wschecklst.pp 19376 2009-04-12 08:46:31Z paul $} +{ $Id$} { ***************************************************************************** * WSCheckLst.pp * diff -Nru lazarus-0.9.30/lcl/widgetset/wscomctrls.pp lazarus-0.9.30.2/lcl/widgetset/wscomctrls.pp --- lazarus-0.9.30/lcl/widgetset/wscomctrls.pp 2010-11-18 09:28:03.000000000 +0000 +++ lazarus-0.9.30.2/lcl/widgetset/wscomctrls.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: wscomctrls.pp 28312 2010-11-18 09:28:03Z paul $} +{ $Id$} { ***************************************************************************** * WSComCtrls.pp * diff -Nru lazarus-0.9.30/lcl/widgetset/wscontrols.pp lazarus-0.9.30.2/lcl/widgetset/wscontrols.pp --- lazarus-0.9.30/lcl/widgetset/wscontrols.pp 2010-11-18 02:19:50.000000000 +0000 +++ lazarus-0.9.30.2/lcl/widgetset/wscontrols.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: wscontrols.pp 28306 2010-11-18 02:19:50Z paul $} +{ $Id$} { ***************************************************************************** * WSControls.pp * diff -Nru lazarus-0.9.30/lcl/widgetset/wsdialogs.pp lazarus-0.9.30.2/lcl/widgetset/wsdialogs.pp --- lazarus-0.9.30/lcl/widgetset/wsdialogs.pp 2010-08-12 12:49:38.000000000 +0000 +++ lazarus-0.9.30.2/lcl/widgetset/wsdialogs.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: wsdialogs.pp 27073 2010-08-12 12:49:38Z blikblum $} +{ $Id$} { ***************************************************************************** * WSDialogs.pp * diff -Nru lazarus-0.9.30/lcl/widgetset/wsextctrls.pp lazarus-0.9.30.2/lcl/widgetset/wsextctrls.pp --- lazarus-0.9.30/lcl/widgetset/wsextctrls.pp 2010-11-18 02:19:50.000000000 +0000 +++ lazarus-0.9.30.2/lcl/widgetset/wsextctrls.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: wsextctrls.pp 28306 2010-11-18 02:19:50Z paul $} +{ $Id$} { ***************************************************************************** * WSExtCtrls.pp * diff -Nru lazarus-0.9.30/lcl/widgetset/wsextdlgs.pp lazarus-0.9.30.2/lcl/widgetset/wsextdlgs.pp --- lazarus-0.9.30/lcl/widgetset/wsextdlgs.pp 2010-02-05 09:19:06.000000000 +0000 +++ lazarus-0.9.30.2/lcl/widgetset/wsextdlgs.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: wsextdlgs.pp 23638 2010-02-05 09:19:06Z paul $} +{ $Id$} { ***************************************************************************** * WSExtDlgs.pp * diff -Nru lazarus-0.9.30/lcl/widgetset/wsforms.pp lazarus-0.9.30.2/lcl/widgetset/wsforms.pp --- lazarus-0.9.30/lcl/widgetset/wsforms.pp 2010-11-18 02:19:50.000000000 +0000 +++ lazarus-0.9.30.2/lcl/widgetset/wsforms.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: wsforms.pp 28306 2010-11-18 02:19:50Z paul $} +{ $Id$} { ***************************************************************************** * WSForms.pp * diff -Nru lazarus-0.9.30/lcl/widgetset/wsgrids.pp lazarus-0.9.30.2/lcl/widgetset/wsgrids.pp --- lazarus-0.9.30/lcl/widgetset/wsgrids.pp 2010-10-02 19:39:41.000000000 +0000 +++ lazarus-0.9.30.2/lcl/widgetset/wsgrids.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: wsgrids.pp 27549 2010-10-02 19:39:41Z jesus $} +{ $Id$} { ***************************************************************************** * WSGrids.pp * diff -Nru lazarus-0.9.30/lcl/widgetset/wsimglist.pp lazarus-0.9.30.2/lcl/widgetset/wsimglist.pp --- lazarus-0.9.30/lcl/widgetset/wsimglist.pp 2009-04-12 08:46:31.000000000 +0000 +++ lazarus-0.9.30.2/lcl/widgetset/wsimglist.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: wsimglist.pp 19376 2009-04-12 08:46:31Z paul $} +{ $Id$} { ***************************************************************************** * WSImgList.pp * diff -Nru lazarus-0.9.30/lcl/widgetset/wslclclasses.pp lazarus-0.9.30.2/lcl/widgetset/wslclclasses.pp --- lazarus-0.9.30/lcl/widgetset/wslclclasses.pp 2009-04-12 08:46:31.000000000 +0000 +++ lazarus-0.9.30.2/lcl/widgetset/wslclclasses.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: wslclclasses.pp 19376 2009-04-12 08:46:31Z paul $} +{ $Id$} { ***************************************************************************** * wslclclasses.pp * diff -Nru lazarus-0.9.30/lcl/widgetset/wsmenus.pp lazarus-0.9.30.2/lcl/widgetset/wsmenus.pp --- lazarus-0.9.30/lcl/widgetset/wsmenus.pp 2009-04-12 08:46:31.000000000 +0000 +++ lazarus-0.9.30.2/lcl/widgetset/wsmenus.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: wsmenus.pp 19376 2009-04-12 08:46:31Z paul $} +{ $Id$} { ***************************************************************************** * WSMenus.pp * diff -Nru lazarus-0.9.30/lcl/widgetset/wspairsplitter.pp lazarus-0.9.30.2/lcl/widgetset/wspairsplitter.pp --- lazarus-0.9.30/lcl/widgetset/wspairsplitter.pp 2009-04-12 08:46:31.000000000 +0000 +++ lazarus-0.9.30.2/lcl/widgetset/wspairsplitter.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: wspairsplitter.pp 19376 2009-04-12 08:46:31Z paul $} +{ $Id$} { ***************************************************************************** * WSPairSplitter.pp * diff -Nru lazarus-0.9.30/lcl/widgetset/wsreferences.pp lazarus-0.9.30.2/lcl/widgetset/wsreferences.pp --- lazarus-0.9.30/lcl/widgetset/wsreferences.pp 2008-11-25 02:29:28.000000000 +0000 +++ lazarus-0.9.30.2/lcl/widgetset/wsreferences.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: wsreferences.pp 17576 2008-11-25 02:29:28Z paul $} +{ $Id$} { ***************************************************************************** * wsreferences.pp * diff -Nru lazarus-0.9.30/lcl/widgetset/wsspin.pp lazarus-0.9.30.2/lcl/widgetset/wsspin.pp --- lazarus-0.9.30/lcl/widgetset/wsspin.pp 2009-04-12 08:46:31.000000000 +0000 +++ lazarus-0.9.30.2/lcl/widgetset/wsspin.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: wsspin.pp 19376 2009-04-12 08:46:31Z paul $} +{ $Id$} { ***************************************************************************** * WSSpin.pp * diff -Nru lazarus-0.9.30/lcl/widgetset/wsstdctrls.pp lazarus-0.9.30.2/lcl/widgetset/wsstdctrls.pp --- lazarus-0.9.30/lcl/widgetset/wsstdctrls.pp 2010-11-18 02:19:50.000000000 +0000 +++ lazarus-0.9.30.2/lcl/widgetset/wsstdctrls.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: wsstdctrls.pp 28306 2010-11-18 02:19:50Z paul $} +{ $Id$} { ***************************************************************************** * WSStdCtrls.pp * @@ -112,6 +112,7 @@ class function GetIndexAtXY(const ACustomListBox: TCustomListBox; X, Y: integer): integer; virtual; class function GetItemIndex(const ACustomListBox: TCustomListBox): integer; virtual; class function GetItemRect(const ACustomListBox: TCustomListBox; Index: integer; var ARect: TRect): boolean; virtual; + class function GetScrollWidth(const ACustomListBox: TCustomListBox): Integer; virtual; class function GetSelCount(const ACustomListBox: TCustomListBox): integer; virtual; class function GetSelected(const ACustomListBox: TCustomListBox; const AIndex: integer): boolean; virtual; class function GetStrings(const ACustomListBox: TCustomListBox): TStrings; virtual; @@ -123,6 +124,7 @@ class procedure SetBorder(const ACustomListBox: TCustomListBox); virtual; class procedure SetColumnCount(const ACustomListBox: TCustomListBox; ACount: Integer); virtual; class procedure SetItemIndex(const ACustomListBox: TCustomListBox; const AIndex: integer); virtual; + class procedure SetScrollWidth(const ACustomListBox: TCustomListBox; const AScrollWidth: Integer); virtual; class procedure SetSelectionMode(const ACustomListBox: TCustomListBox; const AExtendedSelect, AMultiSelect: boolean); virtual; class procedure SetStyle(const ACustomListBox: TCustomListBox); virtual; @@ -298,6 +300,12 @@ Result:=false; end; +class function TWSCustomListBox.GetScrollWidth( + const ACustomListBox: TCustomListBox): Integer; +begin + Result := 0; +end; + class function TWSCustomListBox.GetSelCount(const ACustomListBox: TCustomListBox): integer; begin Result := 0; @@ -341,6 +349,12 @@ begin end; +class procedure TWSCustomListBox.SetScrollWidth( + const ACustomListBox: TCustomListBox; const AScrollWidth: Integer); +begin + +end; + class procedure TWSCustomListBox.SetSelectionMode(const ACustomListBox: TCustomListBox; const AExtendedSelect, AMultiSelect: boolean); begin diff -Nru lazarus-0.9.30/lcl/widgetset/wstoolwin.pp lazarus-0.9.30.2/lcl/widgetset/wstoolwin.pp --- lazarus-0.9.30/lcl/widgetset/wstoolwin.pp 2009-04-09 05:52:37.000000000 +0000 +++ lazarus-0.9.30.2/lcl/widgetset/wstoolwin.pp 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: wstoolwin.pp 19282 2009-04-09 05:52:37Z paul $} +{ $Id$} { ***************************************************************************** * WSToolwin.pp * diff -Nru lazarus-0.9.30/lcl/xmlpropstorage.pas lazarus-0.9.30.2/lcl/xmlpropstorage.pas --- lazarus-0.9.30/lcl/xmlpropstorage.pas 2010-06-05 15:35:41.000000000 +0000 +++ lazarus-0.9.30.2/lcl/xmlpropstorage.pas 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: xmlpropstorage.pas 25922 2010-06-05 15:35:41Z mattias $ } +{ $Id$ } { ***************************************************************************** * * diff -Nru lazarus-0.9.30/localize.bat lazarus-0.9.30.2/localize.bat --- lazarus-0.9.30/localize.bat 2010-09-24 17:01:14.000000000 +0000 +++ lazarus-0.9.30.2/localize.bat 1970-01-01 00:00:00.000000000 +0000 @@ -1,133 +0,0 @@ -@echo off -REM -REM Make sure you have your setings correctly -REM -REM Usage: localize -REM -REM This script should be executed after adding new resource strings and after -REM udating the translated .po files. -REM -REM This script -REM - converts all compiled .rst files to .po files, -REM - updates all translated xx.po files -REM - -REM set LazInstall=C:\lazarus\ -set ArchOS=i386-win32 -set ArchOsWS=%ArchOS%\win32 - -echo. - -REM Compile tools if updatepofiles is missing - -if exist tools\updatepofiles.exe goto SkipTools -echo The updatepofiles tool was not found, compiling tools ... -echo. -cd tools -make updatepofiles.exe -cd.. -if not exist tools\updatepofiles.exe goto Exit_Error - -:SkipTools - -echo Updating language files ... - -echo on - -@REM IDE -@set IDE_RST=units\%ArchOS%\LazarusIDEStrConsts.rst -tools\updatepofiles %IDE_RST% languages\lazaruside.po - -@REM IDEIntf -@set ObjInsp_RST=ideintf\units\%ArchOS%\ObjInspStrConsts.rst -tools\updatepofiles %ObjInsp_RST% ideintf\languages\objinspstrconsts.po - -@REM INSTALLER -@set Installer_RST=tools\install\win\installerstrconsts.rst -if not exist %Installer_RST% goto SkipInstaller -tools\updatepofiles %Installer_RST% languages\installerstrconsts.po -:SkipInstaller - -@REM CodeTools -@set CodeTools_RST=components\codetools\units\%ArchOS%\CodeToolsStrConsts.rst -tools\updatepofiles %CodeTools_RST% components\codetools\languages\codetoolsstrconsts.po - -@REM SynEdit -@set SynEdit_RST=components\synedit\units\%ArchOS%\SynEditStrConst.rst -tools\updatepofiles %SynEdit_RST% components\synedit\languages\synedit.po - -@REM SynDesign -@set SynDesign_RST=components\synedit\units\%ArchOS%\syndesignstringconstants.rst -tools\updatepofiles %SynDesign_RST% components\synedit\languages\syndesign.po - -@REM SynMacroRecorder -@set SynMacroRec_RST=components\synedit\units\%ArchOS%\synmacrorecorder.rst -tools\updatepofiles %SynMacroRec_RST% components\synedit\languages\synmacrorecorder.po - -@REM SynUniHighLighterShellScript -@set SynUniHighLighterShellScript_RST=components\synedit\units\%ArchOS%\synhighlighterunixshellscript.rst -tools\updatepofiles %SynUniHighLighterShellScript_RST% components\synedit\languages\synhighlighterunixshellscript.po - -@REM LCL -@set LCL_RST=lcl\units\%ArchOS%\lclstrconsts.rst -tools\updatepofiles %LCL_RST% lcl\languages\lclstrconsts.po - -@REM LazReport -@set LazReport_RST=components\lazreport\source\lib\%ArchOS%\lr_const.rst -tools\updatepofiles %LazReport_RST% components\lazreport\source\languages\lr_const.po - -@REM MemDS -@set MemDS_RST=components\memds\lib\%ArchOSWS%\frmselectdataset.rst -tools\updatepofiles %MemDS_RST% components\memds\languages\frmselectdataset.po - -@REM Printers -@set Printers_RST=components\printers\design\lib\%ArchOS%\ideprinting.rst -tools\updatepofiles %Printers_RST% components\printers\design\languages\ideprinting.po - -@REM ProjectTemplates -@set ProjectTemplates_RST=components\projecttemplates\lib\%ArchOsWS%\frmtemplatevariables.rst -tools\updatepofiles %ProjectTemplates_RST% components\projecttemplates\languages\frmtemplatevariables.po - -@set ProjectTemplates_RST=components\projecttemplates\lib\%ArchOsWS%\idetemplateproject.rst -tools\updatepofiles %ProjectTemplates_RST% components\projecttemplates\languages\idetemplateproject.po - -@set ProjectTemplates_RST=components\projecttemplates\lib\%ArchOsWS%\projecttemplates.rst -tools\updatepofiles %ProjectTemplates_RST% components\projecttemplates\languages\projecttemplates.po - -@REM TDBF -@set TDBF_RST=components\tdbf\lib\%ArchOSWS%\registerdbf.rst -tools\updatepofiles %TDBF_RST% components\tdbf\languages\registerdbf.po - -@REM TP_IPro -@set TP_IPro_RST=components\turbopower_ipro\units\%ArchOS%\ipconst.rst -tools\updatepofiles %TP_IPro_RST% components\turbopower_ipro\languages\ipconst.po - -@set TP_IPro_RST=components\turbopower_ipro\units\%ArchOS%\iputils.rst -tools\updatepofiles %TP_IPro_RST% components\turbopower_ipro\languages\iputils.po - -@REM LazDataDesktop -@set LazDataDesktop_RST=tools\lazdatadesktop\lib\%ArchOS%\lazdatadeskstr.rst -tools\updatepofiles %LazDataDesktop_RST% tools\lazdatadesktop\languages\lazdatadesktop.po - -@REM LazDoc -@set LazDoc_RST=doceditor\units\%ArchOS%\lazdemsg.rst -tools\updatepofiles %LazDoc_RST% doceditor\languages\lazde.po - -@REM LazExplorer -@set LazExplorer_RST=examples\lazresexplorer\lib\%ArchOS%\reconstsunit.rst -tools\updatepofiles %LazExplorer_RST% examples\lazresexplorer\languages\resexplorer.po - - -@REM LazReport editor sample -@set LREditor_RST=components\lazreport\samples\editor\maincalleditor.rst -if not exist %LREditor_RST% goto SkipLREditor -tools\updatepofiles %LREditor_RST% components\lazreport\samples\editor\languages\calleditorwithpkg.po -:SkipLREditor - -@goto Exit - -:Exit_Error -echo Unable to compile updatepofiles tool - -:Exit - diff -Nru lazarus-0.9.30/localize.sh lazarus-0.9.30.2/localize.sh --- lazarus-0.9.30/localize.sh 2010-09-24 17:01:14.000000000 +0000 +++ lazarus-0.9.30.2/localize.sh 1970-01-01 00:00:00.000000000 +0000 @@ -1,75 +0,0 @@ -#!/usr/bin/env bash -# -# Usage: sh localize.sh -# -# This script should be executed after adding new resource strings and after -# udating the translated .po files. -# -# This script -# - converts all compiled .rst files to .po files, -# - updates all translated xx.po files -# - -# enable for debugging -#set -x -set -e - -if [ ! -x tools/updatepofiles ]; then - cd tools - make updatepofiles - cd - -fi - -if [ "@"$FPCTARGET == "@" ]; then - FPCTARGET=`fpc -iTP`-`fpc -iTO` - if [ $FPCTARGET == "-" ]; then - FPCTARGET="" - fi -fi - -RSTFILES=( - ". lazarusidestrconsts lazaruside" - "ideintf objinspstrconsts" - "components/codetools codetoolsstrconsts" - "components/synedit syneditstrconst synedit" - "components/synedit syndesignstringconstants syndesign" - "components/synedit synmacrorecorder" - "components/synedit synhighlighterunixshellscript" - "components/tdbf registerdbf" - "components/turbopower_ipro ipconst" - "components/turbopower_ipro iputils" - "components/lazreport/samples/editor maincalleditor calleditorwithpkg" - "components/memds frmselectdataset" - "components/printers/design ideprinting" - "components/projecttemplates projecttemplates" - "components/projecttemplates frmtemplatevariables" - "components/projecttemplates idetemplateproject" - "tools/lazdatadesktop lazdatadeskstr lazdatadesktop" - "doceditor lazdemsg lazde" - "examples/lazresexplorer reconstsunit resexplorer" - "lcl lclstrconsts" -) - -set -x - -for idx in ${!RSTFILES[@]}; do - LINE=(${RSTFILES[idx]}) - RSTDIR=${LINE[0]} - RSTFILE=${LINE[1]} - POFILE=${LINE[2]:-$RSTFILE} - - RST=$(find $RSTDIR -name $RSTFILE.rst) - if [ -n "$RST" ]; then - RST=`find $RSTDIR -name $RSTFILE.rst | xargs ls -1t | head -1`; - - if [ -n "$RST" ]; then - POFileFull=$RSTDIR/languages/$POFILE.po - - ./tools/updatepofiles $RST $POFileFull - - fi - fi -done - -exit 0 - diff -Nru lazarus-0.9.30/Makefile lazarus-0.9.30.2/Makefile --- lazarus-0.9.30/Makefile 2011-02-13 11:29:00.000000000 +0000 +++ lazarus-0.9.30.2/Makefile 1970-01-01 00:00:00.000000000 +0000 @@ -1,3753 +0,0 @@ -# -# Don't edit, this file is generated by FPCMake Version 2.0.0 [2010/04/21] -# -default: all -MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian i386-nativent m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-solaris x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded avr-embedded armeb-linux armeb-embedded mipsel-linux -BSDs = freebsd netbsd openbsd darwin -UNIXs = linux $(BSDs) solaris qnx haiku -LIMIT83fs = go32v2 os2 emx watcom -OSNeedsComspecToRunBatch = go32v2 watcom -FORCE: -.PHONY: FORCE -override PATH:=$(patsubst %/,%,$(subst \,/,$(PATH))) -ifneq ($(findstring darwin,$(OSTYPE)),) -inUnix=1 #darwin -SEARCHPATH:=$(filter-out .,$(subst :, ,$(PATH))) -else -ifeq ($(findstring ;,$(PATH)),) -inUnix=1 -SEARCHPATH:=$(filter-out .,$(subst :, ,$(PATH))) -else -SEARCHPATH:=$(subst ;, ,$(PATH)) -endif -endif -SEARCHPATH+=$(patsubst %/,%,$(subst \,/,$(dir $(MAKE)))) -PWD:=$(strip $(wildcard $(addsuffix /pwd.exe,$(SEARCHPATH)))) -ifeq ($(PWD),) -PWD:=$(strip $(wildcard $(addsuffix /pwd,$(SEARCHPATH)))) -ifeq ($(PWD),) -$(error You need the GNU utils package to use this Makefile) -else -PWD:=$(firstword $(PWD)) -SRCEXEEXT= -endif -else -PWD:=$(firstword $(PWD)) -SRCEXEEXT=.exe -endif -ifndef inUnix -ifeq ($(OS),Windows_NT) -inWinNT=1 -else -ifdef OS2_SHELL -inOS2=1 -endif -endif -else -ifneq ($(findstring cygdrive,$(PATH)),) -inCygWin=1 -endif -endif -ifdef inUnix -SRCBATCHEXT=.sh -else -ifdef inOS2 -SRCBATCHEXT=.cmd -else -SRCBATCHEXT=.bat -endif -endif -ifdef COMSPEC -ifneq ($(findstring $(OS_SOURCE),$(OSNeedsComspecToRunBatch)),) -ifndef RUNBATCH -RUNBATCH=$(COMSPEC) /C -endif -endif -endif -ifdef inUnix -PATHSEP=/ -else -PATHSEP:=$(subst /,\,/) -ifdef inCygWin -PATHSEP=/ -endif -endif -ifdef PWD -BASEDIR:=$(subst \,/,$(shell $(PWD))) -ifdef inCygWin -ifneq ($(findstring /cygdrive/,$(BASEDIR)),) -BASENODIR:=$(patsubst /cygdrive%,%,$(BASEDIR)) -BASEDRIVE:=$(firstword $(subst /, ,$(BASENODIR))) -BASEDIR:=$(subst /cygdrive/$(BASEDRIVE)/,$(BASEDRIVE):/,$(BASEDIR)) -endif -endif -else -BASEDIR=. -endif -ifdef inOS2 -ifndef ECHO -ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(ECHO),) -ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(ECHO),) -ECHO=echo -else -ECHO:=$(firstword $(ECHO)) -endif -else -ECHO:=$(firstword $(ECHO)) -endif -endif -export ECHO -endif -ifndef FPC -ifdef PP -FPC=$(PP) -endif -endif -ifndef FPC -FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH)))) -ifneq ($(FPCPROG),) -FPCPROG:=$(firstword $(FPCPROG)) -ifneq ($(CPU_TARGET),) -FPC:=$(shell $(FPCPROG) -P$(CPU_TARGET) -PB) -else -FPC:=$(shell $(FPCPROG) -PB) -endif -ifneq ($(findstring Error,$(FPC)),) -override FPC=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH))))) -else -ifeq ($(strip $(wildcard $(FPC))),) -FPC:=$(firstword $(FPCPROG)) -endif -endif -else -override FPC=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH))))) -endif -endif -override FPC:=$(subst $(SRCEXEEXT),,$(FPC)) -override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT) -FOUNDFPC:=$(strip $(wildcard $(FPC))) -ifeq ($(FOUNDFPC),) -FOUNDFPC=$(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH)))) -ifeq ($(FOUNDFPC),) -$(error Compiler $(FPC) not found) -endif -endif -ifndef FPC_COMPILERINFO -FPC_COMPILERINFO:=$(shell $(FPC) -iVSPTPSOTO) -endif -ifndef FPC_VERSION -FPC_VERSION:=$(word 1,$(FPC_COMPILERINFO)) -endif -export FPC FPC_VERSION FPC_COMPILERINFO -unexport CHECKDEPEND ALLDEPENDENCIES -ifndef CPU_TARGET -ifdef CPU_TARGET_DEFAULT -CPU_TARGET=$(CPU_TARGET_DEFAULT) -endif -endif -ifndef OS_TARGET -ifdef OS_TARGET_DEFAULT -OS_TARGET=$(OS_TARGET_DEFAULT) -endif -endif -ifneq ($(words $(FPC_COMPILERINFO)),5) -FPC_COMPILERINFO+=$(shell $(FPC) -iSP) -FPC_COMPILERINFO+=$(shell $(FPC) -iTP) -FPC_COMPILERINFO+=$(shell $(FPC) -iSO) -FPC_COMPILERINFO+=$(shell $(FPC) -iTO) -endif -ifndef CPU_SOURCE -CPU_SOURCE:=$(word 2,$(FPC_COMPILERINFO)) -endif -ifndef CPU_TARGET -CPU_TARGET:=$(word 3,$(FPC_COMPILERINFO)) -endif -ifndef OS_SOURCE -OS_SOURCE:=$(word 4,$(FPC_COMPILERINFO)) -endif -ifndef OS_TARGET -OS_TARGET:=$(word 5,$(FPC_COMPILERINFO)) -endif -FULL_TARGET=$(CPU_TARGET)-$(OS_TARGET) -FULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE) -ifeq ($(CPU_TARGET),armeb) -ARCH=arm -override FPCOPT+=-Cb -else -ifeq ($(CPU_TARGET),armel) -ARCH=arm -override FPCOPT+=-CaEABI -else -ARCH=$(CPU_TARGET) -endif -endif -ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),) -TARGETSUFFIX=$(OS_TARGET) -SOURCESUFFIX=$(OS_SOURCE) -else -TARGETSUFFIX=$(FULL_TARGET) -SOURCESUFFIX=$(FULL_SOURCE) -endif -ifneq ($(FULL_TARGET),$(FULL_SOURCE)) -CROSSCOMPILE=1 -endif -ifeq ($(findstring makefile,$(MAKECMDGOALS)),) -ifeq ($(findstring $(FULL_TARGET),$(MAKEFILETARGETS)),) -$(error The Makefile doesn't support target $(FULL_TARGET), please run fpcmake first) -endif -endif -ifneq ($(findstring $(OS_TARGET),$(BSDs)),) -BSDhier=1 -endif -ifeq ($(OS_TARGET),linux) -linuxHier=1 -endif -export OS_TARGET OS_SOURCE ARCH CPU_TARGET CPU_SOURCE FULL_TARGET FULL_SOURCE TARGETSUFFIX SOURCESUFFIX CROSSCOMPILE -ifdef FPCDIR -override FPCDIR:=$(subst \,/,$(FPCDIR)) -ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),) -override FPCDIR=wrong -endif -else -override FPCDIR=wrong -endif -ifdef DEFAULT_FPCDIR -ifeq ($(FPCDIR),wrong) -override FPCDIR:=$(subst \,/,$(DEFAULT_FPCDIR)) -ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),) -override FPCDIR=wrong -endif -endif -endif -ifeq ($(FPCDIR),wrong) -ifdef inUnix -override FPCDIR=/usr/local/lib/fpc/$(FPC_VERSION) -ifeq ($(wildcard $(FPCDIR)/units),) -override FPCDIR=/usr/lib/fpc/$(FPC_VERSION) -endif -else -override FPCDIR:=$(subst /$(FPC),,$(firstword $(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH)))))) -override FPCDIR:=$(FPCDIR)/.. -ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),) -override FPCDIR:=$(FPCDIR)/.. -ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),) -override FPCDIR:=$(BASEDIR) -ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),) -override FPCDIR=c:/pp -endif -endif -endif -endif -endif -ifndef CROSSBINDIR -CROSSBINDIR:=$(wildcard $(FPCDIR)/bin/$(TARGETSUFFIX)) -endif -ifeq ($(OS_TARGET),darwin) -ifeq ($(OS_SOURCE),darwin) -DARWIN2DARWIN=1 -endif -endif -ifndef BINUTILSPREFIX -ifndef CROSSBINDIR -ifdef CROSSCOMPILE -ifndef DARWIN2DARWIN -BINUTILSPREFIX=$(CPU_TARGET)-$(OS_TARGET)- -endif -endif -endif -endif -UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX)) -ifeq ($(UNITSDIR),) -UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET)) -endif -PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra) -override PACKAGE_NAME=lazarus -override PACKAGE_VERSION=$(IDEVERSION) -RCPP?=$(strip $(firstword cpp$(SRCEXEEXT))) -LAZARUS_INSTALL_DIR=$(INSTALL_PREFIX)/share/lazarus -INSTALL_MAN_DIR=$(INSTALL_PREFIX)/share/man -ifneq ($(findstring $(OS_TARGET),win32 win64),) -LAZARUS_INSTALL_DIR=C:\lazarus -endif -ifneq ($(findstring $(OS_TARGET),freebsd),) -LAZARUS_INSTALL_DIR=/usr/local/lazarus -endif -ifneq ($(findstring $(OS_TARGET),win32 win64),) -IDEVERSION=$(shell .\tools\install\get_lazarus_version.bat) -else -IDEVERSION=$(shell ./tools/install/get_lazarus_version.sh) -endif -ifeq ($(FULL_TARGET),i386-linux) -override TARGET_DIRS+=lcl packager/registration ideintf packager components -endif -ifeq ($(FULL_TARGET),i386-go32v2) -override TARGET_DIRS+=lcl packager/registration ideintf packager components -endif -ifeq ($(FULL_TARGET),i386-win32) -override TARGET_DIRS+=lcl packager/registration ideintf packager components -endif -ifeq ($(FULL_TARGET),i386-os2) -override TARGET_DIRS+=lcl packager/registration ideintf packager components -endif -ifeq ($(FULL_TARGET),i386-freebsd) -override TARGET_DIRS+=lcl packager/registration ideintf packager components -endif -ifeq ($(FULL_TARGET),i386-beos) -override TARGET_DIRS+=lcl packager/registration ideintf packager components -endif -ifeq ($(FULL_TARGET),i386-haiku) -override TARGET_DIRS+=lcl packager/registration ideintf packager components -endif -ifeq ($(FULL_TARGET),i386-netbsd) -override TARGET_DIRS+=lcl packager/registration ideintf packager components -endif -ifeq ($(FULL_TARGET),i386-solaris) -override TARGET_DIRS+=lcl packager/registration ideintf packager components -endif -ifeq ($(FULL_TARGET),i386-qnx) -override TARGET_DIRS+=lcl packager/registration ideintf packager components -endif -ifeq ($(FULL_TARGET),i386-netware) -override TARGET_DIRS+=lcl packager/registration ideintf packager components -endif -ifeq ($(FULL_TARGET),i386-openbsd) -override TARGET_DIRS+=lcl packager/registration ideintf packager components -endif -ifeq ($(FULL_TARGET),i386-wdosx) -override TARGET_DIRS+=lcl packager/registration ideintf packager components -endif -ifeq ($(FULL_TARGET),i386-darwin) -override TARGET_DIRS+=lcl packager/registration ideintf packager components -endif -ifeq ($(FULL_TARGET),i386-emx) -override TARGET_DIRS+=lcl packager/registration ideintf packager components -endif -ifeq ($(FULL_TARGET),i386-watcom) -override TARGET_DIRS+=lcl packager/registration ideintf packager components -endif -ifeq ($(FULL_TARGET),i386-netwlibc) -override TARGET_DIRS+=lcl packager/registration ideintf packager components -endif -ifeq ($(FULL_TARGET),i386-wince) -override TARGET_DIRS+=lcl packager/registration ideintf packager components -endif -ifeq ($(FULL_TARGET),i386-embedded) -override TARGET_DIRS+=lcl packager/registration ideintf packager components -endif -ifeq ($(FULL_TARGET),i386-symbian) -override TARGET_DIRS+=lcl packager/registration ideintf packager components -endif -ifeq ($(FULL_TARGET),i386-nativent) -override TARGET_DIRS+=lcl packager/registration ideintf packager components -endif -ifeq ($(FULL_TARGET),m68k-linux) -override TARGET_DIRS+=lcl packager/registration ideintf packager components -endif -ifeq ($(FULL_TARGET),m68k-freebsd) -override TARGET_DIRS+=lcl packager/registration ideintf packager components -endif -ifeq ($(FULL_TARGET),m68k-netbsd) -override TARGET_DIRS+=lcl packager/registration ideintf packager components -endif -ifeq ($(FULL_TARGET),m68k-amiga) -override TARGET_DIRS+=lcl packager/registration ideintf packager components -endif -ifeq ($(FULL_TARGET),m68k-atari) -override TARGET_DIRS+=lcl packager/registration ideintf packager components -endif -ifeq ($(FULL_TARGET),m68k-openbsd) -override TARGET_DIRS+=lcl packager/registration ideintf packager components -endif -ifeq ($(FULL_TARGET),m68k-palmos) -override TARGET_DIRS+=lcl packager/registration ideintf packager components -endif -ifeq ($(FULL_TARGET),m68k-embedded) -override TARGET_DIRS+=lcl packager/registration ideintf packager components -endif -ifeq ($(FULL_TARGET),powerpc-linux) -override TARGET_DIRS+=lcl packager/registration ideintf packager components -endif -ifeq ($(FULL_TARGET),powerpc-netbsd) -override TARGET_DIRS+=lcl packager/registration ideintf packager components -endif -ifeq ($(FULL_TARGET),powerpc-amiga) -override TARGET_DIRS+=lcl packager/registration ideintf packager components -endif -ifeq ($(FULL_TARGET),powerpc-macos) -override TARGET_DIRS+=lcl packager/registration ideintf packager components -endif -ifeq ($(FULL_TARGET),powerpc-darwin) -override TARGET_DIRS+=lcl packager/registration ideintf packager components -endif -ifeq ($(FULL_TARGET),powerpc-morphos) -override TARGET_DIRS+=lcl packager/registration ideintf packager components -endif -ifeq ($(FULL_TARGET),powerpc-embedded) -override TARGET_DIRS+=lcl packager/registration ideintf packager components -endif -ifeq ($(FULL_TARGET),sparc-linux) -override TARGET_DIRS+=lcl packager/registration ideintf packager components -endif -ifeq ($(FULL_TARGET),sparc-netbsd) -override TARGET_DIRS+=lcl packager/registration ideintf packager components -endif -ifeq ($(FULL_TARGET),sparc-solaris) -override TARGET_DIRS+=lcl packager/registration ideintf packager components -endif -ifeq ($(FULL_TARGET),sparc-embedded) -override TARGET_DIRS+=lcl packager/registration ideintf packager components -endif -ifeq ($(FULL_TARGET),x86_64-linux) -override TARGET_DIRS+=lcl packager/registration ideintf packager components -endif -ifeq ($(FULL_TARGET),x86_64-freebsd) -override TARGET_DIRS+=lcl packager/registration ideintf packager components -endif -ifeq ($(FULL_TARGET),x86_64-solaris) -override TARGET_DIRS+=lcl packager/registration ideintf packager components -endif -ifeq ($(FULL_TARGET),x86_64-darwin) -override TARGET_DIRS+=lcl packager/registration ideintf packager components -endif -ifeq ($(FULL_TARGET),x86_64-win64) -override TARGET_DIRS+=lcl packager/registration ideintf packager components -endif -ifeq ($(FULL_TARGET),x86_64-embedded) -override TARGET_DIRS+=lcl packager/registration ideintf packager components -endif -ifeq ($(FULL_TARGET),arm-linux) -override TARGET_DIRS+=lcl packager/registration ideintf packager components -endif -ifeq ($(FULL_TARGET),arm-palmos) -override TARGET_DIRS+=lcl packager/registration ideintf packager components -endif -ifeq ($(FULL_TARGET),arm-darwin) -override TARGET_DIRS+=lcl packager/registration ideintf packager components -endif -ifeq ($(FULL_TARGET),arm-wince) -override TARGET_DIRS+=lcl packager/registration ideintf packager components -endif -ifeq ($(FULL_TARGET),arm-gba) -override TARGET_DIRS+=lcl packager/registration ideintf packager components -endif -ifeq ($(FULL_TARGET),arm-nds) -override TARGET_DIRS+=lcl packager/registration ideintf packager components -endif -ifeq ($(FULL_TARGET),arm-embedded) -override TARGET_DIRS+=lcl packager/registration ideintf packager components -endif -ifeq ($(FULL_TARGET),arm-symbian) -override TARGET_DIRS+=lcl packager/registration ideintf packager components -endif -ifeq ($(FULL_TARGET),powerpc64-linux) -override TARGET_DIRS+=lcl packager/registration ideintf packager components -endif -ifeq ($(FULL_TARGET),powerpc64-darwin) -override TARGET_DIRS+=lcl packager/registration ideintf packager components -endif -ifeq ($(FULL_TARGET),powerpc64-embedded) -override TARGET_DIRS+=lcl packager/registration ideintf packager components -endif -ifeq ($(FULL_TARGET),avr-embedded) -override TARGET_DIRS+=lcl packager/registration ideintf packager components -endif -ifeq ($(FULL_TARGET),armeb-linux) -override TARGET_DIRS+=lcl packager/registration ideintf packager components -endif -ifeq ($(FULL_TARGET),armeb-embedded) -override TARGET_DIRS+=lcl packager/registration ideintf packager components -endif -ifeq ($(FULL_TARGET),mipsel-linux) -override TARGET_DIRS+=lcl packager/registration ideintf packager components -endif -ifeq ($(FULL_TARGET),i386-linux) -override TARGET_PROGRAMS+=lazarus startlazarus -endif -ifeq ($(FULL_TARGET),i386-go32v2) -override TARGET_PROGRAMS+=lazarus startlazarus -endif -ifeq ($(FULL_TARGET),i386-win32) -override TARGET_PROGRAMS+=lazarus startlazarus -endif -ifeq ($(FULL_TARGET),i386-os2) -override TARGET_PROGRAMS+=lazarus startlazarus -endif -ifeq ($(FULL_TARGET),i386-freebsd) -override TARGET_PROGRAMS+=lazarus startlazarus -endif -ifeq ($(FULL_TARGET),i386-beos) -override TARGET_PROGRAMS+=lazarus startlazarus -endif -ifeq ($(FULL_TARGET),i386-haiku) -override TARGET_PROGRAMS+=lazarus startlazarus -endif -ifeq ($(FULL_TARGET),i386-netbsd) -override TARGET_PROGRAMS+=lazarus startlazarus -endif -ifeq ($(FULL_TARGET),i386-solaris) -override TARGET_PROGRAMS+=lazarus startlazarus -endif -ifeq ($(FULL_TARGET),i386-qnx) -override TARGET_PROGRAMS+=lazarus startlazarus -endif -ifeq ($(FULL_TARGET),i386-netware) -override TARGET_PROGRAMS+=lazarus startlazarus -endif -ifeq ($(FULL_TARGET),i386-openbsd) -override TARGET_PROGRAMS+=lazarus startlazarus -endif -ifeq ($(FULL_TARGET),i386-wdosx) -override TARGET_PROGRAMS+=lazarus startlazarus -endif -ifeq ($(FULL_TARGET),i386-darwin) -override TARGET_PROGRAMS+=lazarus startlazarus -endif -ifeq ($(FULL_TARGET),i386-emx) -override TARGET_PROGRAMS+=lazarus startlazarus -endif -ifeq ($(FULL_TARGET),i386-watcom) -override TARGET_PROGRAMS+=lazarus startlazarus -endif -ifeq ($(FULL_TARGET),i386-netwlibc) -override TARGET_PROGRAMS+=lazarus startlazarus -endif -ifeq ($(FULL_TARGET),i386-wince) -override TARGET_PROGRAMS+=lazarus startlazarus -endif -ifeq ($(FULL_TARGET),i386-embedded) -override TARGET_PROGRAMS+=lazarus startlazarus -endif -ifeq ($(FULL_TARGET),i386-symbian) -override TARGET_PROGRAMS+=lazarus startlazarus -endif -ifeq ($(FULL_TARGET),i386-nativent) -override TARGET_PROGRAMS+=lazarus startlazarus -endif -ifeq ($(FULL_TARGET),m68k-linux) -override TARGET_PROGRAMS+=lazarus startlazarus -endif -ifeq ($(FULL_TARGET),m68k-freebsd) -override TARGET_PROGRAMS+=lazarus startlazarus -endif -ifeq ($(FULL_TARGET),m68k-netbsd) -override TARGET_PROGRAMS+=lazarus startlazarus -endif -ifeq ($(FULL_TARGET),m68k-amiga) -override TARGET_PROGRAMS+=lazarus startlazarus -endif -ifeq ($(FULL_TARGET),m68k-atari) -override TARGET_PROGRAMS+=lazarus startlazarus -endif -ifeq ($(FULL_TARGET),m68k-openbsd) -override TARGET_PROGRAMS+=lazarus startlazarus -endif -ifeq ($(FULL_TARGET),m68k-palmos) -override TARGET_PROGRAMS+=lazarus startlazarus -endif -ifeq ($(FULL_TARGET),m68k-embedded) -override TARGET_PROGRAMS+=lazarus startlazarus -endif -ifeq ($(FULL_TARGET),powerpc-linux) -override TARGET_PROGRAMS+=lazarus startlazarus -endif -ifeq ($(FULL_TARGET),powerpc-netbsd) -override TARGET_PROGRAMS+=lazarus startlazarus -endif -ifeq ($(FULL_TARGET),powerpc-amiga) -override TARGET_PROGRAMS+=lazarus startlazarus -endif -ifeq ($(FULL_TARGET),powerpc-macos) -override TARGET_PROGRAMS+=lazarus startlazarus -endif -ifeq ($(FULL_TARGET),powerpc-darwin) -override TARGET_PROGRAMS+=lazarus startlazarus -endif -ifeq ($(FULL_TARGET),powerpc-morphos) -override TARGET_PROGRAMS+=lazarus startlazarus -endif -ifeq ($(FULL_TARGET),powerpc-embedded) -override TARGET_PROGRAMS+=lazarus startlazarus -endif -ifeq ($(FULL_TARGET),sparc-linux) -override TARGET_PROGRAMS+=lazarus startlazarus -endif -ifeq ($(FULL_TARGET),sparc-netbsd) -override TARGET_PROGRAMS+=lazarus startlazarus -endif -ifeq ($(FULL_TARGET),sparc-solaris) -override TARGET_PROGRAMS+=lazarus startlazarus -endif -ifeq ($(FULL_TARGET),sparc-embedded) -override TARGET_PROGRAMS+=lazarus startlazarus -endif -ifeq ($(FULL_TARGET),x86_64-linux) -override TARGET_PROGRAMS+=lazarus startlazarus -endif -ifeq ($(FULL_TARGET),x86_64-freebsd) -override TARGET_PROGRAMS+=lazarus startlazarus -endif -ifeq ($(FULL_TARGET),x86_64-solaris) -override TARGET_PROGRAMS+=lazarus startlazarus -endif -ifeq ($(FULL_TARGET),x86_64-darwin) -override TARGET_PROGRAMS+=lazarus startlazarus -endif -ifeq ($(FULL_TARGET),x86_64-win64) -override TARGET_PROGRAMS+=lazarus startlazarus -endif -ifeq ($(FULL_TARGET),x86_64-embedded) -override TARGET_PROGRAMS+=lazarus startlazarus -endif -ifeq ($(FULL_TARGET),arm-linux) -override TARGET_PROGRAMS+=lazarus startlazarus -endif -ifeq ($(FULL_TARGET),arm-palmos) -override TARGET_PROGRAMS+=lazarus startlazarus -endif -ifeq ($(FULL_TARGET),arm-darwin) -override TARGET_PROGRAMS+=lazarus startlazarus -endif -ifeq ($(FULL_TARGET),arm-wince) -override TARGET_PROGRAMS+=lazarus startlazarus -endif -ifeq ($(FULL_TARGET),arm-gba) -override TARGET_PROGRAMS+=lazarus startlazarus -endif -ifeq ($(FULL_TARGET),arm-nds) -override TARGET_PROGRAMS+=lazarus startlazarus -endif -ifeq ($(FULL_TARGET),arm-embedded) -override TARGET_PROGRAMS+=lazarus startlazarus -endif -ifeq ($(FULL_TARGET),arm-symbian) -override TARGET_PROGRAMS+=lazarus startlazarus -endif -ifeq ($(FULL_TARGET),powerpc64-linux) -override TARGET_PROGRAMS+=lazarus startlazarus -endif -ifeq ($(FULL_TARGET),powerpc64-darwin) -override TARGET_PROGRAMS+=lazarus startlazarus -endif -ifeq ($(FULL_TARGET),powerpc64-embedded) -override TARGET_PROGRAMS+=lazarus startlazarus -endif -ifeq ($(FULL_TARGET),avr-embedded) -override TARGET_PROGRAMS+=lazarus startlazarus -endif -ifeq ($(FULL_TARGET),armeb-linux) -override TARGET_PROGRAMS+=lazarus startlazarus -endif -ifeq ($(FULL_TARGET),armeb-embedded) -override TARGET_PROGRAMS+=lazarus startlazarus -endif -ifeq ($(FULL_TARGET),mipsel-linux) -override TARGET_PROGRAMS+=lazarus startlazarus -endif -ifeq ($(FULL_TARGET),i386-linux) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),i386-go32v2) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),i386-win32) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),i386-os2) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),i386-freebsd) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),i386-beos) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),i386-haiku) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),i386-netbsd) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),i386-solaris) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),i386-qnx) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),i386-netware) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),i386-openbsd) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),i386-wdosx) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),i386-darwin) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),i386-emx) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),i386-watcom) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),i386-netwlibc) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),i386-wince) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),i386-embedded) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),i386-symbian) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),i386-nativent) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),m68k-linux) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),m68k-freebsd) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),m68k-netbsd) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),m68k-amiga) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),m68k-atari) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),m68k-openbsd) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),m68k-palmos) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),m68k-embedded) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),powerpc-linux) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),powerpc-netbsd) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),powerpc-amiga) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),powerpc-macos) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),powerpc-darwin) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),powerpc-morphos) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),powerpc-embedded) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),sparc-linux) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),sparc-netbsd) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),sparc-solaris) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),sparc-embedded) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),x86_64-linux) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),x86_64-freebsd) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),x86_64-solaris) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),x86_64-darwin) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),x86_64-win64) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),x86_64-embedded) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),arm-linux) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),arm-palmos) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),arm-darwin) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),arm-wince) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),arm-gba) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),arm-nds) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),arm-embedded) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),arm-symbian) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),powerpc64-linux) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),powerpc64-darwin) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),powerpc64-embedded) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),avr-embedded) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),armeb-linux) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),armeb-embedded) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),mipsel-linux) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),i386-linux) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT)) $(wildcard *.lfm) -endif -ifeq ($(FULL_TARGET),i386-go32v2) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT)) $(wildcard *.lfm) -endif -ifeq ($(FULL_TARGET),i386-win32) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT)) $(wildcard *.lfm) -endif -ifeq ($(FULL_TARGET),i386-os2) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT)) $(wildcard *.lfm) -endif -ifeq ($(FULL_TARGET),i386-freebsd) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT)) $(wildcard *.lfm) -endif -ifeq ($(FULL_TARGET),i386-beos) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT)) $(wildcard *.lfm) -endif -ifeq ($(FULL_TARGET),i386-haiku) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT)) $(wildcard *.lfm) -endif -ifeq ($(FULL_TARGET),i386-netbsd) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT)) $(wildcard *.lfm) -endif -ifeq ($(FULL_TARGET),i386-solaris) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT)) $(wildcard *.lfm) -endif -ifeq ($(FULL_TARGET),i386-qnx) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT)) $(wildcard *.lfm) -endif -ifeq ($(FULL_TARGET),i386-netware) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT)) $(wildcard *.lfm) -endif -ifeq ($(FULL_TARGET),i386-openbsd) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT)) $(wildcard *.lfm) -endif -ifeq ($(FULL_TARGET),i386-wdosx) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT)) $(wildcard *.lfm) -endif -ifeq ($(FULL_TARGET),i386-darwin) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT)) $(wildcard *.lfm) -endif -ifeq ($(FULL_TARGET),i386-emx) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT)) $(wildcard *.lfm) -endif -ifeq ($(FULL_TARGET),i386-watcom) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT)) $(wildcard *.lfm) -endif -ifeq ($(FULL_TARGET),i386-netwlibc) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT)) $(wildcard *.lfm) -endif -ifeq ($(FULL_TARGET),i386-wince) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT)) $(wildcard *.lfm) -endif -ifeq ($(FULL_TARGET),i386-embedded) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT)) $(wildcard *.lfm) -endif -ifeq ($(FULL_TARGET),i386-symbian) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT)) $(wildcard *.lfm) -endif -ifeq ($(FULL_TARGET),i386-nativent) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT)) $(wildcard *.lfm) -endif -ifeq ($(FULL_TARGET),m68k-linux) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT)) $(wildcard *.lfm) -endif -ifeq ($(FULL_TARGET),m68k-freebsd) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT)) $(wildcard *.lfm) -endif -ifeq ($(FULL_TARGET),m68k-netbsd) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT)) $(wildcard *.lfm) -endif -ifeq ($(FULL_TARGET),m68k-amiga) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT)) $(wildcard *.lfm) -endif -ifeq ($(FULL_TARGET),m68k-atari) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT)) $(wildcard *.lfm) -endif -ifeq ($(FULL_TARGET),m68k-openbsd) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT)) $(wildcard *.lfm) -endif -ifeq ($(FULL_TARGET),m68k-palmos) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT)) $(wildcard *.lfm) -endif -ifeq ($(FULL_TARGET),m68k-embedded) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT)) $(wildcard *.lfm) -endif -ifeq ($(FULL_TARGET),powerpc-linux) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT)) $(wildcard *.lfm) -endif -ifeq ($(FULL_TARGET),powerpc-netbsd) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT)) $(wildcard *.lfm) -endif -ifeq ($(FULL_TARGET),powerpc-amiga) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT)) $(wildcard *.lfm) -endif -ifeq ($(FULL_TARGET),powerpc-macos) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT)) $(wildcard *.lfm) -endif -ifeq ($(FULL_TARGET),powerpc-darwin) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT)) $(wildcard *.lfm) -endif -ifeq ($(FULL_TARGET),powerpc-morphos) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT)) $(wildcard *.lfm) -endif -ifeq ($(FULL_TARGET),powerpc-embedded) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT)) $(wildcard *.lfm) -endif -ifeq ($(FULL_TARGET),sparc-linux) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT)) $(wildcard *.lfm) -endif -ifeq ($(FULL_TARGET),sparc-netbsd) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT)) $(wildcard *.lfm) -endif -ifeq ($(FULL_TARGET),sparc-solaris) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT)) $(wildcard *.lfm) -endif -ifeq ($(FULL_TARGET),sparc-embedded) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT)) $(wildcard *.lfm) -endif -ifeq ($(FULL_TARGET),x86_64-linux) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT)) $(wildcard *.lfm) -endif -ifeq ($(FULL_TARGET),x86_64-freebsd) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT)) $(wildcard *.lfm) -endif -ifeq ($(FULL_TARGET),x86_64-solaris) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT)) $(wildcard *.lfm) -endif -ifeq ($(FULL_TARGET),x86_64-darwin) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT)) $(wildcard *.lfm) -endif -ifeq ($(FULL_TARGET),x86_64-win64) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT)) $(wildcard *.lfm) -endif -ifeq ($(FULL_TARGET),x86_64-embedded) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT)) $(wildcard *.lfm) -endif -ifeq ($(FULL_TARGET),arm-linux) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT)) $(wildcard *.lfm) -endif -ifeq ($(FULL_TARGET),arm-palmos) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT)) $(wildcard *.lfm) -endif -ifeq ($(FULL_TARGET),arm-darwin) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT)) $(wildcard *.lfm) -endif -ifeq ($(FULL_TARGET),arm-wince) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT)) $(wildcard *.lfm) -endif -ifeq ($(FULL_TARGET),arm-gba) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT)) $(wildcard *.lfm) -endif -ifeq ($(FULL_TARGET),arm-nds) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT)) $(wildcard *.lfm) -endif -ifeq ($(FULL_TARGET),arm-embedded) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT)) $(wildcard *.lfm) -endif -ifeq ($(FULL_TARGET),arm-symbian) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT)) $(wildcard *.lfm) -endif -ifeq ($(FULL_TARGET),powerpc64-linux) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT)) $(wildcard *.lfm) -endif -ifeq ($(FULL_TARGET),powerpc64-darwin) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT)) $(wildcard *.lfm) -endif -ifeq ($(FULL_TARGET),powerpc64-embedded) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT)) $(wildcard *.lfm) -endif -ifeq ($(FULL_TARGET),avr-embedded) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT)) $(wildcard *.lfm) -endif -ifeq ($(FULL_TARGET),armeb-linux) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT)) $(wildcard *.lfm) -endif -ifeq ($(FULL_TARGET),armeb-embedded) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT)) $(wildcard *.lfm) -endif -ifeq ($(FULL_TARGET),mipsel-linux) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT)) $(wildcard *.lfm) -endif -override INSTALL_BASEDIR=share/lazarus -override INSTALL_FPCPACKAGE=n -override DIST_DESTDIR=$(BASEDIR)/dist -ifdef REQUIRE_UNITSDIR -override UNITSDIR+=$(REQUIRE_UNITSDIR) -endif -ifdef REQUIRE_PACKAGESDIR -override PACKAGESDIR+=$(REQUIRE_PACKAGESDIR) -endif -ifdef ZIPINSTALL -ifneq ($(findstring $(OS_TARGET),$(UNIXs)),) -UNIXHier=1 -endif -else -ifneq ($(findstring $(OS_SOURCE),$(UNIXs)),) -UNIXHier=1 -endif -endif -ifndef INSTALL_PREFIX -ifdef PREFIX -INSTALL_PREFIX=$(PREFIX) -endif -endif -ifndef INSTALL_PREFIX -ifdef UNIXHier -INSTALL_PREFIX=/usr/local -else -ifdef INSTALL_FPCPACKAGE -INSTALL_BASEDIR:=/pp -else -INSTALL_BASEDIR:=/$(PACKAGE_NAME) -endif -endif -endif -export INSTALL_PREFIX -ifdef INSTALL_FPCSUBDIR -export INSTALL_FPCSUBDIR -endif -ifndef DIST_DESTDIR -DIST_DESTDIR:=$(BASEDIR) -endif -export DIST_DESTDIR -ifndef COMPILER_UNITTARGETDIR -ifdef PACKAGEDIR_MAIN -COMPILER_UNITTARGETDIR=$(PACKAGEDIR_MAIN)/units/$(TARGETSUFFIX) -else -COMPILER_UNITTARGETDIR=units/$(TARGETSUFFIX) -endif -endif -ifndef COMPILER_TARGETDIR -COMPILER_TARGETDIR=. -endif -ifndef INSTALL_BASEDIR -ifdef UNIXHier -ifdef INSTALL_FPCPACKAGE -INSTALL_BASEDIR:=$(INSTALL_PREFIX)/lib/fpc/$(FPC_VERSION) -else -INSTALL_BASEDIR:=$(INSTALL_PREFIX)/lib/$(PACKAGE_NAME) -endif -else -INSTALL_BASEDIR:=$(INSTALL_PREFIX) -endif -endif -ifndef INSTALL_BINDIR -ifdef UNIXHier -INSTALL_BINDIR:=$(INSTALL_PREFIX)/bin -else -INSTALL_BINDIR:=$(INSTALL_BASEDIR)/bin -ifdef INSTALL_FPCPACKAGE -ifdef CROSSCOMPILE -ifdef CROSSINSTALL -INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(SOURCESUFFIX) -else -INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(TARGETSUFFIX) -endif -else -INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(TARGETSUFFIX) -endif -endif -endif -endif -ifndef INSTALL_UNITDIR -INSTALL_UNITDIR:=$(INSTALL_BASEDIR)/units/$(TARGETSUFFIX) -ifdef INSTALL_FPCPACKAGE -ifdef PACKAGE_NAME -INSTALL_UNITDIR:=$(INSTALL_UNITDIR)/$(PACKAGE_NAME) -endif -endif -endif -ifndef INSTALL_LIBDIR -ifdef UNIXHier -INSTALL_LIBDIR:=$(INSTALL_PREFIX)/lib -else -INSTALL_LIBDIR:=$(INSTALL_UNITDIR) -endif -endif -ifndef INSTALL_SOURCEDIR -ifdef UNIXHier -ifdef BSDhier -SRCPREFIXDIR=share/src -else -ifdef linuxHier -SRCPREFIXDIR=share/src -else -SRCPREFIXDIR=src -endif -endif -ifdef INSTALL_FPCPACKAGE -ifdef INSTALL_FPCSUBDIR -INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/fpc-$(FPC_VERSION)/$(INSTALL_FPCSUBDIR)/$(PACKAGE_NAME) -else -INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/fpc-$(FPC_VERSION)/$(PACKAGE_NAME) -endif -else -INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION) -endif -else -ifdef INSTALL_FPCPACKAGE -ifdef INSTALL_FPCSUBDIR -INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source/$(INSTALL_FPCSUBDIR)/$(PACKAGE_NAME) -else -INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source/$(PACKAGE_NAME) -endif -else -INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source -endif -endif -endif -ifndef INSTALL_DOCDIR -ifdef UNIXHier -ifdef BSDhier -DOCPREFIXDIR=share/doc -else -ifdef linuxHier -DOCPREFIXDIR=share/doc -else -DOCPREFIXDIR=doc -endif -endif -ifdef INSTALL_FPCPACKAGE -INSTALL_DOCDIR:=$(INSTALL_PREFIX)/$(DOCPREFIXDIR)/fpc-$(FPC_VERSION)/$(PACKAGE_NAME) -else -INSTALL_DOCDIR:=$(INSTALL_PREFIX)/$(DOCPREFIXDIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION) -endif -else -ifdef INSTALL_FPCPACKAGE -INSTALL_DOCDIR:=$(INSTALL_BASEDIR)/doc/$(PACKAGE_NAME) -else -INSTALL_DOCDIR:=$(INSTALL_BASEDIR)/doc -endif -endif -endif -ifndef INSTALL_EXAMPLEDIR -ifdef UNIXHier -ifdef INSTALL_FPCPACKAGE -ifdef BSDhier -INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/share/examples/fpc-$(FPC_VERSION)/$(PACKAGE_NAME) -else -ifdef linuxHier -INSTALL_EXAMPLEDIR:=$(INSTALL_DOCDIR)/examples -else -INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/doc/fpc-$(FPC_VERSION)/examples/$(PACKAGE_NAME) -endif -endif -else -ifdef BSDhier -INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/share/examples/$(PACKAGE_NAME)-$(PACKAGE_VERSION) -else -ifdef linuxHier -INSTALL_EXAMPLEDIR:=$(INSTALL_DOCDIR)/examples/$(PACKAGE_NAME)-$(PACKAGE_VERSION) -else -INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/doc/$(PACKAGE_NAME)-$(PACKAGE_VERSION) -endif -endif -endif -else -ifdef INSTALL_FPCPACKAGE -INSTALL_EXAMPLEDIR:=$(INSTALL_BASEDIR)/examples/$(PACKAGE_NAME) -else -INSTALL_EXAMPLEDIR:=$(INSTALL_BASEDIR)/examples -endif -endif -endif -ifndef INSTALL_DATADIR -INSTALL_DATADIR=$(INSTALL_BASEDIR) -endif -ifndef INSTALL_SHAREDDIR -INSTALL_SHAREDDIR=$(INSTALL_PREFIX)/lib -endif -ifdef CROSSCOMPILE -ifndef CROSSBINDIR -CROSSBINDIR:=$(wildcard $(CROSSTARGETDIR)/bin/$(SOURCESUFFIX)) -ifeq ($(CROSSBINDIR),) -CROSSBINDIR:=$(wildcard $(INSTALL_BASEDIR)/cross/$(TARGETSUFFIX)/bin/$(FULL_SOURCE)) -endif -endif -else -CROSSBINDIR= -endif -BATCHEXT=.bat -LOADEREXT=.as -EXEEXT=.exe -PPLEXT=.ppl -PPUEXT=.ppu -OEXT=.o -ASMEXT=.s -SMARTEXT=.sl -STATICLIBEXT=.a -SHAREDLIBEXT=.so -SHAREDLIBPREFIX=libfp -STATICLIBPREFIX=libp -IMPORTLIBPREFIX=libimp -RSTEXT=.rst -ifeq ($(findstring 1.0.,$(FPC_VERSION)),) -ifeq ($(OS_TARGET),go32v1) -STATICLIBPREFIX= -SHORTSUFFIX=v1 -endif -ifeq ($(OS_TARGET),go32v2) -STATICLIBPREFIX= -SHORTSUFFIX=dos -IMPORTLIBPREFIX= -endif -ifeq ($(OS_TARGET),watcom) -STATICLIBPREFIX= -OEXT=.obj -ASMEXT=.asm -SHAREDLIBEXT=.dll -SHORTSUFFIX=wat -IMPORTLIBPREFIX= -endif -ifeq ($(OS_TARGET),linux) -BATCHEXT=.sh -EXEEXT= -HASSHAREDLIB=1 -SHORTSUFFIX=lnx -endif -ifeq ($(OS_TARGET),freebsd) -BATCHEXT=.sh -EXEEXT= -HASSHAREDLIB=1 -SHORTSUFFIX=fbs -endif -ifeq ($(OS_TARGET),netbsd) -BATCHEXT=.sh -EXEEXT= -HASSHAREDLIB=1 -SHORTSUFFIX=nbs -endif -ifeq ($(OS_TARGET),openbsd) -BATCHEXT=.sh -EXEEXT= -HASSHAREDLIB=1 -SHORTSUFFIX=obs -endif -ifeq ($(OS_TARGET),win32) -SHAREDLIBEXT=.dll -SHORTSUFFIX=w32 -endif -ifeq ($(OS_TARGET),os2) -BATCHEXT=.cmd -AOUTEXT=.out -STATICLIBPREFIX= -SHAREDLIBEXT=.dll -SHORTSUFFIX=os2 -ECHO=echo -IMPORTLIBPREFIX= -endif -ifeq ($(OS_TARGET),emx) -BATCHEXT=.cmd -AOUTEXT=.out -STATICLIBPREFIX= -SHAREDLIBEXT=.dll -SHORTSUFFIX=emx -ECHO=echo -IMPORTLIBPREFIX= -endif -ifeq ($(OS_TARGET),amiga) -EXEEXT= -SHAREDLIBEXT=.library -SHORTSUFFIX=amg -endif -ifeq ($(OS_TARGET),morphos) -EXEEXT= -SHAREDLIBEXT=.library -SHORTSUFFIX=mos -endif -ifeq ($(OS_TARGET),atari) -EXEEXT=.ttp -SHORTSUFFIX=ata -endif -ifeq ($(OS_TARGET),beos) -BATCHEXT=.sh -EXEEXT= -SHORTSUFFIX=be -endif -ifeq ($(OS_TARGET),haiku) -BATCHEXT=.sh -EXEEXT= -SHORTSUFFIX=hai -endif -ifeq ($(OS_TARGET),solaris) -BATCHEXT=.sh -EXEEXT= -SHORTSUFFIX=sun -endif -ifeq ($(OS_TARGET),qnx) -BATCHEXT=.sh -EXEEXT= -SHORTSUFFIX=qnx -endif -ifeq ($(OS_TARGET),netware) -EXEEXT=.nlm -STATICLIBPREFIX= -SHORTSUFFIX=nw -IMPORTLIBPREFIX=imp -endif -ifeq ($(OS_TARGET),netwlibc) -EXEEXT=.nlm -STATICLIBPREFIX= -SHORTSUFFIX=nwl -IMPORTLIBPREFIX=imp -endif -ifeq ($(OS_TARGET),macos) -BATCHEXT= -EXEEXT= -DEBUGSYMEXT=.xcoff -SHORTSUFFIX=mac -IMPORTLIBPREFIX=imp -endif -ifeq ($(OS_TARGET),darwin) -BATCHEXT=.sh -EXEEXT= -HASSHAREDLIB=1 -SHORTSUFFIX=dwn -endif -ifeq ($(OS_TARGET),gba) -EXEEXT=.gba -SHAREDLIBEXT=.so -SHORTSUFFIX=gba -endif -ifeq ($(OS_TARGET),symbian) -SHAREDLIBEXT=.dll -SHORTSUFFIX=symbian -endif -ifeq ($(OS_TARGET),NativeNT) -SHAREDLIBEXT=.dll -SHORTSUFFIX=nativent -endif -else -ifeq ($(OS_TARGET),go32v1) -PPUEXT=.pp1 -OEXT=.o1 -ASMEXT=.s1 -SMARTEXT=.sl1 -STATICLIBEXT=.a1 -SHAREDLIBEXT=.so1 -STATICLIBPREFIX= -SHORTSUFFIX=v1 -IMPORTLIBPREFIX= -endif -ifeq ($(OS_TARGET),go32v2) -STATICLIBPREFIX= -SHORTSUFFIX=dos -IMPORTLIBPREFIX= -endif -ifeq ($(OS_TARGET),watcom) -STATICLIBPREFIX= -SHORTSUFFIX=wat -IMPORTLIBPREFIX= -endif -ifeq ($(OS_TARGET),linux) -BATCHEXT=.sh -EXEEXT= -HASSHAREDLIB=1 -SHORTSUFFIX=lnx -endif -ifeq ($(OS_TARGET),freebsd) -BATCHEXT=.sh -EXEEXT= -HASSHAREDLIB=1 -SHORTSUFFIX=fbs -endif -ifeq ($(OS_TARGET),netbsd) -BATCHEXT=.sh -EXEEXT= -HASSHAREDLIB=1 -SHORTSUFFIX=nbs -endif -ifeq ($(OS_TARGET),openbsd) -BATCHEXT=.sh -EXEEXT= -HASSHAREDLIB=1 -SHORTSUFFIX=obs -endif -ifeq ($(OS_TARGET),win32) -PPUEXT=.ppw -OEXT=.ow -ASMEXT=.sw -SMARTEXT=.slw -STATICLIBEXT=.aw -SHAREDLIBEXT=.dll -SHORTSUFFIX=w32 -endif -ifeq ($(OS_TARGET),os2) -BATCHEXT=.cmd -PPUEXT=.ppo -ASMEXT=.so2 -OEXT=.oo2 -AOUTEXT=.out -SMARTEXT=.sl2 -STATICLIBPREFIX= -STATICLIBEXT=.ao2 -SHAREDLIBEXT=.dll -SHORTSUFFIX=os2 -ECHO=echo -IMPORTLIBPREFIX= -endif -ifeq ($(OS_TARGET),amiga) -EXEEXT= -PPUEXT=.ppu -ASMEXT=.s -OEXT=.o -SMARTEXT=.sl -STATICLIBEXT=.a -SHAREDLIBEXT=.library -SHORTSUFFIX=amg -endif -ifeq ($(OS_TARGET),atari) -PPUEXT=.ppu -ASMEXT=.s -OEXT=.o -SMARTEXT=.sl -STATICLIBEXT=.a -EXEEXT=.ttp -SHORTSUFFIX=ata -endif -ifeq ($(OS_TARGET),beos) -BATCHEXT=.sh -PPUEXT=.ppu -ASMEXT=.s -OEXT=.o -SMARTEXT=.sl -STATICLIBEXT=.a -EXEEXT= -SHORTSUFFIX=be -endif -ifeq ($(OS_TARGET),solaris) -BATCHEXT=.sh -PPUEXT=.ppu -ASMEXT=.s -OEXT=.o -SMARTEXT=.sl -STATICLIBEXT=.a -EXEEXT= -SHORTSUFFIX=sun -endif -ifeq ($(OS_TARGET),qnx) -BATCHEXT=.sh -PPUEXT=.ppu -ASMEXT=.s -OEXT=.o -SMARTEXT=.sl -STATICLIBEXT=.a -EXEEXT= -SHORTSUFFIX=qnx -endif -ifeq ($(OS_TARGET),netware) -STATICLIBPREFIX= -PPUEXT=.ppu -OEXT=.o -ASMEXT=.s -SMARTEXT=.sl -STATICLIBEXT=.a -SHAREDLIBEXT=.nlm -EXEEXT=.nlm -SHORTSUFFIX=nw -IMPORTLIBPREFIX=imp -endif -ifeq ($(OS_TARGET),netwlibc) -STATICLIBPREFIX= -PPUEXT=.ppu -OEXT=.o -ASMEXT=.s -SMARTEXT=.sl -STATICLIBEXT=.a -SHAREDLIBEXT=.nlm -EXEEXT=.nlm -SHORTSUFFIX=nwl -IMPORTLIBPREFIX=imp -endif -ifeq ($(OS_TARGET),macos) -BATCHEXT= -PPUEXT=.ppu -ASMEXT=.s -OEXT=.o -SMARTEXT=.sl -STATICLIBEXT=.a -EXEEXT= -DEBUGSYMEXT=.xcoff -SHORTSUFFIX=mac -IMPORTLIBPREFIX=imp -endif -endif -ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),) -FPCMADE=fpcmade.$(SHORTSUFFIX) -ZIPSUFFIX=$(SHORTSUFFIX) -ZIPCROSSPREFIX= -ZIPSOURCESUFFIX=src -ZIPEXAMPLESUFFIX=exm -else -FPCMADE=fpcmade.$(TARGETSUFFIX) -ZIPSOURCESUFFIX=.source -ZIPEXAMPLESUFFIX=.examples -ifdef CROSSCOMPILE -ZIPSUFFIX=.$(SOURCESUFFIX) -ZIPCROSSPREFIX=$(TARGETSUFFIX)- -else -ZIPSUFFIX=.$(TARGETSUFFIX) -ZIPCROSSPREFIX= -endif -endif -ifndef ECHO -ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(ECHO),) -ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(ECHO),) -ECHO= __missing_command_ECHO -else -ECHO:=$(firstword $(ECHO)) -endif -else -ECHO:=$(firstword $(ECHO)) -endif -endif -export ECHO -ifndef DATE -DATE:=$(strip $(wildcard $(addsuffix /gdate$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(DATE),) -DATE:=$(strip $(wildcard $(addsuffix /date$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(DATE),) -DATE= __missing_command_DATE -else -DATE:=$(firstword $(DATE)) -endif -else -DATE:=$(firstword $(DATE)) -endif -endif -export DATE -ifndef GINSTALL -GINSTALL:=$(strip $(wildcard $(addsuffix /ginstall$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(GINSTALL),) -GINSTALL:=$(strip $(wildcard $(addsuffix /install$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(GINSTALL),) -GINSTALL= __missing_command_GINSTALL -else -GINSTALL:=$(firstword $(GINSTALL)) -endif -else -GINSTALL:=$(firstword $(GINSTALL)) -endif -endif -export GINSTALL -ifndef CPPROG -CPPROG:=$(strip $(wildcard $(addsuffix /cp$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(CPPROG),) -CPPROG= __missing_command_CPPROG -else -CPPROG:=$(firstword $(CPPROG)) -endif -endif -export CPPROG -ifndef RMPROG -RMPROG:=$(strip $(wildcard $(addsuffix /rm$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(RMPROG),) -RMPROG= __missing_command_RMPROG -else -RMPROG:=$(firstword $(RMPROG)) -endif -endif -export RMPROG -ifndef MVPROG -MVPROG:=$(strip $(wildcard $(addsuffix /mv$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(MVPROG),) -MVPROG= __missing_command_MVPROG -else -MVPROG:=$(firstword $(MVPROG)) -endif -endif -export MVPROG -ifndef MKDIRPROG -MKDIRPROG:=$(strip $(wildcard $(addsuffix /gmkdir$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(MKDIRPROG),) -MKDIRPROG:=$(strip $(wildcard $(addsuffix /mkdir$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(MKDIRPROG),) -MKDIRPROG= __missing_command_MKDIRPROG -else -MKDIRPROG:=$(firstword $(MKDIRPROG)) -endif -else -MKDIRPROG:=$(firstword $(MKDIRPROG)) -endif -endif -export MKDIRPROG -ifndef ECHOREDIR -ifndef inUnix -ECHOREDIR=echo -else -ECHOREDIR=$(ECHO) -endif -endif -ifndef COPY -COPY:=$(CPPROG) -fp -endif -ifndef COPYTREE -COPYTREE:=$(CPPROG) -Rfp -endif -ifndef MKDIRTREE -MKDIRTREE:=$(MKDIRPROG) -p -endif -ifndef MOVE -MOVE:=$(MVPROG) -f -endif -ifndef DEL -DEL:=$(RMPROG) -f -endif -ifndef DELTREE -DELTREE:=$(RMPROG) -rf -endif -ifndef INSTALL -ifdef inUnix -INSTALL:=$(GINSTALL) -c -m 644 -else -INSTALL:=$(COPY) -endif -endif -ifndef INSTALLEXE -ifdef inUnix -INSTALLEXE:=$(GINSTALL) -c -m 755 -else -INSTALLEXE:=$(COPY) -endif -endif -ifndef MKDIR -MKDIR:=$(GINSTALL) -m 755 -d -endif -export ECHOREDIR COPY COPYTREE MOVE DEL DELTREE INSTALL INSTALLEXE MKDIR -ifndef PPUMOVE -PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(PPUMOVE),) -PPUMOVE= __missing_command_PPUMOVE -else -PPUMOVE:=$(firstword $(PPUMOVE)) -endif -endif -export PPUMOVE -ifndef FPCMAKE -FPCMAKE:=$(strip $(wildcard $(addsuffix /fpcmake$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(FPCMAKE),) -FPCMAKE= __missing_command_FPCMAKE -else -FPCMAKE:=$(firstword $(FPCMAKE)) -endif -endif -export FPCMAKE -ifndef ZIPPROG -ZIPPROG:=$(strip $(wildcard $(addsuffix /zip$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(ZIPPROG),) -ZIPPROG= __missing_command_ZIPPROG -else -ZIPPROG:=$(firstword $(ZIPPROG)) -endif -endif -export ZIPPROG -ifndef TARPROG -TARPROG:=$(strip $(wildcard $(addsuffix /gtar$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(TARPROG),) -TARPROG:=$(strip $(wildcard $(addsuffix /tar$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(TARPROG),) -TARPROG= __missing_command_TARPROG -else -TARPROG:=$(firstword $(TARPROG)) -endif -else -TARPROG:=$(firstword $(TARPROG)) -endif -endif -export TARPROG -ASNAME=$(BINUTILSPREFIX)as -LDNAME=$(BINUTILSPREFIX)ld -ARNAME=$(BINUTILSPREFIX)ar -RCNAME=$(BINUTILSPREFIX)rc -ifneq ($(findstring 1.0.,$(FPC_VERSION)),) -ifeq ($(OS_TARGET),win32) -ifeq ($(CROSSBINDIR),) -ASNAME=asw -LDNAME=ldw -ARNAME=arw -endif -endif -endif -ifndef ASPROG -ifdef CROSSBINDIR -ASPROG=$(CROSSBINDIR)/$(ASNAME)$(SRCEXEEXT) -else -ASPROG=$(ASNAME) -endif -endif -ifndef LDPROG -ifdef CROSSBINDIR -LDPROG=$(CROSSBINDIR)/$(LDNAME)$(SRCEXEEXT) -else -LDPROG=$(LDNAME) -endif -endif -ifndef RCPROG -ifdef CROSSBINDIR -RCPROG=$(CROSSBINDIR)/$(RCNAME)$(SRCEXEEXT) -else -RCPROG=$(RCNAME) -endif -endif -ifndef ARPROG -ifdef CROSSBINDIR -ARPROG=$(CROSSBINDIR)/$(ARNAME)$(SRCEXEEXT) -else -ARPROG=$(ARNAME) -endif -endif -AS=$(ASPROG) -LD=$(LDPROG) -RC=$(RCPROG) -AR=$(ARPROG) -PPAS=ppas$(SRCBATCHEXT) -ifdef inUnix -LDCONFIG=ldconfig -else -LDCONFIG= -endif -ifdef DATE -DATESTR:=$(shell $(DATE) +%Y%m%d) -else -DATESTR= -endif -ifndef UPXPROG -ifeq ($(OS_TARGET),go32v2) -UPXPROG:=1 -endif -ifeq ($(OS_TARGET),win32) -UPXPROG:=1 -endif -ifdef UPXPROG -UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(UPXPROG),) -UPXPROG= -else -UPXPROG:=$(firstword $(UPXPROG)) -endif -else -UPXPROG= -endif -endif -export UPXPROG -ZIPOPT=-9 -ZIPEXT=.zip -ifeq ($(USETAR),bz2) -TAROPT=vj -TAREXT=.tar.bz2 -else -TAROPT=vz -TAREXT=.tar.gz -endif -override REQUIRE_PACKAGES=rtl regexpr -ifeq ($(FULL_TARGET),i386-linux) -REQUIRE_PACKAGES_RTL=1 -REQUIRE_PACKAGES_REGEXPR=1 -endif -ifeq ($(FULL_TARGET),i386-go32v2) -REQUIRE_PACKAGES_RTL=1 -REQUIRE_PACKAGES_REGEXPR=1 -endif -ifeq ($(FULL_TARGET),i386-win32) -REQUIRE_PACKAGES_RTL=1 -REQUIRE_PACKAGES_REGEXPR=1 -endif -ifeq ($(FULL_TARGET),i386-os2) -REQUIRE_PACKAGES_RTL=1 -REQUIRE_PACKAGES_REGEXPR=1 -endif -ifeq ($(FULL_TARGET),i386-freebsd) -REQUIRE_PACKAGES_RTL=1 -REQUIRE_PACKAGES_REGEXPR=1 -endif -ifeq ($(FULL_TARGET),i386-beos) -REQUIRE_PACKAGES_RTL=1 -REQUIRE_PACKAGES_REGEXPR=1 -endif -ifeq ($(FULL_TARGET),i386-haiku) -REQUIRE_PACKAGES_RTL=1 -REQUIRE_PACKAGES_REGEXPR=1 -endif -ifeq ($(FULL_TARGET),i386-netbsd) -REQUIRE_PACKAGES_RTL=1 -REQUIRE_PACKAGES_REGEXPR=1 -endif -ifeq ($(FULL_TARGET),i386-solaris) -REQUIRE_PACKAGES_RTL=1 -REQUIRE_PACKAGES_REGEXPR=1 -endif -ifeq ($(FULL_TARGET),i386-qnx) -REQUIRE_PACKAGES_RTL=1 -REQUIRE_PACKAGES_REGEXPR=1 -endif -ifeq ($(FULL_TARGET),i386-netware) -REQUIRE_PACKAGES_RTL=1 -REQUIRE_PACKAGES_REGEXPR=1 -endif -ifeq ($(FULL_TARGET),i386-openbsd) -REQUIRE_PACKAGES_RTL=1 -REQUIRE_PACKAGES_REGEXPR=1 -endif -ifeq ($(FULL_TARGET),i386-wdosx) -REQUIRE_PACKAGES_RTL=1 -REQUIRE_PACKAGES_REGEXPR=1 -endif -ifeq ($(FULL_TARGET),i386-darwin) -REQUIRE_PACKAGES_RTL=1 -REQUIRE_PACKAGES_REGEXPR=1 -endif -ifeq ($(FULL_TARGET),i386-emx) -REQUIRE_PACKAGES_RTL=1 -REQUIRE_PACKAGES_REGEXPR=1 -endif -ifeq ($(FULL_TARGET),i386-watcom) -REQUIRE_PACKAGES_RTL=1 -REQUIRE_PACKAGES_REGEXPR=1 -endif -ifeq ($(FULL_TARGET),i386-netwlibc) -REQUIRE_PACKAGES_RTL=1 -REQUIRE_PACKAGES_REGEXPR=1 -endif -ifeq ($(FULL_TARGET),i386-wince) -REQUIRE_PACKAGES_RTL=1 -REQUIRE_PACKAGES_REGEXPR=1 -endif -ifeq ($(FULL_TARGET),i386-embedded) -REQUIRE_PACKAGES_RTL=1 -REQUIRE_PACKAGES_REGEXPR=1 -endif -ifeq ($(FULL_TARGET),i386-symbian) -REQUIRE_PACKAGES_RTL=1 -REQUIRE_PACKAGES_REGEXPR=1 -endif -ifeq ($(FULL_TARGET),i386-nativent) -REQUIRE_PACKAGES_RTL=1 -REQUIRE_PACKAGES_REGEXPR=1 -endif -ifeq ($(FULL_TARGET),m68k-linux) -REQUIRE_PACKAGES_RTL=1 -REQUIRE_PACKAGES_REGEXPR=1 -endif -ifeq ($(FULL_TARGET),m68k-freebsd) -REQUIRE_PACKAGES_RTL=1 -REQUIRE_PACKAGES_REGEXPR=1 -endif -ifeq ($(FULL_TARGET),m68k-netbsd) -REQUIRE_PACKAGES_RTL=1 -REQUIRE_PACKAGES_REGEXPR=1 -endif -ifeq ($(FULL_TARGET),m68k-amiga) -REQUIRE_PACKAGES_RTL=1 -REQUIRE_PACKAGES_REGEXPR=1 -endif -ifeq ($(FULL_TARGET),m68k-atari) -REQUIRE_PACKAGES_RTL=1 -REQUIRE_PACKAGES_REGEXPR=1 -endif -ifeq ($(FULL_TARGET),m68k-openbsd) -REQUIRE_PACKAGES_RTL=1 -REQUIRE_PACKAGES_REGEXPR=1 -endif -ifeq ($(FULL_TARGET),m68k-palmos) -REQUIRE_PACKAGES_RTL=1 -REQUIRE_PACKAGES_REGEXPR=1 -endif -ifeq ($(FULL_TARGET),m68k-embedded) -REQUIRE_PACKAGES_RTL=1 -REQUIRE_PACKAGES_REGEXPR=1 -endif -ifeq ($(FULL_TARGET),powerpc-linux) -REQUIRE_PACKAGES_RTL=1 -REQUIRE_PACKAGES_REGEXPR=1 -endif -ifeq ($(FULL_TARGET),powerpc-netbsd) -REQUIRE_PACKAGES_RTL=1 -REQUIRE_PACKAGES_REGEXPR=1 -endif -ifeq ($(FULL_TARGET),powerpc-amiga) -REQUIRE_PACKAGES_RTL=1 -REQUIRE_PACKAGES_REGEXPR=1 -endif -ifeq ($(FULL_TARGET),powerpc-macos) -REQUIRE_PACKAGES_RTL=1 -REQUIRE_PACKAGES_REGEXPR=1 -endif -ifeq ($(FULL_TARGET),powerpc-darwin) -REQUIRE_PACKAGES_RTL=1 -REQUIRE_PACKAGES_REGEXPR=1 -endif -ifeq ($(FULL_TARGET),powerpc-morphos) -REQUIRE_PACKAGES_RTL=1 -REQUIRE_PACKAGES_REGEXPR=1 -endif -ifeq ($(FULL_TARGET),powerpc-embedded) -REQUIRE_PACKAGES_RTL=1 -REQUIRE_PACKAGES_REGEXPR=1 -endif -ifeq ($(FULL_TARGET),sparc-linux) -REQUIRE_PACKAGES_RTL=1 -REQUIRE_PACKAGES_REGEXPR=1 -endif -ifeq ($(FULL_TARGET),sparc-netbsd) -REQUIRE_PACKAGES_RTL=1 -REQUIRE_PACKAGES_REGEXPR=1 -endif -ifeq ($(FULL_TARGET),sparc-solaris) -REQUIRE_PACKAGES_RTL=1 -REQUIRE_PACKAGES_REGEXPR=1 -endif -ifeq ($(FULL_TARGET),sparc-embedded) -REQUIRE_PACKAGES_RTL=1 -REQUIRE_PACKAGES_REGEXPR=1 -endif -ifeq ($(FULL_TARGET),x86_64-linux) -REQUIRE_PACKAGES_RTL=1 -REQUIRE_PACKAGES_REGEXPR=1 -endif -ifeq ($(FULL_TARGET),x86_64-freebsd) -REQUIRE_PACKAGES_RTL=1 -REQUIRE_PACKAGES_REGEXPR=1 -endif -ifeq ($(FULL_TARGET),x86_64-solaris) -REQUIRE_PACKAGES_RTL=1 -REQUIRE_PACKAGES_REGEXPR=1 -endif -ifeq ($(FULL_TARGET),x86_64-darwin) -REQUIRE_PACKAGES_RTL=1 -REQUIRE_PACKAGES_REGEXPR=1 -endif -ifeq ($(FULL_TARGET),x86_64-win64) -REQUIRE_PACKAGES_RTL=1 -REQUIRE_PACKAGES_REGEXPR=1 -endif -ifeq ($(FULL_TARGET),x86_64-embedded) -REQUIRE_PACKAGES_RTL=1 -REQUIRE_PACKAGES_REGEXPR=1 -endif -ifeq ($(FULL_TARGET),arm-linux) -REQUIRE_PACKAGES_RTL=1 -REQUIRE_PACKAGES_REGEXPR=1 -endif -ifeq ($(FULL_TARGET),arm-palmos) -REQUIRE_PACKAGES_RTL=1 -REQUIRE_PACKAGES_REGEXPR=1 -endif -ifeq ($(FULL_TARGET),arm-darwin) -REQUIRE_PACKAGES_RTL=1 -REQUIRE_PACKAGES_REGEXPR=1 -endif -ifeq ($(FULL_TARGET),arm-wince) -REQUIRE_PACKAGES_RTL=1 -REQUIRE_PACKAGES_REGEXPR=1 -endif -ifeq ($(FULL_TARGET),arm-gba) -REQUIRE_PACKAGES_RTL=1 -REQUIRE_PACKAGES_REGEXPR=1 -endif -ifeq ($(FULL_TARGET),arm-nds) -REQUIRE_PACKAGES_RTL=1 -REQUIRE_PACKAGES_REGEXPR=1 -endif -ifeq ($(FULL_TARGET),arm-embedded) -REQUIRE_PACKAGES_RTL=1 -REQUIRE_PACKAGES_REGEXPR=1 -endif -ifeq ($(FULL_TARGET),arm-symbian) -REQUIRE_PACKAGES_RTL=1 -REQUIRE_PACKAGES_REGEXPR=1 -endif -ifeq ($(FULL_TARGET),powerpc64-linux) -REQUIRE_PACKAGES_RTL=1 -REQUIRE_PACKAGES_REGEXPR=1 -endif -ifeq ($(FULL_TARGET),powerpc64-darwin) -REQUIRE_PACKAGES_RTL=1 -REQUIRE_PACKAGES_REGEXPR=1 -endif -ifeq ($(FULL_TARGET),powerpc64-embedded) -REQUIRE_PACKAGES_RTL=1 -REQUIRE_PACKAGES_REGEXPR=1 -endif -ifeq ($(FULL_TARGET),avr-embedded) -REQUIRE_PACKAGES_RTL=1 -REQUIRE_PACKAGES_REGEXPR=1 -endif -ifeq ($(FULL_TARGET),armeb-linux) -REQUIRE_PACKAGES_RTL=1 -REQUIRE_PACKAGES_REGEXPR=1 -endif -ifeq ($(FULL_TARGET),armeb-embedded) -REQUIRE_PACKAGES_RTL=1 -REQUIRE_PACKAGES_REGEXPR=1 -endif -ifeq ($(FULL_TARGET),mipsel-linux) -REQUIRE_PACKAGES_RTL=1 -REQUIRE_PACKAGES_REGEXPR=1 -endif -ifdef REQUIRE_PACKAGES_RTL -PACKAGEDIR_RTL:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /rtl/Makefile.fpc,$(PACKAGESDIR)))))) -ifneq ($(PACKAGEDIR_RTL),) -ifneq ($(wildcard $(PACKAGEDIR_RTL)/units/$(TARGETSUFFIX)),) -UNITDIR_RTL=$(PACKAGEDIR_RTL)/units/$(TARGETSUFFIX) -else -UNITDIR_RTL=$(PACKAGEDIR_RTL) -endif -ifdef CHECKDEPEND -$(PACKAGEDIR_RTL)/$(OS_TARGET)/$(FPCMADE): - $(MAKE) -C $(PACKAGEDIR_RTL)/$(OS_TARGET) $(FPCMADE) -override ALLDEPENDENCIES+=$(PACKAGEDIR_RTL)/$(OS_TARGET)/$(FPCMADE) -endif -else -PACKAGEDIR_RTL= -UNITDIR_RTL:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /rtl/Package.fpc,$(UNITSDIR))))) -ifneq ($(UNITDIR_RTL),) -UNITDIR_RTL:=$(firstword $(UNITDIR_RTL)) -else -UNITDIR_RTL= -endif -endif -ifdef UNITDIR_RTL -override COMPILER_UNITDIR+=$(UNITDIR_RTL) -endif -endif -ifdef REQUIRE_PACKAGES_REGEXPR -PACKAGEDIR_REGEXPR:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /regexpr/Makefile.fpc,$(PACKAGESDIR)))))) -ifneq ($(PACKAGEDIR_REGEXPR),) -ifneq ($(wildcard $(PACKAGEDIR_REGEXPR)/units/$(TARGETSUFFIX)),) -UNITDIR_REGEXPR=$(PACKAGEDIR_REGEXPR)/units/$(TARGETSUFFIX) -else -UNITDIR_REGEXPR=$(PACKAGEDIR_REGEXPR) -endif -ifdef CHECKDEPEND -$(PACKAGEDIR_REGEXPR)/$(FPCMADE): - $(MAKE) -C $(PACKAGEDIR_REGEXPR) $(FPCMADE) -override ALLDEPENDENCIES+=$(PACKAGEDIR_REGEXPR)/$(FPCMADE) -endif -else -PACKAGEDIR_REGEXPR= -UNITDIR_REGEXPR:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /regexpr/Package.fpc,$(UNITSDIR))))) -ifneq ($(UNITDIR_REGEXPR),) -UNITDIR_REGEXPR:=$(firstword $(UNITDIR_REGEXPR)) -else -UNITDIR_REGEXPR= -endif -endif -ifdef UNITDIR_REGEXPR -override COMPILER_UNITDIR+=$(UNITDIR_REGEXPR) -endif -endif -ifndef NOCPUDEF -override FPCOPTDEF=$(ARCH) -endif -ifneq ($(OS_TARGET),$(OS_SOURCE)) -override FPCOPT+=-T$(OS_TARGET) -endif -ifneq ($(CPU_TARGET),$(CPU_SOURCE)) -override FPCOPT+=-P$(ARCH) -endif -ifeq ($(OS_SOURCE),openbsd) -override FPCOPT+=-FD$(NEW_BINUTILS_PATH) -endif -ifndef CROSSBOOTSTRAP -ifneq ($(BINUTILSPREFIX),) -override FPCOPT+=-XP$(BINUTILSPREFIX) -endif -ifneq ($(BINUTILSPREFIX),) -override FPCOPT+=-Xr$(RLINKPATH) -endif -endif -ifdef UNITDIR -override FPCOPT+=$(addprefix -Fu,$(UNITDIR)) -endif -ifdef LIBDIR -override FPCOPT+=$(addprefix -Fl,$(LIBDIR)) -endif -ifdef OBJDIR -override FPCOPT+=$(addprefix -Fo,$(OBJDIR)) -endif -ifdef INCDIR -override FPCOPT+=$(addprefix -Fi,$(INCDIR)) -endif -ifdef LINKSMART -override FPCOPT+=-XX -endif -ifdef CREATESMART -override FPCOPT+=-CX -endif -ifdef DEBUG -override FPCOPT+=-gl -override FPCOPTDEF+=DEBUG -endif -ifdef RELEASE -ifneq ($(findstring 2.0.,$(FPC_VERSION)),) -ifeq ($(CPU_TARGET),i386) -FPCCPUOPT:=-OG2p3 -endif -ifeq ($(CPU_TARGET),powerpc) -FPCCPUOPT:=-O1r -endif -else -FPCCPUOPT:=-O2 -endif -override FPCOPT+=-Ur -Xs $(FPCCPUOPT) -n -override FPCOPTDEF+=RELEASE -endif -ifdef STRIP -override FPCOPT+=-Xs -endif -ifdef OPTIMIZE -override FPCOPT+=-O2 -endif -ifdef VERBOSE -override FPCOPT+=-vwni -endif -ifdef COMPILER_OPTIONS -override FPCOPT+=$(COMPILER_OPTIONS) -endif -ifdef COMPILER_UNITDIR -override FPCOPT+=$(addprefix -Fu,$(COMPILER_UNITDIR)) -endif -ifdef COMPILER_LIBRARYDIR -override FPCOPT+=$(addprefix -Fl,$(COMPILER_LIBRARYDIR)) -endif -ifdef COMPILER_OBJECTDIR -override FPCOPT+=$(addprefix -Fo,$(COMPILER_OBJECTDIR)) -endif -ifdef COMPILER_INCLUDEDIR -override FPCOPT+=$(addprefix -Fi,$(COMPILER_INCLUDEDIR)) -endif -ifdef CROSSBINDIR -override FPCOPT+=-FD$(CROSSBINDIR) -endif -ifdef COMPILER_TARGETDIR -override FPCOPT+=-FE$(COMPILER_TARGETDIR) -ifeq ($(COMPILER_TARGETDIR),.) -override TARGETDIRPREFIX= -else -override TARGETDIRPREFIX=$(COMPILER_TARGETDIR)/ -endif -endif -ifdef COMPILER_UNITTARGETDIR -override FPCOPT+=-FU$(COMPILER_UNITTARGETDIR) -ifeq ($(COMPILER_UNITTARGETDIR),.) -override UNITTARGETDIRPREFIX= -else -override UNITTARGETDIRPREFIX=$(COMPILER_UNITTARGETDIR)/ -endif -else -ifdef COMPILER_TARGETDIR -override COMPILER_UNITTARGETDIR=$(COMPILER_TARGETDIR) -override UNITTARGETDIRPREFIX=$(TARGETDIRPREFIX) -endif -endif -ifdef CREATESHARED -override FPCOPT+=-Cg -ifeq ($(CPU_TARGET),i386) -override FPCOPT+=-Aas -endif -endif -ifeq ($(findstring 2.0.,$(FPC_VERSION)),) -ifeq ($(OS_TARGET),linux) -ifeq ($(CPU_TARGET),x86_64) -override FPCOPT+=-Cg -endif -endif -endif -ifdef LINKSHARED -endif -ifdef OPT -override FPCOPT+=$(OPT) -endif -ifdef FPCOPTDEF -override FPCOPT+=$(addprefix -d,$(FPCOPTDEF)) -endif -ifdef CFGFILE -override FPCOPT+=@$(CFGFILE) -endif -ifdef USEENV -override FPCEXTCMD:=$(FPCOPT) -override FPCOPT:=!FPCEXTCMD -export FPCEXTCMD -endif -override AFULL_TARGET=$(CPU_TARGET)-$(OS_TARGET) -override AFULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE) -ifneq ($(AFULL_TARGET),$(AFULL_SOURCE)) -override ACROSSCOMPILE=1 -endif -ifdef ACROSSCOMPILE -override FPCOPT+=$(CROSSOPT) -endif -override COMPILER:=$(FPC) $(FPCOPT) -ifeq (,$(findstring -s ,$(COMPILER))) -EXECPPAS= -else -ifeq ($(FULL_SOURCE),$(FULL_TARGET)) -ifdef RUNBATCH -EXECPPAS:=@$(RUNBATCH) $(PPAS) -else -EXECPPAS:=@$(PPAS) -endif -endif -endif -.PHONY: fpc_exes -ifndef CROSSINSTALL -ifneq ($(TARGET_PROGRAMS),) -override EXEFILES=$(addsuffix $(EXEEXT),$(TARGET_PROGRAMS)) -override EXEOFILES:=$(addsuffix $(OEXT),$(TARGET_PROGRAMS)) $(addprefix $(STATICLIBPREFIX),$(addsuffix $(STATICLIBEXT),$(TARGET_PROGRAMS))) $(addprefix $(IMPORTLIBPREFIX),$(addsuffix $(STATICLIBEXT),$(TARGET_PROGRAMS))) -override ALLTARGET+=fpc_exes -override INSTALLEXEFILES+=$(EXEFILES) -override CLEANEXEFILES+=$(EXEFILES) $(EXEOFILES) -ifeq ($(OS_TARGET),os2) -override CLEANEXEFILES+=$(addsuffix $(AOUTEXT),$(TARGET_PROGRAMS)) -endif -ifeq ($(OS_TARGET),emx) -override CLEANEXEFILES+=$(addsuffix $(AOUTEXT),$(TARGET_PROGRAMS)) -endif -endif -endif -fpc_exes: $(COMPILER_TARGETDIR) $(COMPILER_UNITTARGETDIR) $(EXEFILES) -ifdef TARGET_RSTS -override RSTFILES=$(addsuffix $(RSTEXT),$(TARGET_RSTS)) -override CLEANRSTFILES+=$(RSTFILES) -endif -.PHONY: fpc_examples -ifneq ($(TARGET_EXAMPLES),) -HASEXAMPLES=1 -override EXAMPLESOURCEFILES:=$(wildcard $(addsuffix .pp,$(TARGET_EXAMPLES)) $(addsuffix .pas,$(TARGET_EXAMPLES)) $(addsuffix .lpr,$(TARGET_EXAMPLES)) $(addsuffix .dpr,$(TARGET_EXAMPLES))) -override EXAMPLEFILES:=$(addsuffix $(EXEEXT),$(TARGET_EXAMPLES)) -override EXAMPLEOFILES:=$(addsuffix $(OEXT),$(TARGET_EXAMPLES)) $(addprefix $(STATICLIBPREFIX),$(addsuffix $(STATICLIBEXT),$(TARGET_EXAMPLES))) $(addprefix $(IMPORTLIBPREFIX),$(addsuffix $(STATICLIBEXT),$(TARGET_EXAMPLES))) -override CLEANEXEFILES+=$(EXAMPLEFILES) $(EXAMPLEOFILES) -ifeq ($(OS_TARGET),os2) -override CLEANEXEFILES+=$(addsuffix $(AOUTEXT),$(TARGET_EXAMPLES)) -endif -ifeq ($(OS_TARGET),emx) -override CLEANEXEFILES+=$(addsuffix $(AOUTEXT),$(TARGET_EXAMPLES)) -endif -endif -ifneq ($(TARGET_EXAMPLEDIRS),) -HASEXAMPLES=1 -endif -fpc_examples: all $(EXAMPLEFILES) $(addsuffix _all,$(TARGET_EXAMPLEDIRS)) -.PHONY: fpc_all fpc_smart fpc_debug fpc_release fpc_shared -$(FPCMADE): $(ALLDEPENDENCIES) $(ALLTARGET) - @$(ECHOREDIR) Compiled > $(FPCMADE) -fpc_all: $(FPCMADE) -fpc_smart: - $(MAKE) all LINKSMART=1 CREATESMART=1 -fpc_debug: - $(MAKE) all DEBUG=1 -fpc_release: - $(MAKE) all RELEASE=1 -.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .lpr .dpr .pp .rc .res -$(COMPILER_UNITTARGETDIR): - $(MKDIRTREE) $(COMPILER_UNITTARGETDIR) -$(COMPILER_TARGETDIR): - $(MKDIRTREE) $(COMPILER_TARGETDIR) -%$(PPUEXT): %.pp - $(COMPILER) $< - $(EXECPPAS) -%$(PPUEXT): %.pas - $(COMPILER) $< - $(EXECPPAS) -%$(EXEEXT): %.pp - $(COMPILER) $< - $(EXECPPAS) -%$(EXEEXT): %.pas - $(COMPILER) $< - $(EXECPPAS) -%$(EXEEXT): %.lpr - $(COMPILER) $< - $(EXECPPAS) -%$(EXEEXT): %.dpr - $(COMPILER) $< - $(EXECPPAS) -%.res: %.rc - windres -i $< -o $@ -vpath %.pp $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR) -vpath %.pas $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR) -vpath %.lpr $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR) -vpath %.dpr $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR) -vpath %.inc $(COMPILER_INCLUDEDIR) -vpath %$(OEXT) $(COMPILER_UNITTARGETDIR) -vpath %$(PPUEXT) $(COMPILER_UNITTARGETDIR) -.PHONY: fpc_shared -override INSTALLTARGET+=fpc_shared_install -ifndef SHARED_LIBVERSION -SHARED_LIBVERSION=$(FPC_VERSION) -endif -ifndef SHARED_LIBNAME -SHARED_LIBNAME=$(PACKAGE_NAME) -endif -ifndef SHARED_FULLNAME -SHARED_FULLNAME=$(SHAREDLIBPREFIX)$(SHARED_LIBNAME)-$(SHARED_LIBVERSION)$(SHAREDLIBEXT) -endif -ifndef SHARED_LIBUNITS -SHARED_LIBUNITS:=$(TARGET_UNITS) $(TARGET_IMPLICITUNITS) -override SHARED_LIBUNITS:=$(filter-out $(INSTALL_BUILDUNIT),$(SHARED_LIBUNITS)) -endif -fpc_shared: -ifdef HASSHAREDLIB - $(MAKE) all CREATESHARED=1 LINKSHARED=1 CREATESMART=1 -ifneq ($(SHARED_BUILD),n) - $(PPUMOVE) -q $(SHARED_LIBUNITS) -i$(COMPILER_UNITTARGETDIR) -o$(SHARED_FULLNAME) -d$(COMPILER_UNITTARGETDIR) -endif -else - @$(ECHO) Shared Libraries not supported -endif -fpc_shared_install: -ifneq ($(SHARED_BUILD),n) -ifneq ($(SHARED_LIBUNITS),) -ifneq ($(wildcard $(COMPILER_UNITTARGETDIR)/$(SHARED_FULLNAME)),) - $(INSTALL) $(COMPILER_UNITTARGETDIR)/$(SHARED_FULLNAME) $(INSTALL_SHAREDDIR) -endif -endif -endif -.PHONY: fpc_install fpc_sourceinstall fpc_exampleinstall -ifdef INSTALL_UNITS -override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(INSTALL_UNITS)) -endif -ifdef INSTALL_BUILDUNIT -override INSTALLPPUFILES:=$(filter-out $(INSTALL_BUILDUNIT)$(PPUEXT),$(INSTALLPPUFILES)) -endif -ifdef INSTALLPPUFILES -override INSTALLPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES))) $(addprefix $(IMPORTLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES))) -ifneq ($(UNITTARGETDIRPREFIX),) -override INSTALLPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(notdir $(INSTALLPPUFILES))) -override INSTALLPPULINKFILES:=$(wildcard $(addprefix $(UNITTARGETDIRPREFIX),$(notdir $(INSTALLPPULINKFILES)))) -endif -override INSTALL_CREATEPACKAGEFPC=1 -endif -ifdef INSTALLEXEFILES -ifneq ($(TARGETDIRPREFIX),) -override INSTALLEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(notdir $(INSTALLEXEFILES))) -endif -endif -fpc_install: all $(INSTALLTARGET) -ifdef INSTALLEXEFILES - $(MKDIR) $(INSTALL_BINDIR) -ifdef UPXPROG - -$(UPXPROG) $(INSTALLEXEFILES) -endif - $(INSTALLEXE) $(INSTALLEXEFILES) $(INSTALL_BINDIR) -endif -ifdef INSTALL_CREATEPACKAGEFPC -ifdef FPCMAKE -ifdef PACKAGE_VERSION -ifneq ($(wildcard Makefile.fpc),) - $(FPCMAKE) -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc - $(MKDIR) $(INSTALL_UNITDIR) - $(INSTALL) Package.fpc $(INSTALL_UNITDIR) -endif -endif -endif -endif -ifdef INSTALLPPUFILES - $(MKDIR) $(INSTALL_UNITDIR) - $(INSTALL) $(INSTALLPPUFILES) $(INSTALL_UNITDIR) -ifneq ($(INSTALLPPULINKFILES),) - $(INSTALL) $(INSTALLPPULINKFILES) $(INSTALL_UNITDIR) -endif -ifneq ($(wildcard $(LIB_FULLNAME)),) - $(MKDIR) $(INSTALL_LIBDIR) - $(INSTALL) $(LIB_FULLNAME) $(INSTALL_LIBDIR) -ifdef inUnix - ln -sf $(LIB_FULLNAME) $(INSTALL_LIBDIR)/$(LIB_NAME) -endif -endif -endif -ifdef INSTALL_FILES - $(MKDIR) $(INSTALL_DATADIR) - $(INSTALL) $(INSTALL_FILES) $(INSTALL_DATADIR) -endif -fpc_sourceinstall: distclean - $(MKDIR) $(INSTALL_SOURCEDIR) - $(COPYTREE) $(BASEDIR)/* $(INSTALL_SOURCEDIR) -fpc_exampleinstall: $(addsuffix _distclean,$(TARGET_EXAMPLEDIRS)) -ifdef HASEXAMPLES - $(MKDIR) $(INSTALL_EXAMPLEDIR) -endif -ifdef EXAMPLESOURCEFILES - $(COPY) $(EXAMPLESOURCEFILES) $(INSTALL_EXAMPLEDIR) -endif -ifdef TARGET_EXAMPLEDIRS - $(COPYTREE) $(addsuffix /*,$(TARGET_EXAMPLEDIRS)) $(INSTALL_EXAMPLEDIR) -endif -.PHONY: fpc_distinstall -fpc_distinstall: install exampleinstall -.PHONY: fpc_zipinstall fpc_zipsourceinstall fpc_zipexampleinstall -ifndef PACKDIR -ifndef inUnix -PACKDIR=$(BASEDIR)/../fpc-pack -else -PACKDIR=/tmp/fpc-pack -endif -endif -ifndef ZIPNAME -ifdef DIST_ZIPNAME -ZIPNAME=$(DIST_ZIPNAME) -else -ZIPNAME=$(PACKAGE_NAME) -endif -endif -ifndef FULLZIPNAME -FULLZIPNAME=$(ZIPCROSSPREFIX)$(ZIPPREFIX)$(ZIPNAME)$(ZIPSUFFIX) -endif -ifndef ZIPTARGET -ifdef DIST_ZIPTARGET -ZIPTARGET=DIST_ZIPTARGET -else -ZIPTARGET=install -endif -endif -ifndef USEZIP -ifdef inUnix -USETAR=1 -endif -endif -ifndef inUnix -USEZIPWRAPPER=1 -endif -ifdef USEZIPWRAPPER -ZIPPATHSEP=$(PATHSEP) -ZIPWRAPPER=$(subst /,$(PATHSEP),$(DIST_DESTDIR)/fpczip$(SRCBATCHEXT)) -else -ZIPPATHSEP=/ -endif -ZIPCMD_CDPACK:=cd $(subst /,$(ZIPPATHSEP),$(PACKDIR)) -ZIPCMD_CDBASE:=cd $(subst /,$(ZIPPATHSEP),$(BASEDIR)) -ifdef USETAR -ZIPDESTFILE:=$(DIST_DESTDIR)/$(FULLZIPNAME)$(TAREXT) -ZIPCMD_ZIP:=$(TARPROG) cf$(TAROPT) $(ZIPDESTFILE) * -else -ZIPDESTFILE:=$(DIST_DESTDIR)/$(FULLZIPNAME)$(ZIPEXT) -ZIPCMD_ZIP:=$(subst /,$(ZIPPATHSEP),$(ZIPPROG)) -Dr $(ZIPOPT) $(ZIPDESTFILE) * -endif -fpc_zipinstall: - $(MAKE) $(ZIPTARGET) INSTALL_PREFIX=$(PACKDIR) ZIPINSTALL=1 - $(MKDIR) $(DIST_DESTDIR) - $(DEL) $(ZIPDESTFILE) -ifdef USEZIPWRAPPER -ifneq ($(ECHOREDIR),echo) - $(ECHOREDIR) -e "$(subst \,\\,$(ZIPCMD_CDPACK))" > $(ZIPWRAPPER) - $(ECHOREDIR) -e "$(subst \,\\,$(ZIPCMD_ZIP))" >> $(ZIPWRAPPER) - $(ECHOREDIR) -e "$(subst \,\\,$(ZIPCMD_CDBASE))" >> $(ZIPWRAPPER) -else - echo $(ZIPCMD_CDPACK) > $(ZIPWRAPPER) - echo $(ZIPCMD_ZIP) >> $(ZIPWRAPPER) - echo $(ZIPCMD_CDBASE) >> $(ZIPWRAPPER) -endif -ifdef inUnix - /bin/sh $(ZIPWRAPPER) -else -ifdef RUNBATCH - $(RUNBATCH) $(ZIPWRAPPER) -else - $(ZIPWRAPPER) -endif -endif - $(DEL) $(ZIPWRAPPER) -else - $(ZIPCMD_CDPACK) ; $(ZIPCMD_ZIP) ; $(ZIPCMD_CDBASE) -endif - $(DELTREE) $(PACKDIR) -fpc_zipsourceinstall: - $(MAKE) fpc_zipinstall ZIPTARGET=sourceinstall ZIPSUFFIX=$(ZIPSOURCESUFFIX) -fpc_zipexampleinstall: -ifdef HASEXAMPLES - $(MAKE) fpc_zipinstall ZIPTARGET=exampleinstall ZIPSUFFIX=$(ZIPEXAMPLESUFFIX) -endif -fpc_zipdistinstall: - $(MAKE) fpc_zipinstall ZIPTARGET=distinstall -.PHONY: fpc_clean fpc_cleanall fpc_distclean -ifdef EXEFILES -override CLEANEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(CLEANEXEFILES)) -endif -ifdef CLEAN_PROGRAMS -override CLEANEXEFILES+=$(addprefix $(TARGETDIRPREFIX),$(addsuffix $(EXEEXT), $(CLEAN_PROGRAMS))) -endif -ifdef CLEAN_UNITS -override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(CLEAN_UNITS)) -endif -ifdef CLEANPPUFILES -override CLEANPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES))) $(addprefix $(IMPORTLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES))) -ifdef DEBUGSYMEXT -override CLEANPPULINKFILES+=$(subst $(PPUEXT),$(DEBUGSYMEXT),$(CLEANPPUFILES)) -endif -override CLEANPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPUFILES)) -override CLEANPPULINKFILES:=$(wildcard $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPULINKFILES))) -endif -fpc_clean: $(CLEANTARGET) -ifdef CLEANEXEFILES - -$(DEL) $(CLEANEXEFILES) -endif -ifdef CLEANPPUFILES - -$(DEL) $(CLEANPPUFILES) -endif -ifneq ($(CLEANPPULINKFILES),) - -$(DEL) $(CLEANPPULINKFILES) -endif -ifdef CLEANRSTFILES - -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES)) -endif -ifdef CLEAN_FILES - -$(DEL) $(CLEAN_FILES) -endif -ifdef LIB_NAME - -$(DEL) $(LIB_NAME) $(LIB_FULLNAME) -endif - -$(DEL) $(FPCMADE) Package.fpc $(PPAS) script.res link.res $(FPCEXTFILE) $(REDIRFILE) - -$(DEL) *$(ASMEXT) *_ppas$(BATCHEXT) -fpc_cleanall: $(CLEANTARGET) -ifdef CLEANEXEFILES - -$(DEL) $(CLEANEXEFILES) -endif -ifdef COMPILER_UNITTARGETDIR -ifdef CLEANPPUFILES - -$(DEL) $(CLEANPPUFILES) -endif -ifneq ($(CLEANPPULINKFILES),) - -$(DEL) $(CLEANPPULINKFILES) -endif -ifdef CLEANRSTFILES - -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES)) -endif -endif -ifdef CLEAN_FILES - -$(DEL) $(CLEAN_FILES) -endif - -$(DELTREE) units - -$(DEL) *$(OEXT) *$(PPUEXT) *$(RSTEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT) -ifneq ($(PPUEXT),.ppu) - -$(DEL) *.o *.ppu *.a -endif - -$(DELTREE) *$(SMARTEXT) - -$(DEL) fpcmade.* Package.fpc $(PPAS) script.res link.res $(FPCEXTFILE) $(REDIRFILE) - -$(DEL) *_ppas$(BATCHEXT) -ifdef AOUTEXT - -$(DEL) *$(AOUTEXT) -endif -ifdef DEBUGSYMEXT - -$(DEL) *$(DEBUGSYMEXT) -endif -fpc_distclean: cleanall -.PHONY: fpc_baseinfo -override INFORULES+=fpc_baseinfo -fpc_baseinfo: - @$(ECHO) - @$(ECHO) == Package info == - @$(ECHO) Package Name..... $(PACKAGE_NAME) - @$(ECHO) Package Version.. $(PACKAGE_VERSION) - @$(ECHO) - @$(ECHO) == Configuration info == - @$(ECHO) - @$(ECHO) FPC.......... $(FPC) - @$(ECHO) FPC Version.. $(FPC_VERSION) - @$(ECHO) Source CPU... $(CPU_SOURCE) - @$(ECHO) Target CPU... $(CPU_TARGET) - @$(ECHO) Source OS.... $(OS_SOURCE) - @$(ECHO) Target OS.... $(OS_TARGET) - @$(ECHO) Full Source.. $(FULL_SOURCE) - @$(ECHO) Full Target.. $(FULL_TARGET) - @$(ECHO) SourceSuffix. $(SOURCESUFFIX) - @$(ECHO) TargetSuffix. $(TARGETSUFFIX) - @$(ECHO) - @$(ECHO) == Directory info == - @$(ECHO) - @$(ECHO) Required pkgs... $(REQUIRE_PACKAGES) - @$(ECHO) - @$(ECHO) Basedir......... $(BASEDIR) - @$(ECHO) FPCDir.......... $(FPCDIR) - @$(ECHO) CrossBinDir..... $(CROSSBINDIR) - @$(ECHO) UnitsDir........ $(UNITSDIR) - @$(ECHO) PackagesDir..... $(PACKAGESDIR) - @$(ECHO) - @$(ECHO) GCC library..... $(GCCLIBDIR) - @$(ECHO) Other library... $(OTHERLIBDIR) - @$(ECHO) - @$(ECHO) == Tools info == - @$(ECHO) - @$(ECHO) As........ $(AS) - @$(ECHO) Ld........ $(LD) - @$(ECHO) Ar........ $(AR) - @$(ECHO) Rc........ $(RC) - @$(ECHO) - @$(ECHO) Mv........ $(MVPROG) - @$(ECHO) Cp........ $(CPPROG) - @$(ECHO) Rm........ $(RMPROG) - @$(ECHO) GInstall.. $(GINSTALL) - @$(ECHO) Echo...... $(ECHO) - @$(ECHO) Shell..... $(SHELL) - @$(ECHO) Date...... $(DATE) - @$(ECHO) FPCMake... $(FPCMAKE) - @$(ECHO) PPUMove... $(PPUMOVE) - @$(ECHO) Upx....... $(UPXPROG) - @$(ECHO) Zip....... $(ZIPPROG) - @$(ECHO) - @$(ECHO) == Object info == - @$(ECHO) - @$(ECHO) Target Loaders........ $(TARGET_LOADERS) - @$(ECHO) Target Units.......... $(TARGET_UNITS) - @$(ECHO) Target Implicit Units. $(TARGET_IMPLICITUNITS) - @$(ECHO) Target Programs....... $(TARGET_PROGRAMS) - @$(ECHO) Target Dirs........... $(TARGET_DIRS) - @$(ECHO) Target Examples....... $(TARGET_EXAMPLES) - @$(ECHO) Target ExampleDirs.... $(TARGET_EXAMPLEDIRS) - @$(ECHO) - @$(ECHO) Clean Units......... $(CLEAN_UNITS) - @$(ECHO) Clean Files......... $(CLEAN_FILES) - @$(ECHO) - @$(ECHO) Install Units....... $(INSTALL_UNITS) - @$(ECHO) Install Files....... $(INSTALL_FILES) - @$(ECHO) - @$(ECHO) == Install info == - @$(ECHO) - @$(ECHO) DateStr.............. $(DATESTR) - @$(ECHO) ZipName.............. $(ZIPNAME) - @$(ECHO) ZipPrefix............ $(ZIPPREFIX) - @$(ECHO) ZipCrossPrefix....... $(ZIPCROSSPREFIX) - @$(ECHO) ZipSuffix............ $(ZIPSUFFIX) - @$(ECHO) FullZipName.......... $(FULLZIPNAME) - @$(ECHO) Install FPC Package.. $(INSTALL_FPCPACKAGE) - @$(ECHO) - @$(ECHO) Install base dir..... $(INSTALL_BASEDIR) - @$(ECHO) Install binary dir... $(INSTALL_BINDIR) - @$(ECHO) Install library dir.. $(INSTALL_LIBDIR) - @$(ECHO) Install units dir.... $(INSTALL_UNITDIR) - @$(ECHO) Install source dir... $(INSTALL_SOURCEDIR) - @$(ECHO) Install doc dir...... $(INSTALL_DOCDIR) - @$(ECHO) Install example dir.. $(INSTALL_EXAMPLEDIR) - @$(ECHO) Install data dir..... $(INSTALL_DATADIR) - @$(ECHO) - @$(ECHO) Dist destination dir. $(DIST_DESTDIR) - @$(ECHO) Dist zip name........ $(DIST_ZIPNAME) - @$(ECHO) -.PHONY: fpc_info -fpc_info: $(INFORULES) -.PHONY: fpc_makefile fpc_makefiles fpc_makefile_sub1 fpc_makefile_sub2 \ - fpc_makefile_dirs -fpc_makefile: - $(FPCMAKE) -w -T$(OS_TARGET) Makefile.fpc -fpc_makefile_sub1: -ifdef TARGET_DIRS - $(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TARGET_DIRS)) -endif -ifdef TARGET_EXAMPLEDIRS - $(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TARGET_EXAMPLEDIRS)) -endif -fpc_makefile_sub2: $(addsuffix _makefile_dirs,$(TARGET_DIRS) $(TARGET_EXAMPLEDIRS)) -fpc_makefile_dirs: fpc_makefile_sub1 fpc_makefile_sub2 -fpc_makefiles: fpc_makefile fpc_makefile_dirs -ifeq ($(FULL_TARGET),i386-linux) -TARGET_DIRS_LCL=1 -TARGET_DIRS_PACKAGER/REGISTRATION=1 -TARGET_DIRS_IDEINTF=1 -TARGET_DIRS_PACKAGER=1 -TARGET_DIRS_COMPONENTS=1 -endif -ifeq ($(FULL_TARGET),i386-go32v2) -TARGET_DIRS_LCL=1 -TARGET_DIRS_PACKAGER/REGISTRATION=1 -TARGET_DIRS_IDEINTF=1 -TARGET_DIRS_PACKAGER=1 -TARGET_DIRS_COMPONENTS=1 -endif -ifeq ($(FULL_TARGET),i386-win32) -TARGET_DIRS_LCL=1 -TARGET_DIRS_PACKAGER/REGISTRATION=1 -TARGET_DIRS_IDEINTF=1 -TARGET_DIRS_PACKAGER=1 -TARGET_DIRS_COMPONENTS=1 -endif -ifeq ($(FULL_TARGET),i386-os2) -TARGET_DIRS_LCL=1 -TARGET_DIRS_PACKAGER/REGISTRATION=1 -TARGET_DIRS_IDEINTF=1 -TARGET_DIRS_PACKAGER=1 -TARGET_DIRS_COMPONENTS=1 -endif -ifeq ($(FULL_TARGET),i386-freebsd) -TARGET_DIRS_LCL=1 -TARGET_DIRS_PACKAGER/REGISTRATION=1 -TARGET_DIRS_IDEINTF=1 -TARGET_DIRS_PACKAGER=1 -TARGET_DIRS_COMPONENTS=1 -endif -ifeq ($(FULL_TARGET),i386-beos) -TARGET_DIRS_LCL=1 -TARGET_DIRS_PACKAGER/REGISTRATION=1 -TARGET_DIRS_IDEINTF=1 -TARGET_DIRS_PACKAGER=1 -TARGET_DIRS_COMPONENTS=1 -endif -ifeq ($(FULL_TARGET),i386-haiku) -TARGET_DIRS_LCL=1 -TARGET_DIRS_PACKAGER/REGISTRATION=1 -TARGET_DIRS_IDEINTF=1 -TARGET_DIRS_PACKAGER=1 -TARGET_DIRS_COMPONENTS=1 -endif -ifeq ($(FULL_TARGET),i386-netbsd) -TARGET_DIRS_LCL=1 -TARGET_DIRS_PACKAGER/REGISTRATION=1 -TARGET_DIRS_IDEINTF=1 -TARGET_DIRS_PACKAGER=1 -TARGET_DIRS_COMPONENTS=1 -endif -ifeq ($(FULL_TARGET),i386-solaris) -TARGET_DIRS_LCL=1 -TARGET_DIRS_PACKAGER/REGISTRATION=1 -TARGET_DIRS_IDEINTF=1 -TARGET_DIRS_PACKAGER=1 -TARGET_DIRS_COMPONENTS=1 -endif -ifeq ($(FULL_TARGET),i386-qnx) -TARGET_DIRS_LCL=1 -TARGET_DIRS_PACKAGER/REGISTRATION=1 -TARGET_DIRS_IDEINTF=1 -TARGET_DIRS_PACKAGER=1 -TARGET_DIRS_COMPONENTS=1 -endif -ifeq ($(FULL_TARGET),i386-netware) -TARGET_DIRS_LCL=1 -TARGET_DIRS_PACKAGER/REGISTRATION=1 -TARGET_DIRS_IDEINTF=1 -TARGET_DIRS_PACKAGER=1 -TARGET_DIRS_COMPONENTS=1 -endif -ifeq ($(FULL_TARGET),i386-openbsd) -TARGET_DIRS_LCL=1 -TARGET_DIRS_PACKAGER/REGISTRATION=1 -TARGET_DIRS_IDEINTF=1 -TARGET_DIRS_PACKAGER=1 -TARGET_DIRS_COMPONENTS=1 -endif -ifeq ($(FULL_TARGET),i386-wdosx) -TARGET_DIRS_LCL=1 -TARGET_DIRS_PACKAGER/REGISTRATION=1 -TARGET_DIRS_IDEINTF=1 -TARGET_DIRS_PACKAGER=1 -TARGET_DIRS_COMPONENTS=1 -endif -ifeq ($(FULL_TARGET),i386-darwin) -TARGET_DIRS_LCL=1 -TARGET_DIRS_PACKAGER/REGISTRATION=1 -TARGET_DIRS_IDEINTF=1 -TARGET_DIRS_PACKAGER=1 -TARGET_DIRS_COMPONENTS=1 -endif -ifeq ($(FULL_TARGET),i386-emx) -TARGET_DIRS_LCL=1 -TARGET_DIRS_PACKAGER/REGISTRATION=1 -TARGET_DIRS_IDEINTF=1 -TARGET_DIRS_PACKAGER=1 -TARGET_DIRS_COMPONENTS=1 -endif -ifeq ($(FULL_TARGET),i386-watcom) -TARGET_DIRS_LCL=1 -TARGET_DIRS_PACKAGER/REGISTRATION=1 -TARGET_DIRS_IDEINTF=1 -TARGET_DIRS_PACKAGER=1 -TARGET_DIRS_COMPONENTS=1 -endif -ifeq ($(FULL_TARGET),i386-netwlibc) -TARGET_DIRS_LCL=1 -TARGET_DIRS_PACKAGER/REGISTRATION=1 -TARGET_DIRS_IDEINTF=1 -TARGET_DIRS_PACKAGER=1 -TARGET_DIRS_COMPONENTS=1 -endif -ifeq ($(FULL_TARGET),i386-wince) -TARGET_DIRS_LCL=1 -TARGET_DIRS_PACKAGER/REGISTRATION=1 -TARGET_DIRS_IDEINTF=1 -TARGET_DIRS_PACKAGER=1 -TARGET_DIRS_COMPONENTS=1 -endif -ifeq ($(FULL_TARGET),i386-embedded) -TARGET_DIRS_LCL=1 -TARGET_DIRS_PACKAGER/REGISTRATION=1 -TARGET_DIRS_IDEINTF=1 -TARGET_DIRS_PACKAGER=1 -TARGET_DIRS_COMPONENTS=1 -endif -ifeq ($(FULL_TARGET),i386-symbian) -TARGET_DIRS_LCL=1 -TARGET_DIRS_PACKAGER/REGISTRATION=1 -TARGET_DIRS_IDEINTF=1 -TARGET_DIRS_PACKAGER=1 -TARGET_DIRS_COMPONENTS=1 -endif -ifeq ($(FULL_TARGET),i386-nativent) -TARGET_DIRS_LCL=1 -TARGET_DIRS_PACKAGER/REGISTRATION=1 -TARGET_DIRS_IDEINTF=1 -TARGET_DIRS_PACKAGER=1 -TARGET_DIRS_COMPONENTS=1 -endif -ifeq ($(FULL_TARGET),m68k-linux) -TARGET_DIRS_LCL=1 -TARGET_DIRS_PACKAGER/REGISTRATION=1 -TARGET_DIRS_IDEINTF=1 -TARGET_DIRS_PACKAGER=1 -TARGET_DIRS_COMPONENTS=1 -endif -ifeq ($(FULL_TARGET),m68k-freebsd) -TARGET_DIRS_LCL=1 -TARGET_DIRS_PACKAGER/REGISTRATION=1 -TARGET_DIRS_IDEINTF=1 -TARGET_DIRS_PACKAGER=1 -TARGET_DIRS_COMPONENTS=1 -endif -ifeq ($(FULL_TARGET),m68k-netbsd) -TARGET_DIRS_LCL=1 -TARGET_DIRS_PACKAGER/REGISTRATION=1 -TARGET_DIRS_IDEINTF=1 -TARGET_DIRS_PACKAGER=1 -TARGET_DIRS_COMPONENTS=1 -endif -ifeq ($(FULL_TARGET),m68k-amiga) -TARGET_DIRS_LCL=1 -TARGET_DIRS_PACKAGER/REGISTRATION=1 -TARGET_DIRS_IDEINTF=1 -TARGET_DIRS_PACKAGER=1 -TARGET_DIRS_COMPONENTS=1 -endif -ifeq ($(FULL_TARGET),m68k-atari) -TARGET_DIRS_LCL=1 -TARGET_DIRS_PACKAGER/REGISTRATION=1 -TARGET_DIRS_IDEINTF=1 -TARGET_DIRS_PACKAGER=1 -TARGET_DIRS_COMPONENTS=1 -endif -ifeq ($(FULL_TARGET),m68k-openbsd) -TARGET_DIRS_LCL=1 -TARGET_DIRS_PACKAGER/REGISTRATION=1 -TARGET_DIRS_IDEINTF=1 -TARGET_DIRS_PACKAGER=1 -TARGET_DIRS_COMPONENTS=1 -endif -ifeq ($(FULL_TARGET),m68k-palmos) -TARGET_DIRS_LCL=1 -TARGET_DIRS_PACKAGER/REGISTRATION=1 -TARGET_DIRS_IDEINTF=1 -TARGET_DIRS_PACKAGER=1 -TARGET_DIRS_COMPONENTS=1 -endif -ifeq ($(FULL_TARGET),m68k-embedded) -TARGET_DIRS_LCL=1 -TARGET_DIRS_PACKAGER/REGISTRATION=1 -TARGET_DIRS_IDEINTF=1 -TARGET_DIRS_PACKAGER=1 -TARGET_DIRS_COMPONENTS=1 -endif -ifeq ($(FULL_TARGET),powerpc-linux) -TARGET_DIRS_LCL=1 -TARGET_DIRS_PACKAGER/REGISTRATION=1 -TARGET_DIRS_IDEINTF=1 -TARGET_DIRS_PACKAGER=1 -TARGET_DIRS_COMPONENTS=1 -endif -ifeq ($(FULL_TARGET),powerpc-netbsd) -TARGET_DIRS_LCL=1 -TARGET_DIRS_PACKAGER/REGISTRATION=1 -TARGET_DIRS_IDEINTF=1 -TARGET_DIRS_PACKAGER=1 -TARGET_DIRS_COMPONENTS=1 -endif -ifeq ($(FULL_TARGET),powerpc-amiga) -TARGET_DIRS_LCL=1 -TARGET_DIRS_PACKAGER/REGISTRATION=1 -TARGET_DIRS_IDEINTF=1 -TARGET_DIRS_PACKAGER=1 -TARGET_DIRS_COMPONENTS=1 -endif -ifeq ($(FULL_TARGET),powerpc-macos) -TARGET_DIRS_LCL=1 -TARGET_DIRS_PACKAGER/REGISTRATION=1 -TARGET_DIRS_IDEINTF=1 -TARGET_DIRS_PACKAGER=1 -TARGET_DIRS_COMPONENTS=1 -endif -ifeq ($(FULL_TARGET),powerpc-darwin) -TARGET_DIRS_LCL=1 -TARGET_DIRS_PACKAGER/REGISTRATION=1 -TARGET_DIRS_IDEINTF=1 -TARGET_DIRS_PACKAGER=1 -TARGET_DIRS_COMPONENTS=1 -endif -ifeq ($(FULL_TARGET),powerpc-morphos) -TARGET_DIRS_LCL=1 -TARGET_DIRS_PACKAGER/REGISTRATION=1 -TARGET_DIRS_IDEINTF=1 -TARGET_DIRS_PACKAGER=1 -TARGET_DIRS_COMPONENTS=1 -endif -ifeq ($(FULL_TARGET),powerpc-embedded) -TARGET_DIRS_LCL=1 -TARGET_DIRS_PACKAGER/REGISTRATION=1 -TARGET_DIRS_IDEINTF=1 -TARGET_DIRS_PACKAGER=1 -TARGET_DIRS_COMPONENTS=1 -endif -ifeq ($(FULL_TARGET),sparc-linux) -TARGET_DIRS_LCL=1 -TARGET_DIRS_PACKAGER/REGISTRATION=1 -TARGET_DIRS_IDEINTF=1 -TARGET_DIRS_PACKAGER=1 -TARGET_DIRS_COMPONENTS=1 -endif -ifeq ($(FULL_TARGET),sparc-netbsd) -TARGET_DIRS_LCL=1 -TARGET_DIRS_PACKAGER/REGISTRATION=1 -TARGET_DIRS_IDEINTF=1 -TARGET_DIRS_PACKAGER=1 -TARGET_DIRS_COMPONENTS=1 -endif -ifeq ($(FULL_TARGET),sparc-solaris) -TARGET_DIRS_LCL=1 -TARGET_DIRS_PACKAGER/REGISTRATION=1 -TARGET_DIRS_IDEINTF=1 -TARGET_DIRS_PACKAGER=1 -TARGET_DIRS_COMPONENTS=1 -endif -ifeq ($(FULL_TARGET),sparc-embedded) -TARGET_DIRS_LCL=1 -TARGET_DIRS_PACKAGER/REGISTRATION=1 -TARGET_DIRS_IDEINTF=1 -TARGET_DIRS_PACKAGER=1 -TARGET_DIRS_COMPONENTS=1 -endif -ifeq ($(FULL_TARGET),x86_64-linux) -TARGET_DIRS_LCL=1 -TARGET_DIRS_PACKAGER/REGISTRATION=1 -TARGET_DIRS_IDEINTF=1 -TARGET_DIRS_PACKAGER=1 -TARGET_DIRS_COMPONENTS=1 -endif -ifeq ($(FULL_TARGET),x86_64-freebsd) -TARGET_DIRS_LCL=1 -TARGET_DIRS_PACKAGER/REGISTRATION=1 -TARGET_DIRS_IDEINTF=1 -TARGET_DIRS_PACKAGER=1 -TARGET_DIRS_COMPONENTS=1 -endif -ifeq ($(FULL_TARGET),x86_64-solaris) -TARGET_DIRS_LCL=1 -TARGET_DIRS_PACKAGER/REGISTRATION=1 -TARGET_DIRS_IDEINTF=1 -TARGET_DIRS_PACKAGER=1 -TARGET_DIRS_COMPONENTS=1 -endif -ifeq ($(FULL_TARGET),x86_64-darwin) -TARGET_DIRS_LCL=1 -TARGET_DIRS_PACKAGER/REGISTRATION=1 -TARGET_DIRS_IDEINTF=1 -TARGET_DIRS_PACKAGER=1 -TARGET_DIRS_COMPONENTS=1 -endif -ifeq ($(FULL_TARGET),x86_64-win64) -TARGET_DIRS_LCL=1 -TARGET_DIRS_PACKAGER/REGISTRATION=1 -TARGET_DIRS_IDEINTF=1 -TARGET_DIRS_PACKAGER=1 -TARGET_DIRS_COMPONENTS=1 -endif -ifeq ($(FULL_TARGET),x86_64-embedded) -TARGET_DIRS_LCL=1 -TARGET_DIRS_PACKAGER/REGISTRATION=1 -TARGET_DIRS_IDEINTF=1 -TARGET_DIRS_PACKAGER=1 -TARGET_DIRS_COMPONENTS=1 -endif -ifeq ($(FULL_TARGET),arm-linux) -TARGET_DIRS_LCL=1 -TARGET_DIRS_PACKAGER/REGISTRATION=1 -TARGET_DIRS_IDEINTF=1 -TARGET_DIRS_PACKAGER=1 -TARGET_DIRS_COMPONENTS=1 -endif -ifeq ($(FULL_TARGET),arm-palmos) -TARGET_DIRS_LCL=1 -TARGET_DIRS_PACKAGER/REGISTRATION=1 -TARGET_DIRS_IDEINTF=1 -TARGET_DIRS_PACKAGER=1 -TARGET_DIRS_COMPONENTS=1 -endif -ifeq ($(FULL_TARGET),arm-darwin) -TARGET_DIRS_LCL=1 -TARGET_DIRS_PACKAGER/REGISTRATION=1 -TARGET_DIRS_IDEINTF=1 -TARGET_DIRS_PACKAGER=1 -TARGET_DIRS_COMPONENTS=1 -endif -ifeq ($(FULL_TARGET),arm-wince) -TARGET_DIRS_LCL=1 -TARGET_DIRS_PACKAGER/REGISTRATION=1 -TARGET_DIRS_IDEINTF=1 -TARGET_DIRS_PACKAGER=1 -TARGET_DIRS_COMPONENTS=1 -endif -ifeq ($(FULL_TARGET),arm-gba) -TARGET_DIRS_LCL=1 -TARGET_DIRS_PACKAGER/REGISTRATION=1 -TARGET_DIRS_IDEINTF=1 -TARGET_DIRS_PACKAGER=1 -TARGET_DIRS_COMPONENTS=1 -endif -ifeq ($(FULL_TARGET),arm-nds) -TARGET_DIRS_LCL=1 -TARGET_DIRS_PACKAGER/REGISTRATION=1 -TARGET_DIRS_IDEINTF=1 -TARGET_DIRS_PACKAGER=1 -TARGET_DIRS_COMPONENTS=1 -endif -ifeq ($(FULL_TARGET),arm-embedded) -TARGET_DIRS_LCL=1 -TARGET_DIRS_PACKAGER/REGISTRATION=1 -TARGET_DIRS_IDEINTF=1 -TARGET_DIRS_PACKAGER=1 -TARGET_DIRS_COMPONENTS=1 -endif -ifeq ($(FULL_TARGET),arm-symbian) -TARGET_DIRS_LCL=1 -TARGET_DIRS_PACKAGER/REGISTRATION=1 -TARGET_DIRS_IDEINTF=1 -TARGET_DIRS_PACKAGER=1 -TARGET_DIRS_COMPONENTS=1 -endif -ifeq ($(FULL_TARGET),powerpc64-linux) -TARGET_DIRS_LCL=1 -TARGET_DIRS_PACKAGER/REGISTRATION=1 -TARGET_DIRS_IDEINTF=1 -TARGET_DIRS_PACKAGER=1 -TARGET_DIRS_COMPONENTS=1 -endif -ifeq ($(FULL_TARGET),powerpc64-darwin) -TARGET_DIRS_LCL=1 -TARGET_DIRS_PACKAGER/REGISTRATION=1 -TARGET_DIRS_IDEINTF=1 -TARGET_DIRS_PACKAGER=1 -TARGET_DIRS_COMPONENTS=1 -endif -ifeq ($(FULL_TARGET),powerpc64-embedded) -TARGET_DIRS_LCL=1 -TARGET_DIRS_PACKAGER/REGISTRATION=1 -TARGET_DIRS_IDEINTF=1 -TARGET_DIRS_PACKAGER=1 -TARGET_DIRS_COMPONENTS=1 -endif -ifeq ($(FULL_TARGET),avr-embedded) -TARGET_DIRS_LCL=1 -TARGET_DIRS_PACKAGER/REGISTRATION=1 -TARGET_DIRS_IDEINTF=1 -TARGET_DIRS_PACKAGER=1 -TARGET_DIRS_COMPONENTS=1 -endif -ifeq ($(FULL_TARGET),armeb-linux) -TARGET_DIRS_LCL=1 -TARGET_DIRS_PACKAGER/REGISTRATION=1 -TARGET_DIRS_IDEINTF=1 -TARGET_DIRS_PACKAGER=1 -TARGET_DIRS_COMPONENTS=1 -endif -ifeq ($(FULL_TARGET),armeb-embedded) -TARGET_DIRS_LCL=1 -TARGET_DIRS_PACKAGER/REGISTRATION=1 -TARGET_DIRS_IDEINTF=1 -TARGET_DIRS_PACKAGER=1 -TARGET_DIRS_COMPONENTS=1 -endif -ifeq ($(FULL_TARGET),mipsel-linux) -TARGET_DIRS_LCL=1 -TARGET_DIRS_PACKAGER/REGISTRATION=1 -TARGET_DIRS_IDEINTF=1 -TARGET_DIRS_PACKAGER=1 -TARGET_DIRS_COMPONENTS=1 -endif -ifdef TARGET_DIRS_LCL -lcl_all: - $(MAKE) -C lcl all -lcl_debug: - $(MAKE) -C lcl debug -lcl_smart: - $(MAKE) -C lcl smart -lcl_release: - $(MAKE) -C lcl release -lcl_units: - $(MAKE) -C lcl units -lcl_examples: - $(MAKE) -C lcl examples -lcl_shared: - $(MAKE) -C lcl shared -lcl_install: - $(MAKE) -C lcl install -lcl_sourceinstall: - $(MAKE) -C lcl sourceinstall -lcl_exampleinstall: - $(MAKE) -C lcl exampleinstall -lcl_distinstall: - $(MAKE) -C lcl distinstall -lcl_zipinstall: - $(MAKE) -C lcl zipinstall -lcl_zipsourceinstall: - $(MAKE) -C lcl zipsourceinstall -lcl_zipexampleinstall: - $(MAKE) -C lcl zipexampleinstall -lcl_zipdistinstall: - $(MAKE) -C lcl zipdistinstall -lcl_clean: - $(MAKE) -C lcl clean -lcl_distclean: - $(MAKE) -C lcl distclean -lcl_cleanall: - $(MAKE) -C lcl cleanall -lcl_info: - $(MAKE) -C lcl info -lcl_makefiles: - $(MAKE) -C lcl makefiles -lcl: - $(MAKE) -C lcl all -.PHONY: lcl_all lcl_debug lcl_smart lcl_release lcl_units lcl_examples lcl_shared lcl_install lcl_sourceinstall lcl_exampleinstall lcl_distinstall lcl_zipinstall lcl_zipsourceinstall lcl_zipexampleinstall lcl_zipdistinstall lcl_clean lcl_distclean lcl_cleanall lcl_info lcl_makefiles lcl -endif -ifdef TARGET_DIRS_PACKAGER/REGISTRATION -packager/registration_all: - $(MAKE) -C packager/registration all -packager/registration_debug: - $(MAKE) -C packager/registration debug -packager/registration_smart: - $(MAKE) -C packager/registration smart -packager/registration_release: - $(MAKE) -C packager/registration release -packager/registration_units: - $(MAKE) -C packager/registration units -packager/registration_examples: - $(MAKE) -C packager/registration examples -packager/registration_shared: - $(MAKE) -C packager/registration shared -packager/registration_install: - $(MAKE) -C packager/registration install -packager/registration_sourceinstall: - $(MAKE) -C packager/registration sourceinstall -packager/registration_exampleinstall: - $(MAKE) -C packager/registration exampleinstall -packager/registration_distinstall: - $(MAKE) -C packager/registration distinstall -packager/registration_zipinstall: - $(MAKE) -C packager/registration zipinstall -packager/registration_zipsourceinstall: - $(MAKE) -C packager/registration zipsourceinstall -packager/registration_zipexampleinstall: - $(MAKE) -C packager/registration zipexampleinstall -packager/registration_zipdistinstall: - $(MAKE) -C packager/registration zipdistinstall -packager/registration_clean: - $(MAKE) -C packager/registration clean -packager/registration_distclean: - $(MAKE) -C packager/registration distclean -packager/registration_cleanall: - $(MAKE) -C packager/registration cleanall -packager/registration_info: - $(MAKE) -C packager/registration info -packager/registration_makefiles: - $(MAKE) -C packager/registration makefiles -packager/registration: - $(MAKE) -C packager/registration all -.PHONY: packager/registration_all packager/registration_debug packager/registration_smart packager/registration_release packager/registration_units packager/registration_examples packager/registration_shared packager/registration_install packager/registration_sourceinstall packager/registration_exampleinstall packager/registration_distinstall packager/registration_zipinstall packager/registration_zipsourceinstall packager/registration_zipexampleinstall packager/registration_zipdistinstall packager/registration_clean packager/registration_distclean packager/registration_cleanall packager/registration_info packager/registration_makefiles packager/registration -endif -ifdef TARGET_DIRS_IDEINTF -ideintf_all: - $(MAKE) -C ideintf all -ideintf_debug: - $(MAKE) -C ideintf debug -ideintf_smart: - $(MAKE) -C ideintf smart -ideintf_release: - $(MAKE) -C ideintf release -ideintf_units: - $(MAKE) -C ideintf units -ideintf_examples: - $(MAKE) -C ideintf examples -ideintf_shared: - $(MAKE) -C ideintf shared -ideintf_install: - $(MAKE) -C ideintf install -ideintf_sourceinstall: - $(MAKE) -C ideintf sourceinstall -ideintf_exampleinstall: - $(MAKE) -C ideintf exampleinstall -ideintf_distinstall: - $(MAKE) -C ideintf distinstall -ideintf_zipinstall: - $(MAKE) -C ideintf zipinstall -ideintf_zipsourceinstall: - $(MAKE) -C ideintf zipsourceinstall -ideintf_zipexampleinstall: - $(MAKE) -C ideintf zipexampleinstall -ideintf_zipdistinstall: - $(MAKE) -C ideintf zipdistinstall -ideintf_clean: - $(MAKE) -C ideintf clean -ideintf_distclean: - $(MAKE) -C ideintf distclean -ideintf_cleanall: - $(MAKE) -C ideintf cleanall -ideintf_info: - $(MAKE) -C ideintf info -ideintf_makefiles: - $(MAKE) -C ideintf makefiles -ideintf: - $(MAKE) -C ideintf all -.PHONY: ideintf_all ideintf_debug ideintf_smart ideintf_release ideintf_units ideintf_examples ideintf_shared ideintf_install ideintf_sourceinstall ideintf_exampleinstall ideintf_distinstall ideintf_zipinstall ideintf_zipsourceinstall ideintf_zipexampleinstall ideintf_zipdistinstall ideintf_clean ideintf_distclean ideintf_cleanall ideintf_info ideintf_makefiles ideintf -endif -ifdef TARGET_DIRS_PACKAGER -packager_all: - $(MAKE) -C packager all -packager_debug: - $(MAKE) -C packager debug -packager_smart: - $(MAKE) -C packager smart -packager_release: - $(MAKE) -C packager release -packager_units: - $(MAKE) -C packager units -packager_examples: - $(MAKE) -C packager examples -packager_shared: - $(MAKE) -C packager shared -packager_install: - $(MAKE) -C packager install -packager_sourceinstall: - $(MAKE) -C packager sourceinstall -packager_exampleinstall: - $(MAKE) -C packager exampleinstall -packager_distinstall: - $(MAKE) -C packager distinstall -packager_zipinstall: - $(MAKE) -C packager zipinstall -packager_zipsourceinstall: - $(MAKE) -C packager zipsourceinstall -packager_zipexampleinstall: - $(MAKE) -C packager zipexampleinstall -packager_zipdistinstall: - $(MAKE) -C packager zipdistinstall -packager_clean: - $(MAKE) -C packager clean -packager_distclean: - $(MAKE) -C packager distclean -packager_cleanall: - $(MAKE) -C packager cleanall -packager_info: - $(MAKE) -C packager info -packager_makefiles: - $(MAKE) -C packager makefiles -packager: - $(MAKE) -C packager all -.PHONY: packager_all packager_debug packager_smart packager_release packager_units packager_examples packager_shared packager_install packager_sourceinstall packager_exampleinstall packager_distinstall packager_zipinstall packager_zipsourceinstall packager_zipexampleinstall packager_zipdistinstall packager_clean packager_distclean packager_cleanall packager_info packager_makefiles packager -endif -ifdef TARGET_DIRS_COMPONENTS -components_all: - $(MAKE) -C components all -components_debug: - $(MAKE) -C components debug -components_smart: - $(MAKE) -C components smart -components_release: - $(MAKE) -C components release -components_units: - $(MAKE) -C components units -components_examples: - $(MAKE) -C components examples -components_shared: - $(MAKE) -C components shared -components_install: - $(MAKE) -C components install -components_sourceinstall: - $(MAKE) -C components sourceinstall -components_exampleinstall: - $(MAKE) -C components exampleinstall -components_distinstall: - $(MAKE) -C components distinstall -components_zipinstall: - $(MAKE) -C components zipinstall -components_zipsourceinstall: - $(MAKE) -C components zipsourceinstall -components_zipexampleinstall: - $(MAKE) -C components zipexampleinstall -components_zipdistinstall: - $(MAKE) -C components zipdistinstall -components_clean: - $(MAKE) -C components clean -components_distclean: - $(MAKE) -C components distclean -components_cleanall: - $(MAKE) -C components cleanall -components_info: - $(MAKE) -C components info -components_makefiles: - $(MAKE) -C components makefiles -components: - $(MAKE) -C components all -.PHONY: components_all components_debug components_smart components_release components_units components_examples components_shared components_install components_sourceinstall components_exampleinstall components_distinstall components_zipinstall components_zipsourceinstall components_zipexampleinstall components_zipdistinstall components_clean components_distclean components_cleanall components_info components_makefiles components -endif -ifeq ($(FULL_TARGET),i386-linux) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),i386-go32v2) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),i386-win32) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),i386-os2) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),i386-freebsd) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),i386-beos) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),i386-haiku) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),i386-netbsd) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),i386-solaris) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),i386-qnx) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),i386-netware) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),i386-openbsd) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),i386-wdosx) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),i386-darwin) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),i386-emx) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),i386-watcom) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),i386-netwlibc) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),i386-wince) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),i386-embedded) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),i386-symbian) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),i386-nativent) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),m68k-linux) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),m68k-freebsd) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),m68k-netbsd) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),m68k-amiga) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),m68k-atari) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),m68k-openbsd) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),m68k-palmos) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),m68k-embedded) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),powerpc-linux) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),powerpc-netbsd) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),powerpc-amiga) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),powerpc-macos) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),powerpc-darwin) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),powerpc-morphos) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),powerpc-embedded) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),sparc-linux) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),sparc-netbsd) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),sparc-solaris) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),sparc-embedded) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),x86_64-linux) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),x86_64-freebsd) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),x86_64-solaris) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),x86_64-darwin) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),x86_64-win64) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),x86_64-embedded) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),arm-linux) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),arm-palmos) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),arm-darwin) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),arm-wince) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),arm-gba) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),arm-nds) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),arm-embedded) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),arm-symbian) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),powerpc64-linux) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),powerpc64-darwin) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),powerpc64-embedded) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),avr-embedded) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),armeb-linux) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),armeb-embedded) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),mipsel-linux) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifdef TARGET_EXAMPLEDIRS_EXAMPLES -examples_all: - $(MAKE) -C examples all -examples_debug: - $(MAKE) -C examples debug -examples_smart: - $(MAKE) -C examples smart -examples_release: - $(MAKE) -C examples release -examples_units: - $(MAKE) -C examples units -examples_examples: - $(MAKE) -C examples examples -examples_shared: - $(MAKE) -C examples shared -examples_install: - $(MAKE) -C examples install -examples_sourceinstall: - $(MAKE) -C examples sourceinstall -examples_exampleinstall: - $(MAKE) -C examples exampleinstall -examples_distinstall: - $(MAKE) -C examples distinstall -examples_zipinstall: - $(MAKE) -C examples zipinstall -examples_zipsourceinstall: - $(MAKE) -C examples zipsourceinstall -examples_zipexampleinstall: - $(MAKE) -C examples zipexampleinstall -examples_zipdistinstall: - $(MAKE) -C examples zipdistinstall -examples_clean: - $(MAKE) -C examples clean -examples_distclean: - $(MAKE) -C examples distclean -examples_cleanall: - $(MAKE) -C examples cleanall -examples_info: - $(MAKE) -C examples info -examples_makefiles: - $(MAKE) -C examples makefiles -examples: - $(MAKE) -C examples all -.PHONY: examples_all examples_debug examples_smart examples_release examples_units examples_examples examples_shared examples_install examples_sourceinstall examples_exampleinstall examples_distinstall examples_zipinstall examples_zipsourceinstall examples_zipexampleinstall examples_zipdistinstall examples_clean examples_distclean examples_cleanall examples_info examples_makefiles examples -endif -debug: fpc_debug -smart: fpc_smart -release: fpc_release -units: fpc_units $(addsuffix _units,$(TARGET_DIRS)) -shared: fpc_shared -sourceinstall: fpc_sourceinstall -exampleinstall: fpc_exampleinstall $(addsuffix _exampleinstall,$(TARGET_DIRS)) -distinstall: fpc_distinstall -zipinstall: fpc_zipinstall -zipsourceinstall: fpc_zipsourceinstall -zipexampleinstall: fpc_zipexampleinstall $(addsuffix _zipexampleinstall,$(TARGET_DIRS)) -zipdistinstall: fpc_zipdistinstall -distclean: fpc_distclean $(addsuffix _distclean,$(TARGET_DIRS)) -info: fpc_info -makefiles: fpc_makefiles -.PHONY: debug smart release units shared sourceinstall exampleinstall distinstall zipinstall zipsourceinstall zipexampleinstall zipdistinstall distclean info makefiles -ifneq ($(wildcard fpcmake.loc),) -include fpcmake.loc -endif -.PHONY: lcl components packager/registration ideintf packager bigidecomponents ide idepkg idebig bigide starter lazbuilder tools all clean cleanide purge examples install lazbuild -ide: - $(MAKE) -C ide ide -idepkg: - $(MAKE) -C ide idepkg -bigide: lcl packager/registration ideintf packager bigidecomponents idebig starter lazbuilder -idebig: - $(MAKE) -C ide bigide -bigidecomponents: - $(MAKE) -C components bigidecomponents -bigideclean: cleanlaz - $(MAKE) -C components bigideclean -starter: - $(MAKE) -C ide starter -lazbuild: lazbuilder -lazbuilder: - $(MAKE) -C lcl/interfaces/nogui - $(MAKE) -C ide lazbuilder LCL_PLATFORM=nogui -tools: lcl - $(MAKE) -C tools -examples: lcl components -all: lcl packager/registration ideintf packager components ide starter lazbuilder -cleanide: - $(MAKE) -C ide cleanide -cleanlaz: cleanide - $(MAKE) -C lcl clean - $(MAKE) -C components clean - $(MAKE) -C packager clean - $(MAKE) -C ideintf clean -purge: cleanlaz - $(MAKE) -C examples clean - $(MAKE) -C tools clean - $(MAKE) -C tools clean -clean: cleanlaz -cleanall: purge -installbase: -ifneq ($(findstring $(OS_TARGET),win32 win64),) -else - $(MKDIR) $(INSTALL_PREFIX)/share - $(MKDIR) $(INSTALL_PREFIX)/share/lazarus - $(MKDIR) $(INSTALL_BINDIR) - $(MKDIR) $(INSTALL_MAN_DIR) - $(MKDIR) $(INSTALL_MAN_DIR)/man1 -endif -install: - $(MAKE) installbase - $(COPYTREE) . $(LAZARUS_INSTALL_DIR) -ifneq ($(findstring $(OS_TARGET),win32 win64),) -else - ln -sf $(LAZARUS_INSTALL_DIR)/lazarus $(INSTALL_PREFIX)/bin/lazarus-ide - ln -sf $(LAZARUS_INSTALL_DIR)/startlazarus $(INSTALL_PREFIX)/bin/startlazarus - ln -sf $(LAZARUS_INSTALL_DIR)/lazbuild $(INSTALL_PREFIX)/bin/lazbuild - cat install/man/man1/lazarus-ide.1 | gzip > $(INSTALL_MAN_DIR)/man1/lazarus-ide.1.gz - cat install/man/man1/startlazarus.1 | gzip > $(INSTALL_MAN_DIR)/man1/startlazarus.1.gz - cat install/man/man1/lazbuild.1 | gzip > $(INSTALL_MAN_DIR)/man1/lazbuild.1.gz -endif -ifndef BUILDDIR -BUILDDIR=$(BASEDIR)/build -endif -ifeq ($(OS_TARGET),linux) -ifndef DEBDIR -DEBDIR=debian -endif -ifdef LINKISCOPY -ifndef LINKTREE -LINKTREE:=$(CPPROG) -Rfpl -endif -else -ifndef LINKTREE -LINKTREE:=$(CPPROG) -Rfpl -endif -endif -ifneq ($(wildcard ${DEBDIR}/changelog),) -.PHONY: debcopy deb -DEBPACKAGEVERSION:=$(shell head -n 1 ${DEBDIR}/changelog | awk '{ print $$2 }' | tr -d '[()]') -DEBVERSION=$(firstword $(subst -, ,${DEBPACKAGEVERSION})) -DEBBUILD=$(lastword $(subst -, ,${DEBPACKAGEVERSION})) -DEBSRC=${PACKAGE_NAME}-${DEBVERSION} -DEBSRCDIR=${BUILDDIR}/${DEBSRC} -DEBSRC_ORIG=${PACKAGE_NAME}_${DEBVERSION}.orig -BUILDDATE=$(shell /bin/date --utc +%Y%m%d) -ifdef MENTORS -DEB_BUILDPKG_OPT=-sa -else -DEB_BUILDPKG_OPT= -endif -ifeq (${DEBBUILD},0) -DEBUSESVN=1 -endif -ifeq (${DEBBUILD},1) -DEBUSESVN=1 -endif -ifdef SNAPSHOT -DEBUSESVN=1 -endif -ifndef SIGN -DEB_BUILDPKG_OPT+= -us -uc -endif -debcheck: -ifneq ($(DEBVERSION),$(PACKAGE_VERSION)) - ! ${ECHO} "Debian version ($(DEBVERSION)) is not correct, expect $(PACKAGE_VERSION)" -endif -ifeq ($(wildcard ${DEBSRC_ORIG}.tar.gz),) -ifndef DEBUSESVN - ! ${ECHO} 'Need "${DEBSRC_ORIG}.tar.gz" to build for DEBBUILD = "${DEBBUILD}" > 1' -endif -endif -debcopy: distclean - ${DELTREE} ${BUILDDIR} - ${MKDIRTREE} ${DEBSRCDIR} -ifdef DEBUSESVN - $(LINKTREE) -t $(DEBSRCDIR) \ - Makefile.fpc COPYING.* README.txt \ - components \ - converter \ - debugger \ - designer \ - doceditor \ - docs \ - install \ - examples \ - ide \ - ideintf \ - images \ - languages \ - lazarus.app \ - lcl \ - packager \ - test \ - tools - # add ide/revision.inc - echo "const RevisionStr = '${SVNVERSION}';" > $(DEBSRCDIR)/ide/revision.inc -else - tar -C ${BUILDDIR} -zxf ${DEBSRC_ORIG}.tar.gz ${DEBSRC} - ${DELTREE} $(DEBSRCDIR)/debian -endif -debsetup: - $(COPYTREE) ${DEBDIR} $(DEBSRCDIR)/debian -ifdef SNAPSHOT - sed -e "s/${DEBPACKAGEVERSION}/${DEBPACKAGEVERSION}-${BUILDDATE}/" $(DEBSRCDIR)/debian/changelog > $(DEBSRCDIR)/debian/changelog.tmp - ${MOVE} $(DEBSRCDIR)/debian/changelog.tmp $(DEBSRCDIR)/debian/changelog -endif - chmod 755 $(DEBSRCDIR)/debian/rules - find $(DEBSRCDIR) -name '.svn' | xargs ${DELTREE} -debbuild: - cd ${DEBSRCDIR} ; dpkg-buildpackage ${DEB_BUILDPKG_OPT} -debcheckpolicy: -ifdef LINTIAN - cd ${DEBSRCDIR} ; lintian -I -i ../*.changes -endif -debclean: -ifndef DEBUSESVN - ${DEL} ${BUILDDIR}/${DEBSRC_ORIG}.tar.gz -endif - mv -v -t . \ - $(DEBSRCDIR)/../*.changes \ - $(DEBSRCDIR)/../*.deb \ - $(DEBSRCDIR)/../*.dsc \ - $(DEBSRCDIR)/../*.gz - ${DELTREE} $(DEBSRCDIR) - rmdir $(BUILDDIR) -deb: debcheck debcopy deborigtargz debsetup debbuild debcheckpolicy debclean -deborigtargz: -ifdef DEBUSESVN - tar -C ${BUILDDIR} -zcf ${BUILDDIR}/${DEBSRC_ORIG}.tar.gz --exclude-vcs ${DEBSRC} -else - ${LINKTREE} ${DEBSRC_ORIG}.tar.gz ${BUILDDIR}/${DEBSRC_ORIG}.tar.gz -endif -endif # changelog found -endif diff -Nru lazarus-0.9.30/Makefile.fpc lazarus-0.9.30.2/Makefile.fpc --- lazarus-0.9.30/Makefile.fpc 2011-02-13 11:29:00.000000000 +0000 +++ lazarus-0.9.30.2/Makefile.fpc 2011-11-23 16:28:22.000000000 +0000 @@ -11,7 +11,7 @@ [target] programs=lazarus startlazarus -dirs=lcl packager/registration ideintf packager components +dirs=lcl packager/registration ideintf components exampledirs=examples [compiler] @@ -45,7 +45,7 @@ #----------------------------------------------------------------------------- [rules] -.PHONY: lcl components packager/registration ideintf packager bigidecomponents ide idepkg idebig bigide starter lazbuilder tools all clean cleanide purge examples install lazbuild +.PHONY: lcl components packager/registration ideintf bigidecomponents ide idepkg idebig bigide starter lazbuilder tools all clean cleanide cleannogui purge examples install lazbuild #----------------------------------------------------------------------------- ide: @@ -56,7 +56,7 @@ $(MAKE) -C ide idepkg #----------------------------------------------------------------------------- -bigide: lcl packager/registration ideintf packager bigidecomponents idebig starter lazbuilder +bigide: packager/registration lcl ideintf bigidecomponents idebig starter lazbuilder #----------------------------------------------------------------------------- idebig: @@ -88,21 +88,23 @@ examples: lcl components #----------------------------------------------------------------------------- -all: lcl packager/registration ideintf packager components ide starter lazbuilder +all: packager/registration lcl ideintf components ide starter lazbuilder #----------------------------------------------------------------------------- +cleannogui: + $(MAKE) -C lcl/interfaces/nogui clean LCL_PLATFORM=nogui + cleanide: $(MAKE) -C ide cleanide -cleanlaz: cleanide +cleanlaz: cleanide cleannogui $(MAKE) -C lcl clean $(MAKE) -C components clean - $(MAKE) -C packager clean + $(MAKE) -C packager/registration clean $(MAKE) -C ideintf clean purge: cleanlaz $(MAKE) -C examples clean - $(MAKE) -C tools clean # $(MAKE) -C doceditor clean $(MAKE) -C tools clean @@ -237,8 +239,7 @@ debsetup: $(COPYTREE) ${DEBDIR} $(DEBSRCDIR)/debian ifdef SNAPSHOT - sed -e "s/${DEBPACKAGEVERSION}/${DEBPACKAGEVERSION}-${BUILDDATE}/" $(DEBSRCDIR)/debian/changelog > $(DEBSRCDIR)/debian/changelog.tmp - ${MOVE} $(DEBSRCDIR)/debian/changelog.tmp $(DEBSRCDIR)/debian/changelog + sed -e 's/${DEBPACKAGEVERSION}/${DEBPACKAGEVERSION}~${BUILDDATE}/' -i $(DEBSRCDIR)/debian/changelog endif chmod 755 $(DEBSRCDIR)/debian/rules find $(DEBSRCDIR) -name '.svn' | xargs ${DELTREE} diff -Nru lazarus-0.9.30/packager/addfiletoapackagedlg.pas lazarus-0.9.30.2/packager/addfiletoapackagedlg.pas --- lazarus-0.9.30/packager/addfiletoapackagedlg.pas 2010-06-16 11:53:34.000000000 +0000 +++ lazarus-0.9.30.2/packager/addfiletoapackagedlg.pas 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: addfiletoapackagedlg.pas 26151 2010-06-16 11:53:34Z mattias $ } +{ $Id$ } { /*************************************************************************** addfiletoapackagedlg.pas diff -Nru lazarus-0.9.30/packager/addtopackagedlg.pas lazarus-0.9.30.2/packager/addtopackagedlg.pas --- lazarus-0.9.30/packager/addtopackagedlg.pas 2010-09-26 19:50:30.000000000 +0000 +++ lazarus-0.9.30.2/packager/addtopackagedlg.pas 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: addtopackagedlg.pas 27478 2010-09-26 19:50:30Z mattias $ } +{ $Id$ } { /*************************************************************************** addtopackagedlg.pas diff -Nru lazarus-0.9.30/packager/basepkgmanager.pas lazarus-0.9.30.2/packager/basepkgmanager.pas --- lazarus-0.9.30/packager/basepkgmanager.pas 2010-12-03 16:32:25.000000000 +0000 +++ lazarus-0.9.30.2/packager/basepkgmanager.pas 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: basepkgmanager.pas 28612 2010-12-03 16:32:25Z mattias $ } +{ $Id$ } { /*************************************************************************** basepkgmanager.pas diff -Nru lazarus-0.9.30/packager/brokendependenciesdlg.pas lazarus-0.9.30.2/packager/brokendependenciesdlg.pas --- lazarus-0.9.30/packager/brokendependenciesdlg.pas 2006-09-05 11:36:29.000000000 +0000 +++ lazarus-0.9.30.2/packager/brokendependenciesdlg.pas 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: brokendependenciesdlg.pas 9815 2006-09-05 11:36:29Z mattias $ } +{ $Id$ } { /*************************************************************************** brokendependenciesdlg.pas diff -Nru lazarus-0.9.30/packager/globallinks/lcl1-0.9.30.lpl lazarus-0.9.30.2/packager/globallinks/lcl1-0.9.30.lpl --- lazarus-0.9.30/packager/globallinks/lcl1-0.9.30.lpl 2011-02-27 19:52:04.000000000 +0000 +++ lazarus-0.9.30.2/packager/globallinks/lcl1-0.9.30.lpl 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -$(LazarusDir)/lcl/interfaces/lcl1.lpk diff -Nru lazarus-0.9.30/packager/globallinks/lclbase-0.9.30.lpl lazarus-0.9.30.2/packager/globallinks/lclbase-0.9.30.lpl --- lazarus-0.9.30/packager/globallinks/lclbase-0.9.30.lpl 2011-02-27 19:52:04.000000000 +0000 +++ lazarus-0.9.30.2/packager/globallinks/lclbase-0.9.30.lpl 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -$(LazarusDir)/lcl/lclbase.lpk diff -Nru lazarus-0.9.30/packager/globallinks/lclbase-0.lpl lazarus-0.9.30.2/packager/globallinks/lclbase-0.lpl --- lazarus-0.9.30/packager/globallinks/lclbase-0.lpl 1970-01-01 00:00:00.000000000 +0000 +++ lazarus-0.9.30.2/packager/globallinks/lclbase-0.lpl 2011-11-23 16:14:45.000000000 +0000 @@ -0,0 +1 @@ +$(LazarusDir)/lcl/lclbase.lpk diff -Nru lazarus-0.9.30/packager/installpkgsetdlg.pas lazarus-0.9.30.2/packager/installpkgsetdlg.pas --- lazarus-0.9.30/packager/installpkgsetdlg.pas 2010-11-05 00:19:24.000000000 +0000 +++ lazarus-0.9.30.2/packager/installpkgsetdlg.pas 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: installpkgsetdlg.pas 28080 2010-11-05 00:19:24Z mattias $ } +{ $Id$ } { /*************************************************************************** installpkgsetdlg.pas diff -Nru lazarus-0.9.30/packager/Makefile lazarus-0.9.30.2/packager/Makefile --- lazarus-0.9.30/packager/Makefile 2008-06-20 19:33:44.000000000 +0000 +++ lazarus-0.9.30.2/packager/Makefile 1970-01-01 00:00:00.000000000 +0000 @@ -1,1540 +0,0 @@ -# -# Don't edit, this file is generated by FPCMake Version 2.0.0 [2008/06/19] -# -default: all -MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded avr-embedded armeb-linux armeb-embedded -BSDs = freebsd netbsd openbsd darwin -UNIXs = linux $(BSDs) solaris qnx -LIMIT83fs = go32v2 os2 emx watcom -OSNeedsComspecToRunBatch = go32v2 watcom -FORCE: -.PHONY: FORCE -override PATH:=$(patsubst %/,%,$(subst \,/,$(PATH))) -ifneq ($(findstring darwin,$(OSTYPE)),) -inUnix=1 #darwin -SEARCHPATH:=$(filter-out .,$(subst :, ,$(PATH))) -else -ifeq ($(findstring ;,$(PATH)),) -inUnix=1 -SEARCHPATH:=$(filter-out .,$(subst :, ,$(PATH))) -else -SEARCHPATH:=$(subst ;, ,$(PATH)) -endif -endif -SEARCHPATH+=$(patsubst %/,%,$(subst \,/,$(dir $(MAKE)))) -PWD:=$(strip $(wildcard $(addsuffix /pwd.exe,$(SEARCHPATH)))) -ifeq ($(PWD),) -PWD:=$(strip $(wildcard $(addsuffix /pwd,$(SEARCHPATH)))) -ifeq ($(PWD),) -$(error You need the GNU utils package to use this Makefile) -else -PWD:=$(firstword $(PWD)) -SRCEXEEXT= -endif -else -PWD:=$(firstword $(PWD)) -SRCEXEEXT=.exe -endif -ifndef inUnix -ifeq ($(OS),Windows_NT) -inWinNT=1 -else -ifdef OS2_SHELL -inOS2=1 -endif -endif -else -ifneq ($(findstring cygdrive,$(PATH)),) -inCygWin=1 -endif -endif -ifdef inUnix -SRCBATCHEXT=.sh -else -ifdef inOS2 -SRCBATCHEXT=.cmd -else -SRCBATCHEXT=.bat -endif -endif -ifdef COMSPEC -ifneq ($(findstring $(OS_SOURCE),$(OSNeedsComspecToRunBatch)),) -RUNBATCH=$(COMSPEC) /C -endif -endif -ifdef inUnix -PATHSEP=/ -else -PATHSEP:=$(subst /,\,/) -ifdef inCygWin -PATHSEP=/ -endif -endif -ifdef PWD -BASEDIR:=$(subst \,/,$(shell $(PWD))) -ifdef inCygWin -ifneq ($(findstring /cygdrive/,$(BASEDIR)),) -BASENODIR:=$(patsubst /cygdrive%,%,$(BASEDIR)) -BASEDRIVE:=$(firstword $(subst /, ,$(BASENODIR))) -BASEDIR:=$(subst /cygdrive/$(BASEDRIVE)/,$(BASEDRIVE):/,$(BASEDIR)) -endif -endif -else -BASEDIR=. -endif -ifdef inOS2 -ifndef ECHO -ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(ECHO),) -ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(ECHO),) -ECHO=echo -else -ECHO:=$(firstword $(ECHO)) -endif -else -ECHO:=$(firstword $(ECHO)) -endif -endif -export ECHO -endif -ifndef FPC -ifdef PP -FPC=$(PP) -endif -endif -ifndef FPC -FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH)))) -ifneq ($(FPCPROG),) -FPCPROG:=$(firstword $(FPCPROG)) -ifneq ($(CPU_TARGET),) -FPC:=$(shell $(FPCPROG) -P$(CPU_TARGET) -PB) -else -FPC:=$(shell $(FPCPROG) -PB) -endif -ifneq ($(findstring Error,$(FPC)),) -override FPC=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH))))) -endif -else -override FPC=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH))))) -endif -endif -override FPC:=$(subst $(SRCEXEEXT),,$(FPC)) -override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT) -FOUNDFPC:=$(strip $(wildcard $(FPC))) -ifeq ($(FOUNDFPC),) -FOUNDFPC=$(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH)))) -ifeq ($(FOUNDFPC),) -$(error Compiler $(FPC) not found) -endif -endif -ifndef FPC_COMPILERINFO -FPC_COMPILERINFO:=$(shell $(FPC) -iVSPTPSOTO) -endif -ifndef FPC_VERSION -FPC_VERSION:=$(word 1,$(FPC_COMPILERINFO)) -endif -export FPC FPC_VERSION FPC_COMPILERINFO -unexport CHECKDEPEND ALLDEPENDENCIES -ifndef CPU_TARGET -ifdef CPU_TARGET_DEFAULT -CPU_TARGET=$(CPU_TARGET_DEFAULT) -endif -endif -ifndef OS_TARGET -ifdef OS_TARGET_DEFAULT -OS_TARGET=$(OS_TARGET_DEFAULT) -endif -endif -ifneq ($(words $(FPC_COMPILERINFO)),5) -FPC_COMPILERINFO+=$(shell $(FPC) -iSP) -FPC_COMPILERINFO+=$(shell $(FPC) -iTP) -FPC_COMPILERINFO+=$(shell $(FPC) -iSO) -FPC_COMPILERINFO+=$(shell $(FPC) -iTO) -endif -ifndef CPU_SOURCE -CPU_SOURCE:=$(word 2,$(FPC_COMPILERINFO)) -endif -ifndef CPU_TARGET -CPU_TARGET:=$(word 3,$(FPC_COMPILERINFO)) -endif -ifndef OS_SOURCE -OS_SOURCE:=$(word 4,$(FPC_COMPILERINFO)) -endif -ifndef OS_TARGET -OS_TARGET:=$(word 5,$(FPC_COMPILERINFO)) -endif -FULL_TARGET=$(CPU_TARGET)-$(OS_TARGET) -FULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE) -ifeq ($(CPU_TARGET),armeb) -ARCH=arm -override FPCOPT+=-Cb -else -ifeq ($(CPU_TARGET),armel) -ARCH=arm -override FPCOPT+=-CaEABI -else -ARCH=$(CPU_TARGET) -endif -endif -ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),) -TARGETSUFFIX=$(OS_TARGET) -SOURCESUFFIX=$(OS_SOURCE) -else -TARGETSUFFIX=$(FULL_TARGET) -SOURCESUFFIX=$(FULL_SOURCE) -endif -ifneq ($(FULL_TARGET),$(FULL_SOURCE)) -CROSSCOMPILE=1 -endif -ifeq ($(findstring makefile,$(MAKECMDGOALS)),) -ifeq ($(findstring $(FULL_TARGET),$(MAKEFILETARGETS)),) -$(error The Makefile doesn't support target $(FULL_TARGET), please run fpcmake first) -endif -endif -ifneq ($(findstring $(OS_TARGET),$(BSDs)),) -BSDhier=1 -endif -ifeq ($(OS_TARGET),linux) -linuxHier=1 -endif -export OS_TARGET OS_SOURCE ARCH CPU_TARGET CPU_SOURCE FULL_TARGET FULL_SOURCE TARGETSUFFIX SOURCESUFFIX CROSSCOMPILE -ifdef FPCDIR -override FPCDIR:=$(subst \,/,$(FPCDIR)) -ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),) -override FPCDIR=wrong -endif -else -override FPCDIR=wrong -endif -ifdef DEFAULT_FPCDIR -ifeq ($(FPCDIR),wrong) -override FPCDIR:=$(subst \,/,$(DEFAULT_FPCDIR)) -ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),) -override FPCDIR=wrong -endif -endif -endif -ifeq ($(FPCDIR),wrong) -ifdef inUnix -override FPCDIR=/usr/local/lib/fpc/$(FPC_VERSION) -ifeq ($(wildcard $(FPCDIR)/units),) -override FPCDIR=/usr/lib/fpc/$(FPC_VERSION) -endif -else -override FPCDIR:=$(subst /$(FPC),,$(firstword $(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH)))))) -override FPCDIR:=$(FPCDIR)/.. -ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),) -override FPCDIR:=$(FPCDIR)/.. -ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),) -override FPCDIR:=$(BASEDIR) -ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),) -override FPCDIR=c:/pp -endif -endif -endif -endif -endif -ifndef CROSSBINDIR -CROSSBINDIR:=$(wildcard $(FPCDIR)/bin/$(TARGETSUFFIX)) -endif -ifeq ($(OS_TARGET),darwin) -ifeq ($(OS_SOURCE),darwin) -DARWIN2DARWIN=1 -endif -endif -ifndef BINUTILSPREFIX -ifndef CROSSBINDIR -ifdef CROSSCOMPILE -ifndef DARWIN2DARWIN -BINUTILSPREFIX=$(CPU_TARGET)-$(OS_TARGET)- -endif -endif -endif -endif -UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX)) -ifeq ($(UNITSDIR),) -UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET)) -endif -PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra) -ifeq ($(FULL_TARGET),i386-linux) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))$(wildcard ./units/*$(OEXT)) $(wildcard ./units/*$(PPUEXT)) $(wildcard ./units/*$(RSTEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(OEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(PPUEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(RSTEXT)) -endif -ifeq ($(FULL_TARGET),i386-go32v2) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))$(wildcard ./units/*$(OEXT)) $(wildcard ./units/*$(PPUEXT)) $(wildcard ./units/*$(RSTEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(OEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(PPUEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(RSTEXT)) -endif -ifeq ($(FULL_TARGET),i386-win32) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))$(wildcard ./units/*$(OEXT)) $(wildcard ./units/*$(PPUEXT)) $(wildcard ./units/*$(RSTEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(OEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(PPUEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(RSTEXT)) -endif -ifeq ($(FULL_TARGET),i386-os2) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))$(wildcard ./units/*$(OEXT)) $(wildcard ./units/*$(PPUEXT)) $(wildcard ./units/*$(RSTEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(OEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(PPUEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(RSTEXT)) -endif -ifeq ($(FULL_TARGET),i386-freebsd) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))$(wildcard ./units/*$(OEXT)) $(wildcard ./units/*$(PPUEXT)) $(wildcard ./units/*$(RSTEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(OEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(PPUEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(RSTEXT)) -endif -ifeq ($(FULL_TARGET),i386-beos) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))$(wildcard ./units/*$(OEXT)) $(wildcard ./units/*$(PPUEXT)) $(wildcard ./units/*$(RSTEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(OEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(PPUEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(RSTEXT)) -endif -ifeq ($(FULL_TARGET),i386-haiku) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))$(wildcard ./units/*$(OEXT)) $(wildcard ./units/*$(PPUEXT)) $(wildcard ./units/*$(RSTEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(OEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(PPUEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(RSTEXT)) -endif -ifeq ($(FULL_TARGET),i386-netbsd) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))$(wildcard ./units/*$(OEXT)) $(wildcard ./units/*$(PPUEXT)) $(wildcard ./units/*$(RSTEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(OEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(PPUEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(RSTEXT)) -endif -ifeq ($(FULL_TARGET),i386-solaris) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))$(wildcard ./units/*$(OEXT)) $(wildcard ./units/*$(PPUEXT)) $(wildcard ./units/*$(RSTEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(OEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(PPUEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(RSTEXT)) -endif -ifeq ($(FULL_TARGET),i386-qnx) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))$(wildcard ./units/*$(OEXT)) $(wildcard ./units/*$(PPUEXT)) $(wildcard ./units/*$(RSTEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(OEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(PPUEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(RSTEXT)) -endif -ifeq ($(FULL_TARGET),i386-netware) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))$(wildcard ./units/*$(OEXT)) $(wildcard ./units/*$(PPUEXT)) $(wildcard ./units/*$(RSTEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(OEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(PPUEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(RSTEXT)) -endif -ifeq ($(FULL_TARGET),i386-openbsd) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))$(wildcard ./units/*$(OEXT)) $(wildcard ./units/*$(PPUEXT)) $(wildcard ./units/*$(RSTEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(OEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(PPUEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(RSTEXT)) -endif -ifeq ($(FULL_TARGET),i386-wdosx) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))$(wildcard ./units/*$(OEXT)) $(wildcard ./units/*$(PPUEXT)) $(wildcard ./units/*$(RSTEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(OEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(PPUEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(RSTEXT)) -endif -ifeq ($(FULL_TARGET),i386-darwin) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))$(wildcard ./units/*$(OEXT)) $(wildcard ./units/*$(PPUEXT)) $(wildcard ./units/*$(RSTEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(OEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(PPUEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(RSTEXT)) -endif -ifeq ($(FULL_TARGET),i386-emx) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))$(wildcard ./units/*$(OEXT)) $(wildcard ./units/*$(PPUEXT)) $(wildcard ./units/*$(RSTEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(OEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(PPUEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(RSTEXT)) -endif -ifeq ($(FULL_TARGET),i386-watcom) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))$(wildcard ./units/*$(OEXT)) $(wildcard ./units/*$(PPUEXT)) $(wildcard ./units/*$(RSTEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(OEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(PPUEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(RSTEXT)) -endif -ifeq ($(FULL_TARGET),i386-netwlibc) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))$(wildcard ./units/*$(OEXT)) $(wildcard ./units/*$(PPUEXT)) $(wildcard ./units/*$(RSTEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(OEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(PPUEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(RSTEXT)) -endif -ifeq ($(FULL_TARGET),i386-wince) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))$(wildcard ./units/*$(OEXT)) $(wildcard ./units/*$(PPUEXT)) $(wildcard ./units/*$(RSTEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(OEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(PPUEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(RSTEXT)) -endif -ifeq ($(FULL_TARGET),i386-embedded) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))$(wildcard ./units/*$(OEXT)) $(wildcard ./units/*$(PPUEXT)) $(wildcard ./units/*$(RSTEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(OEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(PPUEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(RSTEXT)) -endif -ifeq ($(FULL_TARGET),i386-symbian) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))$(wildcard ./units/*$(OEXT)) $(wildcard ./units/*$(PPUEXT)) $(wildcard ./units/*$(RSTEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(OEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(PPUEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(RSTEXT)) -endif -ifeq ($(FULL_TARGET),m68k-linux) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))$(wildcard ./units/*$(OEXT)) $(wildcard ./units/*$(PPUEXT)) $(wildcard ./units/*$(RSTEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(OEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(PPUEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(RSTEXT)) -endif -ifeq ($(FULL_TARGET),m68k-freebsd) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))$(wildcard ./units/*$(OEXT)) $(wildcard ./units/*$(PPUEXT)) $(wildcard ./units/*$(RSTEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(OEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(PPUEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(RSTEXT)) -endif -ifeq ($(FULL_TARGET),m68k-netbsd) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))$(wildcard ./units/*$(OEXT)) $(wildcard ./units/*$(PPUEXT)) $(wildcard ./units/*$(RSTEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(OEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(PPUEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(RSTEXT)) -endif -ifeq ($(FULL_TARGET),m68k-amiga) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))$(wildcard ./units/*$(OEXT)) $(wildcard ./units/*$(PPUEXT)) $(wildcard ./units/*$(RSTEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(OEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(PPUEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(RSTEXT)) -endif -ifeq ($(FULL_TARGET),m68k-atari) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))$(wildcard ./units/*$(OEXT)) $(wildcard ./units/*$(PPUEXT)) $(wildcard ./units/*$(RSTEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(OEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(PPUEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(RSTEXT)) -endif -ifeq ($(FULL_TARGET),m68k-openbsd) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))$(wildcard ./units/*$(OEXT)) $(wildcard ./units/*$(PPUEXT)) $(wildcard ./units/*$(RSTEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(OEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(PPUEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(RSTEXT)) -endif -ifeq ($(FULL_TARGET),m68k-palmos) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))$(wildcard ./units/*$(OEXT)) $(wildcard ./units/*$(PPUEXT)) $(wildcard ./units/*$(RSTEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(OEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(PPUEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(RSTEXT)) -endif -ifeq ($(FULL_TARGET),m68k-embedded) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))$(wildcard ./units/*$(OEXT)) $(wildcard ./units/*$(PPUEXT)) $(wildcard ./units/*$(RSTEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(OEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(PPUEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(RSTEXT)) -endif -ifeq ($(FULL_TARGET),powerpc-linux) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))$(wildcard ./units/*$(OEXT)) $(wildcard ./units/*$(PPUEXT)) $(wildcard ./units/*$(RSTEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(OEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(PPUEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(RSTEXT)) -endif -ifeq ($(FULL_TARGET),powerpc-netbsd) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))$(wildcard ./units/*$(OEXT)) $(wildcard ./units/*$(PPUEXT)) $(wildcard ./units/*$(RSTEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(OEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(PPUEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(RSTEXT)) -endif -ifeq ($(FULL_TARGET),powerpc-amiga) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))$(wildcard ./units/*$(OEXT)) $(wildcard ./units/*$(PPUEXT)) $(wildcard ./units/*$(RSTEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(OEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(PPUEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(RSTEXT)) -endif -ifeq ($(FULL_TARGET),powerpc-macos) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))$(wildcard ./units/*$(OEXT)) $(wildcard ./units/*$(PPUEXT)) $(wildcard ./units/*$(RSTEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(OEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(PPUEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(RSTEXT)) -endif -ifeq ($(FULL_TARGET),powerpc-darwin) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))$(wildcard ./units/*$(OEXT)) $(wildcard ./units/*$(PPUEXT)) $(wildcard ./units/*$(RSTEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(OEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(PPUEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(RSTEXT)) -endif -ifeq ($(FULL_TARGET),powerpc-morphos) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))$(wildcard ./units/*$(OEXT)) $(wildcard ./units/*$(PPUEXT)) $(wildcard ./units/*$(RSTEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(OEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(PPUEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(RSTEXT)) -endif -ifeq ($(FULL_TARGET),powerpc-embedded) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))$(wildcard ./units/*$(OEXT)) $(wildcard ./units/*$(PPUEXT)) $(wildcard ./units/*$(RSTEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(OEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(PPUEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(RSTEXT)) -endif -ifeq ($(FULL_TARGET),sparc-linux) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))$(wildcard ./units/*$(OEXT)) $(wildcard ./units/*$(PPUEXT)) $(wildcard ./units/*$(RSTEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(OEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(PPUEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(RSTEXT)) -endif -ifeq ($(FULL_TARGET),sparc-netbsd) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))$(wildcard ./units/*$(OEXT)) $(wildcard ./units/*$(PPUEXT)) $(wildcard ./units/*$(RSTEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(OEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(PPUEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(RSTEXT)) -endif -ifeq ($(FULL_TARGET),sparc-solaris) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))$(wildcard ./units/*$(OEXT)) $(wildcard ./units/*$(PPUEXT)) $(wildcard ./units/*$(RSTEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(OEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(PPUEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(RSTEXT)) -endif -ifeq ($(FULL_TARGET),sparc-embedded) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))$(wildcard ./units/*$(OEXT)) $(wildcard ./units/*$(PPUEXT)) $(wildcard ./units/*$(RSTEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(OEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(PPUEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(RSTEXT)) -endif -ifeq ($(FULL_TARGET),x86_64-linux) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))$(wildcard ./units/*$(OEXT)) $(wildcard ./units/*$(PPUEXT)) $(wildcard ./units/*$(RSTEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(OEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(PPUEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(RSTEXT)) -endif -ifeq ($(FULL_TARGET),x86_64-freebsd) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))$(wildcard ./units/*$(OEXT)) $(wildcard ./units/*$(PPUEXT)) $(wildcard ./units/*$(RSTEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(OEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(PPUEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(RSTEXT)) -endif -ifeq ($(FULL_TARGET),x86_64-darwin) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))$(wildcard ./units/*$(OEXT)) $(wildcard ./units/*$(PPUEXT)) $(wildcard ./units/*$(RSTEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(OEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(PPUEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(RSTEXT)) -endif -ifeq ($(FULL_TARGET),x86_64-win64) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))$(wildcard ./units/*$(OEXT)) $(wildcard ./units/*$(PPUEXT)) $(wildcard ./units/*$(RSTEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(OEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(PPUEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(RSTEXT)) -endif -ifeq ($(FULL_TARGET),x86_64-embedded) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))$(wildcard ./units/*$(OEXT)) $(wildcard ./units/*$(PPUEXT)) $(wildcard ./units/*$(RSTEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(OEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(PPUEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(RSTEXT)) -endif -ifeq ($(FULL_TARGET),arm-linux) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))$(wildcard ./units/*$(OEXT)) $(wildcard ./units/*$(PPUEXT)) $(wildcard ./units/*$(RSTEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(OEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(PPUEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(RSTEXT)) -endif -ifeq ($(FULL_TARGET),arm-palmos) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))$(wildcard ./units/*$(OEXT)) $(wildcard ./units/*$(PPUEXT)) $(wildcard ./units/*$(RSTEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(OEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(PPUEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(RSTEXT)) -endif -ifeq ($(FULL_TARGET),arm-darwin) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))$(wildcard ./units/*$(OEXT)) $(wildcard ./units/*$(PPUEXT)) $(wildcard ./units/*$(RSTEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(OEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(PPUEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(RSTEXT)) -endif -ifeq ($(FULL_TARGET),arm-wince) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))$(wildcard ./units/*$(OEXT)) $(wildcard ./units/*$(PPUEXT)) $(wildcard ./units/*$(RSTEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(OEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(PPUEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(RSTEXT)) -endif -ifeq ($(FULL_TARGET),arm-gba) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))$(wildcard ./units/*$(OEXT)) $(wildcard ./units/*$(PPUEXT)) $(wildcard ./units/*$(RSTEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(OEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(PPUEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(RSTEXT)) -endif -ifeq ($(FULL_TARGET),arm-nds) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))$(wildcard ./units/*$(OEXT)) $(wildcard ./units/*$(PPUEXT)) $(wildcard ./units/*$(RSTEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(OEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(PPUEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(RSTEXT)) -endif -ifeq ($(FULL_TARGET),arm-embedded) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))$(wildcard ./units/*$(OEXT)) $(wildcard ./units/*$(PPUEXT)) $(wildcard ./units/*$(RSTEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(OEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(PPUEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(RSTEXT)) -endif -ifeq ($(FULL_TARGET),arm-symbian) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))$(wildcard ./units/*$(OEXT)) $(wildcard ./units/*$(PPUEXT)) $(wildcard ./units/*$(RSTEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(OEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(PPUEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(RSTEXT)) -endif -ifeq ($(FULL_TARGET),powerpc64-linux) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))$(wildcard ./units/*$(OEXT)) $(wildcard ./units/*$(PPUEXT)) $(wildcard ./units/*$(RSTEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(OEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(PPUEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(RSTEXT)) -endif -ifeq ($(FULL_TARGET),powerpc64-darwin) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))$(wildcard ./units/*$(OEXT)) $(wildcard ./units/*$(PPUEXT)) $(wildcard ./units/*$(RSTEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(OEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(PPUEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(RSTEXT)) -endif -ifeq ($(FULL_TARGET),powerpc64-embedded) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))$(wildcard ./units/*$(OEXT)) $(wildcard ./units/*$(PPUEXT)) $(wildcard ./units/*$(RSTEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(OEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(PPUEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(RSTEXT)) -endif -ifeq ($(FULL_TARGET),avr-embedded) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))$(wildcard ./units/*$(OEXT)) $(wildcard ./units/*$(PPUEXT)) $(wildcard ./units/*$(RSTEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(OEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(PPUEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(RSTEXT)) -endif -ifeq ($(FULL_TARGET),armeb-linux) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))$(wildcard ./units/*$(OEXT)) $(wildcard ./units/*$(PPUEXT)) $(wildcard ./units/*$(RSTEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(OEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(PPUEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(RSTEXT)) -endif -ifeq ($(FULL_TARGET),armeb-embedded) -override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))$(wildcard ./units/*$(OEXT)) $(wildcard ./units/*$(PPUEXT)) $(wildcard ./units/*$(RSTEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(OEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(PPUEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(RSTEXT)) -endif -ifdef REQUIRE_UNITSDIR -override UNITSDIR+=$(REQUIRE_UNITSDIR) -endif -ifdef REQUIRE_PACKAGESDIR -override PACKAGESDIR+=$(REQUIRE_PACKAGESDIR) -endif -ifdef ZIPINSTALL -ifneq ($(findstring $(OS_TARGET),$(UNIXs)),) -UNIXHier=1 -endif -else -ifneq ($(findstring $(OS_SOURCE),$(UNIXs)),) -UNIXHier=1 -endif -endif -ifndef INSTALL_PREFIX -ifdef PREFIX -INSTALL_PREFIX=$(PREFIX) -endif -endif -ifndef INSTALL_PREFIX -ifdef UNIXHier -INSTALL_PREFIX=/usr/local -else -ifdef INSTALL_FPCPACKAGE -INSTALL_BASEDIR:=/pp -else -INSTALL_BASEDIR:=/$(PACKAGE_NAME) -endif -endif -endif -export INSTALL_PREFIX -ifdef INSTALL_FPCSUBDIR -export INSTALL_FPCSUBDIR -endif -ifndef DIST_DESTDIR -DIST_DESTDIR:=$(BASEDIR) -endif -export DIST_DESTDIR -ifndef COMPILER_UNITTARGETDIR -ifdef PACKAGEDIR_MAIN -COMPILER_UNITTARGETDIR=$(PACKAGEDIR_MAIN)/units/$(TARGETSUFFIX) -else -COMPILER_UNITTARGETDIR=units/$(TARGETSUFFIX) -endif -endif -ifndef COMPILER_TARGETDIR -COMPILER_TARGETDIR=. -endif -ifndef INSTALL_BASEDIR -ifdef UNIXHier -ifdef INSTALL_FPCPACKAGE -INSTALL_BASEDIR:=$(INSTALL_PREFIX)/lib/fpc/$(FPC_VERSION) -else -INSTALL_BASEDIR:=$(INSTALL_PREFIX)/lib/$(PACKAGE_NAME) -endif -else -INSTALL_BASEDIR:=$(INSTALL_PREFIX) -endif -endif -ifndef INSTALL_BINDIR -ifdef UNIXHier -INSTALL_BINDIR:=$(INSTALL_PREFIX)/bin -else -INSTALL_BINDIR:=$(INSTALL_BASEDIR)/bin -ifdef INSTALL_FPCPACKAGE -ifdef CROSSCOMPILE -ifdef CROSSINSTALL -INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(SOURCESUFFIX) -else -INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(TARGETSUFFIX) -endif -else -INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(TARGETSUFFIX) -endif -endif -endif -endif -ifndef INSTALL_UNITDIR -INSTALL_UNITDIR:=$(INSTALL_BASEDIR)/units/$(TARGETSUFFIX) -ifdef INSTALL_FPCPACKAGE -ifdef PACKAGE_NAME -INSTALL_UNITDIR:=$(INSTALL_UNITDIR)/$(PACKAGE_NAME) -endif -endif -endif -ifndef INSTALL_LIBDIR -ifdef UNIXHier -INSTALL_LIBDIR:=$(INSTALL_PREFIX)/lib -else -INSTALL_LIBDIR:=$(INSTALL_UNITDIR) -endif -endif -ifndef INSTALL_SOURCEDIR -ifdef UNIXHier -ifdef BSDhier -SRCPREFIXDIR=share/src -else -ifdef linuxHier -SRCPREFIXDIR=share/src -else -SRCPREFIXDIR=src -endif -endif -ifdef INSTALL_FPCPACKAGE -ifdef INSTALL_FPCSUBDIR -INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/fpc-$(FPC_VERSION)/$(INSTALL_FPCSUBDIR)/$(PACKAGE_NAME) -else -INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/fpc-$(FPC_VERSION)/$(PACKAGE_NAME) -endif -else -INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION) -endif -else -ifdef INSTALL_FPCPACKAGE -ifdef INSTALL_FPCSUBDIR -INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source/$(INSTALL_FPCSUBDIR)/$(PACKAGE_NAME) -else -INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source/$(PACKAGE_NAME) -endif -else -INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source -endif -endif -endif -ifndef INSTALL_DOCDIR -ifdef UNIXHier -ifdef BSDhier -DOCPREFIXDIR=share/doc -else -ifdef linuxHier -DOCPREFIXDIR=share/doc -else -DOCPREFIXDIR=doc -endif -endif -ifdef INSTALL_FPCPACKAGE -INSTALL_DOCDIR:=$(INSTALL_PREFIX)/$(DOCPREFIXDIR)/fpc-$(FPC_VERSION)/$(PACKAGE_NAME) -else -INSTALL_DOCDIR:=$(INSTALL_PREFIX)/$(DOCPREFIXDIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION) -endif -else -ifdef INSTALL_FPCPACKAGE -INSTALL_DOCDIR:=$(INSTALL_BASEDIR)/doc/$(PACKAGE_NAME) -else -INSTALL_DOCDIR:=$(INSTALL_BASEDIR)/doc -endif -endif -endif -ifndef INSTALL_EXAMPLEDIR -ifdef UNIXHier -ifdef INSTALL_FPCPACKAGE -ifdef BSDhier -INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/share/examples/fpc-$(FPC_VERSION)/$(PACKAGE_NAME) -else -ifdef linuxHier -INSTALL_EXAMPLEDIR:=$(INSTALL_DOCDIR)/examples -else -INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/doc/fpc-$(FPC_VERSION)/examples/$(PACKAGE_NAME) -endif -endif -else -ifdef BSDhier -INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/share/examples/$(PACKAGE_NAME)-$(PACKAGE_VERSION) -else -ifdef linuxHier -INSTALL_EXAMPLEDIR:=$(INSTALL_DOCDIR)/examples/$(PACKAGE_NAME)-$(PACKAGE_VERSION) -else -INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/doc/$(PACKAGE_NAME)-$(PACKAGE_VERSION) -endif -endif -endif -else -ifdef INSTALL_FPCPACKAGE -INSTALL_EXAMPLEDIR:=$(INSTALL_BASEDIR)/examples/$(PACKAGE_NAME) -else -INSTALL_EXAMPLEDIR:=$(INSTALL_BASEDIR)/examples -endif -endif -endif -ifndef INSTALL_DATADIR -INSTALL_DATADIR=$(INSTALL_BASEDIR) -endif -ifndef INSTALL_SHAREDDIR -INSTALL_SHAREDDIR=$(INSTALL_PREFIX)/lib -endif -ifdef CROSSCOMPILE -ifndef CROSSBINDIR -CROSSBINDIR:=$(wildcard $(CROSSTARGETDIR)/bin/$(SOURCESUFFIX)) -ifeq ($(CROSSBINDIR),) -CROSSBINDIR:=$(wildcard $(INSTALL_BASEDIR)/cross/$(TARGETSUFFIX)/bin/$(FULL_SOURCE)) -endif -endif -else -CROSSBINDIR= -endif -BATCHEXT=.bat -LOADEREXT=.as -EXEEXT=.exe -PPLEXT=.ppl -PPUEXT=.ppu -OEXT=.o -ASMEXT=.s -SMARTEXT=.sl -STATICLIBEXT=.a -SHAREDLIBEXT=.so -SHAREDLIBPREFIX=libfp -STATICLIBPREFIX=libp -IMPORTLIBPREFIX=libimp -RSTEXT=.rst -ifeq ($(findstring 1.0.,$(FPC_VERSION)),) -ifeq ($(OS_TARGET),go32v1) -STATICLIBPREFIX= -SHORTSUFFIX=v1 -endif -ifeq ($(OS_TARGET),go32v2) -STATICLIBPREFIX= -SHORTSUFFIX=dos -endif -ifeq ($(OS_TARGET),watcom) -STATICLIBPREFIX= -OEXT=.obj -ASMEXT=.asm -SHAREDLIBEXT=.dll -SHORTSUFFIX=wat -endif -ifeq ($(OS_TARGET),linux) -BATCHEXT=.sh -EXEEXT= -HASSHAREDLIB=1 -SHORTSUFFIX=lnx -endif -ifeq ($(OS_TARGET),freebsd) -BATCHEXT=.sh -EXEEXT= -HASSHAREDLIB=1 -SHORTSUFFIX=fbs -endif -ifeq ($(OS_TARGET),netbsd) -BATCHEXT=.sh -EXEEXT= -HASSHAREDLIB=1 -SHORTSUFFIX=nbs -endif -ifeq ($(OS_TARGET),openbsd) -BATCHEXT=.sh -EXEEXT= -HASSHAREDLIB=1 -SHORTSUFFIX=obs -endif -ifeq ($(OS_TARGET),win32) -SHAREDLIBEXT=.dll -SHORTSUFFIX=w32 -endif -ifeq ($(OS_TARGET),os2) -BATCHEXT=.cmd -AOUTEXT=.out -STATICLIBPREFIX= -SHAREDLIBEXT=.dll -SHORTSUFFIX=os2 -ECHO=echo -endif -ifeq ($(OS_TARGET),emx) -BATCHEXT=.cmd -AOUTEXT=.out -STATICLIBPREFIX= -SHAREDLIBEXT=.dll -SHORTSUFFIX=emx -ECHO=echo -endif -ifeq ($(OS_TARGET),amiga) -EXEEXT= -SHAREDLIBEXT=.library -SHORTSUFFIX=amg -endif -ifeq ($(OS_TARGET),morphos) -EXEEXT= -SHAREDLIBEXT=.library -SHORTSUFFIX=mos -endif -ifeq ($(OS_TARGET),atari) -EXEEXT=.ttp -SHORTSUFFIX=ata -endif -ifeq ($(OS_TARGET),beos) -BATCHEXT=.sh -EXEEXT= -SHORTSUFFIX=be -endif -ifeq ($(OS_TARGET),haiku) -BATCHEXT=.sh -EXEEXT= -SHORTSUFFIX=hai -endif -ifeq ($(OS_TARGET),solaris) -BATCHEXT=.sh -EXEEXT= -SHORTSUFFIX=sun -endif -ifeq ($(OS_TARGET),qnx) -BATCHEXT=.sh -EXEEXT= -SHORTSUFFIX=qnx -endif -ifeq ($(OS_TARGET),netware) -EXEEXT=.nlm -STATICLIBPREFIX= -SHORTSUFFIX=nw -endif -ifeq ($(OS_TARGET),netwlibc) -EXEEXT=.nlm -STATICLIBPREFIX= -SHORTSUFFIX=nwl -endif -ifeq ($(OS_TARGET),macos) -BATCHEXT= -EXEEXT= -DEBUGSYMEXT=.xcoff -SHORTSUFFIX=mac -endif -ifeq ($(OS_TARGET),darwin) -BATCHEXT=.sh -EXEEXT= -HASSHAREDLIB=1 -SHORTSUFFIX=dwn -endif -ifeq ($(OS_TARGET),gba) -EXEEXT=.gba -SHAREDLIBEXT=.so -SHORTSUFFIX=gba -endif -ifeq ($(OS_TARGET),symbian) -SHAREDLIBEXT=.dll -SHORTSUFFIX=symbian -endif -else -ifeq ($(OS_TARGET),go32v1) -PPUEXT=.pp1 -OEXT=.o1 -ASMEXT=.s1 -SMARTEXT=.sl1 -STATICLIBEXT=.a1 -SHAREDLIBEXT=.so1 -STATICLIBPREFIX= -SHORTSUFFIX=v1 -endif -ifeq ($(OS_TARGET),go32v2) -STATICLIBPREFIX= -SHORTSUFFIX=dos -endif -ifeq ($(OS_TARGET),watcom) -STATICLIBPREFIX= -SHORTSUFFIX=wat -endif -ifeq ($(OS_TARGET),linux) -BATCHEXT=.sh -EXEEXT= -HASSHAREDLIB=1 -SHORTSUFFIX=lnx -endif -ifeq ($(OS_TARGET),freebsd) -BATCHEXT=.sh -EXEEXT= -HASSHAREDLIB=1 -SHORTSUFFIX=fbs -endif -ifeq ($(OS_TARGET),netbsd) -BATCHEXT=.sh -EXEEXT= -HASSHAREDLIB=1 -SHORTSUFFIX=nbs -endif -ifeq ($(OS_TARGET),openbsd) -BATCHEXT=.sh -EXEEXT= -HASSHAREDLIB=1 -SHORTSUFFIX=obs -endif -ifeq ($(OS_TARGET),win32) -PPUEXT=.ppw -OEXT=.ow -ASMEXT=.sw -SMARTEXT=.slw -STATICLIBEXT=.aw -SHAREDLIBEXT=.dll -SHORTSUFFIX=w32 -endif -ifeq ($(OS_TARGET),os2) -BATCHEXT=.cmd -PPUEXT=.ppo -ASMEXT=.so2 -OEXT=.oo2 -AOUTEXT=.out -SMARTEXT=.sl2 -STATICLIBPREFIX= -STATICLIBEXT=.ao2 -SHAREDLIBEXT=.dll -SHORTSUFFIX=os2 -ECHO=echo -endif -ifeq ($(OS_TARGET),amiga) -EXEEXT= -PPUEXT=.ppu -ASMEXT=.s -OEXT=.o -SMARTEXT=.sl -STATICLIBEXT=.a -SHAREDLIBEXT=.library -SHORTSUFFIX=amg -endif -ifeq ($(OS_TARGET),atari) -PPUEXT=.ppu -ASMEXT=.s -OEXT=.o -SMARTEXT=.sl -STATICLIBEXT=.a -EXEEXT=.ttp -SHORTSUFFIX=ata -endif -ifeq ($(OS_TARGET),beos) -BATCHEXT=.sh -PPUEXT=.ppu -ASMEXT=.s -OEXT=.o -SMARTEXT=.sl -STATICLIBEXT=.a -EXEEXT= -SHORTSUFFIX=be -endif -ifeq ($(OS_TARGET),solaris) -BATCHEXT=.sh -PPUEXT=.ppu -ASMEXT=.s -OEXT=.o -SMARTEXT=.sl -STATICLIBEXT=.a -EXEEXT= -SHORTSUFFIX=sun -endif -ifeq ($(OS_TARGET),qnx) -BATCHEXT=.sh -PPUEXT=.ppu -ASMEXT=.s -OEXT=.o -SMARTEXT=.sl -STATICLIBEXT=.a -EXEEXT= -SHORTSUFFIX=qnx -endif -ifeq ($(OS_TARGET),netware) -STATICLIBPREFIX= -PPUEXT=.ppu -OEXT=.o -ASMEXT=.s -SMARTEXT=.sl -STATICLIBEXT=.a -SHAREDLIBEXT=.nlm -EXEEXT=.nlm -SHORTSUFFIX=nw -endif -ifeq ($(OS_TARGET),netwlibc) -STATICLIBPREFIX= -PPUEXT=.ppu -OEXT=.o -ASMEXT=.s -SMARTEXT=.sl -STATICLIBEXT=.a -SHAREDLIBEXT=.nlm -EXEEXT=.nlm -SHORTSUFFIX=nwl -endif -ifeq ($(OS_TARGET),macos) -BATCHEXT= -PPUEXT=.ppu -ASMEXT=.s -OEXT=.o -SMARTEXT=.sl -STATICLIBEXT=.a -EXEEXT= -DEBUGSYMEXT=.xcoff -SHORTSUFFIX=mac -endif -endif -ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),) -FPCMADE=fpcmade.$(SHORTSUFFIX) -ZIPSUFFIX=$(SHORTSUFFIX) -ZIPCROSSPREFIX= -ZIPSOURCESUFFIX=src -ZIPEXAMPLESUFFIX=exm -else -FPCMADE=fpcmade.$(TARGETSUFFIX) -ZIPSOURCESUFFIX=.source -ZIPEXAMPLESUFFIX=.examples -ifdef CROSSCOMPILE -ZIPSUFFIX=.$(SOURCESUFFIX) -ZIPCROSSPREFIX=$(TARGETSUFFIX)- -else -ZIPSUFFIX=.$(TARGETSUFFIX) -ZIPCROSSPREFIX= -endif -endif -ifndef ECHO -ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(ECHO),) -ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(ECHO),) -ECHO= __missing_command_ECHO -else -ECHO:=$(firstword $(ECHO)) -endif -else -ECHO:=$(firstword $(ECHO)) -endif -endif -export ECHO -ifndef DATE -DATE:=$(strip $(wildcard $(addsuffix /gdate$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(DATE),) -DATE:=$(strip $(wildcard $(addsuffix /date$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(DATE),) -DATE= __missing_command_DATE -else -DATE:=$(firstword $(DATE)) -endif -else -DATE:=$(firstword $(DATE)) -endif -endif -export DATE -ifndef GINSTALL -GINSTALL:=$(strip $(wildcard $(addsuffix /ginstall$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(GINSTALL),) -GINSTALL:=$(strip $(wildcard $(addsuffix /install$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(GINSTALL),) -GINSTALL= __missing_command_GINSTALL -else -GINSTALL:=$(firstword $(GINSTALL)) -endif -else -GINSTALL:=$(firstword $(GINSTALL)) -endif -endif -export GINSTALL -ifndef CPPROG -CPPROG:=$(strip $(wildcard $(addsuffix /cp$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(CPPROG),) -CPPROG= __missing_command_CPPROG -else -CPPROG:=$(firstword $(CPPROG)) -endif -endif -export CPPROG -ifndef RMPROG -RMPROG:=$(strip $(wildcard $(addsuffix /rm$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(RMPROG),) -RMPROG= __missing_command_RMPROG -else -RMPROG:=$(firstword $(RMPROG)) -endif -endif -export RMPROG -ifndef MVPROG -MVPROG:=$(strip $(wildcard $(addsuffix /mv$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(MVPROG),) -MVPROG= __missing_command_MVPROG -else -MVPROG:=$(firstword $(MVPROG)) -endif -endif -export MVPROG -ifndef MKDIRPROG -MKDIRPROG:=$(strip $(wildcard $(addsuffix /gmkdir$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(MKDIRPROG),) -MKDIRPROG:=$(strip $(wildcard $(addsuffix /mkdir$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(MKDIRPROG),) -MKDIRPROG= __missing_command_MKDIRPROG -else -MKDIRPROG:=$(firstword $(MKDIRPROG)) -endif -else -MKDIRPROG:=$(firstword $(MKDIRPROG)) -endif -endif -export MKDIRPROG -ifndef ECHOREDIR -ifndef inUnix -ECHOREDIR=echo -else -ECHOREDIR=$(ECHO) -endif -endif -ifndef COPY -COPY:=$(CPPROG) -fp -endif -ifndef COPYTREE -COPYTREE:=$(CPPROG) -Rfp -endif -ifndef MKDIRTREE -MKDIRTREE:=$(MKDIRPROG) -p -endif -ifndef MOVE -MOVE:=$(MVPROG) -f -endif -ifndef DEL -DEL:=$(RMPROG) -f -endif -ifndef DELTREE -DELTREE:=$(RMPROG) -rf -endif -ifndef INSTALL -ifdef inUnix -INSTALL:=$(GINSTALL) -c -m 644 -else -INSTALL:=$(COPY) -endif -endif -ifndef INSTALLEXE -ifdef inUnix -INSTALLEXE:=$(GINSTALL) -c -m 755 -else -INSTALLEXE:=$(COPY) -endif -endif -ifndef MKDIR -MKDIR:=$(GINSTALL) -m 755 -d -endif -export ECHOREDIR COPY COPYTREE MOVE DEL DELTREE INSTALL INSTALLEXE MKDIR -ifndef PPUMOVE -PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(PPUMOVE),) -PPUMOVE= __missing_command_PPUMOVE -else -PPUMOVE:=$(firstword $(PPUMOVE)) -endif -endif -export PPUMOVE -ifndef FPCMAKE -FPCMAKE:=$(strip $(wildcard $(addsuffix /fpcmake$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(FPCMAKE),) -FPCMAKE= __missing_command_FPCMAKE -else -FPCMAKE:=$(firstword $(FPCMAKE)) -endif -endif -export FPCMAKE -ifndef ZIPPROG -ZIPPROG:=$(strip $(wildcard $(addsuffix /zip$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(ZIPPROG),) -ZIPPROG= __missing_command_ZIPPROG -else -ZIPPROG:=$(firstword $(ZIPPROG)) -endif -endif -export ZIPPROG -ifndef TARPROG -TARPROG:=$(strip $(wildcard $(addsuffix /gtar$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(TARPROG),) -TARPROG:=$(strip $(wildcard $(addsuffix /tar$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(TARPROG),) -TARPROG= __missing_command_TARPROG -else -TARPROG:=$(firstword $(TARPROG)) -endif -else -TARPROG:=$(firstword $(TARPROG)) -endif -endif -export TARPROG -ASNAME=$(BINUTILSPREFIX)as -LDNAME=$(BINUTILSPREFIX)ld -ARNAME=$(BINUTILSPREFIX)ar -RCNAME=$(BINUTILSPREFIX)rc -ifneq ($(findstring 1.0.,$(FPC_VERSION)),) -ifeq ($(OS_TARGET),win32) -ifeq ($(CROSSBINDIR),) -ASNAME=asw -LDNAME=ldw -ARNAME=arw -endif -endif -endif -ifndef ASPROG -ifdef CROSSBINDIR -ASPROG=$(CROSSBINDIR)/$(ASNAME)$(SRCEXEEXT) -else -ASPROG=$(ASNAME) -endif -endif -ifndef LDPROG -ifdef CROSSBINDIR -LDPROG=$(CROSSBINDIR)/$(LDNAME)$(SRCEXEEXT) -else -LDPROG=$(LDNAME) -endif -endif -ifndef RCPROG -ifdef CROSSBINDIR -RCPROG=$(CROSSBINDIR)/$(RCNAME)$(SRCEXEEXT) -else -RCPROG=$(RCNAME) -endif -endif -ifndef ARPROG -ifdef CROSSBINDIR -ARPROG=$(CROSSBINDIR)/$(ARNAME)$(SRCEXEEXT) -else -ARPROG=$(ARNAME) -endif -endif -AS=$(ASPROG) -LD=$(LDPROG) -RC=$(RCPROG) -AR=$(ARPROG) -PPAS=ppas$(SRCBATCHEXT) -ifdef inUnix -LDCONFIG=ldconfig -else -LDCONFIG= -endif -ifdef DATE -DATESTR:=$(shell $(DATE) +%Y%m%d) -else -DATESTR= -endif -ifndef UPXPROG -ifeq ($(OS_TARGET),go32v2) -UPXPROG:=1 -endif -ifeq ($(OS_TARGET),win32) -UPXPROG:=1 -endif -ifdef UPXPROG -UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(UPXPROG),) -UPXPROG= -else -UPXPROG:=$(firstword $(UPXPROG)) -endif -else -UPXPROG= -endif -endif -export UPXPROG -ZIPOPT=-9 -ZIPEXT=.zip -ifeq ($(USETAR),bz2) -TAROPT=vj -TAREXT=.tar.bz2 -else -TAROPT=vz -TAREXT=.tar.gz -endif -ifndef NOCPUDEF -override FPCOPTDEF=$(ARCH) -endif -ifneq ($(OS_TARGET),$(OS_SOURCE)) -override FPCOPT+=-T$(OS_TARGET) -endif -ifneq ($(CPU_TARGET),$(CPU_SOURCE)) -override FPCOPT+=-P$(ARCH) -endif -ifeq ($(OS_SOURCE),openbsd) -override FPCOPT+=-FD$(NEW_BINUTILS_PATH) -endif -ifndef CROSSBOOTSTRAP -ifneq ($(BINUTILSPREFIX),) -override FPCOPT+=-XP$(BINUTILSPREFIX) -endif -ifneq ($(BINUTILSPREFIX),) -override FPCOPT+=-Xr$(RLINKPATH) -endif -endif -ifdef UNITDIR -override FPCOPT+=$(addprefix -Fu,$(UNITDIR)) -endif -ifdef LIBDIR -override FPCOPT+=$(addprefix -Fl,$(LIBDIR)) -endif -ifdef OBJDIR -override FPCOPT+=$(addprefix -Fo,$(OBJDIR)) -endif -ifdef INCDIR -override FPCOPT+=$(addprefix -Fi,$(INCDIR)) -endif -ifdef LINKSMART -override FPCOPT+=-XX -endif -ifdef CREATESMART -override FPCOPT+=-CX -endif -ifdef DEBUG -override FPCOPT+=-gl -override FPCOPTDEF+=DEBUG -endif -ifdef RELEASE -ifneq ($(findstring 2.0.,$(FPC_VERSION)),) -ifeq ($(CPU_TARGET),i386) -FPCCPUOPT:=-OG2p3 -endif -ifeq ($(CPU_TARGET),powerpc) -FPCCPUOPT:=-O1r -endif -else -FPCCPUOPT:=-O2 -endif -override FPCOPT+=-Ur -Xs $(FPCCPUOPT) -n -override FPCOPTDEF+=RELEASE -endif -ifdef STRIP -override FPCOPT+=-Xs -endif -ifdef OPTIMIZE -override FPCOPT+=-O2 -endif -ifdef VERBOSE -override FPCOPT+=-vwni -endif -ifdef COMPILER_OPTIONS -override FPCOPT+=$(COMPILER_OPTIONS) -endif -ifdef COMPILER_UNITDIR -override FPCOPT+=$(addprefix -Fu,$(COMPILER_UNITDIR)) -endif -ifdef COMPILER_LIBRARYDIR -override FPCOPT+=$(addprefix -Fl,$(COMPILER_LIBRARYDIR)) -endif -ifdef COMPILER_OBJECTDIR -override FPCOPT+=$(addprefix -Fo,$(COMPILER_OBJECTDIR)) -endif -ifdef COMPILER_INCLUDEDIR -override FPCOPT+=$(addprefix -Fi,$(COMPILER_INCLUDEDIR)) -endif -ifdef CROSSBINDIR -override FPCOPT+=-FD$(CROSSBINDIR) -endif -ifdef COMPILER_TARGETDIR -override FPCOPT+=-FE$(COMPILER_TARGETDIR) -ifeq ($(COMPILER_TARGETDIR),.) -override TARGETDIRPREFIX= -else -override TARGETDIRPREFIX=$(COMPILER_TARGETDIR)/ -endif -endif -ifdef COMPILER_UNITTARGETDIR -override FPCOPT+=-FU$(COMPILER_UNITTARGETDIR) -ifeq ($(COMPILER_UNITTARGETDIR),.) -override UNITTARGETDIRPREFIX= -else -override UNITTARGETDIRPREFIX=$(COMPILER_UNITTARGETDIR)/ -endif -else -ifdef COMPILER_TARGETDIR -override COMPILER_UNITTARGETDIR=$(COMPILER_TARGETDIR) -override UNITTARGETDIRPREFIX=$(TARGETDIRPREFIX) -endif -endif -ifdef CREATESHARED -override FPCOPT+=-Cg -ifeq ($(CPU_TARGET),i386) -override FPCOPT+=-Aas -endif -endif -ifeq ($(findstring 2.0.,$(FPC_VERSION)),) -ifeq ($(OS_TARGET),linux) -ifeq ($(CPU_TARGET),x86_64) -override FPCOPT+=-Cg -endif -endif -endif -ifdef LINKSHARED -endif -ifdef OPT -override FPCOPT+=$(OPT) -endif -ifdef FPCOPTDEF -override FPCOPT+=$(addprefix -d,$(FPCOPTDEF)) -endif -ifdef CFGFILE -override FPCOPT+=@$(CFGFILE) -endif -ifdef USEENV -override FPCEXTCMD:=$(FPCOPT) -override FPCOPT:=!FPCEXTCMD -export FPCEXTCMD -endif -override AFULL_TARGET=$(CPU_TARGET)-$(OS_TARGET) -override AFULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE) -ifneq ($(AFULL_TARGET),$(AFULL_SOURCE)) -override ACROSSCOMPILE=1 -endif -ifdef ACROSSCOMPILE -override FPCOPT+=$(CROSSOPT) -endif -override COMPILER:=$(FPC) $(FPCOPT) -ifeq (,$(findstring -s ,$(COMPILER))) -EXECPPAS= -else -ifeq ($(FULL_SOURCE),$(FULL_TARGET)) -ifdef RUNBATCH -EXECPPAS:=@$(RUNBATCH) $(PPAS) -else -EXECPPAS:=@$(PPAS) -endif -endif -endif -ifdef TARGET_RSTS -override RSTFILES=$(addsuffix $(RSTEXT),$(TARGET_RSTS)) -override CLEANRSTFILES+=$(RSTFILES) -endif -.PHONY: fpc_clean fpc_cleanall fpc_distclean -ifdef EXEFILES -override CLEANEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(CLEANEXEFILES)) -endif -ifdef CLEAN_UNITS -override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(CLEAN_UNITS)) -endif -ifdef CLEANPPUFILES -override CLEANPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES))) $(addprefix $(IMPORTLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES))) -ifdef DEBUGSYMEXT -override CLEANPPULINKFILES+=$(subst $(PPUEXT),$(DEBUGSYMEXT),$(CLEANPPUFILES)) -endif -override CLEANPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPUFILES)) -override CLEANPPULINKFILES:=$(wildcard $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPULINKFILES))) -endif -fpc_clean: $(CLEANTARGET) -ifdef CLEANEXEFILES - -$(DEL) $(CLEANEXEFILES) -endif -ifdef CLEANPPUFILES - -$(DEL) $(CLEANPPUFILES) -endif -ifneq ($(CLEANPPULINKFILES),) - -$(DEL) $(CLEANPPULINKFILES) -endif -ifdef CLEANRSTFILES - -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES)) -endif -ifdef CLEAN_FILES - -$(DEL) $(CLEAN_FILES) -endif -ifdef LIB_NAME - -$(DEL) $(LIB_NAME) $(LIB_FULLNAME) -endif - -$(DEL) $(FPCMADE) Package.fpc $(PPAS) script.res link.res $(FPCEXTFILE) $(REDIRFILE) - -$(DEL) *$(ASMEXT) *_ppas$(BATCHEXT) -fpc_cleanall: $(CLEANTARGET) -ifdef CLEANEXEFILES - -$(DEL) $(CLEANEXEFILES) -endif -ifdef COMPILER_UNITTARGETDIR -ifdef CLEANPPUFILES - -$(DEL) $(CLEANPPUFILES) -endif -ifneq ($(CLEANPPULINKFILES),) - -$(DEL) $(CLEANPPULINKFILES) -endif -ifdef CLEANRSTFILES - -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES)) -endif -endif - -$(DELTREE) units - -$(DEL) *$(OEXT) *$(PPUEXT) *$(RSTEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT) -ifneq ($(PPUEXT),.ppu) - -$(DEL) *.o *.ppu *.a -endif - -$(DELTREE) *$(SMARTEXT) - -$(DEL) fpcmade.* Package.fpc $(PPAS) script.res link.res $(FPCEXTFILE) $(REDIRFILE) - -$(DEL) *_ppas$(BATCHEXT) -ifdef AOUTEXT - -$(DEL) *$(AOUTEXT) -endif -ifdef DEBUGSYMEXT - -$(DEL) *$(DEBUGSYMEXT) -endif -fpc_distclean: cleanall -.PHONY: fpc_baseinfo -override INFORULES+=fpc_baseinfo -fpc_baseinfo: - @$(ECHO) - @$(ECHO) == Package info == - @$(ECHO) Package Name..... $(PACKAGE_NAME) - @$(ECHO) Package Version.. $(PACKAGE_VERSION) - @$(ECHO) - @$(ECHO) == Configuration info == - @$(ECHO) - @$(ECHO) FPC.......... $(FPC) - @$(ECHO) FPC Version.. $(FPC_VERSION) - @$(ECHO) Source CPU... $(CPU_SOURCE) - @$(ECHO) Target CPU... $(CPU_TARGET) - @$(ECHO) Source OS.... $(OS_SOURCE) - @$(ECHO) Target OS.... $(OS_TARGET) - @$(ECHO) Full Source.. $(FULL_SOURCE) - @$(ECHO) Full Target.. $(FULL_TARGET) - @$(ECHO) SourceSuffix. $(SOURCESUFFIX) - @$(ECHO) TargetSuffix. $(TARGETSUFFIX) - @$(ECHO) - @$(ECHO) == Directory info == - @$(ECHO) - @$(ECHO) Required pkgs... $(REQUIRE_PACKAGES) - @$(ECHO) - @$(ECHO) Basedir......... $(BASEDIR) - @$(ECHO) FPCDir.......... $(FPCDIR) - @$(ECHO) CrossBinDir..... $(CROSSBINDIR) - @$(ECHO) UnitsDir........ $(UNITSDIR) - @$(ECHO) PackagesDir..... $(PACKAGESDIR) - @$(ECHO) - @$(ECHO) GCC library..... $(GCCLIBDIR) - @$(ECHO) Other library... $(OTHERLIBDIR) - @$(ECHO) - @$(ECHO) == Tools info == - @$(ECHO) - @$(ECHO) As........ $(AS) - @$(ECHO) Ld........ $(LD) - @$(ECHO) Ar........ $(AR) - @$(ECHO) Rc........ $(RC) - @$(ECHO) - @$(ECHO) Mv........ $(MVPROG) - @$(ECHO) Cp........ $(CPPROG) - @$(ECHO) Rm........ $(RMPROG) - @$(ECHO) GInstall.. $(GINSTALL) - @$(ECHO) Echo...... $(ECHO) - @$(ECHO) Shell..... $(SHELL) - @$(ECHO) Date...... $(DATE) - @$(ECHO) FPCMake... $(FPCMAKE) - @$(ECHO) PPUMove... $(PPUMOVE) - @$(ECHO) Upx....... $(UPXPROG) - @$(ECHO) Zip....... $(ZIPPROG) - @$(ECHO) - @$(ECHO) == Object info == - @$(ECHO) - @$(ECHO) Target Loaders........ $(TARGET_LOADERS) - @$(ECHO) Target Units.......... $(TARGET_UNITS) - @$(ECHO) Target Implicit Units. $(TARGET_IMPLICITUNITS) - @$(ECHO) Target Programs....... $(TARGET_PROGRAMS) - @$(ECHO) Target Dirs........... $(TARGET_DIRS) - @$(ECHO) Target Examples....... $(TARGET_EXAMPLES) - @$(ECHO) Target ExampleDirs.... $(TARGET_EXAMPLEDIRS) - @$(ECHO) - @$(ECHO) Clean Units......... $(CLEAN_UNITS) - @$(ECHO) Clean Files......... $(CLEAN_FILES) - @$(ECHO) - @$(ECHO) Install Units....... $(INSTALL_UNITS) - @$(ECHO) Install Files....... $(INSTALL_FILES) - @$(ECHO) - @$(ECHO) == Install info == - @$(ECHO) - @$(ECHO) DateStr.............. $(DATESTR) - @$(ECHO) ZipName.............. $(ZIPNAME) - @$(ECHO) ZipPrefix............ $(ZIPPREFIX) - @$(ECHO) ZipCrossPrefix....... $(ZIPCROSSPREFIX) - @$(ECHO) ZipSuffix............ $(ZIPSUFFIX) - @$(ECHO) FullZipName.......... $(FULLZIPNAME) - @$(ECHO) Install FPC Package.. $(INSTALL_FPCPACKAGE) - @$(ECHO) - @$(ECHO) Install base dir..... $(INSTALL_BASEDIR) - @$(ECHO) Install binary dir... $(INSTALL_BINDIR) - @$(ECHO) Install library dir.. $(INSTALL_LIBDIR) - @$(ECHO) Install units dir.... $(INSTALL_UNITDIR) - @$(ECHO) Install source dir... $(INSTALL_SOURCEDIR) - @$(ECHO) Install doc dir...... $(INSTALL_DOCDIR) - @$(ECHO) Install example dir.. $(INSTALL_EXAMPLEDIR) - @$(ECHO) Install data dir..... $(INSTALL_DATADIR) - @$(ECHO) - @$(ECHO) Dist destination dir. $(DIST_DESTDIR) - @$(ECHO) Dist zip name........ $(DIST_ZIPNAME) - @$(ECHO) -.PHONY: fpc_info -fpc_info: $(INFORULES) -.PHONY: fpc_makefile fpc_makefiles fpc_makefile_sub1 fpc_makefile_sub2 \ - fpc_makefile_dirs -fpc_makefile: - $(FPCMAKE) -w -T$(OS_TARGET) Makefile.fpc -fpc_makefile_sub1: -ifdef TARGET_DIRS - $(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TARGET_DIRS)) -endif -ifdef TARGET_EXAMPLEDIRS - $(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TARGET_EXAMPLEDIRS)) -endif -fpc_makefile_sub2: $(addsuffix _makefile_dirs,$(TARGET_DIRS) $(TARGET_EXAMPLEDIRS)) -fpc_makefile_dirs: fpc_makefile_sub1 fpc_makefile_sub2 -fpc_makefiles: fpc_makefile fpc_makefile_dirs -all: -debug: -smart: -release: -units: -examples: -shared: -install: -sourceinstall: -exampleinstall: -distinstall: -zipinstall: -zipsourceinstall: -zipexampleinstall: -zipdistinstall: -clean: fpc_clean -distclean: fpc_distclean -cleanall: fpc_cleanall -info: fpc_info -makefiles: fpc_makefiles -.PHONY: all debug smart release units examples shared install sourceinstall exampleinstall distinstall zipinstall zipsourceinstall zipexampleinstall zipdistinstall clean distclean cleanall info makefiles -ifneq ($(wildcard fpcmake.loc),) -include fpcmake.loc -endif -cleanlaz: clean diff -Nru lazarus-0.9.30/packager/Makefile.fpc lazarus-0.9.30.2/packager/Makefile.fpc --- lazarus-0.9.30/packager/Makefile.fpc 2008-02-16 11:09:45.000000000 +0000 +++ lazarus-0.9.30.2/packager/Makefile.fpc 1970-01-01 00:00:00.000000000 +0000 @@ -1,21 +0,0 @@ -# $Id: Makefile.fpc 14157 2008-02-16 11:09:45Z mattias $ -# -# Makefile.fpc for Lazarus for Free Pascal -# - -[target] - -[clean] -files=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))\ - $(wildcard ./units/*$(OEXT)) \ - $(wildcard ./units/*$(PPUEXT)) \ - $(wildcard ./units/*$(RSTEXT)) \ - $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(OEXT)) \ - $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(PPUEXT)) \ - $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(RSTEXT)) \ - -[rules] -cleanlaz: clean - -# end. - diff -Nru lazarus-0.9.30/packager/openinstalledpkgdlg.pas lazarus-0.9.30.2/packager/openinstalledpkgdlg.pas --- lazarus-0.9.30/packager/openinstalledpkgdlg.pas 2010-04-05 20:09:18.000000000 +0000 +++ lazarus-0.9.30.2/packager/openinstalledpkgdlg.pas 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: openinstalledpkgdlg.pas 24448 2010-04-05 20:09:18Z mattias $ } +{ $Id$ } { /*************************************************************************** openinstalledpkgdlg.pas diff -Nru lazarus-0.9.30/packager/packagedefs.pas lazarus-0.9.30.2/packager/packagedefs.pas --- lazarus-0.9.30/packager/packagedefs.pas 2010-12-16 21:31:47.000000000 +0000 +++ lazarus-0.9.30.2/packager/packagedefs.pas 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: packagedefs.pas 28732 2010-12-16 21:31:47Z mattias $ } +{ $Id$ } { /*************************************************************************** packagedefs.pas diff -Nru lazarus-0.9.30/packager/packagesystem.pas lazarus-0.9.30.2/packager/packagesystem.pas --- lazarus-0.9.30/packager/packagesystem.pas 2011-02-10 22:22:30.000000000 +0000 +++ lazarus-0.9.30.2/packager/packagesystem.pas 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: packagesystem.pas 29456 2011-02-10 22:22:30Z vincents $ } +{ $Id$ } { /*************************************************************************** packagesystem.pas @@ -154,6 +154,7 @@ function Count: integer; // number of Packages procedure BeginUpdate(Change: boolean); procedure EndUpdate; + procedure UpdatePkgOutputDir(APackage: TLazPackage); function Updating: boolean; procedure RebuildDefineTemplates; function MacroFunctionPkgDir(const s: string; const Data: PtrInt; @@ -710,6 +711,38 @@ end; end; +procedure TLazPackageGraph.UpdatePkgOutputDir(APackage: TLazPackage); +var + StateFilename: String; + OutputDir: String; + NewOutputDir: String; +begin + if (APackage.CompilerOptions.ParsedOpts.OutputDirectoryOverride='') then + begin + OutputDir:=APackage.GetOutputDirectory(false); + if not DirectoryIsWritableCached(OutputDir) then + begin + // the package uses the default output directory, but the default is + // not writable. + // => check the alternative + if Assigned(OnGetWritablePkgOutputDirectory) then begin + NewOutputDir:=OutputDir; + OnGetWritablePkgOutputDirectory(APackage, NewOutputDir); + if (NewOutputDir<>OutputDir) and (NewOutputDir<>'') then begin + StateFilename:=APackage.GetStateFilename(NewOutputDir); + if FileExistsCached(StateFilename) then begin + // the alternative output directory contains a state file + // this means the user has compiled his own version + // => use the alternative output directory + APackage.CompilerOptions.ParsedOpts.OutputDirectoryOverride:= + NewOutputDir; + end; + end; + end; + end; + end; +end; + function TLazPackageGraph.Updating: boolean; begin Result:=FUpdateLock>0; @@ -2981,8 +3014,6 @@ StateFileAge: Integer; i: Integer; CurFile: TPkgFile; - NewOutputDir: String; - OutputDir: String; LastParams: String; LastPaths: TStringList; CurPaths: TStringList; @@ -3007,29 +3038,7 @@ then NeedBuildAllFlag:=true; - if (APackage.CompilerOptions.ParsedOpts.OutputDirectoryOverride='') then - begin - OutputDir:=APackage.GetOutputDirectory(false); - if not DirectoryIsWritableCached(OutputDir) then - begin - // the package uses the default output directory, but the default is - // not writable. - // => check the alternative - if Assigned(OnGetWritablePkgOutputDirectory) then begin - NewOutputDir:=OutputDir; - OnGetWritablePkgOutputDirectory(APackage,NewOutputDir); - if (NewOutputDir<>OutputDir) and (NewOutputDir<>'') then begin - StateFilename:=APackage.GetStateFilename(NewOutputDir); - if FileExistsCached(StateFilename) then begin - // the alternative output directory contains a state file - // this means the user has compiled his own version - // => use the alternative output directory - APackage.CompilerOptions.ParsedOpts.OutputDirectoryOverride:=NewOutputDir; - end; - end; - end; - end; - end; + UpdatePkgOutputDir(APackage); // check state file StateFilename:=APackage.GetStateFilename; @@ -3232,6 +3241,7 @@ SrcFilename:=APackage.GetSrcFilename; CompilerFilename:=APackage.GetCompilerFilename; + UpdatePkgOutputDir(APackage); // Note: use absolute paths, because some external tools resolve symlinked directories CompilerParams:=APackage.CompilerOptions.MakeOptionsString(Globals, APackage.CompilerOptions.DefaultMakeOptionsFlags+[ccloAbsolutePaths]) diff -Nru lazarus-0.9.30/packager/pkggraphexplorer.pas lazarus-0.9.30.2/packager/pkggraphexplorer.pas --- lazarus-0.9.30/packager/pkggraphexplorer.pas 2010-11-14 20:53:45.000000000 +0000 +++ lazarus-0.9.30.2/packager/pkggraphexplorer.pas 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: pkggraphexplorer.pas 28228 2010-11-14 20:53:45Z mattias $ } +{ $Id$ } { /*************************************************************************** pkggraphexplorer.pas diff -Nru lazarus-0.9.30/packager/pkgoptionsdlg.pas lazarus-0.9.30.2/packager/pkgoptionsdlg.pas --- lazarus-0.9.30/packager/pkgoptionsdlg.pas 2010-09-27 11:45:53.000000000 +0000 +++ lazarus-0.9.30.2/packager/pkgoptionsdlg.pas 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: pkgoptionsdlg.pas 27491 2010-09-27 11:45:53Z mattias $ } +{ $Id$ } { /*************************************************************************** pkgoptionsdlg.pas diff -Nru lazarus-0.9.30/packager/pkgvirtualuniteditor.pas lazarus-0.9.30.2/packager/pkgvirtualuniteditor.pas --- lazarus-0.9.30/packager/pkgvirtualuniteditor.pas 2010-01-14 03:25:02.000000000 +0000 +++ lazarus-0.9.30.2/packager/pkgvirtualuniteditor.pas 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: pkgvirtualuniteditor.pas 23442 2010-01-14 03:25:02Z paul $ } +{ $Id$ } { /*************************************************************************** pkgvirtualuniteditor.pas diff -Nru lazarus-0.9.30/packager/registerfcl.pas lazarus-0.9.30.2/packager/registerfcl.pas --- lazarus-0.9.30/packager/registerfcl.pas 2010-03-09 15:48:35.000000000 +0000 +++ lazarus-0.9.30.2/packager/registerfcl.pas 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: registerfcl.pas 23892 2010-03-09 15:48:35Z vincents $ } +{ $Id$ } { /*************************************************************************** registerlcl.pas diff -Nru lazarus-0.9.30/packager/registerideintf.pas lazarus-0.9.30.2/packager/registerideintf.pas --- lazarus-0.9.30/packager/registerideintf.pas 2005-07-31 17:58:40.000000000 +0000 +++ lazarus-0.9.30.2/packager/registerideintf.pas 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: registerideintf.pas 7462 2005-07-31 17:58:40Z mattias $ } +{ $Id$ } { /*************************************************************************** registerideintf.pas diff -Nru lazarus-0.9.30/packager/registerlcl.pas lazarus-0.9.30.2/packager/registerlcl.pas --- lazarus-0.9.30/packager/registerlcl.pas 2009-04-10 15:33:23.000000000 +0000 +++ lazarus-0.9.30.2/packager/registerlcl.pas 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: registerlcl.pas 19313 2009-04-10 15:33:23Z paul $ } +{ $Id$ } { /*************************************************************************** registerlcl.pas diff -Nru lazarus-0.9.30/packager/registersynedit.pas lazarus-0.9.30.2/packager/registersynedit.pas --- lazarus-0.9.30/packager/registersynedit.pas 2010-12-17 19:50:17.000000000 +0000 +++ lazarus-0.9.30.2/packager/registersynedit.pas 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: registersynedit.pas 28746 2010-12-17 19:50:17Z martin $ } +{ $Id$ } { /*************************************************************************** registersynedit.pas diff -Nru lazarus-0.9.30/packager/registration/lazaruspackageintf.pas lazarus-0.9.30.2/packager/registration/lazaruspackageintf.pas --- lazarus-0.9.30/packager/registration/lazaruspackageintf.pas 2008-07-22 09:48:15.000000000 +0000 +++ lazarus-0.9.30.2/packager/registration/lazaruspackageintf.pas 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: lazaruspackageintf.pas 15834 2008-07-22 09:48:15Z mattias $ } +{ $Id$ } { /*************************************************************************** lazaruspackageintf.pas diff -Nru lazarus-0.9.30/packager/registration/Makefile.fpc lazarus-0.9.30.2/packager/registration/Makefile.fpc --- lazarus-0.9.30/packager/registration/Makefile.fpc 2007-10-16 22:47:51.000000000 +0000 +++ lazarus-0.9.30.2/packager/registration/Makefile.fpc 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -# $Id: Makefile.fpc 12495 2007-10-16 22:47:51Z mattias $ +# $Id$ # # Makefile.fpc for Lazarus for Free Pascal # diff -Nru lazarus-0.9.30/packager/ucomponentmanmain.pas lazarus-0.9.30.2/packager/ucomponentmanmain.pas --- lazarus-0.9.30/packager/ucomponentmanmain.pas 2010-01-14 03:25:02.000000000 +0000 +++ lazarus-0.9.30.2/packager/ucomponentmanmain.pas 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: ucomponentmanmain.pas 23442 2010-01-14 03:25:02Z paul $ } +{ $Id$ } {*************************************************************************** * * * This source is free software; you can redistribute it and/or modify * diff -Nru lazarus-0.9.30/packager/ufrmaddcomponent.pas lazarus-0.9.30.2/packager/ufrmaddcomponent.pas --- lazarus-0.9.30/packager/ufrmaddcomponent.pas 2010-01-14 03:25:02.000000000 +0000 +++ lazarus-0.9.30.2/packager/ufrmaddcomponent.pas 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: ufrmaddcomponent.pas 23442 2010-01-14 03:25:02Z paul $ } +{ $Id$ } {*************************************************************************** * * * This source is free software; you can redistribute it and/or modify * diff -Nru lazarus-0.9.30/test/bugtestcase.pas lazarus-0.9.30.2/test/bugtestcase.pas --- lazarus-0.9.30/test/bugtestcase.pas 2009-04-10 15:33:23.000000000 +0000 +++ lazarus-0.9.30.2/test/bugtestcase.pas 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: bugtestcase.pas 19313 2009-04-10 15:33:23Z paul $} +{ $Id$} { Copyright (C) 2007 Vincent Snijders This source is free software; you can redistribute it and/or modify it under diff -Nru lazarus-0.9.30/test/runtestsgui.lpr lazarus-0.9.30.2/test/runtestsgui.lpr --- lazarus-0.9.30/test/runtestsgui.lpr 2010-10-25 14:53:45.000000000 +0000 +++ lazarus-0.9.30.2/test/runtestsgui.lpr 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: runtestsgui.lpr 27857 2010-10-25 14:53:45Z sekelsenmat $} +{ $Id$} { Copyright (C) 2006 Vincent Snijders This source is free software; you can redistribute it and/or modify it under diff -Nru lazarus-0.9.30/test/runtests.lpr lazarus-0.9.30.2/test/runtests.lpr --- lazarus-0.9.30/test/runtests.lpr 2008-09-23 12:46:36.000000000 +0000 +++ lazarus-0.9.30.2/test/runtests.lpr 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: runtests.lpr 16684 2008-09-23 12:46:36Z vincents $} +{ $Id$} { Copyright (C) 2006 Vincent Snijders This source is free software; you can redistribute it and/or modify it under diff -Nru lazarus-0.9.30/test/testglobals.pas lazarus-0.9.30.2/test/testglobals.pas --- lazarus-0.9.30/test/testglobals.pas 2010-10-25 14:14:56.000000000 +0000 +++ lazarus-0.9.30.2/test/testglobals.pas 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: testglobals.pas 27856 2010-10-25 14:14:56Z sekelsenmat $} +{ $Id$} { Copyright (C) 2007 Vincent Snijders This source is free software; you can redistribute it and/or modify it under diff -Nru lazarus-0.9.30/test/testlpi.pas lazarus-0.9.30.2/test/testlpi.pas --- lazarus-0.9.30/test/testlpi.pas 2010-10-22 10:37:57.000000000 +0000 +++ lazarus-0.9.30.2/test/testlpi.pas 2011-11-23 16:14:45.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: testlpi.pas 27808 2010-10-22 10:37:57Z vincents $} +{ $Id$} { Copyright (C) 2006 Vincent Snijders This source is free software; you can redistribute it and/or modify it under diff -Nru lazarus-0.9.30/tools/apiwizz/apiwizard.pp lazarus-0.9.30.2/tools/apiwizz/apiwizard.pp --- lazarus-0.9.30/tools/apiwizz/apiwizard.pp 2010-01-05 22:30:44.000000000 +0000 +++ lazarus-0.9.30.2/tools/apiwizz/apiwizard.pp 2011-11-23 16:14:46.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: apiwizard.pp 23388 2010-01-05 22:30:44Z marc $ } +{ $Id$ } { /*************************************************************************** APIWizard.pp diff -Nru lazarus-0.9.30/tools/apiwizz/apiwizz.pp lazarus-0.9.30.2/tools/apiwizz/apiwizz.pp --- lazarus-0.9.30/tools/apiwizz/apiwizz.pp 2005-08-22 12:30:03.000000000 +0000 +++ lazarus-0.9.30.2/tools/apiwizz/apiwizz.pp 2011-11-23 16:14:46.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: apiwizz.pp 7541 2005-08-22 12:30:03Z vincents $ } +{ $Id$ } { /*************************************************************************** APIWiZZ.pp diff -Nru lazarus-0.9.30/tools/install/create_lazarus_deb.sh lazarus-0.9.30.2/tools/install/create_lazarus_deb.sh --- lazarus-0.9.30/tools/install/create_lazarus_deb.sh 2010-02-23 10:55:11.000000000 +0000 +++ lazarus-0.9.30.2/tools/install/create_lazarus_deb.sh 2011-11-23 16:14:46.000000000 +0000 @@ -156,7 +156,8 @@ mkdir -p $LazBuildDir/etc/lazarus cp $EtcSrcDir/editoroptions.xml $LazBuildDir/etc/lazarus/ cat $EtcSrcDir/environmentoptions.xml | \ - sed -e "s#/usr/lib/lazarus/%LazarusVersion%#$LazDestDirInstalled/#" \ + sed -e "s#__LAZARUSDIR__#$LazDestDirInstalled/#" \ + -e "s#__FPCSRCDIR__#/usr/share/fpcsrc/\$(FPCVER)/#" \ > $LazBuildDir/etc/lazarus/environmentoptions.xml chmod 644 $LazBuildDir/etc/lazarus/*.xml diff -Nru lazarus-0.9.30/tools/install/create_lazarus_rpm.sh lazarus-0.9.30.2/tools/install/create_lazarus_rpm.sh --- lazarus-0.9.30/tools/install/create_lazarus_rpm.sh 2008-09-28 23:29:51.000000000 +0000 +++ lazarus-0.9.30.2/tools/install/create_lazarus_rpm.sh 2011-11-23 16:14:46.000000000 +0000 @@ -15,7 +15,7 @@ echo ERROR: fpc rpm not installed exit fi -FPCRPMVersion=$(echo $FPCRPM | sed -e 's/fpc-//g' -e 's/\.i386\|\.x86_64//g') +FPCRPMVersion=$(echo $FPCRPM | sed -e 's/fpc-//g' -e 's/\.i386\|\.i686\|\.x86_64//g') echo "installed fpc version: $FPCRPMVersion" FPCSRCRPMVersion=$(echo $FPCRPMVersion | cut -d- -f1) diff -Nru lazarus-0.9.30/tools/install/linux/environmentoptions.xml lazarus-0.9.30.2/tools/install/linux/environmentoptions.xml --- lazarus-0.9.30/tools/install/linux/environmentoptions.xml 2009-10-08 00:19:48.000000000 +0000 +++ lazarus-0.9.30.2/tools/install/linux/environmentoptions.xml 2011-11-23 16:14:46.000000000 +0000 @@ -5,7 +5,7 @@ - + @@ -17,7 +17,7 @@ - + diff -Nru lazarus-0.9.30/tools/install/macosx/create_lazarus_dmg.sh lazarus-0.9.30.2/tools/install/macosx/create_lazarus_dmg.sh --- lazarus-0.9.30/tools/install/macosx/create_lazarus_dmg.sh 2009-11-18 15:30:39.000000000 +0000 +++ lazarus-0.9.30.2/tools/install/macosx/create_lazarus_dmg.sh 2011-11-23 16:14:46.000000000 +0000 @@ -78,9 +78,9 @@ cd - LazRelease='0' # Iceberg only supports a major and a minor version number -# convert 1.2.3 => 1.23 +# convert 1.2.3 => 1.23 and 0.9.30.2RC1 => 0.93021 LAZMAJORVERSION=$(echo $LazVersion | sed -e 's/\..*//') -LAZMINORVERSION=$(echo $LazVersion | sed -e 's/[^.]*\.//' -e 's/\.//g') +LAZMINORVERSION=$(echo $LazVersion | sed -e 's/[^.]*\.//' -e 's/\.//g' | tr -d [A-Za-z]) COMPILER=$PP if [ -z "$COMPILER" ]; then diff -Nru lazarus-0.9.30/tools/install/rpm/create_lazarus_rpm.sh lazarus-0.9.30.2/tools/install/rpm/create_lazarus_rpm.sh --- lazarus-0.9.30/tools/install/rpm/create_lazarus_rpm.sh 1970-01-01 00:00:00.000000000 +0000 +++ lazarus-0.9.30.2/tools/install/rpm/create_lazarus_rpm.sh 2011-11-23 16:14:46.000000000 +0000 @@ -0,0 +1,103 @@ +#!/usr/bin/env bash +# note: this script uses Fedora mock to build the lazarus rpm +# in a chroot environment + +set -x +set -e + +#------------------------------------------------------------------------------ +# parse parameters +#------------------------------------------------------------------------------ +Usage="Usage: $0 [append-revision] [snapshot]" + +LazSrcDir=$1 +shift +if [ "x$LazSrcDir" = "x" ]; then + echo $Usage + exit -1 +fi + +if [ ! -d $LazSrcDir/lcl ]; then + echo "The directory $LazSrcDir does not look like a lazarus source directory" + exit -1 +fi + +if [ ! -d $LazSrcDir/.svn ]; then + echo "The directory $LazSrcDir does not look like a svn working directory" + exit -1 +fi + +FPCFullVersion=$1 +shift +if [ "x$FPCFullVersion" = "x" ]; then + echo $Usage + exit -1 +fi + +cd $(dirname $0) +if [ "$1" = "append-revision" ]; then + LazVersionPostfix=$(../get_svn_revision_number.sh $LazSrcDir) + if [ -n "$LazVersionPostfix" ]; then + LazVersionPostfix=.$LazVersionPostfix + fi + shift +else +LazVersionPostfix= +fi + +LazVersion=$(../get_lazarus_version.sh)$LazVersionPostfix +if [ "$1" = "snapshot" ]; then + LazRelease=`date +%Y%m%d`.laz +else + LazRelease=0.laz +fi + +RPMDIR=$(./get_rpm_source_dir.sh) +RPMARCH=$(rpm --eval "%{_arch}") +RPMTARGETCPU=$(rpm --eval "%{_target_cpu}") + +MOCKCONFIG=buildlazarus +MOCKRESULTDIR=~/tmp/mockresult + +rm -rf $MOCKRESULTDIR + +FPCRPM=$RPMDIR/RPMS/$RPMTARGETCPU/fpc-$FPCFullVersion-0.laz.$RPMTARGETCPU.rpm +if [ ! -f $FPCRPM ]; then + echo ERROR: fpc rpm $FPCRPM not available + exit +fi + +LAZSPEC=$RPMDIR/SPECS/lazarus-$LazVersion-$LazRelease.spec +Src=lazarus-$LazVersion-$LazRelease.tar.gz +SrcTGZ=$RPMDIR/SOURCES/$Src + +#create lazarus spec file +cat lazarus.spec.template | \ + sed -e "s/LAZVERSION/$LazVersion/g" \ + -e "s/LAZRELEASE/$LazRelease/g" \ + -e "s/FPCVERSION/$FPCFullVersion/g" \ + -e "s/FPCSRCVERSION/$FPCFullVersion/g" \ + > $LAZSPEC + +#create lazarus source tgz +../create_lazarus_export_tgz.sh $SrcTGZ + +#init mock environment +mock -r $MOCKCONFIG --init --resultdir $MOCKRESULTDIR + +#install fpc in mock +mock -r $MOCKCONFIG --install $FPCRPM --resultdir $MOCKRESULTDIR + +#build lazarus source rpm +rpmbuild --verbose -bs --nodeps $LAZSPEC + +#build lazarus rpm +mock -r $MOCKCONFIG --no-clean --installdeps --rebuild $RPMDIR/SRPMS/lazarus-$LazVersion-$LazRelease.src.rpm --resultdir $MOCKRESULTDIR + +#copy result into non-root rpm repository +cp $MOCKRESULTDIR/*.src.rpm $RPMDIR/SRPMS/ +cp $MOCKRESULTDIR/*.$RPMTARGETCPU.rpm $RPMDIR/RPMS/$RPMTARGETCPU/ + +echo "The new rpm can be found at $RPMDIR/RPMS/$RPMTARGETCPU/lazarus-$LazVersion-$LazRelease.$RPMTARGETCPU.rpm" + + diff -Nru lazarus-0.9.30/tools/install/rpm/lazarus.spec.template lazarus-0.9.30.2/tools/install/rpm/lazarus.spec.template --- lazarus-0.9.30/tools/install/rpm/lazarus.spec.template 2011-02-02 11:07:34.000000000 +0000 +++ lazarus-0.9.30.2/tools/install/rpm/lazarus.spec.template 2011-11-23 16:14:46.000000000 +0000 @@ -10,7 +10,7 @@ Packager: Mattias Gaertner BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -#BuildRequires: +BuildRequires: fpc = FPCVERSION, gtk2-devel, glibc-devel Requires: fpc-src = FPCSRCVERSION, fpc = FPCVERSION, gtk2-devel, glibc-devel, binutils, gdb Requires(post): desktop-file-utils @@ -29,6 +29,9 @@ %build cd lazarus +for package in $(find . -name '*.lpk'); do + sed -i -e 's@^\(\W*\)\(.*\)@\1\n\1\2@' "$package" +done MAKEOPTS="-Fl/opt/gnome/lib" if [ -n "$FPCCfg" ]; then MAKEOPTS="$MAKEOPTS -n @$FPCCfg" @@ -66,7 +69,7 @@ cat lazarus/install/man/man1/lazarus-ide.1 | gzip > %{buildroot}%{_mandir}/man1/lazarus-ide.1.gz cat lazarus/install/man/man1/startlazarus.1 | gzip > %{buildroot}%{_mandir}/man1/startlazarus.1.gz install lazarus/tools/install/linux/editoroptions.xml %{buildroot}%{_sysconfdir}/lazarus/editoroptions.xml -cat lazarus/tools/install/linux/environmentoptions.xml | sed -e "s#/usr/lib/lazarus/#$LAZARUSDIR/#" > %{buildroot}%{_sysconfdir}/lazarus/environmentoptions.xml +cat lazarus/tools/install/linux/environmentoptions.xml | sed -e "s#__LAZARUSDIR__#$LAZARUSDIR/#" -e "s#__FPCSRCDIR__#%{_datadir}/fpcsrc/#" > %{buildroot}%{_sysconfdir}/lazarus/environmentoptions.xml %clean diff -Nru lazarus-0.9.30/tools/install/win/build-cross.bat lazarus-0.9.30.2/tools/install/win/build-cross.bat --- lazarus-0.9.30/tools/install/win/build-cross.bat 2010-11-24 14:06:21.000000000 +0000 +++ lazarus-0.9.30.2/tools/install/win/build-cross.bat 2011-11-23 16:14:46.000000000 +0000 @@ -50,10 +50,10 @@ :: set path to make sure the right tools are used SET OLDPATH=%PATH% -PATH=%FPCBINDIR% +PATH=%FPCBINDIR%; cd %FPCSVNDIR%\fpcsrc -%MAKEEXE% distclean FPC=%RELEASE_PPC% > NUL +%MAKEEXE% distclean FPC=%RELEASE_PPC% rm -rf %FPCSVNDIR%\fpcsrc\compiler\*.exe :: create a native compiler + utils %MAKEEXE% compiler_cycle FPC=%RELEASE_PPC% @@ -61,10 +61,14 @@ FOR /F %%L IN ('%FPCSVNDIR%\fpcsrc\compiler\utils\fpc.exe -PB') DO SET COMPILER=%FPCSVNDIR%\fpcsrc\compiler\%%L FOR /F %%L IN ('%COMPILER% -iSO') DO SET FPCSourceOS=%%L FOR /F %%L IN ('%FPCSVNDIR%\fpcsrc\compiler\utils\fpc.exe -P%TARGETCPU% -PB') DO SET PPCNAME=%%L +SET FPCFPMAKE=%COMPILER% :: rebuild the rtl without WPO information %MAKEEXE% rtl_clean rtl PP=%COMPILER% -%MAKEEXE% -C utils/fpcm all FPC=%COMPILER% +%MAKEEXE% -C packages fpmkunit_all fcl-base_all FPC=%COMPILER% +%MAKEEXE% -C utils fpcm_all FPC=%COMPILER% +:: Add -gtttt so that ShowBuiltinCommand is initialized to false, bug in fpc 2.4.4 +%MAKEEXE% -C utils fpcmkcfg_all OPT="-gtttt" FPC=%COMPILER% %MAKEEXE% compiler FPC=%COMPILER% PPC_TARGET=%TARGETCPU% EXENAME=%PPCNAME% IF ERRORLEVEL 1 GOTO CLEANUP @@ -93,7 +97,7 @@ %MAKEEXE% rtl_install packages_install FPCMAKE=%FPCSVNDIR%\fpcsrc\utils\fpcm\fpcmake.exe INSTALL_PREFIX=%INSTALL_BASE% FPC=%COMPILER% copy %COMPILER% %INSTALL_BINDIR% -%FPCSVNDIR%\fpcsrc\compiler\utils\fpcmkcfg.exe -d "basepath=%INSTALL_BASE%" -o %INSTALL_BINDIR%\fpc.cfg +%FPCSVNDIR%\fpcsrc\utils\fpcmkcfg\fpcmkcfg.exe -d "basepath=%INSTALL_BASE%" -o %INSTALL_BINDIR%\fpc.cfg SET COMPILER=%INSTALL_BINDIR%\%PPCNAME% @@ -135,9 +139,14 @@ %OLDCURDRIVE% cd %OLDCURDIR% FOR /F "delims='" %%F IN (%LAZSVNDIR%\ide\version.inc) DO set LAZVERSION=%%F + +SET OutputFileName=lazarus-%LAZVERSION%-fpc-%FPCFULLVERSION%-cross-%FPCFULLTARGET%-%FPCSourceOS% +if [%BUILDLAZRELEASE%]==[] SET OutputFileName=lazarus-%LAZVERSION%-%LAZREVISION%-fpc-%FPCFULLVERSION%-%DATESTAMP%-cross-%FPCFULLTARGET%-%FPCSourceOS% + %ISCC% lazarus-cross.iss :CLEANUP +SET FPCFPMAKE= SET CPU_TARGET= SET OS_TARGET= SET CROSSBINDIR= diff -Nru lazarus-0.9.30/tools/install/win/create_installer.bat lazarus-0.9.30.2/tools/install/win/create_installer.bat --- lazarus-0.9.30/tools/install/win/create_installer.bat 2008-09-05 21:17:52.000000000 +0000 +++ lazarus-0.9.30.2/tools/install/win/create_installer.bat 2011-11-23 16:14:46.000000000 +0000 @@ -72,7 +72,7 @@ :: copy lazarus dir rmdir /s /q %BUILDDIR% %SVN% export %LAZSVNDIR% %BUILDDIR% >> %LOGFILE% -..\..\svn2revisioninc %LAZSVNDIR% %BUILDDIR%\ide\revision.inc +call svn2revisioninc.bat %LAZSVNDIR% %BUILDDIR%\ide\revision.inc call build-fpc.bat @@ -100,8 +100,16 @@ if exist %GDBDIR% %SVN% export %GDBDIR% %BUILDDIR%\mingw :: create the installer +IF [%BUILDLAZRELEASE%]==[] GOTO SNAPSHOT +SET OutputFileName=lazarus-%LAZVERSION%-fpc-%FPCFULLVERSION%-%FPCTARGETOS% +if not [%IDE_WIDGETSET%]==[win32] SET OutputFileName=lazarus-%IDE_WIDGETSET%-%LAZVERSION%-fpc-%FPCFULLVERSION%-%FPCTARGETOS% +GOTO GO_ON + +:SNAPSHOT SET OutputFileName=lazarus-%LAZVERSION%-%LAZREVISION%-fpc-%FPCFULLVERSION%-%DATESTAMP%-%FPCTARGETOS% if not [%IDE_WIDGETSET%]==[win32] SET OutputFileName=lazarus-%IDE_WIDGETSET%-%LAZVERSION%-%LAZREVISION%-fpc-%FPCFULLVERSION%-%DATESTAMP%-%FPCTARGETOS% + +:GO_ON %ISCC% lazarus.iss >> installer.log :: do not delete build dir, if installer failed. diff -Nru lazarus-0.9.30/tools/install/win/lazarus-cross.iss lazarus-0.9.30.2/tools/install/win/lazarus-cross.iss --- lazarus-0.9.30/tools/install/win/lazarus-cross.iss 2008-12-24 07:55:30.000000000 +0000 +++ lazarus-0.9.30.2/tools/install/win/lazarus-cross.iss 2011-11-23 16:14:46.000000000 +0000 @@ -2,6 +2,13 @@ EnableISX=true [Defines] #define AppVersion GetEnv('LazVersion') +// LazVersion may be 0.9.30.2RC1 +// A valid file version contains only digits, so drop the RC part +#if pos('RC',AppVersion)>0 + #define FileVersion = copy(AppVersion, 1, pos('RC', AppVersion)-1) +#else + #define FileVersion = AppVersion +#endif #define LazRevision GetEnv('LazRevision') #define FPCVersion GetEnv('FPCVersion') #define FPCFullVersion GetEnv('FPCFullVersion') @@ -11,6 +18,7 @@ #define AppName "Lazarus" #define SetupDate GetEnv('DateStamp') #define BuildDir GetEnv('BuildDir') +#define OutputFileName GetEnv('OutputFileName') [Setup] AppName={#AppName} AppVersion={#AppVersion} @@ -19,12 +27,12 @@ AppSupportURL=http://www.lazarus.freepascal.org/ AppUpdatesURL=http://www.lazarus.freepascal.org/ ArchitecturesInstallIn64BitMode=x64 -DefaultDirName={code:GetDefDir|c:\lazarus} +DefaultDirName={code:GetDefDir|{sd}\lazarus} DefaultGroupName={#AppName} InternalCompressLevel=ultra -OutputBaseFilename={#AppName}-{#AppVersion}-{#LazRevision}-fpc-{#FPCFullVersion}-{#SetupDate}-cross-{#FPCFullTarget}-{#FPCSourceOS} +OutputBaseFilename={#OutputFileName} SolidCompression=true -VersionInfoVersion={#AppVersion} +VersionInfoVersion={#FileVersion} VersionInfoTextVersion={#AppVersion}-{#SetupDate} ShowLanguageDialog=yes WizardImageFile=lazarus_install_cheetah.bmp diff -Nru lazarus-0.9.30/tools/install/win/lazarus.iss lazarus-0.9.30.2/tools/install/win/lazarus.iss --- lazarus-0.9.30/tools/install/win/lazarus.iss 2010-11-05 07:36:23.000000000 +0000 +++ lazarus-0.9.30.2/tools/install/win/lazarus.iss 2011-11-23 16:14:46.000000000 +0000 @@ -2,6 +2,13 @@ EnableISX=true [Defines] #define AppVersion GetEnv('LazVersion') +// LazVersion may be 0.9.30.2RC1 +// A valid file version contains only digits, so drop the RC part +#if pos('RC',AppVersion)>0 + #define FileVersion = copy(AppVersion, 1, pos('RC', AppVersion)-1) +#else + #define FileVersion = AppVersion +#endif #define FPCVersion GetEnv('FPCVersion') #define FPCTargetOS GetEnv('FPCTargetOS') #define FPCFullTarget GetEnv('FPCFullTarget') @@ -20,12 +27,12 @@ AppSupportURL=http://www.lazarus.freepascal.org/ AppUpdatesURL=http://www.lazarus.freepascal.org/ ArchitecturesInstallIn64BitMode=x64 -DefaultDirName={code:GetDefDir|c:\lazarus} +DefaultDirName={code:GetDefDir|{sd}\lazarus} DefaultGroupName={#AppName} OutputBaseFilename={#OutputFileName} InternalCompressLevel=ultra SolidCompression=true -VersionInfoVersion={#AppVersion} +VersionInfoVersion={#FileVersion} VersionInfoTextVersion={#AppVersion}-{#SetupDate} ShowLanguageDialog=yes WizardImageFile=lazarus_install_cheetah.bmp diff -Nru lazarus-0.9.30/tools/install/win/svn2revisioninc.bat lazarus-0.9.30.2/tools/install/win/svn2revisioninc.bat --- lazarus-0.9.30/tools/install/win/svn2revisioninc.bat 1970-01-01 00:00:00.000000000 +0000 +++ lazarus-0.9.30.2/tools/install/win/svn2revisioninc.bat 2011-11-23 16:14:46.000000000 +0000 @@ -0,0 +1,8 @@ +%SVN% info %1 | %windir%\system32\find.exe "Last Changed Rev:" > svninfo.txt + +set /P SVNINFO= %2 +echo const RevisionStr = '%SVNINFO:~18%';>> %2 + + diff -Nru lazarus-0.9.30/tools/Makefile.fpc lazarus-0.9.30.2/tools/Makefile.fpc --- lazarus-0.9.30/tools/Makefile.fpc 2008-10-07 12:05:16.000000000 +0000 +++ lazarus-0.9.30.2/tools/Makefile.fpc 2011-11-23 16:14:46.000000000 +0000 @@ -1,4 +1,4 @@ -# $Id: Makefile.fpc 16910 2008-10-07 12:05:16Z mattias $ +# $Id$ # # Makefile.fpc for Lazarus for Free Pascal # diff -Nru lazarus-0.9.30/tools/svn2revisioninc.pas lazarus-0.9.30.2/tools/svn2revisioninc.pas --- lazarus-0.9.30/tools/svn2revisioninc.pas 2010-12-09 22:40:24.000000000 +0000 +++ lazarus-0.9.30.2/tools/svn2revisioninc.pas 2011-11-23 16:14:47.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: svn2revisioninc.pas 28661 2010-12-09 22:40:24Z vincents $ } +{ $Id$ } { *************************************************************************** * * diff -Nru lazarus-0.9.30/tools/updatepofiles.pas lazarus-0.9.30.2/tools/updatepofiles.pas --- lazarus-0.9.30/tools/updatepofiles.pas 2008-11-11 01:28:17.000000000 +0000 +++ lazarus-0.9.30.2/tools/updatepofiles.pas 2011-11-23 16:14:47.000000000 +0000 @@ -1,4 +1,4 @@ -{ $Id: updatepofiles.pas 17325 2008-11-11 01:28:17Z jesus $ } +{ $Id$ } { *************************************************************************** * *