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