fixed saving findtext from vincent

git-svn-id: trunk@5391 -
This commit is contained in:
mattias 2004-04-10 14:20:20 +00:00
parent ffe9052073
commit 88a195111d
3 changed files with 21 additions and 13 deletions

View File

@ -330,11 +330,10 @@ begin
with FindInFilesDialog do
begin
DirectoryComboBox.Text:= SearchObj.SearchDirectory;
FindText:= SearchObj.SearchString;
Options:= SearchObj.SearchOptions;
FileMaskComboBox.Text:= SearchObj.SearchMask;
end;//with
SourceNotebook.FindInFiles(Project1);
SourceNotebook.FindInFiles(Project1, SearchObj.SearchString);
end;//if
end;

View File

@ -163,7 +163,6 @@ type
Procedure CreateEditor(AOwner: TComponent; AParent: TWinControl);
procedure SetVisible(Value: boolean);
protected
FindText: String;
ErrorMsgs: TStrings;
Procedure ReParent(AParent: TWinControl);
@ -531,6 +530,7 @@ type
// FindInFiles
procedure FindInFiles(AProject: TProject);
procedure FindInFiles(AProject: TProject; const FindText: string);
procedure ShowSearchResultsView;
function CreateFindInFilesDialog: TLazFindInFilesDialog;
procedure LoadFindInFilesHistory(ADialog: TLazFindInFilesDialog);
@ -3556,10 +3556,9 @@ end;//FIFCreateSearchForm
Procedure TSourceNotebook.FindInFiles(AProject: TProject);
var
TempEditor: TSourceEditor;
FindText: string;
Begin
if FindInFilesDialog = nil
then FindInFilesDialog := CreateFindInFilesDialog;
FindText:='';
TempEditor := GetActiveSE;
if TempEditor <> nil
then with TempEditor, EditorComponent do
@ -3567,14 +3566,21 @@ Begin
if EditorOpts.FindTextAtCursor
then begin
if SelAvail and (BlockBegin.Y = BlockEnd.Y)
then FindInFilesDialog.FindText := SelText
else FindInFilesDialog.FindText := GetWordAtRowCol(CaretXY);
then FindText := SelText
else FindText := GetWordAtRowCol(CaretXY);
end
else begin
FindInFilesDialog.FindText:='';
end;
end;
FindInFiles(AProject, FindText);
End;
procedure TSourceNotebook.FindInFiles(AProject: TProject;
const FindText: string);
begin
if FindInFilesDialog = nil
then FindInFilesDialog := CreateFindInFilesDialog;
FindInFilesDialog.FindText:= FindText;
IDEDialogLayoutList.ApplyLayout(FindInFilesDialog,320,430);
if FindInFilesDialog.ShowModal=mrOk then
begin
@ -3590,7 +3596,7 @@ Begin
end;//if
end;//if
IDEDialogLayoutList.SaveLayout(FindInFilesDialog);
End;
end;
procedure TSourceNotebook.ShowSearchResultsView;
begin

View File

@ -897,7 +897,7 @@ type
{ TBitmapImage }
{ Descendent of TSharedImage for TBitmap. If a TBitmap is assigned to another
TBitmap, only the reference count wl be increased and both will share the
TBitmap, only the reference count will be increased and both will share the
same TBitmapImage }
TBitmapNativeType = (
@ -1636,6 +1636,9 @@ end.
{ =============================================================================
$Log$
Revision 1.133 2004/04/10 14:20:20 mattias
fixed saving findtext from vincent
Revision 1.132 2004/04/10 00:11:16 mattias
added basic TIcon reading from Colin