mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-10-21 15:32:37 +02:00
ToDoList: Changes to column widths and small optimizations.
git-svn-id: trunk@34860 -
This commit is contained in:
parent
3077fc96cc
commit
baeb86da43
@ -9,7 +9,7 @@ object TodoDialog: TTodoDialog
|
||||
ClientWidth = 475
|
||||
OnCreate = FormCreate
|
||||
Position = poScreenCenter
|
||||
LCLVersion = '0.9.27'
|
||||
LCLVersion = '0.9.31'
|
||||
object TodoLabel: TLabel
|
||||
Left = 8
|
||||
Height = 18
|
||||
@ -102,6 +102,14 @@ object TodoDialog: TTodoDialog
|
||||
Height = 36
|
||||
Top = 225
|
||||
Width = 463
|
||||
OKButton.Name = 'OKButton'
|
||||
OKButton.DefaultCaption = True
|
||||
HelpButton.Name = 'HelpButton'
|
||||
HelpButton.DefaultCaption = True
|
||||
CloseButton.Name = 'CloseButton'
|
||||
CloseButton.DefaultCaption = True
|
||||
CancelButton.Name = 'CancelButton'
|
||||
CancelButton.DefaultCaption = True
|
||||
TabOrder = 4
|
||||
ShowButtons = [pbOK, pbCancel]
|
||||
ShowBevel = False
|
||||
|
@ -50,9 +50,9 @@ type
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure PriorityEditKeyPress(Sender: TObject; var Key: char);
|
||||
private
|
||||
{ private declarations }
|
||||
|
||||
public
|
||||
{ public declarations }
|
||||
|
||||
end;
|
||||
|
||||
var
|
||||
@ -133,11 +133,13 @@ var
|
||||
Pkg: TIDEPackage;
|
||||
begin
|
||||
IDEWindowCreators.ShowForm(ToDoWindowName,true);
|
||||
Pkg:=PackageEditingInterface.GetPackageOfEditorItem(Sender);
|
||||
if Pkg<>nil then
|
||||
IDETodoWindow.IDEItem:=Pkg.Name
|
||||
else
|
||||
IDETodoWindow.IDEItem:='';
|
||||
if IDETodoWindow<>nil then begin
|
||||
Pkg:=PackageEditingInterface.GetPackageOfEditorItem(Sender);
|
||||
if Pkg<>nil then
|
||||
IDETodoWindow.IDEItem:=Pkg.Name
|
||||
else
|
||||
IDETodoWindow.IDEItem:='';
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure CreateIDEToDoWindow(Sender: TObject; aFormName: string;
|
||||
|
@ -30,33 +30,35 @@ object IDETodoWindow: TIDETodoWindow
|
||||
Columns = <
|
||||
item
|
||||
AutoSize = True
|
||||
Caption = 'Caption'
|
||||
Width = 57
|
||||
Caption = 'Done'
|
||||
Width = 100
|
||||
end
|
||||
item
|
||||
Caption = 'Description'
|
||||
Width = 700
|
||||
end
|
||||
item
|
||||
AutoSize = True
|
||||
Caption = 'Caption'
|
||||
Width = 57
|
||||
Caption = 'Priority'
|
||||
Width = 100
|
||||
end
|
||||
item
|
||||
AutoSize = True
|
||||
Caption = 'Caption'
|
||||
Width = 57
|
||||
Caption = 'Module'
|
||||
Width = 100
|
||||
end
|
||||
item
|
||||
AutoSize = True
|
||||
Caption = 'Caption'
|
||||
Width = 57
|
||||
Caption = 'Line'
|
||||
end
|
||||
item
|
||||
Caption = 'Caption'
|
||||
AutoSize = True
|
||||
Caption = 'Owner'
|
||||
end
|
||||
item
|
||||
Caption = 'Caption'
|
||||
end
|
||||
item
|
||||
Caption = 'Caption'
|
||||
Width = 315
|
||||
AutoSize = True
|
||||
Caption = 'Category'
|
||||
Width = 100
|
||||
end>
|
||||
RowSelect = True
|
||||
ScrollBars = ssAutoBoth
|
||||
|
@ -76,8 +76,8 @@ uses
|
||||
Const
|
||||
cTodoFlag = '#todo';
|
||||
cDoneFlag = '#done';
|
||||
cAltTodoFLag = 'todo';
|
||||
cAltDoneFLag = 'done';
|
||||
cAltTodoFLag = 'todo:';
|
||||
cAltDoneFLag = 'done:';
|
||||
ToDoWindowName = 'IDETodoWindow';
|
||||
|
||||
type
|
||||
@ -546,12 +546,11 @@ function TIDETodoWindow.CreateToDoItem(aTLFile: TTLScannedFile;
|
||||
const aFileName: string; const SComment, EComment: string;
|
||||
const TokenString: string; LineNumber: Integer): TTodoItem;
|
||||
var
|
||||
N,Strlen : Integer;
|
||||
TempStr : string;
|
||||
ParsingString : string;
|
||||
N, Strlen: Integer;
|
||||
TempStr, ParsingString, LowerString : string;
|
||||
IsAltNotation,
|
||||
IsDone : boolean;
|
||||
aChar : char;
|
||||
IsDone: boolean;
|
||||
aChar: char;
|
||||
|
||||
const
|
||||
cSemiColon = ':';
|
||||
@ -584,38 +583,35 @@ const
|
||||
begin
|
||||
//DebugLn(['TfrmTodo.CreateToDoItem aFileName=',aFileName,' LineNumber=',LineNumber]);
|
||||
Result := nil;
|
||||
|
||||
ParsingString:= TextToSingleLine(TokenString);
|
||||
|
||||
// Remove the beginning comment chars from input string
|
||||
Delete(ParsingString, 1, Length(SComment));
|
||||
|
||||
// Remove leading and trailing blanks from input
|
||||
ParsingString := Trim(ParsingString);
|
||||
|
||||
// See if it's a TODO or DONE item
|
||||
if (Pos(cTodoFlag, lowercase(ParsingString)) = 1) then
|
||||
LowerString := lowercase(ParsingString);
|
||||
if (Pos(cTodoFlag, LowerString) = 1) then
|
||||
begin
|
||||
IsDone := False;
|
||||
IsAltNotation := False;
|
||||
end
|
||||
else
|
||||
begin
|
||||
if (Pos(cAltTodoFLag, lowercase(ParsingString)) = 1) then
|
||||
if (Pos(cAltTodoFLag, LowerString) = 1) then
|
||||
begin
|
||||
IsDone := False;
|
||||
IsAltNotation := True;
|
||||
end
|
||||
else
|
||||
begin
|
||||
if (Pos(cDoneFlag, lowercase(ParsingString)) = 1) then
|
||||
if (Pos(cDoneFlag, LowerString) = 1) then
|
||||
begin
|
||||
IsDone := True;
|
||||
IsAltNotation := False;
|
||||
end
|
||||
else
|
||||
begin
|
||||
if (Pos(cAltDoneFLag, lowercase(ParsingString)) = 1) then
|
||||
if (Pos(cAltDoneFLag, LowerString) = 1) then
|
||||
begin
|
||||
IsDone := True;
|
||||
IsAltNotation := True;
|
||||
@ -706,19 +702,13 @@ begin
|
||||
with lvTodo do
|
||||
begin
|
||||
Column[0].Caption := lisToDoLDone;
|
||||
Column[0].Width := 45;
|
||||
Column[1].Caption := lisToDoLDescription;
|
||||
Column[1].Width := 150;
|
||||
Column[1].Width := 700;
|
||||
Column[2].Caption := lisToDoLPriority;
|
||||
Column[2].Width := 45;
|
||||
Column[3].Caption := lisToDoLFile;
|
||||
Column[3].Width := 80;
|
||||
Column[4].Caption := lisToDoLLine;
|
||||
Column[4].Width := 40;
|
||||
Column[5].Caption := lisToDoLOwner;
|
||||
Column[5].Width := 50;
|
||||
Column[6].Caption := listToDoLCategory;
|
||||
Column[6].Width := 80;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user