diff --git a/doceditor/frmmain.lrs b/doceditor/frmmain.lrs index cd07d9a3a3..bcd4eb72c9 100644 --- a/doceditor/frmmain.lrs +++ b/doceditor/frmmain.lrs @@ -1,5 +1,3 @@ -{ This is an automatically generated lazarus resource file } - LazarusResources.Add('TMainForm','FORMDATA',[ 'TPF0'#9'TMainForm'#8'MainForm'#7'Caption'#6#8'MainForm'#12'ClientHeight'#3#6 +#2#11'ClientWidth'#3'Z'#2#4'Menu'#7#5'MMain'#12'OnCloseQuery'#7#18'MainFormC' diff --git a/doceditor/frmtable.lrs b/doceditor/frmtable.lrs index 1700973cd1..521aa13dba 100644 --- a/doceditor/frmtable.lrs +++ b/doceditor/frmtable.lrs @@ -1,5 +1,3 @@ -{ This is an automatically generated lazarus resource file } - LazarusResources.Add('TTableForm','FORMDATA',[ 'TPF0'#10'TTableForm'#9'TableForm'#11'BorderStyle'#7#8'bsDialog'#7'Caption'#6 +#16'Insert new table'#12'ClientHeight'#2'a'#11'ClientWidth'#3#26#1#13'Pixels' diff --git a/doceditor/lazde.lpi b/doceditor/lazde.lpi index d5e08c259f..2c5ee971f0 100644 --- a/doceditor/lazde.lpi +++ b/doceditor/lazde.lpi @@ -12,8 +12,9 @@ - <ActiveEditorIndexAtStart Value="5"/> + <ActiveEditorIndexAtStart Value="6"/> </General> + <LazDoc Paths=""/> <Units Count="13"> <Unit0> <CursorPos X="3" Y="9"/> @@ -21,7 +22,7 @@ <IsPartOfProject Value="True"/> <TopLine Value="1"/> <UnitName Value="lazde"/> - <UsageCount Value="98"/> + <UsageCount Value="99"/> </Unit0> <Unit1> <CursorPos X="15" Y="803"/> @@ -33,11 +34,11 @@ <ResourceFilename Value="frmmain.lrs"/> <TopLine Value="787"/> <UnitName Value="FrmMain"/> - <UsageCount Value="98"/> + <UsageCount Value="99"/> </Unit1> <Unit2> <CursorPos X="1" Y="23"/> - <EditorIndex Value="10"/> + <EditorIndex Value="3"/> <Filename Value="frmoptions.pp"/> <ComponentName Value="OptionsForm"/> <IsPartOfProject Value="True"/> @@ -45,11 +46,11 @@ <ResourceFilename Value="frmoptions.lrs"/> <TopLine Value="1"/> <UnitName Value="frmOptions"/> - <UsageCount Value="95"/> + <UsageCount Value="96"/> </Unit2> <Unit3> <CursorPos X="1" Y="23"/> - <EditorIndex Value="11"/> + <EditorIndex Value="4"/> <Filename Value="frmnewnode.pp"/> <ComponentName Value="NewNodeForm"/> <IsPartOfProject Value="True"/> @@ -57,11 +58,11 @@ <ResourceFilename Value="frmnewnode.lrs"/> <TopLine Value="1"/> <UnitName Value="frmNewNode"/> - <UsageCount Value="92"/> + <UsageCount Value="93"/> </Unit3> <Unit4> <CursorPos X="32" Y="27"/> - <EditorIndex Value="13"/> + <EditorIndex Value="8"/> <Filename Value="frmmakeskel.pp"/> <ComponentName Value="MakeSkelForm"/> <IsPartOfProject Value="True"/> @@ -69,11 +70,11 @@ <ResourceFilename Value="frmmakeskel.lrs"/> <TopLine Value="1"/> <UnitName Value="FrmMakeSkel"/> - <UsageCount Value="69"/> + <UsageCount Value="70"/> </Unit4> <Unit5> <CursorPos X="11" Y="16"/> - <EditorIndex Value="8"/> + <EditorIndex Value="1"/> <Filename Value="frmlink.pp"/> <ComponentName Value="LinkForm"/> <IsPartOfProject Value="True"/> @@ -81,11 +82,11 @@ <ResourceFilename Value="frmlink.lrs"/> <TopLine Value="1"/> <UnitName Value="FrmLink"/> - <UsageCount Value="62"/> + <UsageCount Value="63"/> </Unit5> <Unit6> <CursorPos X="1" Y="23"/> - <EditorIndex Value="9"/> + <EditorIndex Value="2"/> <Filename Value="frmtable.pp"/> <ComponentName Value="TableForm"/> <IsPartOfProject Value="True"/> @@ -93,11 +94,11 @@ <ResourceFilename Value="frmtable.lrs"/> <TopLine Value="1"/> <UnitName Value="frmTable"/> - <UsageCount Value="62"/> + <UsageCount Value="63"/> </Unit6> <Unit7> <CursorPos X="35" Y="26"/> - <EditorIndex Value="12"/> + <EditorIndex Value="5"/> <Filename Value="frmabout.pp"/> <ComponentName Value="AboutForm"/> <IsPartOfProject Value="True"/> @@ -105,7 +106,7 @@ <ResourceFilename Value="frmabout.lrs"/> <TopLine Value="1"/> <UnitName Value="FrmAbout"/> - <UsageCount Value="53"/> + <UsageCount Value="54"/> </Unit7> <Unit8> <CursorPos X="22" Y="251"/> @@ -113,17 +114,17 @@ <IsPartOfProject Value="True"/> <TopLine Value="235"/> <UnitName Value="PkEditor"/> - <UsageCount Value="47"/> + <UsageCount Value="48"/> </Unit8> <Unit9> <CursorPos X="12" Y="521"/> - <EditorIndex Value="14"/> + <EditorIndex Value="9"/> <Filename Value="eleditor.pp"/> <IsPartOfProject Value="True"/> <Loaded Value="True"/> <TopLine Value="500"/> <UnitName Value="ElEditor"/> - <UsageCount Value="47"/> + <UsageCount Value="48"/> </Unit9> <Unit10> <CursorPos X="34" Y="28"/> @@ -131,11 +132,11 @@ <IsPartOfProject Value="True"/> <TopLine Value="1"/> <UnitName Value="FPDEUtil"/> - <UsageCount Value="47"/> + <UsageCount Value="48"/> </Unit10> <Unit11> <CursorPos X="15" Y="71"/> - <EditorIndex Value="15"/> + <EditorIndex Value="10"/> <Filename Value="frmexample.pp"/> <ComponentName Value="ExampleForm"/> <IsPartOfProject Value="True"/> @@ -143,11 +144,11 @@ <ResourceFilename Value="frmexample.lrs"/> <TopLine Value="66"/> <UnitName Value="FrmExample"/> - <UsageCount Value="38"/> + <UsageCount Value="39"/> </Unit11> <Unit12> <CursorPos X="19" Y="568"/> - <EditorIndex Value="16"/> + <EditorIndex Value="11"/> <Filename Value="frmbuild.pp"/> <ComponentName Value="BuildForm"/> <IsPartOfProject Value="True"/> @@ -155,7 +156,7 @@ <ResourceFilename Value="frmbuild.lrs"/> <TopLine Value="545"/> <UnitName Value="frmBuild"/> - <UsageCount Value="33"/> + <UsageCount Value="34"/> </Unit12> </Units> <PublishOptions> diff --git a/ide/lazarusidestrconsts.pas b/ide/lazarusidestrconsts.pas index 89ff90a6e1..e189d0e556 100644 --- a/ide/lazarusidestrconsts.pas +++ b/ide/lazarusidestrconsts.pas @@ -98,6 +98,12 @@ resourcestring lisProjectSrcPath = 'Project Src Path'; lisMakeExe = 'Make Executable'; lisProjectMakroProperties = 'Project makro properties'; + lisOpenProject2 = 'Open project'; + lisOpenAsTextFile = 'Open as text file'; + lisAnErrorOccuredAtLastStartupWhileLoadingLoadThisPro = 'An error occured ' + +'at last startup while loading %s!%s%sLoad this project again?'; + lisOpenProjectAgain = 'Open project again'; + lisStartWithANewProject = 'Start with a new project'; lisProjectMakroUnitPath = 'makro ProjectUnitPath'; lisConfigDirectory = 'Lazarus config directory'; @@ -122,6 +128,8 @@ resourcestring lisPkgEditPublishPackage = 'Publish Package'; lisMenuOpenRecent = 'Open Recent'; lisMenuSave = 'Save'; + lisDiscardChanges = 'Discard changes'; + lisDoNotCloseTheIDE = 'Do not close the IDE'; lisMenuSaveAs = 'Save As'; lisMenuSaveAll = 'Save All'; lisMenuClose = 'Close'; @@ -238,6 +246,7 @@ resourcestring lisMenuStepOver = 'Step over'; lisMenuRunToCursor = 'Run to cursor'; lisMenuStop = 'Stop'; + lisContinue = 'Continue'; lisMenuResetDebugger = 'Reset debugger'; lisMenuCompilerOptions = 'Compiler Options...'; lisMenuRunParameters = 'Run Parameters ...'; @@ -332,15 +341,20 @@ resourcestring +'sinitialization section.%sFor example {$I %s.lrs}.%sProbably a syntax ' +'error.'; lisResourceLoadError = 'Resource load error'; + lisIgnoreMissingFile = 'Ignore missing file'; lisnoname = 'noname'; lisTheDestinationDirectoryDoesNotExist = 'The destination directory%s%s%s%s ' +'does not exist.'; lisRenameFile = 'Rename file?'; - lisThisLooksLikeAPascalFileFpc10XExpectsPascalFiles = 'This looks like a ' - +'pascal file.%sfpc 1.0.x expects pascal files lowercase.%sRename it to ' - +'lowercase?'; + lisThisLooksLikeAPascalFileItIsRecommendedToUseLowerC = 'This looks like a ' + +'pascal file.%sIt is recommended to use lower case filenames, to avoid ' + +'various problems on some filesystems and different compilers.%sRename ' + +'it to lowercase?'; + lisRenameToLowercase = 'Rename to lowercase'; + lisKeepName = 'Keep name'; lisOverwriteFile = 'Overwrite file?'; lisAFileAlreadyExistsReplaceIt = 'A file %s%s%s already exists.%sReplace it?'; + lisOverwriteFileOnDisk = 'Overwrite file on disk'; lisAmbiguousFilesFound = 'Ambiguous files found'; lisThereAreOtherFilesInTheDirectoryWithTheSameName = 'There are other files ' +'in the directory with the same name,%swhich only differ in case:%s%s%' @@ -356,6 +370,9 @@ resourcestring +'resource T%s:FORMDATA to resource file %s%s%s%s.%sProbably a syntax ' +'error.'; lisUnableToCreateFile2 = 'Unable to create file %s%s%s'; + lisContinueWithoutLoadingForm = 'Continue without loading form'; + lisCancelLoadingUnit = 'Cancel loading unit'; + lisAbortAllLoading = 'Abort all loading'; lisUnableToTransformBinaryComponentStreamOfTIntoText = 'Unable to transform ' +'binary component stream of %s:T%s into text.'; lisTheFileWasNotFoundIgnoreWillGoOnLoadingTheProject = 'The file %s%s%s%' @@ -605,6 +622,9 @@ resourcestring lisTheUnitAlreadyExistsIgnoreWillForceTheRenaming = 'The unit %s%s%s ' +'already exists.%sIgnore will force the renaming,%sCancel will cancel ' +'the saving of this source and%sAbort will abort the whole saving.'; + lisForceRenaming = 'Force renaming'; + lisCancelRenaming = 'Cancel renaming'; + lisAbortAll = 'Abort all'; lisInvalidPascalIdentifierCap = 'Invalid Pascal Identifier'; lisInvalidPascalIdentifierText = 'The name "%s" is not a valid pascal identifier.'; diff --git a/ide/main.pp b/ide/main.pp index 6b130751b6..c1c3588623 100644 --- a/ide/main.pp +++ b/ide/main.pp @@ -1268,8 +1268,11 @@ begin // check project if SomethingOfProjectIsModified then begin - MsgResult:=MessageDlg(lisProjectChanged, Format(lisSaveChangesToProject, - [Project1.Title]), mtConfirmation, [mbYes, mbNo, mbAbort], 0); + MsgResult:=QuestionDlg(lisProjectChanged, Format(lisSaveChangesToProject, + [Project1.Title]), mtConfirmation, + [mrYes, lisMenuSave, mrNo, lisDiscardChanges, mbAbort, + lisDoNotCloseTheIDE], + 0); case MsgResult of mrYes: @@ -1635,10 +1638,11 @@ procedure TMainIDE.SetupStartProject; function AskIfLoadLastFailingProject: boolean; begin - Result:=MessageDlg('An error occured at last startup while loading ' - +EnvironmentOptions.LastSavedProjectFile+ '!'#13 - +#13 - +'Load this project again?', mtWarning, [mbYes,mbNo],0)=mrYes; + Result:=QuestionDlg(lisOpenProject2, + Format(lisAnErrorOccuredAtLastStartupWhileLoadingLoadThisPro, [ + EnvironmentOptions.LastSavedProjectFile, #13, #13]), mtWarning, + [mrYes, lisOpenProjectAgain, mrNo, lisStartWithANewProject], 0)= + mrYes; end; var @@ -2692,8 +2696,9 @@ begin itDebugger: begin if Interactive - and (MessageDlg(lisStopDebugging, - lisStopTheDebugging, mtConfirmation, [mbYes, mbCancel], 0)<>mrYes) + and (QuestionDlg(lisStopDebugging, + lisStopTheDebugging, mtConfirmation, + [mrYes, lisMenuStop, mrCancel, lisContinue], 0)<>mrYes) then exit; DebugBoss.DoStopProject; end; @@ -3558,8 +3563,8 @@ begin if (ResourceCode=nil) and (not IgnoreSourceErrors) then begin MsgTxt:=Format(lisUnableToLoadOldResourceFileTheResourceFileIs, [#13, #13, #13, AnUnitInfo.UnitName, #13]); - Result:=MessageDlg(lisResourceLoadError, MsgTxt, mtWarning, - [mbIgnore,mbAbort],0); + Result:=QuestionDlg(lisResourceLoadError, MsgTxt, mtWarning, + [mrIgnore, lisIgnoreMissingFile, mrAbort], 0); if Result=mrAbort then exit; end; @@ -3670,10 +3675,12 @@ begin end; if Project1.IndexOfUnitWithName(NewUnitName,true,AnUnitInfo)>=0 then begin - Result:=MessageDlg(lisUnitNameAlreadyExistsCap, + Result:=QuestionDlg(lisUnitNameAlreadyExistsCap, Format(lisTheUnitAlreadyExistsIgnoreWillForceTheRenaming, ['"', NewUnitName, '"', #13, #13, #13]), - mtConfirmation,[mbIgnore,mbCancel,mbAbort],0); + mtConfirmation, [mrIgnore, lisForceRenaming, + mrCancel, lisCancelRenaming, + mrAbort, lisAbortAll], 0); if Result=mrIgnore then Result:=mrCancel else @@ -3691,9 +3698,10 @@ begin if EnvironmentOptions.CharcaseFileAction = ccfaAsk then begin if lowercase(FileWithoutPath)<>FileWithoutPath then begin - Result:=MessageDlg(lisRenameFile, - Format(lisThisLooksLikeAPascalFileFpc10XExpectsPascalFiles, [#13, #13]), - mtWarning,[mbYes,mbNo],0); + Result:=QuestionDlg(lisRenameFile, + Format(lisThisLooksLikeAPascalFileItIsRecommendedToUseLowerC, [ + #13, #13]), + mtWarning, [mrYes, lisRenameToLowercase, mrNo, lisKeepName], 0); if Result=mrYes then NewFileName:=ExtractFilePath(NewFilename)+lowercase(FileWithoutPath); Result:=mrOk; @@ -3711,7 +3719,8 @@ begin and FileExists(NewFilename) then begin ACaption:=lisOverwriteFile; AText:=Format(lisAFileAlreadyExistsReplaceIt, ['"', NewFilename, '"', #13]); - Result:=MessageDlg(ACaption, AText, mtConfirmation,[mbok,mbCancel],0); + Result:=QuestionDlg(ACaption, AText, mtConfirmation, + [mrYes, lisOverwriteFileOnDisk, mbCancel], 0); if Result=mrCancel then exit; end; @@ -3912,9 +3921,11 @@ begin if LFMCode=nil then begin LFMCode:=CodeToolBoss.CreateFile(LFMFilename); if LFMCode=nil then begin - Result:=MessageDlg(lisUnableToCreateFile, + Result:=QuestionDlg(lisUnableToCreateFile, Format(lisUnableToCreateFile2, ['"', LFMFilename, '"']), - mtWarning,[mbIgnore,mbCancel,mbAbort],0); + mtWarning, [mrIgnore, lisContinueWithoutLoadingForm, + mrCancel, lisCancelLoadingUnit, + mrAbort, lisAbortAllLoading], 0); if Result<>mrIgnore then exit; end; end; @@ -5668,9 +5679,10 @@ begin and FilenameIsAbsolute(AFilename) and FileExists(AFilename) then begin // check if file is a lazarus project (.lpi) if (CompareFileExt(AFilename,'.lpi',false)=0) then begin - if MessageDlg(lisOpenProject, + if QuestionDlg(lisOpenProject, Format(lisOpenTheProjectAnswerNoToLoadItAsXmlFile, [AFilename, #13]), - mtConfirmation,[mbYes,mbNo],0)=mrYes + mtConfirmation, [mrYes, lisOpenProject2, mrNo, lisOpenAsTextFile], 0)= + mrYes then begin Result:=DoOpenProjectFile(AFilename,[ofAddToRecent]); exit; @@ -5678,9 +5690,10 @@ begin end; // check if file is a lazarus package (.lpk) if (CompareFileExt(AFilename,'.lpk',false)=0) then begin - if MessageDlg(lisOpenPackage, + if QuestionDlg(lisOpenPackage, Format(lisOpenThePackageAnswerNoToLoadItAsXmlFile, [AFilename, #13]), - mtConfirmation,[mbYes,mbNo],0)=mrYes + mtConfirmation, + [mrYes, lisCompPalOpenPackage, mrNo, lisOpenAsTextFile], 0)=mrYes then begin Result:=PkgBoss.DoOpenPackageFile(AFilename,[pofAddToRecent]); exit;