mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-11 20:40:45 +01:00
fixed loading .files
git-svn-id: trunk@2915 -
This commit is contained in:
parent
ae78151563
commit
ff42a9048b
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -720,6 +720,7 @@ lcl/utrace.pp svneol=native#text/pascal
|
|||||||
lcl/vclglobals.pp svneol=native#text/pascal
|
lcl/vclglobals.pp svneol=native#text/pascal
|
||||||
/localize.sh -text svneol=native#application/x-sh
|
/localize.sh -text svneol=native#application/x-sh
|
||||||
packager/addfiletoapackagedlg.pas svneol=native#text/pascal
|
packager/addfiletoapackagedlg.pas svneol=native#text/pascal
|
||||||
|
packager/addtopackagedlg.pas svneol=native#text/pascal
|
||||||
packager/basepkgmanager.pas svneol=native#text/pascal
|
packager/basepkgmanager.pas svneol=native#text/pascal
|
||||||
packager/brokendependenciesdlg.pas svneol=native#text/pascal
|
packager/brokendependenciesdlg.pas svneol=native#text/pascal
|
||||||
packager/lazaruspackageintf.pas svneol=native#text/pascal
|
packager/lazaruspackageintf.pas svneol=native#text/pascal
|
||||||
|
|||||||
14
ide/main.pp
14
ide/main.pp
@ -4115,6 +4115,7 @@ var
|
|||||||
NewUnitInfo:TUnitInfo;
|
NewUnitInfo:TUnitInfo;
|
||||||
NewBuf: TCodeBuffer;
|
NewBuf: TCodeBuffer;
|
||||||
OtherUnitIndex: Integer;
|
OtherUnitIndex: Integer;
|
||||||
|
FilenameNoPath: String;
|
||||||
begin
|
begin
|
||||||
{$IFDEF IDE_VERBOSE}
|
{$IFDEF IDE_VERBOSE}
|
||||||
writeln('');
|
writeln('');
|
||||||
@ -4124,9 +4125,12 @@ begin
|
|||||||
Result:=mrCancel;
|
Result:=mrCancel;
|
||||||
|
|
||||||
AFilename:=TrimFilename(AFilename);
|
AFilename:=TrimFilename(AFilename);
|
||||||
|
FilenameNoPath:=ExtractFilename(AFilename);
|
||||||
|
|
||||||
|
// check to not open directories
|
||||||
if (not (ofRevert in Flags))
|
if (not (ofRevert in Flags))
|
||||||
and (ExtractFilenameOnly(AFilename)='') then
|
and ((FilenameNoPath='') or (FilenameNoPath='.') or (FilenameNoPath='..'))
|
||||||
|
then
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
if ([ofAddToRecent,ofRevert,ofVirtualFile]*Flags=[ofAddToRecent])
|
if ([ofAddToRecent,ofRevert,ofVirtualFile]*Flags=[ofAddToRecent])
|
||||||
@ -4146,7 +4150,8 @@ begin
|
|||||||
|
|
||||||
// check for .lpi files
|
// check for .lpi files
|
||||||
if ([ofRegularFile,ofRevert,ofProjectLoading]*Flags=[]) then begin
|
if ([ofRegularFile,ofRevert,ofProjectLoading]*Flags=[]) then begin
|
||||||
if CompareFileExt(AFilename,'.lpi',false)=0 then begin
|
if (CompareFileExt(AFilename,'.lpi',false)=0)
|
||||||
|
and (FileExists(AFilename)) then begin
|
||||||
if MessageDlg('Open Project?',
|
if MessageDlg('Open Project?',
|
||||||
'Open the project '+AFilename+'?'#13
|
'Open the project '+AFilename+'?'#13
|
||||||
+'Answer No to load it as xml file.',
|
+'Answer No to load it as xml file.',
|
||||||
@ -8111,6 +8116,9 @@ end.
|
|||||||
|
|
||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.506 2003/04/03 15:02:23 mattias
|
||||||
|
fixed loading .files
|
||||||
|
|
||||||
Revision 1.505 2003/04/02 17:06:27 mattias
|
Revision 1.505 2003/04/02 17:06:27 mattias
|
||||||
improved deb creation
|
improved deb creation
|
||||||
|
|
||||||
|
|||||||
85
packager/addtopackagedlg.pas
Normal file
85
packager/addtopackagedlg.pas
Normal file
@ -0,0 +1,85 @@
|
|||||||
|
{ $Id$ }
|
||||||
|
{
|
||||||
|
/***************************************************************************
|
||||||
|
addtopackagedlg.pas
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
|
||||||
|
***************************************************************************/
|
||||||
|
|
||||||
|
***************************************************************************
|
||||||
|
* *
|
||||||
|
* This source is free software; you can redistribute it and/or modify *
|
||||||
|
* it under the terms of the GNU General Public License as published by *
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or *
|
||||||
|
* (at your option) any later version. *
|
||||||
|
* *
|
||||||
|
* This code is distributed in the hope that it will be useful, but *
|
||||||
|
* WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||||
|
* General Public License for more details. *
|
||||||
|
* *
|
||||||
|
* A copy of the GNU General Public License is available on the World *
|
||||||
|
* Wide Web at <http://www.gnu.org/copyleft/gpl.html>. You can also *
|
||||||
|
* obtain it by writing to the Free Software Foundation, *
|
||||||
|
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||||
|
* *
|
||||||
|
***************************************************************************
|
||||||
|
|
||||||
|
Author: Mattias Gaertner
|
||||||
|
|
||||||
|
Abstract:
|
||||||
|
TAddToPackageDlg is the form for adding files to an open package.
|
||||||
|
}
|
||||||
|
unit AddToPackageDlg;
|
||||||
|
|
||||||
|
{$mode objfpc}{$H+}
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Classes, SysUtils, LResources, Forms, Controls, Buttons, StdCtrls, ExtCtrls,
|
||||||
|
LazarusIDEStrConsts, PackageDefs;
|
||||||
|
|
||||||
|
type
|
||||||
|
TAddToPackageDlg = class(TForm)
|
||||||
|
NoteBook: TNoteBook;
|
||||||
|
AddUnitPage: TPage;
|
||||||
|
NewComponentPage: TPage;
|
||||||
|
AddUnitFilenameLabel: TLabel;
|
||||||
|
AddUnitFilenameEdit: TEdit;
|
||||||
|
AddUnitFileBrowseButton: TButton;
|
||||||
|
AddUnitButton: TButton;
|
||||||
|
CancelNewButton: TButton;
|
||||||
|
AncestorTypeLabel: TLabel;
|
||||||
|
AncestorComboBox: TComboBox;
|
||||||
|
ClassNameLabel: TLabel;
|
||||||
|
ClassNameEdit: TEdit;
|
||||||
|
PalettePageLabel: TLabel;
|
||||||
|
PalettePageCombobox: TCombobox;
|
||||||
|
ComponentUnitLabel: TLabel;
|
||||||
|
ComponentUnitCombobox: TCombobox;
|
||||||
|
NewComponentButton: TButton;
|
||||||
|
CancelNewComponentButton: TButton;
|
||||||
|
private
|
||||||
|
public
|
||||||
|
constructor Create(TheOwner: TComponent); override;
|
||||||
|
destructor Destroy; override;
|
||||||
|
end;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
{ TAddToPackageDlg }
|
||||||
|
|
||||||
|
constructor TAddToPackageDlg.Create(TheOwner: TComponent);
|
||||||
|
begin
|
||||||
|
inherited Create(TheOwner);
|
||||||
|
end;
|
||||||
|
|
||||||
|
destructor TAddToPackageDlg.Destroy;
|
||||||
|
begin
|
||||||
|
inherited Destroy;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
||||||
Loading…
Reference in New Issue
Block a user