79
79
2018/05/12 Extensive changes - MainUnit is now just that. Name of this unit changed.
80
80
2018/05/20 Alterations to way we startup, wrt mainform status report. Mark
81
81
2018/06/04 NoteReadOnly() now checks if NoteLister is valid before calling.
82
+ 2018/07/04 Pass back some info about how the note indexing went.
82
83
}
83
84
84
85
{ $mode objfpc}{ $H+}
@@ -150,7 +151,7 @@ TSearchForm = class(TForm)
150
151
{ Reads header in each note in notes directory, updating Search List and
151
152
the recently used list under the TrayIcon. Downside is time it takes
152
153
to index. use UpdateList() if you just have updates. }
153
- procedure IndexNotes ();
154
+ function IndexNotes () : integer ;
154
155
{ Returns true when passed string is the title of an existing note }
155
156
function IsThisaTitle (const Term: ANSIString): boolean;
156
157
{ Gets called with a title and filename (clicking grid), with just a title
@@ -383,7 +384,7 @@ procedure TSearchForm.FormCloseQuery(Sender: TObject; var CanClose: boolean);
383
384
if not AllowClose then hide(); }
384
385
end ;
385
386
386
- procedure TSearchForm.IndexNotes ();
387
+ function TSearchForm.IndexNotes () : integer ;
387
388
// var
388
389
// TS1, TS2 : TTimeStamp;
389
390
begin
@@ -393,7 +394,7 @@ procedure TSearchForm.IndexNotes();
393
394
NoteLister := TNoteLister.Create;
394
395
NoteLister.WorkingDir:=Sett.NoteDirectory;
395
396
end ;
396
- NoteLister.GetNotes(); { TODO : we should say how many we found }
397
+ Result := NoteLister.GetNotes();
397
398
// TS1 := DateTimeToTimeStamp(Now);
398
399
// Edit1.Text := 'That took (mS) ' + inttostr(TS2.Time - TS1.Time);
399
400
UseList();
0 commit comments