Skip to content
This repository has been archived by the owner on Jan 25, 2019. It is now read-only.

Commit

Permalink
# Fixes the issue 1. (please see: #1)
Browse files Browse the repository at this point in the history
  • Loading branch information
silvioprog committed Dec 18, 2012
1 parent 7dc32c8 commit 45df610
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
4 changes: 2 additions & 2 deletions ideintf/brookprojectintf.pas
Original file line number Diff line number Diff line change
Expand Up @@ -443,8 +443,8 @@ function TBrookBrokersFileDescPascalUnit.CreateSource(const AFileName,
1: VBroker := 'BrookFCLFCGIBroker';
end;
case FAppDefCharset of
0: VCharset := 'HTTP_CHARSET_UTF_8';
1: VCharset := 'HTTP_CHARSET_ISO_8859_1';
0: VCharset := 'BROOK_HTTP_CHARSET_UTF_8';
1: VCharset := 'BROOK_HTTP_CHARSET_ISO_8859_1';
end;
if FFullPlg then
begin
Expand Down
21 changes: 11 additions & 10 deletions ideintf/frmbrooknewproject.pas
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ procedure TfrBrookNewProject.btAddActClick(Sender: TObject);
if TfrBrookActEdit.Execute('Add', VName, VPattern, VDefault) then
begin
VItem := lvActions.Items.Add;
VItem.Data := VItem;
VItem.Caption := VName;
VItem.SubItems.Add(VPattern);
VItem.SubItems.Add(BoolToStr(VDefault, True));
Expand Down Expand Up @@ -275,31 +276,31 @@ procedure TfrBrookNewProject.ValidateData(const AName, APattern: string;
const ADefault: Boolean);
var
I: Integer;
VItem: TListItem;
VData: Pointer;
VItem, VSelected: TListItem;
begin
for I := 0 to Pred(lvActions.Items.Count) do
begin
VItem := lvActions.Items[I];
if CompareText(AName, VItem.Caption) = 0 then
VSelected := lvActions.Selected;
VData := nil;
if Assigned(VSelected) then
VData := VSelected.Data;
if SameText(AName, VItem.Caption) and
SameText(APattern, VItem.SubItems[0]) and (VItem.Data <> VData) then
begin
if VItem = lvActions.Selected then
Continue;
ShowMessage(Format('The action "%s" is already added.',
[VItem.Caption]));
Abort;
end;
if CompareText(APattern, VItem.SubItems[0]) = 0 then
if SameText(APattern, VItem.SubItems[0]) and (VItem.Data <> VData) then
begin
if VItem = lvActions.Selected then
Continue;
ShowMessage(Format('There is already an action added with the pattern "%s".',
[VItem.Caption]));
Abort;
end;
if ADefault and StrToBool(VItem.SubItems[1]) then
if ADefault and StrToBool(VItem.SubItems[1]) and (VItem.Data <> VData) then
begin
if VItem = lvActions.Selected then
Continue;
ShowMessage(Format('There is already a default action added.',
[VItem.Caption]));
Abort;
Expand Down

0 comments on commit 45df610

Please sign in to comment.