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