mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-10-24 20:11:31 +02:00
fixed unsetting ItemIndex on changing TComboBox.Text
git-svn-id: trunk@6913 -
This commit is contained in:
parent
80fb00e662
commit
0c17f82e23
@ -38,8 +38,9 @@ unit FindReplaceDialog;
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, LCLType, Controls, StdCtrls, Forms, Buttons, ExtCtrls,
|
||||
LResources, Dialogs, SynEditTypes, SynRegExpr, SynEdit, LazarusIdeStrConsts;
|
||||
Classes, SysUtils, LCLProc, LCLType, Controls, StdCtrls, Forms, Buttons,
|
||||
ExtCtrls, LResources, Dialogs, SynEditTypes, SynRegExpr, SynEdit,
|
||||
LazarusIdeStrConsts;
|
||||
|
||||
type
|
||||
TFindDlgComponent = (fdcText, fdcReplace);
|
||||
@ -583,11 +584,12 @@ begin
|
||||
Result:=TextToFindComboBox.Text;
|
||||
end;
|
||||
|
||||
procedure TLazFindReplaceDialog.SetFindText(const NewFindText:AnsiString);
|
||||
procedure TLazFindReplaceDialog.SetFindText(const NewFindText: AnsiString);
|
||||
begin
|
||||
// SetComboBoxText(TextToFindComboBox,NewFindText);
|
||||
TextToFindComboBox.Text:= NewFindText;
|
||||
TextToFindComboBox.Text:=NewFindText;
|
||||
TextToFindComboBox.SelectAll;
|
||||
//debugln('TLazFindReplaceDialog.SetFindText A TextToFindComboBox.SelStart=',dbgs(TextToFindComboBox.SelStart),' TextToFindComboBox.SelLength=',dbgs(TextToFindComboBox.SelLength),' TextToFindComboBox.Text="',TextToFindComboBox.Text,'" NewFindText="',DbgStr(NewFindText),'"');
|
||||
end;
|
||||
|
||||
function TLazFindReplaceDialog.GetReplaceText:AnsiString;
|
||||
|
||||
@ -7875,7 +7875,7 @@ begin
|
||||
end;
|
||||
SplitCmdLine(CommandAfter,CmdAfterExe,CmdAfterParams);
|
||||
if (CmdAfterExe<>'') then begin
|
||||
DebugLn('TMainIDE.DoPublishModule A CmdAfterExe="',CmdAfterExe,'"');
|
||||
//DebugLn('TMainIDE.DoPublishModule A CmdAfterExe="',CmdAfterExe,'"');
|
||||
CmdAfterExe:=FindDefaultExecutablePath(CmdAfterExe);
|
||||
if not FileIsExecutableCached(CmdAfterExe) then begin
|
||||
MessageDlg(lisCommandAfterInvalid,
|
||||
@ -11483,6 +11483,9 @@ end.
|
||||
|
||||
{ =============================================================================
|
||||
$Log$
|
||||
Revision 1.855 2005/03/07 18:46:35 mattias
|
||||
fixed unsetting ItemIndex on changing TComboBox.Text
|
||||
|
||||
Revision 1.854 2005/03/07 17:33:54 mattias
|
||||
added check for overwriting source directory on ublish module
|
||||
|
||||
|
||||
@ -793,13 +793,18 @@ begin
|
||||
FindReplaceDlg.ReplaceTextComboBox.Items.Assign(
|
||||
InputHistories.ReplaceHistory);
|
||||
|
||||
FindReplaceDlg.FindText := 'test';
|
||||
with EditorComponent do begin
|
||||
if EditorOpts.FindTextAtCursor then begin
|
||||
if SelAvail and (BlockBegin.Y = BlockEnd.Y) then
|
||||
if SelAvail and (BlockBegin.Y = BlockEnd.Y) then begin
|
||||
//debugln('TSourceEditor.StartFindAndReplace B FindTextAtCursor SelAvail');
|
||||
FindReplaceDlg.FindText := SelText
|
||||
else
|
||||
FindReplaceDlg.FindText := GetWordAtRowCol(LogicalCaretXY);
|
||||
end else begin
|
||||
debugln('TSourceEditor.StartFindAndReplace B FindTextAtCursor not SelAvail');
|
||||
//FindReplaceDlg.FindText := GetWordAtRowCol(LogicalCaretXY);
|
||||
end;
|
||||
end else begin
|
||||
//debugln('TSourceEditor.StartFindAndReplace B not FindTextAtCursor');
|
||||
FindReplaceDlg.FindText:='';
|
||||
end;
|
||||
end;
|
||||
@ -3490,8 +3495,12 @@ begin
|
||||
begin
|
||||
TextToFindComboBox.Items.Assign(FindHistory);
|
||||
if not EditorOpts.FindTextAtCursor then begin
|
||||
if TextToFindComboBox.Items.Count>0 then
|
||||
if TextToFindComboBox.Items.Count>0 then begin
|
||||
//debugln('TSourceNotebook.LoadFindInFilesHistory A TextToFindComboBox.Text=',TextToFindComboBox.Text);
|
||||
TextToFindComboBox.ItemIndex:=0;
|
||||
TextToFindComboBox.SelectAll;
|
||||
//debugln('TSourceNotebook.LoadFindInFilesHistory B TextToFindComboBox.Text=',TextToFindComboBox.Text);
|
||||
end;
|
||||
end;
|
||||
AssignToComboBox(DirectoryComboBox, FindInFilesPathHistory);
|
||||
AssignToComboBox(FileMaskComboBox, FindInFilesMaskHistory);
|
||||
|
||||
@ -3128,7 +3128,7 @@ end;
|
||||
------------------------------------------------------------------------------}
|
||||
procedure TControl.SetText(const Value: TCaption);
|
||||
begin
|
||||
//if CompareText(ClassName,'TMEMO')=0 then
|
||||
//if CompareText(Name,'TextToFindComboBox')=0 then
|
||||
// debugln('TControl.SetText A ',DbgSName(Self),' GetText="',GetText,'" Value="',Value,'" FCaption="',FCaption,'"');
|
||||
if GetText = Value then Exit;
|
||||
|
||||
@ -3497,6 +3497,9 @@ end;
|
||||
|
||||
{ =============================================================================
|
||||
$Log$
|
||||
Revision 1.249 2005/03/07 18:46:36 mattias
|
||||
fixed unsetting ItemIndex on changing TComboBox.Text
|
||||
|
||||
Revision 1.248 2005/03/05 14:42:01 mattias
|
||||
Click events are now created after MouseUp from C Western
|
||||
|
||||
|
||||
@ -707,7 +707,9 @@ var
|
||||
begin
|
||||
I := FItems.IndexOf(AValue);
|
||||
if I >= 0 then
|
||||
ItemIndex := I;
|
||||
ItemIndex := I
|
||||
else if (not (csLoading in ComponentState)) then
|
||||
FItemIndex := -1;
|
||||
inherited;
|
||||
end;
|
||||
|
||||
@ -720,6 +722,8 @@ end;
|
||||
------------------------------------------------------------------------------}
|
||||
procedure TCustomComboBox.SetItemIndex(Val : integer);
|
||||
begin
|
||||
//if CompareText(Name,'TextToFindComboBox')=0 then
|
||||
// debugln('TCustomComboBox.SetItemIndex A ',DbgSName(Self),' Text="',Text,'"');
|
||||
if Val=GetItemIndex then exit;
|
||||
if Val>=Items.Count then exit;
|
||||
|
||||
@ -733,6 +737,8 @@ begin
|
||||
// remember text, in case one reads text without creating handle
|
||||
Text := FItems.Strings[FItemIndex];
|
||||
end;
|
||||
//if CompareText(Name,'TextToFindComboBox')=0 then
|
||||
// debugln('TCustomComboBox.SetItemIndex END ',DbgSName(Self),' Text="',Text,'"');
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
@ -796,6 +802,9 @@ end;
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.57 2005/03/07 18:46:36 mattias
|
||||
fixed unsetting ItemIndex on changing TComboBox.Text
|
||||
|
||||
Revision 1.56 2005/02/15 22:01:54 micha
|
||||
compilation fixes
|
||||
|
||||
|
||||
@ -1530,8 +1530,17 @@ end;
|
||||
Minimizes the application
|
||||
------------------------------------------------------------------------------}
|
||||
procedure TGtkWidgetSet.AppMinimize;
|
||||
var
|
||||
i: Integer;
|
||||
AForm: TCustomForm;
|
||||
begin
|
||||
// TODO: Implement me!
|
||||
if Screen=nil then exit;
|
||||
for i:=0 to Screen.CustomFormCount-1 do begin
|
||||
AForm:=Screen.CustomForms[i];
|
||||
if (AForm.Parent=nil) and AForm.HandleAllocated then begin
|
||||
ShowWindow(AForm.Handle, WS_MINIMIZE);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
@ -6886,6 +6895,9 @@ end;
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.640 2005/03/07 18:46:36 mattias
|
||||
fixed unsetting ItemIndex on changing TComboBox.Text
|
||||
|
||||
Revision 1.639 2005/03/07 16:01:06 mattias
|
||||
hiding secondary form from taskbar in gtk2.2 from Sergio
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user