diff --git a/ide/lazarusidestrconsts.pas b/ide/lazarusidestrconsts.pas index 7716c9a035..62811d209e 100644 --- a/ide/lazarusidestrconsts.pas +++ b/ide/lazarusidestrconsts.pas @@ -2613,6 +2613,7 @@ resourcestring +'sources.%s%sIt only means: It is a bad idea to open the forms for ' +'designing, before installing the missing packages.%s%s'; lisPackageNeedsInstallation = 'Package needs installation'; + lisPkgMangSkipThisPackage = 'Skip this package'; lisPkgMangInvalidFileExtension = 'Invalid file extension'; lisPkgMangTheFileIsNotALazarusPackage = 'The file %s%s%s is not a lazarus ' +'package.'; diff --git a/ide/main.pp b/ide/main.pp index 4e2d90f6e9..9d9eb8d105 100644 --- a/ide/main.pp +++ b/ide/main.pp @@ -2210,7 +2210,7 @@ begin For I := 0 to OpenDialog.Files.Count-1 do Begin AFilename:=CleanAndExpandFilename(OpenDialog.Files.Strings[i]); - if i0 then begin - Result:=IDEMessageDialog(lisPkgMangInvalidFileExtension, - Format(lisPkgMangTheFileIsNotALazarusPackage, ['"', AFilename, '"']), - mtError,[mbCancel,mbAbort]); + DoQuestionDlg(lisPkgMangInvalidFileExtension, + Format(lisPkgMangTheFileIsNotALazarusPackage, ['"', AFilename, '"'])); RemoveFromRecentList(AFilename,EnvironmentOptions.RecentPackageFiles); SetRecentPackagesMenu; exit; @@ -2272,10 +2285,9 @@ begin AlternativePkgName:=ExtractFileNameOnly(AFilename); if (AlternativePkgName='') or (not IsValidIdent(AlternativePkgName)) then begin - Result:=IDEMessageDialog(lisPkgMangInvalidPackageFilename, + DoQuestionDlg(lisPkgMangInvalidPackageFilename, Format(lisPkgMangThePackageFileNameInIsNotAValidLazarusPackageName, ['"', - AlternativePkgName, '"', #13, '"', AFilename, '"']), - mtError,[mbCancel,mbAbort]); + AlternativePkgName, '"', #13, '"', AFilename, '"'])); RemoveFromRecentList(AFilename,EnvironmentOptions.RecentPackageFiles); SetRecentPackagesMenu; exit; @@ -2319,10 +2331,9 @@ begin end; except on E: Exception do begin - Result:=IDEMessageDialog(lisPkgMangErrorReadingPackage, + DoQuestionDlg(lisPkgMangErrorReadingPackage, Format(lisPkgUnableToReadPackageFileError, ['"', AFilename, '"', - #13, E.Message]), - mtError,[mbAbort,mbCancel]); + #13, E.Message])); exit; end; end;