Important bug fix and updated the MOTD generator

This commit is contained in:
Christian Hammacher 2005-11-09 14:32:07 +00:00
parent 0dd88dccbd
commit 38178ea9fa
6 changed files with 14 additions and 10 deletions

View File

@ -115,7 +115,7 @@ AutoIncBuild=1
MajorVer=1 MajorVer=1
MinorVer=3 MinorVer=3
Release=0 Release=0
Build=25 Build=26
Debug=0 Debug=0
PreRelease=0 PreRelease=0
Special=0 Special=0
@ -126,7 +126,7 @@ CodePage=1252
[Version Info Keys] [Version Info Keys]
CompanyName=AMX Mod X Dev Team CompanyName=AMX Mod X Dev Team
FileDescription= FileDescription=
FileVersion=1.3.0.25 FileVersion=1.3.0.26
InternalName= InternalName=
LegalCopyright= LegalCopyright=
LegalTrademarks= LegalTrademarks=

Binary file not shown.

Binary file not shown.

View File

@ -579,7 +579,6 @@ begin
Started := False; // dont run this command twice Started := False; // dont run this command twice
frmMain.tsMain.Items[Index].Checked := True; // select tab frmMain.tsMain.Items[Index].Checked := True; // select tab
CurrProjects := Index; CurrProjects := Index;
Started := True;
tsDocuments.Items.Clear; tsDocuments.Items.Clear;
for i := 0 to Collection.Count -1 do begin for i := 0 to Collection.Count -1 do begin
@ -588,6 +587,7 @@ begin
TabItem.OnSelect := frmMain.OnTabSelect; TabItem.OnSelect := frmMain.OnTabSelect;
tsDocuments.Items.Add(TabItem); tsDocuments.Items.Add(TabItem);
end; end;
Started := True;
if JumpToLastDoc then begin if JumpToLastDoc then begin
Started := False; Started := False;

View File

@ -3,7 +3,7 @@ unit UnitfrmMOTDGen;
interface interface
uses uses
SysUtils, Windows, Messages, Classes, Graphics, Controls, SysUtils, Windows, Messages, Classes, Graphics, Controls, ClipBrd,
StdCtrls, ExtCtrls, Forms, mxFlatControls, TBXDkPanels, SpTBXDkPanels; StdCtrls, ExtCtrls, Forms, mxFlatControls, TBXDkPanels, SpTBXDkPanels;
type type
@ -23,8 +23,7 @@ implementation
procedure TfrmMOTDGen.cmdCopyClick(Sender: TObject); procedure TfrmMOTDGen.cmdCopyClick(Sender: TObject);
begin begin
txtMOTD.CopyToClipboard; Clipboard.SetTextBuf(txtMOTD.Lines.GetText);
txtMOTD.CopyToClipboard;
end; end;
end. end.

View File

@ -690,7 +690,7 @@ begin
case tsMain.ActiveTabIndex of case tsMain.ActiveTabIndex of
0: Collection := PawnProjects; // Pawn 0: Collection := PawnProjects; // Pawn
1: Collection := CPPProjects; // C++ 1: Collection := CPPProjects; // C++
else Collection := OtherProjects; // Other else Collection := OtherProjects; // Other
end; end;
Collection.Activate(ItemIndex, True); Collection.Activate(ItemIndex, True);
end; end;
@ -869,7 +869,7 @@ begin
if not Plugin_CreateNewFile(NEW_OTHER_HTML, True) then exit; if not Plugin_CreateNewFile(NEW_OTHER_HTML, True) then exit;
if tsMain.ActiveTabIndex <> 2 then if tsMain.ActiveTabIndex <> 2 then
ActivateProjects(2, False); ActivateProjects(2, True);
OtherProjects.Activate(OtherProjects.Add('', 'HTML'), True); OtherProjects.Activate(OtherProjects.Add('', 'HTML'), True);
sciEditor.Lines.Add('<html>'); sciEditor.Lines.Add('<html>');
@ -1984,8 +1984,13 @@ begin
if (GetCurrLang.Name = 'HTML') then begin if (GetCurrLang.Name = 'HTML') then begin
eStr := TStringList.Create; eStr := TStringList.Create;
eStr.Text := StringReplace(sciEditor.Lines.Text, #9, '', [rfReplaceAll]); eStr.Text := StringReplace(sciEditor.Lines.Text, #9, '', [rfReplaceAll]);
for i := 0 to eStr.Count - 1 do eStr.Text := StringReplace(sciEditor.Lines.Text, '"', '^"', [rfReplaceAll]);
eStr[i] := '"' + eStr[i] + '\n" +'; for i := 0 to eStr.Count -1 do begin
if i = eStr.Count -1 then
eStr[i] := '"' + eStr[i] + '"'
else
eStr[i] := '"' + eStr[i] + '^n" +';
end;
frmMOTDGen.txtMOTD.Lines.Assign(eStr); frmMOTDGen.txtMOTD.Lines.Assign(eStr);
eStr.Destroy; eStr.Destroy;