From 5dd9773ab87009faf423e1c84a279799b8fefde1 Mon Sep 17 00:00:00 2001 From: mattias Date: Wed, 26 Mar 2003 10:56:30 +0000 Subject: [PATCH] added ToDo List from Olivier git-svn-id: trunk@3965 - --- Makefile | 89 +++++++++--------------- Makefile.fpc | 2 +- components/codetools/definetemplates.pas | 1 + ide/keymapping.pp | 5 +- ide/lazarusidestrconsts.pas | 8 +++ ide/mainbar.pas | 6 ++ 6 files changed, 53 insertions(+), 58 deletions(-) diff --git a/Makefile b/Makefile index aac909f896..152441edb3 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,8 @@ # -# Don't edit, this file is generated by FPCMake Version 1.1 [2003/03/07] +# Don't edit, this file is generated by FPCMake Version 1.1 [2003/03/16] # default: all -MAKEFILETARGETS=linux go32v2 win32 os2 freebsd beos netbsd amiga atari sunos qnx netware openbsd wdosx palmos macos macosx +MAKEFILETARGETS=linux go32v2 win32 os2 freebsd beos netbsd amiga atari sunos qnx netware openbsd wdosx override PATH:=$(subst \,/,$(PATH)) ifeq ($(findstring ;,$(PATH)),) inUnix=1 @@ -110,11 +110,38 @@ endif override FPC:=$(subst $(SRCEXEEXT),,$(FPC)) override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT) ifndef FPC_VERSION -FPC_COMPILERINFO:=$(shell $(FPC) -iVSPTPSOTO) -FPC_VERSION:=$(word 1,$(FPC_COMPILERINFO)) +FPC_VERSION:=$(shell $(FPC) -iV) endif -export FPC FPC_VERSION FPC_COMPILERINFO +export FPC FPC_VERSION unexport CHECKDEPEND ALLDEPENDENCIES +ifeq ($(findstring 1.0.,$(FPC_VERSION)),) +COMPILERINFO:=$(shell $(FPC) -iSP -iTP -iSO -iTO) +ifndef CPU_SOURCE +CPU_SOURCE:=$(word 1,$(COMPILERINFO)) +endif +ifndef CPU_TARGET +CPU_TARGET:=$(word 2,$(COMPILERINFO)) +endif +ifndef OS_SOURCE +OS_SOURCE:=$(word 3,$(COMPILERINFO)) +endif +ifndef OS_TARGET +OS_TARGET:=$(word 4,$(COMPILERINFO)) +endif +else +ifndef CPU_SOURCE +CPU_SOURCE:=$(shell $(FPC) -iSP) +endif +ifndef CPU_TARGET +CPU_TARGET:=$(shell $(FPC) -iTP) +endif +ifndef OS_SOURCE +OS_SOURCE:=$(shell $(FPC) -iSO) +endif +ifndef OS_TARGET +OS_TARGET:=$(shell $(FPC) -iTO) +endif +endif ifndef CPU_TARGET ifdef CPU_TARGET_DEFAULT CPU_TARGET=$(CPU_TARGET_DEFAULT) @@ -125,24 +152,6 @@ 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) ifneq ($(FULL_TARGET),$(FULL_SOURCE)) @@ -221,7 +230,7 @@ override INSTALL_BASEDIR=lib/lazarus override DIST_DESTDIR=$(BASEDIR)/dist override COMPILER_OPTIONS+=-gl override COMPILER_INCLUDEDIR+=include include/$(OS_TARGET) -override COMPILER_UNITDIR+=components/custom lcl/units lcl/units/$(LCL_PLATFORM) designer designer/units debugger packager components/units . +override COMPILER_UNITDIR+=components/custom lcl/units lcl/units/$(LCL_PLATFORM) designer designer/units debugger packager components/units components/mpaslex . override COMPILER_TARGETDIR+=. ifdef REQUIRE_UNITSDIR override UNITSDIR+=$(REQUIRE_UNITSDIR) @@ -566,15 +575,6 @@ FPCMADE=fpcmade.nw ZIPSUFFIX=nw EXEEXT=.nlm endif -ifeq ($(OS_TARGET),macos) -PPUEXT=.ppu -ASMEXT=.s -OEXT=.o -SMARTEXT=.sl -STATICLIBEXT=.a -EXEEXT= -FPCMADE=fpcmade.mcc -endif ifndef ECHO ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH)))) ifeq ($(ECHO),) @@ -895,24 +895,6 @@ REQUIRE_PACKAGES_PASZLIB=1 REQUIRE_PACKAGES_FCL=1 REQUIRE_PACKAGES_REGEXPR=1 endif -ifeq ($(OS_TARGET),palmos) -REQUIRE_PACKAGES_RTL=1 -REQUIRE_PACKAGES_PASZLIB=1 -REQUIRE_PACKAGES_FCL=1 -REQUIRE_PACKAGES_REGEXPR=1 -endif -ifeq ($(OS_TARGET),macos) -REQUIRE_PACKAGES_RTL=1 -REQUIRE_PACKAGES_PASZLIB=1 -REQUIRE_PACKAGES_FCL=1 -REQUIRE_PACKAGES_REGEXPR=1 -endif -ifeq ($(OS_TARGET),macosx) -REQUIRE_PACKAGES_RTL=1 -REQUIRE_PACKAGES_PASZLIB=1 -REQUIRE_PACKAGES_FCL=1 -REQUIRE_PACKAGES_REGEXPR=1 -endif ifdef REQUIRE_PACKAGES_RTL PACKAGEDIR_RTL:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /rtl/$(OS_TARGET)/Makefile.fpc,$(PACKAGESDIR)))))) ifneq ($(PACKAGEDIR_RTL),) @@ -1185,11 +1167,6 @@ override COMPILER_UNITTARGETDIR=$(COMPILER_TARGETDIR) override UNITTARGETDIRPREFIX=$(TARGETDIRPREFIX) endif endif -ifeq ($(OS_TARGET),linux) -ifeq ($(FPC_VERSION),1.0.6) -override FPCOPTDEF+=HASUNIX -endif -endif ifdef GCCLIBDIR override FPCOPT+=-Fl$(GCCLIBDIR) endif diff --git a/Makefile.fpc b/Makefile.fpc index f5f37527d2..4853e55032 100644 --- a/Makefile.fpc +++ b/Makefile.fpc @@ -18,7 +18,7 @@ exampledirs=examples options=-gl unitdir=components/custom \ lcl/units lcl/units/$(LCL_PLATFORM) designer designer/units debugger \ - packager components/units . + packager components/units components/mpaslex . includedir=include include/$(OS_TARGET) targetdir=. diff --git a/components/codetools/definetemplates.pas b/components/codetools/definetemplates.pas index 7aee37c97e..bf70b32190 100644 --- a/components/codetools/definetemplates.pas +++ b/components/codetools/definetemplates.pas @@ -2524,6 +2524,7 @@ begin +'components'+ds+'synedit;' +'components'+ds+'codetools;' +'components'+ds+'custom;' + +'components'+ds+'mpaslex;' +SrcPath ,da_Define)); MainDir.AddChild(TDefineTemplate.Create('includepath addition', diff --git a/ide/keymapping.pp b/ide/keymapping.pp index e01a86e71a..9728defe9c 100644 --- a/ide/keymapping.pp +++ b/ide/keymapping.pp @@ -158,7 +158,8 @@ const ecAddCurUnitToProj = ecUserFirst + 706; ecRemoveFromProj = ecUserFirst + 707; ecViewProjectSource = ecUserFirst + 708; - ecProjectOptions = ecUserFirst + 709; + ecViewProjectTodos = ecUserFirst + 709; + ecProjectOptions = ecUserFirst + 710; ecRunParameters = ecUserFirst + 800; ecCompilerOptions = ecUserFirst + 801; @@ -592,6 +593,7 @@ begin ecAddCurUnitToProj : Result:= lisMenuAddUnitToProject; ecRemoveFromProj : Result:= lisMenuRemoveUnitFromProject; ecViewProjectSource : Result:= lisMenuViewSource; + ecViewProjectTodos : Result:= lisMenuViewProjectTodos; ecProjectOptions : Result:= lisMenuProjectOptions; // run menu (menu string resource) @@ -1421,6 +1423,7 @@ begin Add(C,'Add active unit to project',ecAddCurUnitToProj,VK_F11,[ssShift],VK_UNKNOWN,[]); Add(C,'Remove active unit from project',ecRemoveFromProj,VK_UNKNOWN,[],VK_UNKNOWN,[]); Add(C,'View project source',ecViewProjectSource,VK_UNKNOWN,[],VK_UNKNOWN,[]); + Add(C,'View project ToDo list',ecViewProjectTodos,VK_UNKNOWN,[],VK_UNKNOWN,[]); Add(C,'View project options',ecProjectOptions,VK_F11,[ssShift,ssCtrl],VK_UNKNOWN,[]); // run menu diff --git a/ide/lazarusidestrconsts.pas b/ide/lazarusidestrconsts.pas index 1832d80c5b..06c57f6e59 100644 --- a/ide/lazarusidestrconsts.pas +++ b/ide/lazarusidestrconsts.pas @@ -190,6 +190,7 @@ resourcestring lisMenuAddUnitToProject = 'Add active unit to Project'; lisMenuRemoveUnitFromProject = 'Remove from Project'; lisMenuViewSource = 'View Source'; + lisMenuViewProjectTodos = 'View ToDo List'; lisMenuProjectOptions = 'Project Options...'; lisMenuBuild = 'Build'; @@ -1208,6 +1209,13 @@ resourcestring lisDiffDlgIgnoreSpaces = 'Ignore spaces (newline chars not included)'; lisDiffDlgOpenDiffInEditor = 'Open Diff in editor'; + //todolist + dlgTodoListCaption='ToDo List'; + dlgTodolistRefresh='Refresh todo items'; + dlgTodoListGotoLine='Goto selected source line'; + dlgTodoListPrintList='Print todo items'; + dlgToDoListOptions='ToDo options...'; + implementation end. diff --git a/ide/mainbar.pas b/ide/mainbar.pas index d63af3c274..0e111d58d8 100644 --- a/ide/mainbar.pas +++ b/ide/mainbar.pas @@ -240,6 +240,7 @@ type itmProjectAddTo: TMenuItem; itmProjectRemoveFrom: TMenuItem; itmProjectViewSource: TMenuItem; + itmProjectViewToDos: TMenuItem; itmProjectOptions: TMenuItem; itmProjectBuild: TMenuItem; @@ -942,6 +943,11 @@ begin itmProjectViewSource.Caption := lisMenuViewSource; mnuProject.Add(itmProjectViewSource); + itmProjectViewToDos := TMenuItem.Create(Self); + itmProjectViewToDos.Name:='itmProjectViewToDos'; + itmProjectViewToDos.Caption := lisMenuViewProjectTodos; + mnuProject.Add(itmProjectViewToDos); + mnuProject.Add(CreateMenuSeparator); itmProjectOptions := TMenuItem.Create(Self);