mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-13 12:39:15 +02:00
IDE: In SearchResultsView replace PageControl with ExtendedNotebook which allows reordering tabs. Rename SearchAgainButton -> NewSearchButton.
git-svn-id: trunk@64038 -
This commit is contained in:
parent
006d6e0dcf
commit
1945f8b61d
@ -5614,8 +5614,7 @@ var
|
|||||||
CurGrid: TOICustomPropertyGrid;
|
CurGrid: TOICustomPropertyGrid;
|
||||||
begin
|
begin
|
||||||
// ToDo: Allow TAB key to FilterEdit, TreeView and Grid. Now the Grid gets seleted always.
|
// ToDo: Allow TAB key to FilterEdit, TreeView and Grid. Now the Grid gets seleted always.
|
||||||
DebugLn(['TObjectInspectorDlg.KeyDown: Key=', Key, ', ActiveControl=', ActiveControl]);
|
//DebugLn(['TObjectInspectorDlg.KeyDown: Key=', Key, ', ActiveControl=', ActiveControl]);
|
||||||
|
|
||||||
//Do not disturb the combobox navigation while it has focus
|
//Do not disturb the combobox navigation while it has focus
|
||||||
if not AvailPersistentComboBox.DroppedDown then begin
|
if not AvailPersistentComboBox.DroppedDown then begin
|
||||||
CurGrid:=GetActivePropertyGrid;
|
CurGrid:=GetActivePropertyGrid;
|
||||||
|
@ -1263,7 +1263,9 @@
|
|||||||
<Unit210>
|
<Unit210>
|
||||||
<Filename Value="searchresultview.pp"/>
|
<Filename Value="searchresultview.pp"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
|
<ComponentName Value="SearchResultsView"/>
|
||||||
<HasResources Value="True"/>
|
<HasResources Value="True"/>
|
||||||
|
<ResourceBaseClass Value="Form"/>
|
||||||
<UnitName Value="SearchResultView"/>
|
<UnitName Value="SearchResultView"/>
|
||||||
</Unit210>
|
</Unit210>
|
||||||
<Unit211>
|
<Unit211>
|
||||||
|
@ -13,20 +13,7 @@ object SearchResultsView: TSearchResultsView
|
|||||||
OnClose = FormClose
|
OnClose = FormClose
|
||||||
OnCreate = Form1Create
|
OnCreate = Form1Create
|
||||||
OnKeyDown = FormKeyDown
|
OnKeyDown = FormKeyDown
|
||||||
object ResultsNoteBook: TPageControl
|
LCLVersion = '2.1.0.0'
|
||||||
Left = 0
|
|
||||||
Height = 249
|
|
||||||
Top = 26
|
|
||||||
Width = 722
|
|
||||||
Align = alClient
|
|
||||||
MultiLine = True
|
|
||||||
TabOrder = 0
|
|
||||||
OnChange = ResultsNoteBookPageChanged
|
|
||||||
OnCloseTabClicked = ResultsNoteBookClosetabclicked
|
|
||||||
OnMouseDown = ResultsNoteBookMouseDown
|
|
||||||
OnResize = ResultsNoteBookResize
|
|
||||||
Options = [nboShowCloseButtons, nboMultiLine, nboDoChangeOnSetIndex]
|
|
||||||
end
|
|
||||||
object ControlBar1: TPanel
|
object ControlBar1: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 26
|
Height = 26
|
||||||
@ -49,13 +36,13 @@ object SearchResultsView: TSearchResultsView
|
|||||||
EdgeInner = esNone
|
EdgeInner = esNone
|
||||||
EdgeOuter = esNone
|
EdgeOuter = esNone
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
object SearchAgainButton: TToolButton
|
object NewSearchButton: TToolButton
|
||||||
Left = 1
|
Left = 1
|
||||||
Top = 0
|
Top = 0
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = 'SearchAgainButton'
|
Caption = 'NewSearchButton'
|
||||||
ImageIndex = 0
|
ImageIndex = 0
|
||||||
OnClick = SearchAgainButtonClick
|
OnClick = NewSearchButtonClick
|
||||||
end
|
end
|
||||||
object ClosePageButton: TToolButton
|
object ClosePageButton: TToolButton
|
||||||
Left = 24
|
Left = 24
|
||||||
@ -123,9 +110,25 @@ object SearchResultsView: TSearchResultsView
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
object ResultsNoteBook: TExtendedNotebook
|
||||||
|
Left = 0
|
||||||
|
Height = 249
|
||||||
|
Top = 26
|
||||||
|
Width = 722
|
||||||
|
Align = alClient
|
||||||
|
MultiLine = True
|
||||||
|
TabOrder = 0
|
||||||
|
OnChange = ResultsNoteBookPageChanged
|
||||||
|
OnCloseTabClicked = ResultsNoteBookClosetabclicked
|
||||||
|
OnMouseDown = ResultsNoteBookMouseDown
|
||||||
|
OnResize = ResultsNoteBookResize
|
||||||
|
Options = [nboShowCloseButtons, nboMultiLine, nboDoChangeOnSetIndex]
|
||||||
|
TabDragMode = dmAutomatic
|
||||||
|
TabDragAcceptMode = dmAutomatic
|
||||||
|
end
|
||||||
object popList: TPopupMenu
|
object popList: TPopupMenu
|
||||||
left = 129
|
Left = 129
|
||||||
top = 48
|
Top = 48
|
||||||
object mniCopyItem: TMenuItem
|
object mniCopyItem: TMenuItem
|
||||||
Caption = 'Copy Item'
|
Caption = 'Copy Item'
|
||||||
OnClick = mniCopyItemClick
|
OnClick = mniCopyItemClick
|
||||||
@ -151,8 +154,8 @@ object SearchResultsView: TSearchResultsView
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
object ActionList: TActionList
|
object ActionList: TActionList
|
||||||
left = 32
|
Left = 32
|
||||||
top = 48
|
Top = 48
|
||||||
object actClosePage: TAction
|
object actClosePage: TAction
|
||||||
ImageIndex = 1
|
ImageIndex = 1
|
||||||
OnExecute = ClosePageButtonClick
|
OnExecute = ClosePageButtonClick
|
||||||
|
@ -42,7 +42,7 @@ uses
|
|||||||
LCLProc, LCLType, LCLIntf, Forms, Controls, Graphics, ComCtrls, Menus, Clipbrd,
|
LCLProc, LCLType, LCLIntf, Forms, Controls, Graphics, ComCtrls, Menus, Clipbrd,
|
||||||
ActnList, ExtCtrls,
|
ActnList, ExtCtrls,
|
||||||
// LazControls
|
// LazControls
|
||||||
TreeFilterEdit,
|
TreeFilterEdit, ExtendedNotebook,
|
||||||
// LazUtils
|
// LazUtils
|
||||||
LazUTF8, LazFileUtils, LazLoggerBase, LazStringUtils,
|
LazUTF8, LazFileUtils, LazLoggerBase, LazStringUtils,
|
||||||
// IdeIntf
|
// IdeIntf
|
||||||
@ -151,12 +151,12 @@ type
|
|||||||
mniCopyItem: TMenuItem;
|
mniCopyItem: TMenuItem;
|
||||||
pnlToolBars: TPanel;
|
pnlToolBars: TPanel;
|
||||||
popList: TPopupMenu;
|
popList: TPopupMenu;
|
||||||
ResultsNoteBook: TPageControl;
|
ResultsNoteBook: TExtendedNotebook;
|
||||||
tbbCloseLeft: TToolButton;
|
tbbCloseLeft: TToolButton;
|
||||||
tbbCloseOthers: TToolButton;
|
tbbCloseOthers: TToolButton;
|
||||||
tbbCloseRight: TToolButton;
|
tbbCloseRight: TToolButton;
|
||||||
ToolBar: TToolBar;
|
ToolBar: TToolBar;
|
||||||
SearchAgainButton: TToolButton;
|
NewSearchButton: TToolButton;
|
||||||
CloseTabs: TToolBar;
|
CloseTabs: TToolBar;
|
||||||
ClosePageButton: TToolButton;
|
ClosePageButton: TToolButton;
|
||||||
SearchInListEdit: TTreeFilterEdit;
|
SearchInListEdit: TTreeFilterEdit;
|
||||||
@ -183,7 +183,7 @@ type
|
|||||||
{%H-}Shift: TShiftState; X, Y: Integer);
|
{%H-}Shift: TShiftState; X, Y: Integer);
|
||||||
procedure TreeViewKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
|
procedure TreeViewKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
|
||||||
procedure ResultsNoteBookClosetabclicked(Sender: TObject);
|
procedure ResultsNoteBookClosetabclicked(Sender: TObject);
|
||||||
procedure SearchAgainButtonClick(Sender: TObject);
|
procedure NewSearchButtonClick(Sender: TObject);
|
||||||
procedure TreeViewAdvancedCustomDrawItem(Sender: TCustomTreeView;
|
procedure TreeViewAdvancedCustomDrawItem(Sender: TCustomTreeView;
|
||||||
Node: TTreeNode; State: TCustomDrawState; Stage: TCustomDrawStage;
|
Node: TTreeNode; State: TCustomDrawState; Stage: TCustomDrawStage;
|
||||||
var {%H-}PaintImages, {%H-}DefaultDraw: Boolean);
|
var {%H-}PaintImages, {%H-}DefaultDraw: Boolean);
|
||||||
@ -322,7 +322,7 @@ begin
|
|||||||
Name:=NonModalIDEWindowNames[nmiwSearchResultsView];
|
Name:=NonModalIDEWindowNames[nmiwSearchResultsView];
|
||||||
Caption:=lisMenuViewSearchResults;
|
Caption:=lisMenuViewSearchResults;
|
||||||
|
|
||||||
SearchAgainButton.Hint:=rsStartANewSearch;
|
NewSearchButton.Hint:=rsStartANewSearch;
|
||||||
ClosePageButton.Hint := rsCloseCurrentPage;
|
ClosePageButton.Hint := rsCloseCurrentPage;
|
||||||
SearchInListEdit.Hint:=rsFilterTheListWithString;
|
SearchInListEdit.Hint:=rsFilterTheListWithString;
|
||||||
{ Close tabs buttons }
|
{ Close tabs buttons }
|
||||||
@ -351,7 +351,7 @@ begin
|
|||||||
mniCollapseAll.Caption := lisCollapseAll;
|
mniCollapseAll.Caption := lisCollapseAll;
|
||||||
|
|
||||||
ToolBar.Images := IDEImages.Images_16;
|
ToolBar.Images := IDEImages.Images_16;
|
||||||
SearchAgainButton.ImageIndex := IDEImages.LoadImage('menu_new_search');
|
NewSearchButton.ImageIndex := IDEImages.LoadImage('menu_new_search');
|
||||||
ClosePageButton.ImageIndex := IDEImages.LoadImage('menu_close');
|
ClosePageButton.ImageIndex := IDEImages.LoadImage('menu_close');
|
||||||
ActionList.Images := IDEImages.Images_16;
|
ActionList.Images := IDEImages.Images_16;
|
||||||
actClosePage.ImageIndex := IDEImages.LoadImage('menu_close');
|
actClosePage.ImageIndex := IDEImages.LoadImage('menu_close');
|
||||||
@ -844,7 +844,7 @@ var
|
|||||||
begin
|
begin
|
||||||
CurrentTV:= GetTreeView(ResultsNoteBook.PageIndex);
|
CurrentTV:= GetTreeView(ResultsNoteBook.PageIndex);
|
||||||
state := Assigned(CurrentTV) and not CurrentTV.Updating;
|
state := Assigned(CurrentTV) and not CurrentTV.Updating;
|
||||||
SearchAgainButton.Enabled := state;
|
NewSearchButton.Enabled := state;
|
||||||
ClosePageButton.Enabled := state;
|
ClosePageButton.Enabled := state;
|
||||||
SearchInListEdit.Enabled := state;
|
SearchInListEdit.Enabled := state;
|
||||||
if state then
|
if state then
|
||||||
@ -938,7 +938,7 @@ begin
|
|||||||
ClosePage(TTabSheet(Sender).PageIndex)
|
ClosePage(TTabSheet(Sender).PageIndex)
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TSearchResultsView.SearchAgainButtonClick(Sender: TObject);
|
procedure TSearchResultsView.NewSearchButtonClick(Sender: TObject);
|
||||||
var
|
var
|
||||||
CurrentTV: TLazSearchResultTV;
|
CurrentTV: TLazSearchResultTV;
|
||||||
SearchObj: TLazSearch;
|
SearchObj: TLazSearch;
|
||||||
|
Loading…
Reference in New Issue
Block a user