mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-07 04:10:44 +02:00
SrcEdit / Tab-Menu: via ctrl-right
git-svn-id: trunk@36265 -
This commit is contained in:
parent
ddeeb78f1a
commit
33afd9a994
@ -708,6 +708,7 @@ type
|
|||||||
mbaZoomReset,
|
mbaZoomReset,
|
||||||
mbaContextMenu,
|
mbaContextMenu,
|
||||||
mbaContextMenuDebug,
|
mbaContextMenuDebug,
|
||||||
|
mbaContextMenuTab,
|
||||||
|
|
||||||
// Old values, needed to load old config
|
// Old values, needed to load old config
|
||||||
moTCLNone, moTMIgnore,
|
moTCLNone, moTMIgnore,
|
||||||
@ -716,7 +717,7 @@ type
|
|||||||
moTCLJumpOrBlock
|
moTCLJumpOrBlock
|
||||||
);
|
);
|
||||||
|
|
||||||
TMouseOptButtonAction = mbaNone..mbaContextMenuDebug;
|
TMouseOptButtonAction = mbaNone..mbaContextMenuTab;
|
||||||
|
|
||||||
const
|
const
|
||||||
MouseOptButtonActionOld: Array [moTCLNone..moTCLJumpOrBlock] of TMouseOptButtonActionOld = (
|
MouseOptButtonActionOld: Array [moTCLNone..moTCLJumpOrBlock] of TMouseOptButtonActionOld = (
|
||||||
@ -917,7 +918,7 @@ type
|
|||||||
property TextAltRightClick: TMouseOptButtonAction read FTextAltRightClick write FTextAltRightClick
|
property TextAltRightClick: TMouseOptButtonAction read FTextAltRightClick write FTextAltRightClick
|
||||||
default mbaNone;
|
default mbaNone;
|
||||||
property TextCtrlRightClick: TMouseOptButtonAction read FTextCtrlRightClick write FTextCtrlRightClick
|
property TextCtrlRightClick: TMouseOptButtonAction read FTextCtrlRightClick write FTextCtrlRightClick
|
||||||
default mbaNone;
|
default mbaContextMenuTab;
|
||||||
property TextShiftAltRightClick: TMouseOptButtonAction read FTextShiftAltRightClick write FTextShiftAltRightClick
|
property TextShiftAltRightClick: TMouseOptButtonAction read FTextShiftAltRightClick write FTextShiftAltRightClick
|
||||||
default mbaNone;
|
default mbaNone;
|
||||||
property TextShiftCtrlRightClick: TMouseOptButtonAction read FTextShiftCtrlRightClick write FTextShiftCtrlRightClick
|
property TextShiftCtrlRightClick: TMouseOptButtonAction read FTextShiftCtrlRightClick write FTextShiftCtrlRightClick
|
||||||
@ -2613,7 +2614,7 @@ begin
|
|||||||
FTextRightClick := mbaContextMenu;
|
FTextRightClick := mbaContextMenu;
|
||||||
FTextAltCtrlRightClick := mbaNone;
|
FTextAltCtrlRightClick := mbaNone;
|
||||||
FTextAltRightClick := mbaNone;
|
FTextAltRightClick := mbaNone;
|
||||||
FTextCtrlRightClick := mbaNone;
|
FTextCtrlRightClick := mbaContextMenuTab;
|
||||||
FTextShiftAltCtrlRightClick := mbaNone;
|
FTextShiftAltCtrlRightClick := mbaNone;
|
||||||
FTextShiftAltRightClick := mbaNone;
|
FTextShiftAltRightClick := mbaNone;
|
||||||
FTextShiftCtrlRightClick := mbaNone;
|
FTextShiftCtrlRightClick := mbaNone;
|
||||||
@ -2752,6 +2753,8 @@ procedure TEditorMouseOptions.ResetTextToDefault;
|
|||||||
AddCommand(emcContextMenu, AMoveCaret, AButton, AClickCount, ADir, AShift, AShiftMask, emcoSelectionCaretMoveNever);
|
AddCommand(emcContextMenu, AMoveCaret, AButton, AClickCount, ADir, AShift, AShiftMask, emcoSelectionCaretMoveNever);
|
||||||
mbaContextMenuDebug:
|
mbaContextMenuDebug:
|
||||||
AddCommand(emcContextMenu, True, AButton, AClickCount, ADir, AShift, AShiftMask, emcoSelectionCaretMoveOutside, 0, 1);
|
AddCommand(emcContextMenu, True, AButton, AClickCount, ADir, AShift, AShiftMask, emcoSelectionCaretMoveOutside, 0, 1);
|
||||||
|
mbaContextMenuTab:
|
||||||
|
AddCommand(emcContextMenu, True, AButton, AClickCount, ADir, AShift, AShiftMask, emcoSelectionCaretMoveOutside, 0, 2);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -3005,7 +3008,7 @@ begin
|
|||||||
FTextCtrlDoubleLeftClick := Src.TextCtrlDoubleLeftClick;
|
FTextCtrlDoubleLeftClick := Src.TextCtrlDoubleLeftClick;
|
||||||
// left + modifier click
|
// left + modifier click
|
||||||
FTextAltLeftClick := Src.TextAltLeftClick;
|
FTextAltLeftClick := Src.TextAltLeftClick;
|
||||||
FTextCtrlLeftClick := Src.TextCtrlLeftClick;
|
FTextCtrlLeftClick := Src.TextCtrlLeftClick;
|
||||||
FTextAltCtrlLeftClick := Src.TextAltCtrlLeftClick;
|
FTextAltCtrlLeftClick := Src.TextAltCtrlLeftClick;
|
||||||
FTextShiftLeftClick := Src.TextShiftLeftClick;
|
FTextShiftLeftClick := Src.TextShiftLeftClick;
|
||||||
FTextShiftAltLeftClick := Src.TextShiftAltLeftClick;
|
FTextShiftAltLeftClick := Src.TextShiftAltLeftClick;
|
||||||
|
@ -573,6 +573,7 @@ procedure TEditorMouseOptionsFrame.Setup(ADialog: TAbstractOptionsEditorDialog);
|
|||||||
ACombo.Items.Add(dlfMouseSimpleButtonZoomReset); // mbaZoomReset
|
ACombo.Items.Add(dlfMouseSimpleButtonZoomReset); // mbaZoomReset
|
||||||
ACombo.Items.Add(dlfMouseSimpleButtonContextMenu); // mbaContextMenu
|
ACombo.Items.Add(dlfMouseSimpleButtonContextMenu); // mbaContextMenu
|
||||||
ACombo.Items.Add(dlfMouseSimpleButtonContextMenuDbg); // mbaContextMenuDebug;
|
ACombo.Items.Add(dlfMouseSimpleButtonContextMenuDbg); // mbaContextMenuDebug;
|
||||||
|
ACombo.Items.Add(dlfMouseSimpleButtonContextMenuTab); // mbaContextMenuTab;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure SetupWheelCombo(ACombo: TComboBox);
|
procedure SetupWheelCombo(ACombo: TComboBox);
|
||||||
|
@ -1415,6 +1415,7 @@ resourcestring
|
|||||||
dlfMouseSimpleButtonZoomReset = 'Reset zoom';
|
dlfMouseSimpleButtonZoomReset = 'Reset zoom';
|
||||||
dlfMouseSimpleButtonContextMenu = 'Context Menu';
|
dlfMouseSimpleButtonContextMenu = 'Context Menu';
|
||||||
dlfMouseSimpleButtonContextMenuDbg = 'Context Menu (debug)';
|
dlfMouseSimpleButtonContextMenuDbg = 'Context Menu (debug)';
|
||||||
|
dlfMouseSimpleButtonContextMenuTab = 'Context Menu (tab)';
|
||||||
|
|
||||||
dlfMouseSimpleWheelNothing = 'Nothing/Default';
|
dlfMouseSimpleWheelNothing = 'Nothing/Default';
|
||||||
dlfMouseSimpleWheelSrollDef = 'Scroll (System speed)';
|
dlfMouseSimpleWheelSrollDef = 'Scroll (System speed)';
|
||||||
|
@ -4556,6 +4556,7 @@ begin
|
|||||||
|
|
||||||
case AnAction.Option2 of
|
case AnAction.Option2 of
|
||||||
1: FMouseActionPopUpMenu := SourceNotebook.DbgPopUpMenu;
|
1: FMouseActionPopUpMenu := SourceNotebook.DbgPopUpMenu;
|
||||||
|
2: FMouseActionPopUpMenu := SourceNotebook.TabPopUpMenu;
|
||||||
else
|
else
|
||||||
FMouseActionPopUpMenu := PopupMenu;
|
FMouseActionPopUpMenu := PopupMenu;
|
||||||
end;
|
end;
|
||||||
@ -5424,13 +5425,14 @@ begin
|
|||||||
SourceTabMenuRoot.BeginUpdate;
|
SourceTabMenuRoot.BeginUpdate;
|
||||||
try
|
try
|
||||||
// Get the tab that was clicked
|
// Get the tab that was clicked
|
||||||
Assert(PopM.PopupComponent is TPageControl, 'PopupComponent is not TPageControl');
|
if PopM.PopupComponent is TPageControl then begin
|
||||||
PageCtrl:=TPageControl(PopM.PopupComponent);
|
PageCtrl:=TPageControl(PopM.PopupComponent);
|
||||||
PageI:=PageCtrl.TabIndexAtClientPos(PageCtrl.ScreenToClient(PopM.PopupPoint));
|
PageI:=PageCtrl.TabIndexAtClientPos(PageCtrl.ScreenToClient(PopM.PopupPoint));
|
||||||
if (PageI>=0) and (PageI<PageCtrl.PageCount) then
|
if (PageI>=0) and (PageI<PageCtrl.PageCount) then
|
||||||
PageIndex:=PageI
|
PageIndex:=PageI // Todo: This should be in MouseDown / or both, whichever is first
|
||||||
else
|
else
|
||||||
DebugLn(['TSourceNotebook.TabPopUpMenuPopup: Popup PageIndex=', PageI]);
|
DebugLn(['TSourceNotebook.TabPopUpMenuPopup: Popup PageIndex=', PageI]);
|
||||||
|
end;
|
||||||
ASrcEdit:=Editors[PageIndex];
|
ASrcEdit:=Editors[PageIndex];
|
||||||
|
|
||||||
{$IFnDEF SingleSrcWindow}
|
{$IFnDEF SingleSrcWindow}
|
||||||
|
Loading…
Reference in New Issue
Block a user