added check for view package source and virtual packages

git-svn-id: trunk@7189 -
This commit is contained in:
mattias 2005-05-21 15:18:58 +00:00
parent 91b64942bf
commit a57486b40f
3 changed files with 21 additions and 2 deletions

View File

@ -2211,6 +2211,9 @@ resourcestring
+'marked.%sCurrently lazarus only supports static linked packages. The '
+'real un-installation needs rebuilding and restarting of lazarus.%s%'
+'sDo you want to rebuild Lazarus now?';
lisPkgMangThisIsAVirtualPackageItHasNoSourceYetPleaseSaveThe = 'This is a '
+'virtual package. It has no source yet. Please save the package first.';
lisPkgMangPleaseSaveThePackageFirst = 'Please save the package first.';
lisPkgMangThePackageIsMarkedForInstallationButCanNotBeFound = 'The package %'
+'s%s%s is marked for installation, but can not be found.%sRemove '
+'dependency from the installation list of packages?';

View File

@ -605,8 +605,11 @@ begin
end;
procedure TPackageEditorForm.MoreBitBtnClick(Sender: TObject);
var
p: TPoint;
begin
FilesPopupMenu.Popup(MoreBitBtn.Left,MoreBitBtn.Top+MoreBitBtn.Height);
p:=MoreBitBtn.ClientToScreen(Point(0,MoreBitBtn.Height));
FilesPopupMenu.Popup(p.x,p.y);
end;
procedure TPackageEditorForm.MoveDependencyUpClick(Sender: TObject);

View File

@ -3370,8 +3370,21 @@ begin
end;
function TPkgManager.DoOpenPackageSource(APackage: TLazPackage): TModalResult;
var
Filename: String;
begin
Result:=MainIDE.DoOpenEditorFile(APackage.GetSrcFilename,-1,[ofRegularFile]);
Result:=mrCancel;
if APackage.IsVirtual then begin
MessageDlg(lisPkgMangThisIsAVirtualPackageItHasNoSourceYetPleaseSaveThe,
mtError, [mbCancel], 0);
exit;
end;
Filename:=APackage.GetSrcFilename;
if (not FilenameIsAbsolute(Filename)) or (not FileExists(Filename)) then begin
MessageDlg(lisPkgMangPleaseSaveThePackageFirst, mtError, [mbCancel], 0);
exit;
end;
Result:=MainIDE.DoOpenEditorFile(Filename,-1,[ofRegularFile]);
end;
function TPkgManager.DoCompileAutoInstallPackages(