diff --git a/components/cgi/cgilaz.lpk b/components/cgi/cgilaz.lpk index e56a7baecb..00ac081846 100644 --- a/components/cgi/cgilaz.lpk +++ b/components/cgi/cgilaz.lpk @@ -1,6 +1,6 @@ - + @@ -27,7 +27,10 @@ - + + + + diff --git a/components/h2pas/h2paswizard.lpk b/components/h2pas/h2paswizard.lpk index 9dcd123f53..b0c56b2e8c 100644 --- a/components/h2pas/h2paswizard.lpk +++ b/components/h2pas/h2paswizard.lpk @@ -1,6 +1,6 @@ - + @@ -45,24 +45,27 @@ - + + + + - + - - + - + + - + diff --git a/components/lazreport/source/lazreport.lpk b/components/lazreport/source/lazreport.lpk index 2d5ce8d4ae..31b55b25e9 100644 --- a/components/lazreport/source/lazreport.lpk +++ b/components/lazreport/source/lazreport.lpk @@ -1,14 +1,12 @@ - - + - - + @@ -188,32 +186,34 @@ See license.txt and license-lazreport.txt for details. - + + + + - + + - + - + - - + - + - diff --git a/components/memds/memdslaz.lpk b/components/memds/memdslaz.lpk index d121133750..7ab9308229 100644 --- a/components/memds/memdslaz.lpk +++ b/components/memds/memdslaz.lpk @@ -1,6 +1,6 @@ - + @@ -45,14 +45,17 @@ - + + + + - + - + diff --git a/components/prettyformat/prettyformat.lpk b/components/prettyformat/prettyformat.lpk index e6cf541058..81088d9cf5 100644 --- a/components/prettyformat/prettyformat.lpk +++ b/components/prettyformat/prettyformat.lpk @@ -1,6 +1,6 @@ - + @@ -25,15 +25,18 @@ - + + + + - - - + + + diff --git a/components/printers/design/printers4lazide.lpk b/components/printers/design/printers4lazide.lpk index f0d78fa161..def06ba274 100644 --- a/components/printers/design/printers4lazide.lpk +++ b/components/printers/design/printers4lazide.lpk @@ -1,6 +1,6 @@ - + @@ -23,18 +23,21 @@ - + + + + - + + - - + diff --git a/components/projecttemplates/frmtemplatevariables.pas b/components/projecttemplates/frmtemplatevariables.pas index 6fcb0ebbd1..7be62a0d94 100644 --- a/components/projecttemplates/frmtemplatevariables.pas +++ b/components/projecttemplates/frmtemplatevariables.pas @@ -69,6 +69,8 @@ Var begin For I:=0 to FVariables.Count-1 do begin + V:=''; + N:=''; FVariables.GetNameValue(I,N,V); V:=SGVariables.Cells[1,I+1]; FVariables[i]:=N+'='+V; @@ -87,6 +89,8 @@ begin SGVariables.RowCount:=FVariables.Count+1; For I:=1 to FVariables.Count do begin + V:=''; + N:=''; FVariables.GetNameValue(I-1,N,V); SGVariables.Cells[0,I]:=N; SGVariables.Cells[1,I]:=''; diff --git a/components/projecttemplates/idetemplateproject.pp b/components/projecttemplates/idetemplateproject.pp index 219717d15b..c6f569f9aa 100644 --- a/components/projecttemplates/idetemplateproject.pp +++ b/components/projecttemplates/idetemplateproject.pp @@ -37,11 +37,10 @@ procedure Register; implementation uses - ContNrs, frmTemplateSettings, frmTemplateVariables, LazConfigStorage, - NewItemIntf, MenuIntf, IDECommands; + ContNrs, frmTemplateSettings, frmTemplateVariables, + NewItemIntf, MenuIntf; Var - TemplateProjectDescriptor : TTemplateProjectDescriptor; IDETemplates : TProjectTemplates = nil; itmFileNewFromTemplate : TIDEMenuSection; MenuList : TObjectList; @@ -281,7 +280,6 @@ Var AFile: TLazProjectFile; FN : String; B : Boolean; - RFN : String; L : TStringList; begin @@ -322,9 +320,8 @@ Function TTemplateProjectDescriptor.CreateStartFiles(AProject: TLazProject) : TM Var I : Integer; - E,FN,FN2 : String; - B : Boolean; - + E,FN : String; + begin if Assigned(FTemplate) then begin diff --git a/components/projecttemplates/languages/frmtemplatevariables.po b/components/projecttemplates/languages/frmtemplatevariables.po index 4bbdd6dbab..032a629ccd 100644 --- a/components/projecttemplates/languages/frmtemplatevariables.po +++ b/components/projecttemplates/languages/frmtemplatevariables.po @@ -1,12 +1,18 @@ -#: frmtemplatevariables:svariable -msgid "Variable" +msgid "" +msgstr "" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: frmtemplatevariables:sdescription +msgid "Description" msgstr "" #: frmtemplatevariables:svalue msgid "Value" msgstr "" -#: frmtemplatevariables:sdescription -msgid "Description" +#: frmtemplatevariables:svariable +msgid "Variable" msgstr "" diff --git a/components/projecttemplates/languages/idetemplateproject.po b/components/projecttemplates/languages/idetemplateproject.po index 92fd553314..7862a14c76 100644 --- a/components/projecttemplates/languages/idetemplateproject.po +++ b/components/projecttemplates/languages/idetemplateproject.po @@ -1,8 +1,14 @@ -#: idetemplateproject:sprojecttemplatesettings -msgid "Project templates options" +msgid "" msgstr "" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" #: idetemplateproject:snewfromtemplate msgid "New project from template" msgstr "" +#: idetemplateproject:sprojecttemplatesettings +msgid "Project templates options" +msgstr "" + diff --git a/components/projecttemplates/languages/projecttemplates.po b/components/projecttemplates/languages/projecttemplates.po index 84223cf23f..e1e1a227f2 100644 --- a/components/projecttemplates/languages/projecttemplates.po +++ b/components/projecttemplates/languages/projecttemplates.po @@ -1,3 +1,9 @@ +msgid "" +msgstr "" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + #: projecttemplates:serrnosuchtemplate msgid "\"%s\": No such template." msgstr "" diff --git a/components/projecttemplates/projecttemplates.pp b/components/projecttemplates/projecttemplates.pp index 8e3382ba0f..7ead7d2c1e 100644 --- a/components/projecttemplates/projecttemplates.pp +++ b/components/projecttemplates/projecttemplates.pp @@ -352,9 +352,6 @@ end; function TProjectTemplate.TargetFileName(FN: String; Values: TStrings): String; -Var - RFN : String; - begin Result:=ExtractRelativePath(Directory,FN); Result:=SubstituteString(Result,Values); diff --git a/components/projecttemplates/projtemplates.lpk b/components/projecttemplates/projtemplates.lpk index b8b7456971..5abc378d97 100644 --- a/components/projecttemplates/projtemplates.lpk +++ b/components/projecttemplates/projtemplates.lpk @@ -1,6 +1,6 @@ - + @@ -57,15 +57,18 @@ - + + + + - - - + + + diff --git a/components/synunihighlighter/synuni.lpk b/components/synunihighlighter/synuni.lpk index 2c8e47f3ec..0d93541125 100644 --- a/components/synunihighlighter/synuni.lpk +++ b/components/synunihighlighter/synuni.lpk @@ -1,6 +1,6 @@ - + @@ -46,21 +46,24 @@ see http://www.mozilla.org/MPL/ - + + + + - - - - - - - - - + + + + + + + + + diff --git a/components/tdbf/dbflaz.lpk b/components/tdbf/dbflaz.lpk index cb30e691c4..51d63a3084 100644 --- a/components/tdbf/dbflaz.lpk +++ b/components/tdbf/dbflaz.lpk @@ -1,6 +1,6 @@ - + @@ -37,14 +37,17 @@ - + + + + - + - + diff --git a/components/turbopower_ipro/turbopoweripro.lpk b/components/turbopower_ipro/turbopoweripro.lpk index bc8b57f144..363b345113 100644 --- a/components/turbopower_ipro/turbopoweripro.lpk +++ b/components/turbopower_ipro/turbopoweripro.lpk @@ -1,6 +1,6 @@ - + @@ -68,7 +68,10 @@ - + + + + diff --git a/ide/uniteditor.pp b/ide/uniteditor.pp index c3eff10402..6f11b06ec9 100644 --- a/ide/uniteditor.pp +++ b/ide/uniteditor.pp @@ -3772,6 +3772,7 @@ var SelAvailAndWritable: Boolean; CurFilename: String; begin + //DebugLn(['TSourceNotebook.SrcPopUpMenuPopup ',dbgsName(Sender)]); //SourceEditorMenuRoot.WriteDebugReport('TSourceNotebook.SrcPopUpMenuPopup START ',true); //SourceEditorMenuRoot.ConsistencyCheck; diff --git a/lcl/include/customform.inc b/lcl/include/customform.inc index 8cb6e41787..40ce5d0faf 100644 --- a/lcl/include/customform.inc +++ b/lcl/include/customform.inc @@ -1191,9 +1191,9 @@ begin TWSCustomFormClass(WidgetSetClass).SetFormBorderStyle(Self, NewStyle); end; -{------------------------------------------------------------------------------} -{ TCustomForm UpdateWindowState } -{------------------------------------------------------------------------------} +{------------------------------------------------------------------------------ + TCustomForm UpdateWindowState +------------------------------------------------------------------------------} Procedure TCustomForm.UpdateWindowState; Begin @@ -1201,9 +1201,9 @@ Begin Assert(False, 'Trace:TODO: [TCustomForm.UpdateWindowState]'); end; -{------------------------------------------------------------------------------} -{ TCustomForm SetWindowState } -{------------------------------------------------------------------------------} +{------------------------------------------------------------------------------ + TCustomForm SetWindowState +------------------------------------------------------------------------------} Procedure TCustomForm.SetWindowState(Value : TWindowState); const ShowCommands: array[TWindowState] of Integer = @@ -1228,9 +1228,9 @@ begin WindowState := prevWindowState; end; -{------------------------------------------------------------------------------} -{ TCustomForm SetActiveControl } -{------------------------------------------------------------------------------} +{------------------------------------------------------------------------------ + TCustomForm SetActiveControl +------------------------------------------------------------------------------} Procedure TCustomForm.SetActiveControl(AWinControl: TWinControl); Begin if FActiveControl <> AWinControl then diff --git a/packager/packagedefs.pas b/packager/packagedefs.pas index dcc35174a4..0e29a8d7b3 100644 --- a/packager/packagedefs.pas +++ b/packager/packagedefs.pas @@ -686,8 +686,10 @@ type procedure WriteInheritedUnparsedOptions; // files function IndexOfPkgFile(PkgFile: TPkgFile): integer; - function SearchFile(const ShortFilename: string; - SearchFlags: TSearchIDEFileFlags): TPkgFile; + function SearchShortFilename(const ShortFilename: string; + SearchFlags: TSearchIDEFileFlags): TPkgFile; + function SearchFilename(const AFilename: string; + SearchFlags: TSearchIDEFileFlags): TPkgFile; procedure ShortenFilename(var ExpandedFilename: string; UseUp: boolean); procedure LongenFilename(var AFilename: string); function FindPkgFile(const AFilename: string; @@ -2555,7 +2557,7 @@ begin // i18n if FileVersion<3 then begin FPOOutputDirectory := SwitchPathDelims( - xmlconfig.GetValue(Path+'RST/OutDir/Value', ''),PathDelimChanged); + xmlconfig.GetValue(Path+'RST/OutDir', ''),PathDelimChanged); EnableI18N := FPOOutputDirectory <> ''; end else begin EnableI18N := xmlconfig.GetValue(Path+'i18n/EnableI18N/Value', False); @@ -3274,7 +3276,7 @@ begin while (Files[Result]<>PkgFile) do dec(Result); end; -function TLazPackage.SearchFile(const ShortFilename: string; +function TLazPackage.SearchShortFilename(const ShortFilename: string; SearchFlags: TSearchIDEFileFlags): TPkgFile; var SearchedFilename: String; @@ -3304,6 +3306,36 @@ begin Result:=nil; end; +function TLazPackage.SearchFilename(const AFilename: string; + SearchFlags: TSearchIDEFileFlags): TPkgFile; +var + SearchedFilename: String; + i: Integer; + + function FilenameFits(TheFilename: string): boolean; + begin + if siffIgnoreExtension in SearchFlags then + TheFileName:=ExtractFileNameWithoutExt(TheFileName); + //debugln('TLazPackage.SearchFile A ',SearchedFilename,' ',TheFilename); + if siffCaseSensitive in SearchFlags then + Result:=SearchedFilename=TheFilename + else + Result:=CompareText(SearchedFilename,TheFilename)=0; + end; + +begin + SearchedFilename:=AFilename; + if siffIgnoreExtension in SearchFlags then + SearchedFilename:=ExtractFileNameWithoutExt(SearchedFilename); + + // search in files + for i:=0 to FileCount-1 do begin + Result:=Files[i]; + if FilenameFits(Result.GetFullFilename) then exit; + end; + Result:=nil; +end; + { TPkgComponent } procedure TPkgComponent.SetPkgFile(const AValue: TPkgFile); diff --git a/packager/pkgmanager.pas b/packager/pkgmanager.pas index 396a6ac3b0..beb5297f6e 100644 --- a/packager/pkgmanager.pas +++ b/packager/pkgmanager.pas @@ -1997,7 +1997,7 @@ var FallbackLang: String; Language: String; begin - //DebugLn(['TPkgManager.DoTranslatePackage ', APackage.Name, 'from ', APackage.RSTOutputDirectory]); + //DebugLn(['TPkgManager.DoTranslatePackage ', APackage.Name, 'from ', APackage.POOutputDirectory]); if (APackage.POOutputDirectory='') then exit; Directory:=AppendPathDelim(APackage.GetPOOutDirectory); @@ -2015,6 +2015,7 @@ begin TranslatedUnits:=nil; try + //DebugLn(['TPkgManager.DoTranslatePackage ',APackage.Name,' Directory=',Directory,' Lang=',Lang,' FallbackLang=',FallbackLang]); TranslateWithFileMask(APackage,Directory,Lang); TranslateWithFileMask(APackage,Directory,FallbackLang); finally @@ -3060,7 +3061,6 @@ var begin SrcEdit:=SourceNotebook.GetActiveSE; if SrcEdit<>nil then begin - //debugln('TPkgManager.GetPackageOfCurrentSourceEditor ',SrcEdit.Filename); Result:=SearchFile(SrcEdit.Filename,[],nil); end else SrcEdit:=nil; @@ -3139,7 +3139,7 @@ begin APackage:=TLazPackage(InObject); CurFilename:=AFilename; APackage.ShortenFilename(CurFilename,true); - Result:=APackage.SearchFile(CurFilename,SearchFlags); + Result:=APackage.SearchShortFilename(CurFilename,SearchFlags); if Result<>nil then exit; end; if not (siffDoNotCheckAllPackages in SearchFlags) then begin @@ -3147,8 +3147,8 @@ begin APackage:=PackageGraph[i]; CurFilename:=AFilename; APackage.ShortenFilename(CurFilename,true); - Result:=APackage.SearchFile(CurFilename,SearchFlags); - //debugln('TPkgManager.SearchFile Pkg=',APackage.Filename,' CurFilename="',CurFilename,'"'); + Result:=APackage.SearchShortFilename(CurFilename,SearchFlags); + //debugln(['TPkgManager.SearchFile Pkg=',APackage.Filename,' CurFilename="',CurFilename,'" ',Result<>nil]); if Result<>nil then exit; end; end;