Lazarus
Using the Lazarus IDE => General => Topic started by: DimProfi on March 22, 2014, 04:03:45 pm
-
I'm not sure of the right place for this, so feel free to redirect me to another place ::)
I'm trying to make my first patch for Lazarus. I downloaded SVN and build a new Lazarus with my patch.
The question is, is it acceptable and usable for commiting? Just take a look - need feedback.
The aim of the patch was to give an opportunity to import multiply paths to Libraries (-Fu) and Includes (-Fi) from the text-file.
Just click "Import Paths" and select in TOpendDialog a File. (see Attachement)
patheditordlg.lfm
object ImportPathsButton: TBitBtn
AnchorSideLeft.Control = DeleteInvalidPathsButton
AnchorSideLeft.Side = asrBottom
AnchorSideBottom.Control = PathGroupBox
AnchorSideBottom.Side = asrBottom
Left = 471
Height = 25
Top = 172
Width = 127
Anchors = [akLeft, akBottom]
AutoSize = True
BorderSpacing.Around = 6
Caption = 'ImportPathsButton'
Enabled = False
OnClick = ImportPathsButtonClick
ParentShowHint = False
ShowHint = True
TabOrder = 8
end
object OpenDialogPathsImport: TOpenDialog
left = 504
top = 80
end
patheditordlg.pas
procedure TPathEditorDialog.ImportPathsButtonClick(Sender: TObject);
var paths:TStringList;
y:integer;
c:integer;
RelPath:string;
begin
if not OpenDialogPathsImport.Execute then exit;
paths:=TStringList.Create();
try
paths.LoadFromFile(OpenDialogPathsImport.FileName);
with PathListBox do
begin
y:=ItemIndex+1;
if y=0 then
begin
y:=Count;
end;
for c:=0 to paths.Count-1 do
begin
if path[c]<>'' then
begin
RelPath:=BaseRelative(paths[c]);
Items.InsertObject(y, RelPath, PathMayExist(paths[c]));
ItemIndex:=y;
end;
end;
UpdateButtons;
end;
finally
FreeAndNil(paths);
end;
end;
procedure TPathEditorDialog.FormCreate(Sender: TObject);
...
ImportPathsButton.Caption:=lisPathEditImportPaths;
...
end;
procedure TPathEditorDialog.UpdateButtons;
...
ImportPathsButton.Enabled:=true;
...
end;
LazarusIDEStrConsts.pas
lisPathEditImportPaths = 'Import Paths';
-
The best way to go forward is to open a ticket for it in the bugtracker.
Mark it as feature request.
Attach the full dif (use svn diff).
Bart
-
The best way to go forward is to open a ticket for it in the bugtracker.
Mark it as feature request.
Attach the full dif (use svn diff).
Bart
I was trying to do it here now, but cant find a checkbox "Feature Request".
Do I need another status to acccess it? %)
-
I was trying to do it here now, but cant find a checkbox "Feature Request".
Do I need another status to acccess it? %)
This is forum. Bugtracker is : http://bugs.freepascal.org
You must also create a proper patch, preferably against the latest trunk SVN :
http://wiki.freepascal.org/Creating_A_Patch
-
This is forum. Bugtracker is : http://bugs.freepascal.org
http://bugs.freepascal.org/bug_report_page.php
- is it a right URL to add a new feature?
-
Yes. See also
http://wiki.lazarus.freepascal.org/How_do_I_create_a_bug_report
and related pages
-
I was trying to do it here now, but cant find a checkbox "Feature Request".
Just create bug, there are no other options available (atleast for most)
-
I made it :)
http://bugs.freepascal.org/view.php?id=25903
Thanks you all for help!
Hope, it will be accepted :)